所以我们新配置的服务器发现了一些交换机配置问题。
在 /etc/sysctl.conf 中,我们有以下内容:
net.ipv4.conf.all.send_redirects = 0 # CIS 4.1.2
net.ipv4.conf.default.send_redirects = 0 # CIS 4.1.2
net.ipv4.conf.all.accept_source_route = 0 # CIS 4.2.1
net.ipv4.conf.default.accept_source_route = 0 # CIS 4.2.1
net.ipv4.conf.all.accept_redirects = 0 # CIS 4.2.2
net.ipv4.conf.default.accept_redirects = 0 # CIS 4.2.2
net.ipv4.conf.all.secure_redirects = 0 # CIS 4.2.3
net.ipv4.conf.default.secure_redirects = 0 # CIS 4.2.3
这很好,因为它关闭了 ICMP 重定向并发现了配置不正确的交换机。
相关的交换机配置如下:
configure
vlan database
vlan 10,99,102
vlan routing 102 1
vlan routing 99 2
vlan routing 10 3
exit
hostname "CloudSwitch3"
stack
member 1 1
member 2 1
exit
ip address 10.10.10.12 255.255.255.0
ip routing
ip route 0.0.0.0 0.0.0.0 10.168.102.2
interface vlan 10
routing
ip address 10.10.102.1 255.255.255.0
exit
interface vlan 99
routing
ip address 10.168.99.1 255.255.255.0
exit
interface vlan 102
routing
ip address 10.168.102.1 255.255.255.0
ip rip
ip rip receive version both
exit
我的路由表显示如下:
Network Address Subnet Mask Protocol Next Hop Interface Next Hop IP Address
0.0.0.0 0.0.0.0 Default vlan102 10.168.102.2
10.10.102.0 255.255.255.0 Local vlan10 10.10.102.1
10.168.99.0 255.255.255.0 Local vlan99 10.168.99.1
10.168.102.0 255.255.255.0 Local vlan102 10.168.102.1
现在的问题是:我的 GW 设置为 10.168.102.1,但来自路由器的 ICMP 重定向继续停留以在下次将其重定向到 10.168.102.2。此配置适用于配置为接受重定向的服务器,但不适用于不接受重定向的服务器。(我们正在经历这些缓慢)
当(本地)VLAN 102 说使用 10.168.101.1 时,为什么 10.168.102.xxx 地址会被告知通过 10.168.101.2 服务器路由?
10.168.101.2 是故障转移交换机。
解决问题的最佳方法是什么?