我有 4 个节点,每个节点有 4 个端口。我想像环一样连接它们而无需开关。我的拓扑如下所示:
eth2 和 eth3 已关闭。
我的问题是,
如果我在 node2,我可以 ping node1,但我无法 ping node3;
如果我在node3,我可以ping node4,但我不能ping node2;
如果我在 node4 中,我可以 ping node3,但我无法 ping node1;
如果我在 node1,我可以 ping node2,但我无法 ping node4;
这是我的配置: 系统:CentOS 6.5 完整安装
我使用 /etc/sysconfig/network-scripts/ifcfg-eth0 为端口 0 设置静态 IP 等等。
`DEVICE=eth0
TYPE=Ethernet
UUID=xxxxxxxxxxxxxxx
ONBOOT=yes
NM_CONTROLLED=no
BOOTPROTO=none
IPADDR=10.0.0.101
NETMASK=255.255.255.0
IPV6INIT=no
USERCTL=no
HWADDR=xxxxxxxxxxxx
IPV4_FAILURE_FATAL=yes
NAME="System eth0"`
The IP for node 1 is 10.0.0.101, 10.0.0.102, 10.0.0.103, 10.0.0.104
for node 2 is 10.0.0.105, 10.0.0.106, 10.0.0.107, 10.0.0.108
for node 3 is 10.0.0.109, 10.0.0.110, 10.0.0.111, 10.0.0.112
for node 4 is 10.0.0.113, 10.0.0.114, 10.0.0.115, 10.0.0.116
我的路由表是这样的:
10.0.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth2
10.0.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth3
169.254.0.0 0.0.0.0 255.255.0.0 U 1004 0 0 eth2
169.254.0.0 0.0.0.0 255.255.0.0 U 1005 0 0 eth3
还有我的 /etc/sysctl.conf
net.ipv4.ip_forward = 1
net.ipv4.conf.default.rp_filter = 2
net.ipv4.conf.all.rp_filter = 2
net.ipv4.conf.default.accept_source_route = 2
net.ipv4.conf.all.accept_source_route = 2
ping 的错误信息是“Destination host unreachable”,