linux中的静态路由会自动删除

时间:2017-04-20 05:18:14

标签: linux routing mininet openvswitch

我在Ubuntu LTS 14.04.2上使用mininet在我的计算机上设置了一个网络。我有一个OVS交换机,启用了ip转发,用于inter-vlan路由,我在这个交换机上安装了一些策略和路由。安装在除main之外的其他表中的路由会自动被删除。

这些是我安装的政策。

0:  from all to 10.0.4.251 lookup local 
0:  from all to 10.0.4.252 lookup local 
0:  from all to 10.0.4.253 lookup local 
0:  from all to 10.0.4.254 lookup local 
0:  from all to 10.0.3.251 lookup local 
0:  from all to 10.0.3.252 lookup local 
0:  from all to 10.0.3.253 lookup local 
0:  from all to 10.0.3.254 lookup local 
0:  from all to 10.0.2.251 lookup local 
0:  from all to 10.0.2.252 lookup local 
0:  from all to 10.0.2.253 lookup local 
0:  from all to 10.0.2.254 lookup local 
0:  from all to 10.0.1.251 lookup local 
0:  from all to 10.0.1.252 lookup local 
0:  from all to 10.0.1.253 lookup local 
0:  from all to 10.0.1.254 lookup local 
1:  from 10.0.1.0/24 iif vlan11 lookup 2 
1:  from 10.0.2.0/24 iif vlan12 lookup 2 
1:  from 10.0.3.0/24 iif vlan13 lookup 2 
1:  from 10.0.4.0/24 iif vlan14 lookup 2 
1:  from 10.0.1.0/24 iif vlan21 lookup 3 
1:  from 10.0.2.0/24 iif vlan22 lookup 3 
1:  from 10.0.3.0/24 iif vlan23 lookup 3 
1:  from 10.0.4.0/24 iif vlan24 lookup 3 
1:  from 10.0.1.0/24 iif vlan31 lookup 4 
1:  from 10.0.2.0/24 iif vlan32 lookup 4 
1:  from 10.0.3.0/24 iif vlan33 lookup 4 
1:  from 10.0.4.0/24 iif vlan34 lookup 4 
1:  from 10.0.1.0/24 iif vlan41 lookup 5 
1:  from 10.0.2.0/24 iif vlan42 lookup 5 
1:  from 10.0.3.0/24 iif vlan43 lookup 5 
1:  from 10.0.4.0/24 iif vlan44 lookup 5 
32765:  from all lookup local 
32766:  from all lookup main 
32767:  from all lookup default

这些是我的主表中安装的用于VLAN间路由的路由

10.0.1.0/24 dev vlan11  proto kernel  scope link  src 10.0.1.251 
10.0.1.0/24 dev vlan21  proto kernel  scope link  src 10.0.1.252 
10.0.1.0/24 dev vlan31  proto kernel  scope link  src 10.0.1.253 
10.0.1.0/24 dev vlan41  proto kernel  scope link  src 10.0.1.254 
10.0.2.0/24 dev vlan12  proto kernel  scope link  src 10.0.2.251 
10.0.2.0/24 dev vlan22  proto kernel  scope link  src 10.0.2.252 
10.0.2.0/24 dev vlan32  proto kernel  scope link  src 10.0.2.253 
10.0.2.0/24 dev vlan42  proto kernel  scope link  src 10.0.2.254 
10.0.3.0/24 dev vlan13  proto kernel  scope link  src 10.0.3.251 
10.0.3.0/24 dev vlan23  proto kernel  scope link  src 10.0.3.252 
10.0.3.0/24 dev vlan33  proto kernel  scope link  src 10.0.3.253 
10.0.3.0/24 dev vlan43  proto kernel  scope link  src 10.0.3.254 
10.0.4.0/24 dev vlan14  proto kernel  scope link  src 10.0.4.251 
10.0.4.0/24 dev vlan24  proto kernel  scope link  src 10.0.4.252 
10.0.4.0/24 dev vlan34  proto kernel  scope link  src 10.0.4.253 
10.0.4.0/24 dev vlan44  proto kernel  scope link  src 10.0.4.254

分别是表2,3,4,5的路线

10.0.0.0/16 dev s1-eth1  table 2  proto static  scope link 
10.0.0.0/16 dev s2-eth1  table 3  proto static  scope link 
10.0.0.0/16 dev s3-eth1  table 4  proto static  scope link 
10.0.0.0/16 dev s4-eth1  table 5  proto static  scope link

问题是表2,3,4,5中的这些路由会在设置的几分钟内自动删除。主要工作路线很好。

链接到我的问题

请在那里回答,如果你不能在这里。

0 个答案:

没有答案