|

楼主 |
发表于 2009-9-8 09:34:27
|
显示全部楼层
debian:~# cat /etc/network/interfaces
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
#allow-hotplug eth0
auto eth0
iface eth0 inet static
address 192.168.0.124
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
gateway 192.168.0.1
# dns-* options are implemented by the resolvconf package, if installed
# dns-nameservers 218.2.135.1
# eth0:1
auto eth0:1
iface eth0:1 inet static
address 192.168.0.125
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
debian:~# ifconfig
eth0 Link encap:Ethernet HWaddr 00:24:21:58:13:f4
inet addr:192.168.0.124 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::224:21ff:fe58:13f4/64 Scope ink
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:26917 errors:0 dropped:1017590213 overruns:0 frame:0
TX packets:985 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1838728 (1.7 MiB) TX bytes:579984 (566.3 KiB)
Interrupt:221
eth0:1 Link encap:Ethernet HWaddr 00:24:21:58:13:f4
inet addr:192.168.0.125 Bcast:192.168.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:221
lo Link encap ocal 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:3852 errors:0 dropped:0 overruns:0 frame:0
TX packets:3852 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:2151687 (2.0 MiB) TX bytes:2151687 (2.0 MiB)
debian:~# route -N
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
0.0.0.0 192.168.0.1 0.0.0.0 UG 0 0 0 eth0 |
|