我在做一个实验室,这很简单。就像我需要确认一些命令,但我真的很生气。
这是我的实验室。我配置了一个vrf和一个回环接口,并在vrf下应用它。环已从全局表中消失,并插入到vrf表中。因此,我添加了一个静态路由,以便能够从全局表中平移接口。现在,我可以看到全局表中插入的环回接口是静态的,但是我不能点击。
我觉得这里缺少一些愚蠢的东西,因为一切看起来都很好,而且应该能工作。我的路由器配置的输出如下:
ip vrf HQ
rd 30:50
!
!
!
!
!
!
!
interface Loopback1
ip vrf forwarding HQ
ip address 1.1.1.1 255.255.255.255
!
ip classless
ip route 1.1.1.1 255.255.255.255 Loopback1
no ip http server
no ip http secure-server
!
!
!
!
R2#sh ip ro
R2#sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
1.0.0.0/32 is subnetted, 1 subnets
S 1.1.1.1 is directly connected, Loopback1
R2#sh ip ro
R2#sh ip route vrf HQ
Routing Table: HQ
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
1.0.0.0/32 is subnetted, 1 subnets
C 1.1.1.1 is directly connected, Loopback1
R2#
注意:我可以跟踪接口的ip。
发布于 2017-10-02 12:00:58
您需要的是从VRF到全局路由表的路由泄漏(您已经做到了),以及从全局路由表到VRF的路由泄漏。
我假设您的网络图非常简单,如下所示
在R2上,您已经拥有了ip route 1.1.1.1 255.255.255.255 Loopback1
。
现在需要另一个静态VRF路由将路由10.0.0.0/24泄漏到VRF总部:
ip route vrf HQ 10.0.0.0 255.255.255.0 10.0.0.1 global
在R2上的验证:
R2#show run | i route
ip route 1.1.1.1 255.255.255.255 Loopback1
ip route vrf HQ 10.0.0.0 255.255.255.0 10.0.0.1 global
R2#show ip route | beg Gateway
Gateway of last resort is not set
1.0.0.0/32 is subnetted, 1 subnets
S 1.1.1.1 is directly connected, Loopback1
10.0.0.0/24 is subnetted, 1 subnets
C 10.0.0.0 is directly connected, FastEthernet0/0
R2#show ip route vrf HQ | beg Gateway
Gateway of last resort is not set
1.0.0.0/32 is subnetted, 1 subnets
C 1.1.1.1 is directly connected, Loopback1
10.0.0.0/24 is subnetted, 1 subnets
S 10.0.0.0 [1/0] via 10.0.0.1
R2#ping 1.1.1.1 source 10.0.0.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:
Packet sent with a source address of 10.0.0.2
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 68/70/72 ms
在R1上的验证:
R1#show run | i route
ip route 1.1.1.1 255.255.255.255 10.0.0.2
R1#ping 1.1.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 20/36/64 ms
我希望这是有帮助的,并回答你的问题。
发布于 2017-09-30 18:27:53
您不需要静态路由,只需在vrf中按以下方式进行ping:
ping vrf vrfname ip
https://networkengineering.stackexchange.com/questions/44610
复制相似问题