Nhiều giao diện trên Ubuntu


0

Có nhiều giao diện trên hộp Ubuntu của tôi - Ubuntu 12.04.1 LTS - và mỗi giao diện được gán một IP từ cùng một mạng con.

# 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)

Chỉ giao diện eth0 và eth3 là có thể ping trên mạng.

Đưa ra dưới đây là nội dung của tệp / etc / network / giao diện:

# 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

Tuyến đường:

# 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

Thêm nữa:

# 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

Câu hỏi của tôi là:

  1. Tại sao các giao diện eth1 và eth2 không thể ping được trên mạng?
  2. Tại sao các giao diện không thể truy cập từ (các) giao diện khác như được mô tả ở trên?

Cảm ơn!


bạn có thể thử ping cổng từ eth1 và eth2 không? ping -I eth1 10.28.49.1
chaput

@chaput: Cổng không thể truy cập được từ cả hai giao diện.
Maddy

Bạn có vlan trên cổng chuyển đổi của bạn? bạn có thể thử trao đổi cáp eth3 với eth2 để xem nó có phải là cấu hình cổng không?
chaput
Khi sử dụng trang web của chúng tôi, bạn xác nhận rằng bạn đã đọc và hiểu Chính sách cookieChính sách bảo mật của chúng tôi.
Licensed under cc by-sa 3.0 with attribution required.