Lab AS-Override Soo

Topology:

 

 

实验目的:理解AS-override and soo。

Step 1、配置各台路由器的IP地址,并且使用Ping命令确认各路由器的直连口的互通性。
R1:
lo 0:1.1.1.1/32
s0/0:12.1.1.1/24
R2:
lo 0:2.2.2.2/32
s0/0:12.1.1.2/24
s0/1:23.1.1.2/24
R3:
lo 0:3.3.3.3/32
s0/0:23.1.1.3/24
s0/1:34.1.1.3/24
s0/2:35.1.1.3/24
R4:
lo 0:4.4.4.4/32
s0/0:34.1.1.4/24
s0/1:45.1.1.4/24
R5:
lo 0:5.5.5.5/32
s0/0:35.1.1.5/24
s0/1:45.1.1.5/24

Step 2、R2,R3配置ospf
R2:
router ospf 100
router-id 2.2.2.2
net 2.2.2.2 0.0.0.0 area 0
net 23.1.1.0 0.0.0.255 area 0

R3:
router ospf 100
router-id 3.3.3.3
net 3.3.3.3 0.0.0.0 area 0
net 23.1.1.0 0.0.0.255 area 0

Step 3.配置mpls
R2:
mpls label range 2000 2999
mpls label protocol ldp
mpls ldp router-id lo 0

int s0/1
mpls ip

R3:
mpls label range 3000 3999
mpls label protocol ldp
mpls ldp router-id lo 0

int s0/0
mpls ip

step 4.配置vrf
R2:
ip vrf AAA
rd 100:1
route-target both 100:1

int s0/0
ip vrf forwarding AAA
ip add 12.1.1.2 255.255.255.0

R3:
ip vrf AAA
rd 100:1
route-target both 100:1

int s0/1
ip vrf forwarding AAA
ip add 34.1.1.3 255.255.255.0

int s0/2
ip vrf forwarding AAA
ip add 35.1.1.3 255.255.255.0

step 5.配置mp-bgp
R2:
router bgp 23
no au
no sy
bgp router-id 2.2.2.2
nei 3.3.3.3 remote-as 23
nei 3.3.3.3 update-source lo 0
no bgp default ipv4-unicast
address-family vpnv4
nei 3.3.3.3 activate
exit
address-family ipv4 vrf AAA
nei 12.1.1.1 remote-as 1
nei 12.1.1.1 activate
nei 12.1.1.1 as-override
no au
no sy
red conn
exit

R3:
router bgp 23
no au
no sy
bgp router-id 3.3.3.3
nei 2.2.2.2 remote-as 23
nei 2.2.2.2 update-source lo 0
no bgp default ipv4-unicast
address-family vpnv4
nei 2.2.2.2 activate
exit
address-family ipv4 vrf AAA
no au
no sy
nei 34.1.1.4 remote-as 1
nei 34.1.1.4 activate
nei 34.1.1.4 as-override
nei 35.1.1.5 remote-as 1
nei 35.1.1.5 activate
nei 35.1.1.5 as-override
red conn
exit

step 6.r1,r5,r4配置bgp.
R1:
router bgp 1
no au
no sy
bgp router-id 1.1.1.1
nei 12.1.1.2 remote-as 23
net 1.1.1.1 mask 255.255.255.255

R4:
router bgp 1
no au
no sy
bgp router-id 4.4.4.4
nei 34.1.1.3 remote-as 23
nei 5.5.5.5 remote-as 1
nei 5.5.5.5 update-source lo 0
nei 5.5.5.5 next-hop-self
exit

router ospf 100
net 4.4.4.4 0.0.0.0 area 0
net 45.1.1.0 0.0.0.255 area 0

R5:
router bgp 1
no au
no sy
bgp router-id 5.5.5.5
nei 35.1.1.3 remote-as 23
nei 4.4.4.4 remote-as 1
nei 4.4.4.4 update-source lo 0
nei 4.4.4.4 next-hop-self
exit

router ospf 100
net 5.5.5.5 0.0.0.0 area 0
net 45.1.1.0 0.0.0.255 are 0

step 7.查看结果。
R4#sh ip bgp
BGP table version is 11, local router ID is 4.4.4.4
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
*> 1.1.1.1/32 34.1.1.3 0 23 23 i
* i 5.5.5.5 0 100 0 23 23 i
*> 4.4.4.4/32 0.0.0.0 0 32768 i
*> 12.1.1.0/24 34.1.1.3 0 23 ?
* i 5.5.5.5 0 100 0 23 ?
r> 34.1.1.0/24 34.1.1.3 0 0 23 ?
r i 5.5.5.5 0 100 0 23 ?
*> 35.1.1.0/24 34.1.1.3 0 0 23 ?
* i 5.5.5.5 0 100 0 23 ?

step 8.配置soo
R2:
R2(config)#route-map sss permit 10
R2(config-route-map)#set extcommunity soo 65001:1
R2(config-route-map)#exit
R2(config)#
R2(config)#router bgp 23
R2(config-router)#address-family ipv4 vrf AAA
R2(config-router-af)#neighbor 12.1.1.1 route-map sss in

R3:
R3(config-route-map)#route-map sss permit 10
R3(config-route-map)#set extcommunity soo 65001:1
R3(config-route-map)#exit
R3(config)#router bgp 23
R3(config-router-af)#neighbor 35.1.1.5 route-map sss in
R3(config-router-af)#nei 34.1.1.4 route-map sss in

 

posted @ 2020-04-30 09:37  cyrusxx  阅读(389)  评论(0编辑  收藏  举报