剖析使用物理端口建立的BGP关系(实验部分)
原创
©著作权归作者所有:来自51CTO博客作者pzhnetclass的原创作品,如需转载,请与作者联系,否则将追究法律责任
剖析使用物理端口建立的BGP关系(实验部分)
拓扑图:
hostname R1
no ip domain lookup
interface Loopback0
ip address 1.1.1.1 255.255.255.0
interface Ethernet0/1
ip address 12.1.1.1 255.255.255.0
router bgp 1
no synchronization
bgp router-id 1.1.1.1
bgp log-neighbor-changes
network 1.1.1.0 mask 255.255.255.0
network 12.1.1.0 mask 255.255.255.0
neighbor 12.1.1.2 remote-as 1
no auto-summary
hostname R2
no ip domain lookup
interface Loopback0
ip address 2.2.2.2 255.255.255.0
interface Ethernet0/0
ip address 12.1.1.2 255.255.255.0
interface Ethernet0/1
ip address 23.1.1.1 255.255.255.0
router bgp 1
no synchronization
bgp router-id 2.2.2.2
bgp log-neighbor-changes
network 2.2.2.0 mask 255.255.255.0
network 12.1.1.0 mask 255.255.255.0
network 23.1.1.0 mask 255.255.255.0
neighbor 12.1.1.1 remote-as 1
neighbor 23.1.1.2 remote-as 1
no auto-summary
line con 0
exec-timeout 0 0
logging synchronous
hostname R3
interface Loopback0
ip address 3.3.3.3 255.255.255.0
interface Ethernet0/0
ip address 23.1.1.2 255.255.255.0
interface Ethernet0/1
ip address 34.1.1.1 255.255.255.0
router bgp 1
no synchronization
bgp router-id 3.3.3.3
bgp log-neighbor-changes
network 3.3.3.0 mask 255.255.255.0
network 23.1.1.0 mask 255.255.255.0
neighbor 23.1.1.1 remote-as 1
no auto-summary
line con 0
exec-timeout 0 0
logging synchronous
现在看下路由表
R3# show ip bgp
BGP table version is 5, local router ID is 3.3.3.3
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*>i2.2.2.0/24 23.1.1.1 0 100 0 i
*> 3.3.3.0/24 0.0.0.0 0 32768 i
*>i12.1.1.0/24 23.1.1.1 0 100 0 i
* i23.1.1.0/24 23.1.1.1 0 100 0 i
*> 0.0.0.0 0 32768 i
试验现象:
R3# show ip bgp
BGP table version is 5, local router ID is 3.3.3.3
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*>i2.2.2.0/24 23.1.1.1 0 100 0 i
*> 3.3.3.0/24 0.0.0.0 0 32768 i
*>i12.1.1.0/24 23.1.1.1 0 100 0 i
* i23.1.1.0/24 23.1.1.1 0 100 0 i
*> 0.0.0.0 0 32768 i
这个时间我们看到效果了吧!那是因为R1要和R3建立BGP邻居关系,而BGP中建立的邻居关系是依据TCP来做的,在初始状态下,R3没有到达R1的路由条目,所以我们要启用任何的三层路由协议。只要R3中能有R1 的路由条目就行
上一篇:工程中需要注意的地方
下一篇:商品管理系统
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
干货收藏!Calico的BGP RouteReflector策略实践
了解容器网络组件Calico的BGP Route Reflector模式如何使用。
Calico RR模式 kubernetes Calico BGP 容器 -
为什么bgp建立邻居关系是空闲的 bgp邻居关系分为几种
动态路由协议划分 算法 距离矢量型 RIP ,EIGRP(收敛最快) ,BGP(路径信息) 链路状态型 OSPF ,ISIS 路
为什么bgp建立邻居关系是空闲的 网络 路由表 路由协议 OSPF