CCNP精粹系列之二十六--BGP不同自治系统间通信,推荐

简介:


                                 bgp不同自治系统间实现路由

                                                   
本篇博文将介绍在 bgp 不同自治系统间实现路由的相互学习,这样就不会像上篇博文那样通过建立物理直连,形成邻居关系才能学到路由。
R1:
 
Router#config t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#host R1
R1(config)#int lo0
R1(config-if)#ip addr 192.168.10.1 255.255.255.0
R1(config-if)#no shut
R1(config-if)#int s1/0
R1(config-if)#ip addr 202.110.100.1 255.255.255.0
R1(config-if)#encap hdlc
R1(config-if)#clock rate 56000
R1(config-if)#no shut
R1(config)#router bgp 64500
R1(config-router)#neighbor 202.110.100.2 remote-as 64500
R1(config-router)#net 192.168.10.0
R1(config-router)#net 202.110.100.0
R1(config-router)#
 
R2
 
R2(config)#int s1/0
R2(config-if)#ip addr 202.110.100.2 255.255.255.0
R2(config-if)#encap hdlc
R2(config-if)#no shut
R2(config-if)#exit
 
R2(config)#int s1/1
R2(config-if)#ip addr 202.110.101.1 255.255.255.0
R2(config-if)#encap hdlc
R2(config-if)#clock rate 56000
R2(config-if)#no shut
R2(config)#router bgp 64500
R2(config-router)#neighbor 202.110.100.1 remote-as 64500
R2(config-router)#neighbor 202.110.101.2 remote-as 64501   (易错)
R2(config-router)#net 202.110.100.0
R2(config-router)#net 202.110.101.0
R2(config-router)#
 
R3:
 
Router(config)#host R3
R3(config)#int s1/1
R3(config-if)#ip addr 202.110.101.2 255.255.255.0
R3(config-if)#encap hdlc
R3(config-if)#no shut
R3(config-if)#exit
 
R3(config)#router bgp 64501
R3(config-router)#neighbor 202.110.101.1 remote-as 64500
R3(config-router)#net 202.110.101.0
 
R3 上测试:
 
R3#show ip ro
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
 
B    202.110.100.0/24 [20/0] via 202.110.101.1, 00:00:37
C    202.110.101.0/24 is directly connected, Serial1/1
B    192.168.10.0/24 [20/0] via 202.110.101.1, 00:00:37
R3#
这个试验的完成,我们可以总结出 bgp 水平分隔的生效范围:
即在 IBGP (内部网关协议)间生效。


     本文转自shenleigang 51CTO博客,原文链接:http://blog.51cto.com/shenleigang/152615 ,如需转载请自行联系原作者


相关文章
|
12月前
|
网络协议 算法 网络架构
动态路由四大天王:OSPF、RIP、IS-IS、BGP,收藏这篇文章足矣!
动态路由四大天王:OSPF、RIP、IS-IS、BGP,收藏这篇文章足矣!
158 0
|
网络架构 算法 网络协议
|
Shell 网络虚拟化 网络架构