BGP邻居的建立:
ebgp : 建立在直连接口上
R1
router bgp 100
no au
no sy
neighbor 12.12.12.2 remote-as 200
R2
router bgp 200
no au
no sy
neighbor 12.12.12.1 remote-as 100
如果ebgp邻居建立在非直连接口上:
R1
router bgp 100
no au
no sy
neighbor 2.2.2.2 remote-as 200
neighbor 2.2.2.2 update-source loopback 0
neighbor 2.2.2.2 ebgp-multihop
R2
router bgp 200
no au
no sy
neighbor 1.1.1.1 remote-as 100
neighbor 1.1.1.1 update-source loopback 0
neighbor 1.1.1.1 ebgp-multihop
igbp: 建立在环回接口上
R1
int loop 1
ip add 1.1.1.1 255.255.255.0
router bgp 100
no su
no sy
neighbor 2.2.2.2 remote-as 100 //2.2.2.2一定ip route (AS内的IGP搞定)
neighbor 2.2.2.2 update-source loopback 1
R2
int loop 2
ip add 2.2.2.2 255.255.255.0
router bgp 100
no au
no sy
neighbor 1.1.1.1 remote-as 100
neighbor 1.1.1.1 update-source loopback 2
show ip bgp summary
show ip bgp neighbor
show ip bgp
show ip route
把路由条目放入BGP ,让BGP传递给它的邻居的方式:
network
redistribute
在AS的边界设备需要对所有的ibgp邻居使用:
next-hop-self
转载于:https://blog.51cto.com/439017543/963283