为什么我不能完成从一个虚拟服务器到另一个虚拟服务器的跟踪路由?

问题描述 投票:0回答:1

我有一个具有2个网络的虚拟设置

  • 172.16.0.0/16
  • 192.0.2.0/24

我正在尝试从192.0.2.0/24中的服务器(192.0.2.10)到172.16.0.0/16中的另一服务器(172.16.192.1)运行traceroute。

在两个网络之间是运行VYOS的虚拟路由器,已使用RIP宣告了网络:

vagrant@router:~$ show ip route
Codes: K - kernel route, C - connected, S - static, R - RIP, O - OSPF,
       I - ISIS, B - BGP, > - selected route, * - FIB route

S>* 0.0.0.0/0 [210/0] via 10.0.2.2, eth0
C>* 10.0.2.0/24 is directly connected, eth0
C>* 127.0.0.0/8 is directly connected, lo
C>* 172.16.0.0/16 is directly connected, eth2
C>* 192.0.2.0/24 is directly connected, eth1

使用这些命令:

set protocols rip network 192.0.2.0/24
set protocols rip network 172.16.0.0/16
set protocols rip redistribute connected

我可以从此路由器ping通这两个服务器,并完成一条跟踪路由:

vagrant@router:~$ traceroute ipv4 172.16.192.1
traceroute to 172.16.192.1 (172.16.192.1), 30 hops max, 60 byte packets
 1  172.16.192.1 (172.16.192.1)  0.194 ms  0.146 ms  0.129 ms

vagrant@router:~$ traceroute ipv4 192.0.2.10
traceroute to 192.0.2.10 (192.0.2.10), 30 hops max, 60 byte packets
 1  192.0.2.10 (192.0.2.10)  0.158 ms  0.119 ms  0.162 ms

但是,当我尝试从服务器(192.0.2.10)到另一台服务器的traceroute时,得到:

[vagrant@web~]$ route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
10.0.2.0        0.0.0.0         255.255.255.0   U     100    0        0 eth0
172.16.0.0      192.0.2.254     255.255.0.0     UG    0      0        0 eth1
192.0.2.0       0.0.0.0         255.255.255.0   U     101    0        0 eth1
[vagrant@web~]$ traceroute 172.16.192.1
traceroute to 172.16.192.1 (172.16.192.1), 30 hops max, 60 byte packets
 1  192.0.2.254 (192.0.2.254)  0.202 ms  0.158 ms  0.126 ms
 2  * * *
 3  * * *
 4  * * *
 5  * * *
 6  * * *
 7  *^C

192.0.2.254是此服务器连接到的路由器上的接口。我不知道为什么这不起作用。任何帮助将不胜感激。

linux networking routing vagrant virtualbox
1个回答
0
投票
© www.soinside.com 2019 - 2024. All rights reserved.