ciscomplsvpn自学命令与配置手册7内容摘要:

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 ISIS, su ISIS summary, L1 ISIS level1, L2 ISIS level2 ia ISIS inter area, * candidate default, U peruser static route o ODR, P periodic downloaded static route Gateway of last resort is not set , 1 subs O E2 [110/20] via , 00:00:19, FastEther0/1 , 1 subs O C [110/2] via , 00:00:19, FastEther0/1 , 1 subs is directly connected, Loopback0 13 大量 HPUX AIX cisco 华为学习资料,供大家学习。 O , 1 subs [110/2] via , 00:00:19, FastEther0/0 , 1 subs O E2 [110/20] via , 00:00:19, FastEther0/0 , 2 subs C C is directly connected, FastEther0/1 is directly connected, FastEther0/0 第七步,测试 mpls 交换 ce1ping so re 20 Type escape sequence to abort. Sending 20, 100byte ICMP Echos to , timeout is 2 seconds: Packet sent with a source address of !!!!!!!!!!!!!!!!!!!! Success rate is 100 percent (20/20), roundtrip min/avg/max = 96/137/188 ms 可 以看到源地址 目标地址为 的 20 个包全部通过。 ce1traceroute Protocol [ip]: Target IP address: Source address: Numeric display [n]: Timeout in seconds [3]: Probe count [3]: Minimum Time to Live [1]: Maximum Time to Live [30]: Port Number [33434]: Loose, Strict, Record, Timestamp, Verbose[none]: Type escape sequence to abort. Tracing the route to 1 28 msec 28 msec 28 msec 2 [MPLS: Label 19 Exp 0] 128 msec 136 msec 172 msec 3 [MPLS: Label 19 Exp 0] 124 msec 88 msec 124 msec 4 188 msec * 120 msec 通过 trace 可以看到是基于 mpls 的交换。 交换的步骤在排错里说的很清楚。 通过上面七步,配置完成最基础的 mpls 交换。 下面是 mpls vpn。 大家可能发现下面所做 的结果仍然是从 能 ping 通。 但是大家想一下,下面的配置与上面的配置有 什么区别。 14 大量 HPUX AIX cisco 华为学习资料,供大家学习。 先将上面用于验证的静态路由删除。 ce1(config)no ip route pe1(config)no ip route pe2(config)no ip route ce2(config)no ip route 将 ospf 的路由重分发去除, ,第一种是用来验证传统的交换重分发的后一 种重分发的是 ip router vrf vpna,注意这里的不同。 pe1(config)router ospf 10 pe1(configrouter)no red stat pe1(configrouter)end pe2(config)router ospf 10 pe2(configrouter)no red stat pe2(configrouter)end 第八步启用 vrf rd 用来唯一区别不同的 vpn. pe1(config)ip vrf vpna pe1(configvrf)rd 100:1 pe1(configvrf)routet both 100:1 pe1(configvrf)end pe2(config)ip vrf vpna pe2(configvrf)rd 100:1 pe2(configvrf)routet both 100:1 pe2(configvrf)end 启用 ibgp 主要用来承载大量的私有前缀。 pe1(config)router bgp 100 pe1(configrouter)bgp routerid pe1(configrouter)nei remote 100 pe1(configrouter)nei up lo0 pe1(configrouter)no sy pe1(configrouter)no au pe1(configrouter)exit pe2(config)router bgp 100 pe2(configrouter)bgp routerid pe2(configrouter)nei remote 100 pe2(configrouter)nei up lo0 15 大量 HPUX AIX cisco 华为学习资料,供大家学习。 pe2(configrouter)no sy pe2(configrouter)no auto pe2(configrouter)exit Bgp 配置不清楚,查阅 2020bgp 命令配置手册 BGP 邻居关系起来 pe1(config)do sh ip bgp sum BGP router identifier , local AS number 100 BGP table version is 1, main routing table version 1 Neighbor State/PfxRcd V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down 4 100 2 2 0 0 0 00:00:28 0 第九步 启用 addressfamily vpnv4 的扩展团体属性 pe1(config)router bgp 100 pe1(configrouter)addressfamilyvpnv4 pe1(configrouteraf)nei activate 注意在这里要激活邻居。 pe1(configrouteraf)nei sendmunity ex pe1(configrouteraf)exi pe1(configrouter)exit pe2(config) router bgp 100 pe2(configrouter)add vpnv4 pe2(configrouteraf)nei acti pe2(configrouteraf)nei sendmunity ex pe2(configrouteraf)end 第十步,启用 addressfamily ipv4 vrf vpna pe1(config)router bgp 100 pe1(configrouter)addressfamilyipv4 vrf vpna pe1(configrouteraf)no au pe1(configrouteraf)no sy pe1(configrouteraf)end pe2(config)router bgp 100 pe2(configrouter)add ipv4 vrf vpna pe2(configrouteraf)no au pe2(configrouteraf)no sy pe2(configrouteraf)end 16 大量 HPUX AIX cisco 华为学习资料,供大家学习。 第十一步 ,将 vpn 应用到接口中 ,注意是 pe 与 ce 相连的接口。 pe1(config)int f0/0 pe1(configif)ip vrf forwarding vpna % Interface FastEther0/0 IP address removed due to enabling VRF vpna pe1(configif)ip add pe1(configif)end pe2(config)int f0/1 pe2(configif)ip vrf forwarding vpna % Interface FastEther0/1 IP address removed due to enabling VRF vpna pe2(configif)ip add pe2(configif)end 第十二步,增加 pe 到 ce 的 vrf 路由 ,注意这里与传统路由的区别。 ce1(config)ip route pe1(config)ip route vrf vpna pe2(config)ip route vrf vpna ce2(config)ip route 第十三步 , 将静态路由重分布到 addressfamily ipv4 vrf vpna 中 pe1(config)router bgp 100 pe1(configrouter)add ipv4 vrf vpna pe1(configrouteraf)red stat pe1(configrouteraf)end pe2(config)router bgp 100 pe2(configrouter)add ipv4 vrf vpna pe2(configrouteraf)red stat pe2(configrouteraf)end 第十四步,验证 mpls vpn ce1ping so re 10 注意如果这里不带源地址是不通的,原因为什么。 Type escape sequence to abort. Sending 10, 100byte ICMP Echos to , timeout is 2 seconds: Packet sent with a source address of ..!!!!!!!! Success rate is 80 percent (8/10), roundtrip min/avg/max = 124/160/220 ms ce1ping so re 100 Type escape sequence to abort. 17 大量 HPUX AIX cisco 华为学习资料,供大家学习。 Sending 100, 100byte ICMP Echos to , timeout is 2 seconds: Packet sent with a source address of !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Success rate is 100 percent (100/100), roundtrip min/avg/max = 92/150/252 ms ce1trace Protocol [ip]: Target IP address: Source。
阅读剩余 0%
本站所有文章资讯、展示的图片素材等内容均为注册用户上传(部分报媒/平媒内容转载自网络合作媒体),仅供学习参考。 用户通过本站上传、发布的任何内容的知识产权归属用户或原始著作权人所有。如有侵犯您的版权,请联系我们反馈本站将在三个工作日内改正。