Existem várias interfaces na minha caixa Ubuntu - Ubuntu 12.04.1 LTS - e a cada uma delas é atribuído um IP da mesma sub-rede.
# ifconfig
eth0 Link encap:Ethernet HWaddr 00:50:56:9f:0a:0c
inet addr:10.28.49.89 Bcast:10.28.49.255 Mask:255.255.255.0
inet6 addr: fe80::250:56ff:fe9f:a0c/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:54350 errors:0 dropped:0 overruns:0 frame:0
TX packets:11811 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:67368828 (67.3 MB) TX bytes:1210132 (1.2 MB)
eth1 Link encap:Ethernet HWaddr 00:50:56:9f:82:ae
inet addr:10.28.49.97 Bcast:10.28.49.255 Mask:255.255.255.0
inet6 addr: fe80::250:56ff:fe9f:82ae/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:6657 errors:0 dropped:0 overruns:0 frame:0
TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2967245 (2.9 MB) TX bytes:468 (468.0 B)
eth2 Link encap:Ethernet HWaddr 00:50:56:9f:52:9b
inet addr:10.28.49.98 Bcast:10.28.49.255 Mask:255.255.255.0
inet6 addr: fe80::250:56ff:fe9f:529b/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:6644 errors:0 dropped:0 overruns:0 frame:0
TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2963870 (2.9 MB) TX bytes:468 (468.0 B)
eth3 Link encap:Ethernet HWaddr 00:50:56:9f:2c:a9
inet addr:10.28.49.100 Bcast:10.28.49.255 Mask:255.255.255.0
inet6 addr: fe80::250:56ff:fe9f:2ca9/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:6626 errors:0 dropped:0 overruns:0 frame:0
TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2954844 (2.9 MB) TX bytes:936 (936.0 B)
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:5487 errors:0 dropped:0 overruns:0 frame:0
TX packets:5487 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:510360 (510.3 KB) TX bytes:510360 (510.3 KB)
Somente as interfaces eth0 e eth3 são executáveis na rede.
Abaixo, o conteúdo do arquivo / etc / network / 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
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet static
address 10.28.49.89
netmask 255.255.255.0
network 10.28.49.0
broadcast 10.28.49.255
gateway 10.28.49.1
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 72.163.128.140
dns-search abc.com
auto eth1
iface eth1 inet static
address 10.28.49.97
netmask 255.255.255.0
network 10.28.49.0
broadcast 10.28.49.255
auto eth2
iface eth2 inet static
address 10.28.49.98
netmask 255.255.255.0
network 10.28.49.0
broadcast 10.28.49.255
auto eth3
iface eth3 inet static
address 10.28.49.100
netmask 255.255.255.0
network 10.28.49.0
broadcast 10.28.49.255
Rota:
# ip route show
default via 10.28.49.1 dev eth0 metric 100
10.28.49.0/24 dev eth0 proto kernel scope link src 10.28.49.89
10.28.49.0/24 dev eth1 proto kernel scope link src 10.28.49.97
10.28.49.0/24 dev eth2 proto kernel scope link src 10.28.49.98
10.28.49.0/24 dev eth3 proto kernel scope link src 10.28.49.100
Além disso:
# ping -I eth0 10.28.49.97
PING 10.28.49.97 (10.28.49.97) from 10.28.49.89 eth0: 56(84) bytes of data.
^C
--- 10.28.49.97 ping statistics ---
2 packets transmitted, 0 received, 100% packet loss, time 1007ms
# ping -I eth0 10.28.49.98
PING 10.28.49.98 (10.28.49.98) from 10.28.49.89 eth0: 56(84) bytes of data.
^C
--- 10.28.49.98 ping statistics ---
2 packets transmitted, 0 received, 100% packet loss, time 1007ms
Minhas perguntas são:
Obrigado!
Tags networking ubuntu-12.04