This is used when we have just acquired /changed to a new
AS. Options here include
local
as- we are using a new AS but we don’t want our nei know that (with is,
routes advertised to them would show the the new and old AS. Also our routers
wld see the old AS in the routes advertised from the nei)
local
as no-prepend- we want to prevent the old AS from being advertised back
to us from nei routers. Note that nei routers still see both old and new AS.
don’t prepend this AS when u re sendin any route to me.on our bgp table, we
only see the new AS (100)
local-as
no-prepend replace-as- when am sending to u, we only want to advertise
the old AS i.e my nei wld not know that I am using AS 100. on the nei bgp
table,it will only see the old AS (20,30,40)
local-as
no-prepend replace-as dual-as nei AS can pair with either AS
Deafult cfg
R1.....................
int s0/1
ip add 20.20.20.1 255.255.255.0
no shut
int s0/0
ip add 10.10.10.1 255.255.255.0
no shut
int lo 1
ip add 150.150.150.1 255.255.255.0
no shut
exit
router ospf 1
network 20.20.20.1 0.0.0.0 area 0
exit
router bgp 100
nei 10.10.10.2 remote-as 222
nei 20.20.20.2 remote-as 100
nei 20.20.20.2 next-hop-self
bgp router-id 150.150.150.1
no synchronization
network 150.150.150.0 mask 255.255.255.0
R2..................
int s0/0
ip add 30.30.30.2 255.255.255.0
no shut
int s0/1
ip add 20.20.20.2 255.255.255.0
no shut
int s0/2
ip add 50.50.50.2 255.255.255.0
no shut
int lo 1
ip add 77.77.77.1 255.255.255.0
no shut
exit
router ospf 1
network 20.20.20.2 0.0.0.0 area 0
network 30.30.30.2 0.0.0.0 area 0
exit
router bgp 100
nei 30.30.30.1 remote-as 100
nei 30.30.30.1 next-hop-self
nei 20.20.20.1 remote-as 100
nei 20.20.20.1 next-hop-self
nei 50.50.50.1 remote-as 111
bgp router-id 77.77.77.1
no synchronization
network 77.77.77.0 mask 255.255.255.0
R3..........................
int s0/0
ip add 40.40.40.1 255.255.255.0
no shut
int s0/1
ip add 30.30.30.1 255.255.255.0
no shut
int lo 1
ip add 99.99.99.1 255.255.255.0
no shut
exit
router ospf 1
network 30.30.30.1 0.0.0.0 area 0
exit
router bgp 100
nei 40.40.40.2 remote-as 222
nei 30.30.30.2 remote-as 100
nei 30.30.30.2 next-hop-self
bgp router-id 99.99.99.1
no synchronization
network 99.99.99.0 mask 255.255.255.0
ISP1..................................
int s0/0
ip add 50.50.50.1 255.255.255.0
no shut
int lo 1
ip add 200.200.200.1 255.255.255.0
no shut
exit
router bgp 111
nei 50.50.50.2 remote-as 20
bgp router-id 200.200.200.1
no synchronization
network 200.200.200.0 mask 255.255.255.0
ISP2..................
int s0/1
ip add 40.40.40.2
255.255.255.0
no shut
int s0/0
ip add 10.10.10.2
255.255.255.0
no shut
int lo 1
ip add 100.100.100.1
255.255.255.0
no shut
int lo 2
ip add 100.100.101.1
255.255.255.0
no shut
router bgp 222
nei 10.10.10.1
remote-as 10
nei 40.40.40.1
remote-as 30
bgp router-id
100.100.100.1
no synchronization
network 100.100.100.0
mask 255.255.255.0
TASKS
Task 1
AS 10 (R1), AS 20 (R2), and AS 30 (R3) merg into one AS
100.All old cfgs av bin removed and new
cfgs are already implemented
ISP2 is still configured to peer with AS 10 (R1) and AS 30 (R3).similarly ISP1 is also cfgedd to peer with AS 20 (R2).
ISP2 is still configured to peer with AS 10 (R1) and AS 30 (R3).similarly ISP1 is also cfgedd to peer with AS 20 (R2).
Make sure the peering works btw them withouth changin cfg on
ISP1 & ISP2. All routers in AS 100 should be able to reach prefixes advertised
by AS 111 and AS 222.
As it is now, ISP1 and ISP2 cant peer with routers R1,R2 and R3. So we wld configure,
R1(conf-router)# nei 10.10.10.2 local-as 10
R2(conf-router)# nei 50.50.50.1 local-as 20
R3(conf-router)# nei 40.40.40.2 local-as 30
R2(conf-router)# nei 50.50.50.1 local-as 20
R3(conf-router)# nei 40.40.40.2 local-as 30
Lets confirm this on ISP1
ISP1# sh ip bgp summary
Neighbor V AS MsgRcvd MsgSent TblVer
InQ OutQ Up/Down State/PfxRcd
50.50.50.2 4 20 29
26 7 0 0 00:08:41 4
Lets check the bgp table on ISP1
ISP2# sh ip
bgp
Network Next
Hop Metric LocPrf Weight Path
* 77.77.77.0/24 40.40.40.1 0
30 100 i
*> 10.10.10.1 0
10 100 i
*> 99.99.99.0/24 40.40.40.1 0 0
30 100 i
*> 100.100.100.0/24 0.0.0.0 0
32768 i
*> 150.150.150.0/24 10.10.10.1 0 0
10 100 i
* 200.200.200.0 40.40.40.1 0
30 100 20 111 i
*> 10.10.10.1 0 10 100 20 111 i
Here we see the local as and new AS are appended.
R1# sh ip bgp
Network Next Hop Metric LocPrf Weight
Path
*>i77.77.77.0/24 20.20.20.2 0 100 0
i
*> 100.100.100.0/24 10.10.10.2 0 0 10 222 i
*> 150.150.150.0/24 0.0.0.0 0
32768
i
*>i200.200.200.0 20.20.20.2 0 100 0 20 111 i
Task2: Remove configs in task 1.
After merging the three ASes, prefixes advertised by AS 111 and AS 222 prepend local-as AS numbers. Configure routers in such a way that the local-AS numbers no longer get propagated within AS 100 and to other autonomous systems.
After merging the three ASes, prefixes advertised by AS 111 and AS 222 prepend local-as AS numbers. Configure routers in such a way that the local-AS numbers no longer get propagated within AS 100 and to other autonomous systems.
R1(conf-router)# nei 10.10.10.2 local-as 10
no-prepend
R2(conf-router)# nei 50.50.50.1 local-as 20 no-prepend
R3(conf-router)# nei 40.40.40.2 local-as 30 no-prepend
R2(conf-router)# nei 50.50.50.1 local-as 20 no-prepend
R3(conf-router)# nei 40.40.40.2 local-as 30 no-prepend
To prove this,
R1#sh ip
bgp
Network Next
Hop Metric LocPrf Weight Path
*>i77.77.77.0/24 20.20.20.2 0 100 0 i
*> 100.100.100.0/24 10.10.10.2 0 0
222 i
*> 150.150.150.0/24 0.0.0.0 0
32768
i
*>i200.200.200.0 20.20.20.2 0 100 0
111 i
Lets confirm that ISP2 bgp table will not change
ISP2#sh ip
bgp
Network Next Hop
Metric LocPrf Weight Path
* 77.77.77.0/24 40.40.40.1 0
30 100 i
*> 10.10.10.1 0
10 100 i
*> 99.99.99.0/24 40.40.40.1 0 0 30
100 i
*> 100.100.100.0/24 0.0.0.0 0
32768
i
*> 150.150.150.0/24 10.10.10.1 0 0 10 100 i
* 200.200.200.0 40.40.40.1 0 30 100 111 i
*> 10.10.10.1 0
10 100 111 i
Task 3) Remove the config above
After merging the three ASes ,d administrator of AS 111 noticed dat prefixes arriving on ISP1 carry the AS 100 in the AS_PATH attribute. Remove AS 100 from the AS_PATH attribute while also ensuring that routers in AS 100 donot receive their former AS
After merging the three ASes ,d administrator of AS 111 noticed dat prefixes arriving on ISP1 carry the AS 100 in the AS_PATH attribute. Remove AS 100 from the AS_PATH attribute while also ensuring that routers in AS 100 donot receive their former AS
R1(conf-router)# nei 10.10.10.2 local-as 10
no-prepend replace-as
R2(conf-router)# nei 50.50.50.1 local-as 20 no-prepend replace-as
R3(conf-router)# nei 40.40.40.2 local-as 30 no-prepend replace-as
R2(conf-router)# nei 50.50.50.1 local-as 20 no-prepend replace-as
R3(conf-router)# nei 40.40.40.2 local-as 30 no-prepend replace-as
On checking R1’s bgp table which shld remain the same
Network Next
Hop Metric LocPrf Weight Path
*>i77.77.77.0/24 20.20.20.2 0 100 0
i
*> 100.100.100.0/24 10.10.10.2 0 0
222 i
*> 150.150.150.0/24 0.0.0.0 0
32768
i
*>i200.200.200.0 20.20.20.2 0 100 0
111 i
Now lets check ISP2’s bgp table
ISP2# sh ip bgp
Network Next
Hop Metric LocPrf Weight Path
* 77.77.77.0/24 40.40.40.1 0
30 i
*> 10.10.10.1 0
10 i
*> 99.99.99.0/24 40.40.40.1 0 0
30 i
*> 100.100.100.0/24 0.0.0.0 0
32768 i
*> 150.150.150.0/24 10.10.10.1 0 0
10 i
* 200.200.200.0 10.10.10.1 0 10 111 i
*> 40.40.40.1 0
30 111 i
Task 4) Remove the cfg above
After merging the three ASes, the administrators of AS 222 requested that AS 100 should not show in the path of the prefixes advertised by 100. They also requested that you configure R1 so that ISP2 can peer using either AS100 or the previous AS 10
After merging the three ASes, the administrators of AS 222 requested that AS 100 should not show in the path of the prefixes advertised by 100. They also requested that you configure R1 so that ISP2 can peer using either AS100 or the previous AS 10
R1(conf-router)# nei 10.10.10.2 local-as 10 no-prepend
replace-as dual-as
R2(conf-router)# nei 50.50.50.1 local-as 20 no-prepend replace-as dual-as
R3(conf-router)# nei 40.40.40.2 local-as 30 no-prepend replace-as dual-as
R2(conf-router)# nei 50.50.50.1 local-as 20 no-prepend replace-as dual-as
R3(conf-router)# nei 40.40.40.2 local-as 30 no-prepend replace-as dual-as
BGP
table do not change unless we tear down the bgp session on ISP 2
ISP2(conf-router)#
no nei 10.10.10.1 remote-as 10
no nei 40.40.40.1 remote-as 30
neighbor 10.10.10.1 remote-as 100
neighbor 40.40.40.1 remote-as 100
Lets show ISP2 bgp table now
ISP2# sh ip bgp
Network Next
Hop Metric LocPrf Weight Path
* 77.77.77.0/24 40.40.40.1 0
100 i
*> 10.10.10.1 0 100 i
*> 99.99.99.0/24 40.40.40.1 0 0 100 i
*> 100.100.100.0/24 0.0.0.0 0
32768 i
*> 150.150.150.0/24 10.10.10.1 0 0 100 i
* 200.200.200.0 40.40.40.1 0 100 111 i
*> 10.10.10.1 0 100 111 i