BGP高级.docx
文本预览下载声明
BGP策略通告
R1配置
R1(config)#int lo0
R1(config-if)#ip add 1.1.1.1 255.255.255.0
R1(config-if)#int lo1
R1(config-if)#ip add 11.11.11.1 255.255.255.0
R1(config-if)#do sh ip route
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
1.0.0.0/24 is subnetted, 1 subnets
C 1.1.1.0 is directly connected, Loopback0
11.0.0.0/24 is subnetted, 1 subnets
C 11.11.11.0 is directly connected, Loopback1
R1(config-if)#int f0/0
R1(config-if)#no sh
R1(config-if)#ip add 202.101.12.1 255.255.255.0
R1(config-if)#router bgp 100
R1(config-router)#bgp router-id 1.1.1.1
R1(config-router)#net 1.1.1.0 mask 255.255.255.0
R1(config-router)#net 11.11.11.0 mask 255.255.255.0
R1(config-router)#nei 202.101.12.2 remote-as 200
R1(config-router)#nei 202.101.12.2 advertise-map 11 non-exist-map 1
R1(config)#ip prefix-list 1 seq 5 permit 1.1.1.0/24
R1(config)#ip prefix-list 11 seq 5 permit 11.11.11.0/24
R1(config)#route-map 11 permit 10
R1(config-route-map)#match ip address prefix-list 11
R1(config-route-map)#route-map 1 permit 10
R1(config-route-map)#match ip address prefix-list 1
R1(config-route-map)#router bgp 100
R2配置
R2(config)#int f0/0
R2(config-if)#ip add 202.101.12.2 255.255.255.0
R2(config-if)#no sh
R2(config-if)#router bgp 200
R2(config-router)#bgp router-id 2.2.2.2
R2(config-router)#nei 202.101.12.1 remote-as 100
R2(config-router)#do sh ip bgp su
BGP router identifier 2.2.2.2, local AS number 200
BGP table version is 1, main routing table version 1
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
202.
显示全部