Debian : ipaddress alias

deb1:~# uname -a
Linux deb1 2.6.18-6-686 #1 SMP Sun Feb 10 22:11:31 UTC 2008 i686 GNU/Linux

deb1:~# cd /etc/network
deb1:/etc/network# vi interfaces

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo eth1 eth1:0
iface lo inet loopback

# The primary network interface
allow-hotplug eth0
iface eth0 inet dhcp

allow-hotplug eth1
iface eth1 inet static
    address 192.168.250.100
    netmask    255.255.255.0

iface eth1:0 inet static
   address 192.168.250.101
   netmask    255.255.255.0

deb1:/etc/network# /etc/init.d/networking restart
Reconfiguring network interfaces…done.
deb1:/etc/network# ifconfig

eth1      Link encap:Ethernet  HWaddr 00:03:FF:10:5E:3C
          inet addr:192.168.250.100  Bcast:192.168.250.255  Mask:255.255.255.0
          inet6 addr: fe80::203:ffff:fe10:5e3c/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1314 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1272 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:140883 (137.5 KiB)  TX bytes:181638 (177.3 KiB)
          Interrupt:11 Base address:0xec00

eth1:0    Link encap:Ethernet  HWaddr 00:03:FF:10:5E:3C
          inet addr:192.168.250.101  Bcast:192.168.250.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          Interrupt:11 Base address:0xec00

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:568 errors:0 dropped:0 overruns:0 frame:0
          TX packets:568 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:175573 (171.4 KiB)  TX bytes:175573 (171.4 KiB)

deb1:/etc/network# vi interfaces

auto lo eth0 eth1 eth1:0

deb1:/etc/network# /etc/init.d/networking restart

Reconfiguring network interfaces…There is already a pid file /var/run/dhclient.eth0.pid with pid 3462
killed old client process, removed PID file
Internet Systems Consortium DHCP Client V3.0.4
Copyright 2004-2006 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/

Listening on LPF/eth0/00:03:ff:fe:ff:ff
Sending on   LPF/eth0/00:03:ff:fe:ff:ff
Sending on   Socket/fallback
DHCPRELEASE on eth0 to 192.168.131.254 port 67
Internet Systems Consortium DHCP Client V3.0.4
Copyright 2004-2006 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/

Listening on LPF/eth0/00:03:ff:fe:ff:ff
Sending on   LPF/eth0/00:03:ff:fe:ff:ff
Sending on   Socket/fallback
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 6
DHCPOFFER from 192.168.131.254
DHCPREQUEST on eth0 to 255.255.255.255 port 67
DHCPACK from 192.168.131.254
bound to 192.168.131.65 — renewal in 512689424 seconds.
done.

deb1:/etc/network# ifconfig

eth0      Link encap:Ethernet  HWaddr 00:03:FF:FE:FF:FF
          inet addr:192.168.131.65  Bcast:192.168.131.255  Mask:255.255.255.0
          inet6 addr: fe80::203:ffff:fefe:ffff/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:258 errors:0 dropped:0 overruns:0 frame:0
          TX packets:283 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:25678 (25.0 KiB)  TX bytes:28790 (28.1 KiB)
          Interrupt:11 Base address:0xe880

eth1      Link encap:Ethernet  HWaddr 00:03:FF:10:5E:3C
          inet addr:192.168.250.100  Bcast:192.168.250.255  Mask:255.255.255.0
          inet6 addr: fe80::203:ffff:fe10:5e3c/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1539 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1500 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:165333 (161.4 KiB)  TX bytes:218762 (213.6 KiB)
          Interrupt:11 Base address:0xec00

eth1:0    Link encap:Ethernet  HWaddr 00:03:FF:10:5E:3C
          inet addr:192.168.250.101  Bcast:192.168.250.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          Interrupt:11 Base address:0xec00

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:586 errors:0 dropped:0 overruns:0 frame:0
          TX packets:586 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:181045 (176.8 KiB)  TX bytes:181045 (176.8 KiB)

カテゴリー: 未分類 パーマリンク

コメントを残す

以下に詳細を記入するか、アイコンをクリックしてログインしてください。

WordPress.com ロゴ

WordPress.com アカウントを使ってコメントしています。 ログアウト / 変更 )

Twitter 画像

Twitter アカウントを使ってコメントしています。 ログアウト / 変更 )

Facebook の写真

Facebook アカウントを使ってコメントしています。 ログアウト / 変更 )

Google+ フォト

Google+ アカウントを使ってコメントしています。 ログアウト / 変更 )

%s と連携中