网络管理器导致重复路由

网络管理器导致重复路由

我正在使用 nmtui 在单个接口上创建具有多个 IP 地址的网络。问题是它会为每个 IP 地址创建单独的重复路由。这是在 AlmaLinux 8.7 上

ip route 显示这个...

default via 120.120.120.97 dev eno1 proto static metric 100 
10.1.1.0/24 via 10.1.2.1 dev eno2 proto static metric 101 
10.1.2.0/24 dev eno2 proto kernel scope link src 10.1.2.36 metric 101 
120.120.120.96/27 dev eno1 proto kernel scope link src 120.120.120.123 metric 100 
120.120.120.96/27 dev eno1 proto kernel scope link src 120.120.120.117 metric 100 
120.120.120.96/27 dev eno1 proto kernel scope link src 120.120.120.115 metric 100 
120.120.120.96/27 dev eno1 proto kernel scope link src 120.120.120.116 metric 100 
120.120.120.96/27 dev eno1 proto kernel scope link src 120.120.120.118 metric 100 
120.120.120.96/27 dev eno1 proto kernel scope link src 120.120.120.119 metric 100 
120.120.120.96/27 dev eno1 proto kernel scope link src 120.120.120.120 metric 100 
120.120.120.96/27 dev eno1 proto kernel scope link src 120.120.120.121 metric 100 
120.120.120.96/27 dev eno1 proto kernel scope link src 120.120.120.122 metric 100 
120.120.120.96/27 dev eno1 proto kernel scope link src 120.120.120.111 metric 100 
120.120.120.96/27 dev eno1 proto kernel scope link src 120.120.120.112 metric 100 
120.120.120.96/27 dev eno1 proto kernel scope link src 120.120.120.113 metric 100 
120.120.120.96/27 dev eno1 proto kernel scope link src 120.120.120.114 metric 100 

这听起来很有道理,但当我跑步时,就看到了这个问题,这令我感到困扰。

 > route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         _gateway        0.0.0.0         UG    100    0        0 eno1
10.1.1.0        apolloback.delt 255.255.255.0   UG    101    0        0 eno2
10.1.2.0        0.0.0.0         255.255.255.0   U     101    0        0 eno2
120.120.120.96    0.0.0.0         255.255.255.224 U     100    0        0 eno1
120.120.120.96    0.0.0.0         255.255.255.224 U     100    0        0 eno1
120.120.120.96    0.0.0.0         255.255.255.224 U     100    0        0 eno1
120.120.120.96    0.0.0.0         255.255.255.224 U     100    0        0 eno1
120.120.120.96    0.0.0.0         255.255.255.224 U     100    0        0 eno1
120.120.120.96    0.0.0.0         255.255.255.224 U     100    0        0 eno1
120.120.120.96    0.0.0.0         255.255.255.224 U     100    0        0 eno1
120.120.120.96    0.0.0.0         255.255.255.224 U     100    0        0 eno1
120.120.120.96    0.0.0.0         255.255.255.224 U     100    0        0 eno1
120.120.120.96    0.0.0.0         255.255.255.224 U     100    0        0 eno1
120.120.120.96    0.0.0.0         255.255.255.224 U     100    0        0 eno1
120.120.120.96    0.0.0.0         255.255.255.224 U     100    0        0 eno1
120.120.120.96    0.0.0.0         255.255.255.224 U     100    0        0 eno1

一切似乎都运行正常,但我从未见过所有这些相同的路线。我应该担心吗?我该如何修复它?或者我应该修复吗?

答案1

您不必担心,它与ip route显示的路由表条目相同,只是不显示源地址。

route不是最新的工具,因此请使用它ip route来了解全部真相 :-)

相关内容