分类:
2012-12-26 16:10:04
注意及时用“clear ip bgp *”
R1(config)#router eigrp 1
R1()#no au
R1(config-router)#net 12.12.12.0 255.255.255.0
R1(config-router)#net 1.1.1.0 255.255.255.0
R1(config-router)#exi
R1(config)#router bgp 100
R1(config-router)#no synchronization
R1(config-router)#no au
R1(config-router)#bgp router-id 1.1.1.1
R1(config-router)#neigh 2.2.2.2 remote-as 100
R1(config-router)#nei 2.2.2.2 update-source loo 0
R1(config-router)#nei 2.2.2.2 next-hop-self
R1(config-router)#nei 3.3.3.3 remote-as 100
R1(config-router)#nei 3.3.3.3 update-source loo 0
R1(config-router)#nei 3.3.3.3 next-hop-self
R1(config-router)#nei 14.14.14.4 remote-as 200
///////////////////////////////
R2(config)#router eigrp 1
R2(config-router)#no au
R2(config-router)#net 2.2.2.0 255.255.255.0
R2(config-router)#net 12.12.12.0 255.255.255.0
R2(config-router)#net 23.23.23.0 255.255.255.0
R2(config)#router bgp 100
R2(config-router)#no sy
R2(config-router)#no au
R2(config-router)#bgp router-id 2.2.2.2
R2(config-router)#nei 1.1.1.1 remote-as 100
R2(config-router)#nei 3.3.3.3 remote-as 100
R2(config-router)#nei 1.1.1.1 update-source loo 0
R2(config-router)#nei 3.3.3.3 update-source loo 0
////////////////////////////////
R3(config)#router eigrp 1
R3(config-router)#no au
R3(config-router)#net 3.3.3.0 255.255.255.0
R3(config-router)#net 23.23.23.0 255.255.255.0
R3(config)#router bgp 100
R3(config-router)#no sy
R3(config-router)#no au
R3(config-router)#bgp router-id 3.3.3.3
R3(config-router)#nei 1.1.1.1 remote-as 100
R3(config-router)#nei 1.1.1.1 update-source loo 0
R3(config-router)#nei 1.1.1.1 next-hop-self
R3(config-router)#nei 2.2.2.2 remote 100
R3(config-router)#nei 2.2.2.2 upda loo 0
R3(config-router)#nei 2.2.2.2 next-hop-self
R3(config-router)#nei 34.34.34.4 remote-as 200
////////////////////////////////
R4(config)#ip prefix-list 1 permit 4.4.4.0/24
R4(config)#route-map egp permit 10
R4(config-route-map)#match ip address prefix-list 1
R4(config-route-map)#set origin egp 900---------------这里的“900”表示什么意思?
R4(config)#router bgp 200
R4(config-router)#no synchronization
R4(config-router)#no au
R4(config-router)#bgp router-id 4.4.4.4
R4(config-router)#nei 14.14.14.1 remote-as 100
R4(config-router)#net 4.4.4.0 mask 255.255.255.0
R4(config-router)#nei 14.14.14.1 route-map egp out-----在出方向为去邻居14.14.14.1的路由设置策略,不是接口下设置吗?
R4(config-router)#nei 34.34.34.3 remote-as 100
结果:
R1#sh ip bgp
BGP table version is 3, local router ID is 1.1.1.1
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
*>i4.4.4.0/24 3.3.3.3 0 100 0 200 i
* 14.14.14.4 0 0 200 e
R1#
R2#sh ip bgp
BGP table version is 3, local router ID is 2.2.2.2
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
*>i4.4.4.0/24 3.3.3.3 0 100 0 200 i
R2#
R3#sh ip bgp
BGP table version is 2, 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