我有 2 个主机,通过交换机连接。交换机上没有配置 vlan。
在主机 A 上:
5: enp5s0f1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether 0c:c4:7a:58:ef:95 brd ff:ff:ff:ff:ff:ff
inet 192.168.10.11/24 brd 192.168.10.255 scope global enp5s0f1
valid_lft forever preferred_lft forever
inet 192.168.10.10/24 scope global secondary enp5s0f1
valid_lft forever preferred_lft forever
inet6 fe80::ec4:7aff:fe58:ef95/64 scope link
valid_lft forever preferred_lft forever
[root@ceph-node1 ~]# ip addr show enp5s0f1.1001
24: enp5s0f1.1001@enp5s0f1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether 0c:c4:7a:58:ef:95 brd ff:ff:ff:ff:ff:ff
inet 172.16.0.1/24 scope global enp5s0f1.1001
valid_lft forever preferred_lft forever
inet6 fe80::ec4:7aff:fe58:ef95/64 scope link
valid_lft forever preferred_lft forever
在主机 B 上:
5: enp5s0f1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether 0c:c4:7a:59:a9:5b brd ff:ff:ff:ff:ff:ff
inet 192.168.10.12/24 brd 192.168.10.255 scope global enp5s0f1
valid_lft forever preferred_lft forever
inet6 fe80::ec4:7aff:fe59:a95b/64 scope link
valid_lft forever preferred_lft forever
[root@ceph-node2 ~]# ip addr show enp5s0f1.1001
8: enp5s0f1.1001@enp5s0f1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether 0c:c4:7a:59:a9:5b brd ff:ff:ff:ff:ff:ff
inet 172.16.0.2/24 scope global enp5s0f1.1001
valid_lft forever preferred_lft forever
inet6 fe80::ec4:7aff:fe59:a95b/64 scope link
valid_lft forever preferred_lft forever
主机 A 在非 VLAN 接口上 ping 主机 B:
[root@ceph-node1 ~]# ping 192.168.10.12
PING 192.168.10.12 (192.168.10.12) 56(84) bytes of data.
64 bytes from 192.168.10.12: icmp_seq=1 ttl=64 time=0.169 ms
64 bytes from 192.168.10.12: icmp_seq=2 ttl=64 time=0.241 m
s
但是当 A 在 VLAN 接口上 ping 主机 B 时
[root@ceph-node1 ~]# ping 172.16.0.2
PING 172.16.0.2 (172.16.0.2) 56(84) bytes of data.
From 172.16.0.1 icmp_seq=1 Destination Host Unreachable
From 172.16.0.1 icmp_seq=2 Destination Host Unreachable
操作系统是Centos7
请给我提示来解决这个问题
真挚地