BGP lab
BGP LAB_001
Interface Configuration
##R1##
R1(config)#int g0/0
R1(config-if)#ip add 10.0.0.1 255.255.255.252
R1(config-if)#no shut
R1(config-if)#int g0/1
R1(config-if)#ip add 172.10.0.254 255.255.255.0
R1(config-if)#no shut
##R2##
R2(config)#int g0/0
R2(config-if)#ip add 10.0.0.2 255.255.255.252
R2(config-if)#no shut
R2(config-if)#int g0/1
R2(config-if)#ip add 20.0.0.1 255.255.255.0
R2(config-if)#no shut
R2(config-if)#int g0/2
R2(config-if)#ip add 172.10.1.254 255.255.255.0
R2(config-if)#no shut
##R3##
R3(config)#int g0/0
R3(config-if)#ip add 20.0.0.2 255.255.255.252
R3(config-if)#no shut
R3(config-if)#int g0/1
R3(config-if)#ip add 172.10.2.254 255.255.255.0
R3(config-if)#no shut
Enable eBGP on all routers
##R1##
R1(config)#router bgp 100
R1(config-router)#neighbor 10.0.0.2 remote-as 200
R1(config-router)#network 172.10.0.0 mask 255.255.255.0
##R2##
R2(config)#router bgp 200
R2(config-router)#neighbor 10.0.0.1 remote-as 100
R2(config-router)#neighbor 20.0.0.2 remote-as 300
R2(config-router)#network 172.10.1.0 mask 255.255.255.0
##R3##
R1(config)#router bgp 300
R1(config-router)#neighbor 20.0.0.1 remote-as 200
R1(config-router)#network 172.10.2.0 mask 255.255.255.0
Troubleshooting
sh ip protocols
sh ip route
sh ip route bgp
sh ip bgp
sh ip bgp summary
sh run | sec bgp
sh ip bgp nei
sh tcp brief
BGP
LAB_002
Interface Configuration
##R1##
R1(config)#int g0/0
R1(config-if)#ip add 10.0.0.1 255.255.255.252
R1(config-if)#no shut
R1(config-if)#int g0/1
R1(config-if)#ip add 40.0.0.1 255.255.255.252
R1(config-if)#no shut
R1(config-if)#int g0/2
R1(config-if)#ip add 172.10.0.254 255.255.255.0
R1(config-if)#no shut
##R2##
R2(config)#int g0/0
R2(config-if)#ip add 10.0.0.2 255.255.255.252
R2(config-if)#no shut
R2(config-if)#int g0/1
R2(config-if)#ip add 20.0.0.1 255.255.255.252
R2(config-if)#no shut
R2(config-if)#int g0/2
R2(config-if)#ip add 172.10.1.254 255.255.255.0
R2(config-if)#no shut
##R3##
R3(config)#int g0/0
R3(config-if)#ip add 20.0.0.2 255.255.255.252
R3(config-if)#no shut
R3(config-if)#int g0/1
R3(config-if)#ip add 30.0.0.1 255.255.255.252
R3(config-if)#no shut
R3(config-if)#int g0/2
R3(config-if)#ip add 172.10.2.254 255.255.255.0
R3(config-if)#no shut
##R4##
R4(config)#int g0/0
R4(config-if)#ip add 30.0.0.2 255.255.255.252
R4(config-if)#no shut
R4(config-if)#int g0/1
R4(config-if)#ip add 40.0.0.2 255.255.255.252
R4(config-if)#no shut
R4(config-if)#int g0/2
R4(config-if)#ip add 172.10.3.254 255.255.255.0
R4(config-if)#no shut
!!!!!!!!!!!!!Enable iBGP!!!!!!!!!!!!!!!
##R1##
R1(config)#router bgp 100
R1(config-router)#neighbor 10.0.0.2 remote-as 100
R1(config-router)#neighbor 40.0.0.2 remote-as 100
R1(config-router)#net 172.10.0.0 mask 255.255.255.0
##R2##
R2(config)#router bgp 100
R2(config-router)#neighbor 10.0.0.1 remote-as 100
R2(config-router)#neighbor 20.0.0.2 remote-as 100
R2(config-router)#net 172.10.1.0 mask 255.255.255.0
##R3##
R3(config)#router bgp 100
R3(config-router)#neighbor 20.0.0.1 remote-as 100
R3(config-router)#neighbor 30.0.0.2 remote-as 100
R3(config-router)#net 172.10.2.0 mask 255.255.255.0
##R4##
R4(config)#router bgp 100
R4(config-router)#neighbor 30.0.0.1 remote-as 100
R4(config-router)#neighbor 40.0.0.1 remote-as 100
R4(config-router)#net 172.10.3.0
mask 255.255.255.0
Trobuleshooting
BGP
LAB_003
For Loopback and Route Reflector
Interface Configuration
##R1##
R1(config)#int g0/0
R1(config-if)#ip add 10.0.0.1 255.255.255.252
R1(config-if)#no shut
R1(config-if)#int g0/1
R1(config-if)#ip add 40.0.0.1 255.255.255.252
R1(config-if)#no shut
R1(config-if)#int g0/2
R1(config-if)#ip add 172.10.0.254 255.255.255.0
R1(config-if)#no shut
R1(config-if)#int lo 0
R1(config-if)#ip add 1.1.1.1 255.255.255.255
##R2##
R2(config)#int g0/0
R2(config-if)#ip add 10.0.0.2 255.255.255.252
R2(config-if)#no shut
R2(config-if)#int g0/1
R2(config-if)#ip add 20.0.0.1 255.255.255.252
R2(config-if)#no shut
R2(config-if)#int g0/2
R2(config-if)#ip add 172.10.1.254 255.255.255.0
R2(config-if)#no shut
R2(config-if)#int lo 0
R2(config-if)#ip add 2.2.2.2 255.255.255.255
##R3##
R3(config)#int g0/0
R3(config-if)#ip add 20.0.0.2 255.255.255.252
R3(config-if)#no shut
R3(config-if)#int g0/1
R3(config-if)#ip add 30.0.0.1 255.255.255.252
R3(config-if)#no shut
R3(config-if)#int g0/2
R3(config-if)#ip add 172.10.2.254 255.255.255.0
R3(config-if)#no shut
R3(config-if)#int lo 0
R3(config-if)#ip add 3.3.3.3 255.255.255.255
R3(config-if)#no shut
##R4##
R4(config)#int g0/0
R4(config-if)#ip add 30.0.0.2 255.255.255.252
R4(config-if)#no shut
R4(config-if)#int g0/1
R4(config-if)#ip add 40.0.0.2 255.255.255.252
R4(config-if)#no shut
R4(config-if)#int g0/2
R4(config-if)#ip add 172.10.3.254 255.255.255.0
R4(config-if)#no shut
R4(config)#int lo 0
R4(config-if)#ip add 4.4.4.4 255.255.255.255
R4(config-if)#no shut
Enable OSPF
R1(config)#router ospf 1
R1(config)#net 10.0.0.0 0.0.0.3 area 0
R1(config)#net 40.0.0.0 0.0.0.3 area 0
R1(config)#net 172.10.0.0 0.0.0.255 area 0
R1(config)#net 1.1.1.1 0.0.0.0 area 0
R2(config)#router ospf 1
R2(config)#net 10.0.0.0 0.0.0.3 area 0
R2(config)#net 20.0.0.0 0.0.0.3 area 0
R2(config)#net 172.10.1.0 0.0.0.255 area 0
R2(config)#net 2.2.2.2 0.0.0.0 area 0
R3(config)#router ospf 1
R3(config)#net 30.0.0.0 0.0.0.3 area 0
R3(config)#net 20.0.0.0 0.0.0.3 area 0
R3(config)#net 172.10.2.0 0.0.0.255 area 0
R3(config)#net 3.3.3.3 0.0.0.0 area 0
R4(config)#router ospf 1
R4(config)#net 30.0.0.0 0.0.0.3 area 0
R4(config)#net 40.0.0.0 0.0.0.3 area 0
R4(config)#net 172.10.3.0 0.0.0.255 area 0
R4(config)#net 4.4.4.4 0.0.0.0 area 0
Enable BGP
R1(config)#router bgp
R1(config-router)#neighbor 2.2.2.2 remote-as 100
R1(config-router)#neighbor 2.2.2.2 update-source lo 0
R1(config-router)#neighbor 2.2.2.2 route-reflector-client
R1(config-router)# neighbor 3.3.3.3 remote-as 100
R1(config-router)#neighbor 3.3.3.3 update-source lo 0
R1(config-router)#neighbor 3.3.3.3 route-reflector-client
R1(config-router)# neighbor 4.4.4.4 remote-as 100
R1(config-router)#neighbor 4.4.4.4 update-source lo 0
R1(config-router)#neighbor 4.4.4.4
route-reflector-client
BGP
LAB_004
Interface Configurtaion
R1
en
conf t
int g0/0
ip add 10.0.0.1 255.255.255.252
no shut
exit
int g0/1
ip add 10.0.0.5 255.255.255.252
no shut
exit
int g0/2
ip add 172.10.0.254 255.255.255.0
no shut
exit
int lo 0
ip add 1.1.1.1 255.255.255.255
no shut
exit
do write mem
-----------------
##R2##
en
conf t
int g0/0
ip add 10.0.0.2 255.255.255.252
no shut
exit
int g0/1
ip add 20.0.0.1 255.255.255.252
no shut
exit
int lo 0
ip add 2.2.2.2 255.255.255.255
no shut
exit
do write mem
-----------------------
##R3##
en
conf t
int g0/0
ip add 10.0.0.6 255.255.255.252
no shut
exit
int g0/1
ip add 20.0.0.5 255.255.255.252
no shut
exit
int lo 0
ip add 3.3.3.3 255.255.255.255
no shut
exit
do write mem
------------------------
##R4##
en
conf t
int g0/0
ip add 20.0.0.2 255.255.255.252
no shut
exit
int g0/1
ip add 30.0.0.1 255.255.255.252
no shut
exit
int lo 0
ip add 4.4.4.4 255.255.255.255
no shut
exit
do write mem
-------------
##R5##
en
conf t
int g0/0
ip add 20.0.0.6 255.255.255.252
no shut
exit
int g0/1
ip add 40.0.0.1 255.255.255.252
no shut
exit
int lo 0
ip add 5.5.5.5 255.255.255.255
no shut
exit
do write mem
-----------
##R6##
en
conf t
int g0/0
ip add 10.0.0.1 255.255.255.252
no shut
exit
int g0/1
ip add 10.0.0.5 255.255.255.252
no shut
exit
int g0/2
ip add 172.10.0.254 255.255.255.0
no shut
exit
int lo 0
ip add 1.1.1.1 255.255.255.255
no shut
exit
do write mem
--------------------
##R7##
en
conf t
int g0/0
ip add 40.0.0.2 255.255.255.252
no shut
exit
int g0/1
ip add 172.30.0.254 255.255.255.0
no shut
exit
int lo 0
ip add 7.7.7.7 255.255.255.255
no shut
exit
do write mem
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!OSPF ENABLE!!!!!!!!!!!!!!!
##R1##
router ospf 1
router-id 1.1.1.1
net 1.1.1.1 0.0.0.0 area 0
net 10.0.0.0 0.0.0.3 area 0
net 10.0.0.4 0.0.0.3 area 0
##R2##
router ospf 1
router-id 2.2.2.2
net 2.2.2.2 0.0.0.0 area 0
net 10.0.0.0 0.0.0.3 area 0
##R3##
router ospf 1
router-id 3.3.3.3
net 3.3.3.3 0.0.0.0 area 0
net 10.0.0.4 0.0.0.3 area 0
##R4##
router ospf 1
router-id 4.4.4.4
net 4.4.4.4 0.0.0.0 area 0
net 30.0.0.0 0.0.0.3 area 0
##R5##
router ospf 1
router-id 5.5.5.5
net 5.5.5.5 0.0.0.0 area 0
net 40.0.0.0 0.0.0.3 area 0
##R6##
router ospf 1
router-id 6.6.6.6
net 6.6.6.6 0.0.0.0 area 0
net 30.0.0.0 0.0.0.3 area 0
##R7##
router ospf 1
router-id 7.7.7.7
net 7.7.7.7 0.0.0.0 area 0
net 40.0.0.0 0.0.0.3 area 0
BGP
LAB_005
Interface Configuration
##R1##
en
conf t
int g0/0
ip add 10.0.0.1 255.255.255.252
no shut
int g0/1
ip add 40.0.0.1 255.255.255.252
no shut
int g0/2
ip add 172.10.0.254 255.255.255.0
no shut
exit
do write mem
##R2##
en
conf t
int g0/0
ip add 10.0.0.2 255.255.255.252
no shut
int g0/1
ip add 20.0.0.1 255.255.255.252
no shut
int g0/2
ip add 172.10.1.254 255.255.255.0
no shut
exit
do write mem
##R3##
en
conf t
int g0/0
ip add 20.0.0.2 255.255.255.252
no shut
int g0/1
ip add 30.0.0.1 255.255.255.252
no shut
int g0/2
ip add 172.10.2.254 255.255.255.0
no shut
exit
do write mem
##R4##
en
conf t
int g0/0
ip add 30.0.0.2 255.255.255.252
no shut
int g0/1
ip add 40.0.0.2 255.255.255.252
no shut
int g0/2
ip add 172.10.3.254 255.255.255.0
no shut
exit
do write mem
--------------------------------------------------
##Enable BGP on R1###
router bgp 100
bgp router-id 1.1.1.1
net 172.10.0.0 mask 255.255.255.0
nei 10.0.0.2 remote-as 200
nei 10.0.0.2 update-source g0/0
nei 40.0.0.2 remote-as 400
nei 40.0.0.2 update-source g0/1
exit
do write mem
!!!!!!!!!!!!!!!!!!!!!!!!!!
##Enable BGP on R2###
router bgp 200
bgp router-id 2.2.2.2
net 172.10.1.0 mask 255.255.255.0
nei 10.0.0.1 remote-as 100
nei 10.0.0.1 update-source g0/0
nei 20.0.0.2 remote-as 300
nei 20.0.0.2 update-source g0/1
exit
do write mem
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
##Enable BGP on R3###
router bgp 300
bgp router-id 3.3.3.3
net 172.10.2.0 mask 255.255.255.0
nei 20.0.0.1 remote-as 200
nei 20.0.0.1 update-source g0/0
nei 30.0.0.2 remote-as 400
nei 30.0.0.2 update-source g0/1
exit
do write mem
!!!!!!!!!!!!!!!!!!!!!!
##Enable BGP on R4###
router bgp 400
bgp router-id 4.4.4.4
net 172.10.3.0 mask 255.255.255.0
nei 30.0.0.1 remote-as 300
nei 30.0.0.1 update-source g0/0
nei 40.0.0.1 remote-as 100
nei 40.0.0.1 update-source g0/1
exit
do write mem
!!!!!!!!!!!!!!!!!!!Weight Attributes!!!!!!!!!!!!
Enable R2
router bgp 200
nei 10.0.0.1 weight 100
nei 20.0.0.2 weight 200
!!!!!!!!!!!!!!!!!!!!!!!Local Preference
Attributes!!!!!!!!!!!!!!
##Enable R2
route-map route_map_100 permit
set local preference 100
route-map route_map_300 permit
set local preference 200
router bgp 200
nei 10.0.0.1 route-map route_map_100 in
nei 20.0.0.2 route-map route_map_300 in
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!AS-Path
PREPEND!!!!!!!!!!!!!!!!!!!!!!1
route-map route_map_prepend_100 permit
set as-path prepend 200 200 200 200
router bgp 200
nei 10.0.0.1 route-map rout_map_prepend_100 in
BGP
LAB_006
##Interface Configuration##
##R1##
en
conf t
int g0/0
ip add 1.1.1.1 255.255.255.252
no shut
exit
int g0/2
ip add 10.1.1.254 255.255.255.0
no shut
exit
int lo 0
ip add 1.1.1.1 255.255.255.255
no shut
exit
do write mem
\\\\\\\\\\\\
##R2##
en
conf t
int g0/0
ip add 1.1.1.2 255.255.255.252
no shut
exit
int g0/1
ip add 2.2.2.1 255.255.255.252
no shut
exit
int g0/2
ip add 20.1.1.254 255.255.255.0
no shut
exit
int lo 0
ip add 22.22.22.22 255.255.255.255
no shut
exit
do write mem
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
##R3##
en
conf t
int g0/0
ip add 2.2.2.2 255.255.255.252
no shut
exit
int g0/1
ip add 3.3.3.1 255.255.255.252
no shut
exit
int g0/2
ip add 30.1.1.254 255.255.255.0
no shut
exit
int lo 0
ip add 33.33.33.33 255.255.255.255
no shut
exit
do write mem
\\\\\\\\\\\\\\\\\
##R4##
en
conf t
int g0/0
ip add 3.3.3.2 255.255.255.252
no shut
exit
int g0/2
ip add 40.1.1.254 255.255.255.0
no shut
exit
int lo 0
ip add 4.4.4.4 255.255.255.255
no shut
exit
do write mem
##Enable OSPF on R2 and R3 for IGP##
##R2##
router ospf 1
router-id 22.22.22.22
net 22.22.22.22 0.0.0.0 area 0
net 2.2.2.0 0.0.0.3 area 0
exit
##R3##
router ospf 1
router-id 33.33.33.33
net 2.2.2.0 0.0.0.3 area 0
net 33.33.33.33 0.0.0.0 area 0
exit
##Enable BGP on Each Router##
##R1##
router bgp 500
bgp router-id 1.1.1.1
nei 1.1.1.2 remote-as 600
nei 1.1.1.2 update-source g0/0
nei 1.1.1.2
allowas-in ##for same as route from R4
net 1.1.1.1 mask 255.255.255.255
net 10.1.1.0 mask 255.255.255.0
\\\\\\\\\\\\\\
##R2##
router bgp 600
bgp router-id 22.22.22.22
nei 1.1.1.1 remote-as 500
nei 1.1.1.1 update-source g0/0
nei 33.33.33.33 remote-as 600
nei 33.33.33.33 update-source lo 0
nei
33.33.33.33 next-hop-self
net 22.22.22.22 mask 255.255.255.255
net 20.1.1.0 mask 255.255.255.0
\\\\\\\\\\\\\\\\\\
##R3##
router bgp 600
bgp router-id 33.33.33.33
nei 22.22.22.22 remote-as 600
nei 22.22.22.22 update-source lo 0
nei
22.22.22.22 next-hop-self
nei 3.3.3.2 remote-as 500
nei 3.3.3.2 update-source g0/1
net 33.33.33.33 mask 255.255.255.255
net 30.1.1.0 mask 255.255.255.0
\\\\\\\\\\\\\\\\\
##R4##
router bgp 500
bgp router-id 4.4.4.4
nei 3.3.3.1 remote-as 600
nei 3.3.3.1 update-source g0/0
nei 3.3.3.1
allowas-in ##for same as route
from R1
net 4.4.4.4 mask 255.255.255.255
net 40.1.1.0 mask 255.255.255.0
AS 200
VRF RED
rd 200:1
VRF GREEN
rd 200:2
VRF BLUE
rd 200:3
VRF SHARE
rd 200:99
\\\\\\\\\\\\\\\\\\
##Enable vrf on Each router##
##PE01##
ip vrf RED
description To CE03
ip vrf BLUE
description To CE04
---------------
##PE02##
ip vrf RED
description To PE01
ip vrf BLUE
description To PE01
--------------
##PE03##
ip vrf RED
ip vrf BLUE
-------------
\\\\\\\\\\\\\\\\\\\\\\\\\\\
##Enable vrf on Interface##
##PE01##
int g0/0
ip vrf forwarding BLUE
##(when enable vrf assign ip in this interface is automatically deleted,
so assign ip after vrf enable)##
int g0/1
ip vrf forwarding RED
int g0/2 ##(two vrf carry, so create sub interface g0/2.1,
g0/2.2 and carry each vrf with each dot1Q vlan and then assign ip address on
each sub interface )##
int g0/2.1
encapsulation dot1Q vlan 10 ##vlan 10 for RED##
ip vrf forwarding RED
ip add 10.0.0.1 255.255.255.252
no shut
exit
int g0/2.2
encapsulation dot1Q vlan 20
##vlan 20 for BLUE##
ip vrf forwarding BLUE
ip add 10.0.0.1 255.255.255.252
no shut
exit
int g0/3.1
encapsulation dot1Q vlan 10 ##vlan 10 for RED##
ip vrf forwarding RED
ip add 10.0.0.5 255.255.255.252
no shut
exit
int g0/3.2
encapsulation dot1Q vlan 20 ## vlan 20 for BLUE##
ip vrf forwarding BLUE
ip add 10.0.0.5 255.255.255.252
no shut
exit
--------------------------------------
##PE02##
##Enable vrf on Router##
ip vrf RED
ip vrf BLUE
------------
##Enable vrf on interface##
int g0/0.1
encapsulation dot1Q vlan 10 ##for RED##
ip vrf forwarding RED
ip add 10.0.0.2 255.255.255.252
no shut
exit
int g0/0.2
encapsulation dot1Q vlan 20 ## for BLUE##
ip vrf forwarding BLUE
ip add 10.0.0.2 255.255.255.252
no shut
exit
int g0/1.1
encapsulation dot1Q vlan 10 ##for RED##
ip vrf forwarding RED
ip add 10.0.0.9 255.255.255.252
no shut
exit
int g0/1.2
encapsulation dot1Q vlan 20 ## for BLUE##
ip vrf forwarding BLUE
ip add 10.0.0.9 255.255.255.252
no shut
exit
int g0/2
ip vrf forwarding RED
ip add 20.0.0.1 255.255.255.252
no shut
exit
---------------------
##PE03##
##Enable VRF on router##
ip vrf RED
ip vrf BLUE
-----------
##Enable vrf on interface##
int g0/0.1
encapsulation dot1Q vlan 10 ##for RED ##
ip vrf forwarding RED
ip add 10.0.0.6 255.255.255.252
no shut
exit
int g0/0.2
encapsulation dot1Q vlan 20 ##for BLUE##
ip vrf forwarding BLUE
ip add 10.0.0.6 255.255.255.252
no shut
exit
int g0/1.1
encapsulation dot1Q vlan 10 ##for RED ##
ip vrf forwarding RED
ip add 10.0.0.10 255.255.255.252
no shut
exit
int g0/1.2
encapsulation dot1Q vlan 20 ##for BLUE##
ip vrf forwarding BLUE
ip add 10.0.0.10 255.255.255.252
no shut
exit
int g0/2
ip vrf forwarding BLUE
ip add 20.0.0.1 255.255.255.252
no shut
exit
##Enable vrf OSPF on each router###
##PE01##
router ospf 1 vrf RED
router-id 0.0.1.1
net 10.0.0.0 0.0.0.3 area 0
net 100.0.0.0 0.0.0.3 area 0
net 10.0.0.4 0.0.0.3 area 0
exit
router ospf 2 vrf BLUE
router-id 0.0.1.2
net 10.0.0.0 0.0.0.3 area 0
net 200.0.0.0 0.0.0.3 area 0
net 10.0.0.4 0.0.0.3 area 0
exit
---------------
##Enable OSPF on PE02##
router ospf 1 vrf RED
router-id 0.0.2.1
net 10.0.0.0 0.0.0.3 area 0
net 10.0.0.8 0.0.0.3 area 0
net 20.0.0.0 0.0.0.3 area 0
----------------
router ospf 2 vrf BLUE
router-id 0.0.2.2
net 10.0.0.0 0.0.0.3 area 0
net 10.0.0.8 0.0.0.3 area 0
------------------------------
##Enable OSPF on PE03##
router ospf 1 vrf RED
router-id 0.0.3.1
net 10.0.0.8 0.0.0.3 area 0
net 10.0.0.4 0.0.0.3 area 0
---------------
router ospf 2 vrf BLUE
router-id 0.0.3.2
net 10.0.0.8 0.0.0.3 area 0
net 10.0.0.4 0.0.0.3 area 0
net 20.0.0.0 0.0.0.3 area 0
\\\\\\\\\\\\\\\\\\\\\\\\\\\\
##Enable default on each router##
##Enable default on PE01##
ip route vrf RED 0.0.0.0 0.0.0.0 100.0.0.2
ip route vrf BLUE 0.0.0.0 0.0.0.0 200.0.0.2
------------
##Enable default route on PE02##
ip route vrf RED 0.0.0.0 0.0.0.0 20.0.0.2
--------------
##Enable default route on PE03##
ip route vrf BLUE 0.0.0.0 0.0.0.0 20.0.0.1
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
BGP LAB_008 (BGP Confederations)
Enable IP on each router
##R1##
en
conf t
int g0/0
ip add 100.0.0.1 255.255.255.252
no shut
exit
int g0/1
ip add 10.0.0.254 255.255.255.0
no shut
exit
do write mem
\\\\\\\\\\\\\\\\\\\\\\
#R2##
en
conf t
hostname PE02
int g0/0
ip add 100.0.0.2 255.255.255.252
no shut
exit
int g0/1
ip add 40.0.0.1 255.255.255.252
no shut
exit
int g0/2
ip add 40.0.0.5 255.255.255.252
no shut
exit
int lo 0
ip add 2.2.2.2 255.255.255.255
no shut
exit
do write mem
\\\\\\\\\\\\\\\\\\\\\\
#R3##
en
conf t
int g0/0
ip add 40.0.0.2 255.255.255.252
no shut
exit
int g0/1
ip add 40.0.0.9 255.255.255.252
no shut
int g0/2
ip add 20.0.0.254 255.255.255.0
no shut
int lo 0
ip add 3.3.3.3 255.255.255.255
no shut
exit
do write mem
\\\\\\\\\\\\\\\\
##R4##
en
conf t
int g0/0
ip add 40.0.0.10 255.255.255.252
no shut
exit
int g0/1
ip add 40.0.0.13 255.255.255.252
no shut
exit
int g0/2
ip add 30.0.0.254 255.255.255.0
no shut
exit
int lo 0
ip add 4.4.4.4 255.255.255.255
no shut
exit
do write mem
\\\\\\\\\\\\\\\\\
##R5##
en
conf t
int g0/0
ip add 40.0.0.14 255.255.255.252
no shut
exit
int g0/1
ip add 40.0.0.6 255.255.255.252
no shut
exit
int lo 0
ip add 5.5.5.5 255.255.255.252
no shut
exit
do write mem
## Enable IGP protocol ISIS or OSPF on R2,R3,R4,R5##
##R2##
router isis PE02
net 49.0000.0000.0000.0002.00
is-type level-1
metric-style wide
passive-interface g0/2
int g0/0
ip router isis PE02
int g0/1
ip router isis PE02
int g0/2
ip router isis PE02
int lo 0
ip router isis PE02
\\\\\\\\\\\\\\\\\\\\\
##R3##
router isis PE03
net 49.0000.0000.0000.0003.00
is-type level-1
metric-style wide
passive-interface g0/2
int g0/0
ip router isis PE03
int g0/1
ip router isis PE03
int g0/2
ip router isis PE03
int lo 0
ip router isis PE03
\\\\\\\\\\\\\\\\\\\\\\\\\\\
router isis PE04
net 49.0000.0000.0000.0004.00
is-type level-1
metric-style wide
passive-interface g0/2
int g0/0
ip router isis PE04
int g0/1
ip router isis PE04
int g0/2
ip router isis PE04
int lo 0
ip router isis PE04
\\\\\\\\\\\\\\
router isis PE05
net 49.0000.0000.0000.0005.00
is-type level-1
metric-style wide
passive-interface g0/2
int g0/0
ip router isis PE05
int g0/1
ip router isis PE05
int g0/2
ip router isis PE05
int lo 0
ip router isis PE05
-----------------------------
##Enable BGP confederations on each router##
##R2##
router bgp 500
bgp confederation identifier 200
bgp router-id 2.2.2.2
bgp confederation peers 600
nei 3.3.3.3 remote-as 500
nei 3.3.3.3 update-source lo 0
nei 5.5.5.5 remote-as 600
nei 5.5.5.5 update-source lo 0
nei 5.5.5.5 ebgp-multihop 2
nei 100.0.0.1 remote-as 100
\\\\\\\\\\\\\\\\\\\\\\\\\\\\
##R3##
router bgp 500
bgp confederation identifier 200
bgp router-id 3.3.3.3
bgp confederation peers 600
nei 2.2.2.2 remote-as 500
nei 2.2.2.2 update-source lo 0
nei 4.4.4.4 remote-as 600
nei 4.4.4.4 update-source lo 0
nei 4.4.4.4 ebgp-multihop 2
\\\\\\\\\\\\\\\\\\\\\\\\\\\
##R4##
router bgp 600
bgp confederation identifier 200
bgp router-id 4.4.4.4
bgp confederation peers 500
nei 3.3.3.3 remote-as 500
nei 3.3.3.3 update-source lo 0
nei 5.5.5.5 remote-as 600
nei 5.5.5.5 update-source lo 0
nei 5.5.5.5 ebgp-multihop 2
\\\\\\\\\\\\\\\\\\\\\\\\\
##R5##
router bgp 600
bgp confederation identifier 200
bgp router-id 5.5.5.5
bgp confederation peers 500
nei 2.2.2.2 remote-as 500
nei 2.2.2.2 update-source lo 0
nei 5.5.5.5 remote-as 600
nei 5.5.5.5 update-source lo 0
nei 5.5.5.5 ebgp-multihop 2
Trouble Shooting
R1(config)#router isis PE01
R1(config-router)#log adjacency-changes
show isis database
show isis database ##display network in database with metric
value
show isis neighbor
show isis database level-1 verbose
show ip route isis
BGP LAB_009 MP BGP or multiprotocol
##Enable IP on each router##
#R1##
en
conf t
ipv6 unicast-routing
int g0/0
ipv6 add 2003::1/64
no shut
exit
int lo 0
ipv6 add 2001:0001::1/64
no shut
exit
int lo 1
ipv6 address 2001:0002::2/64
no shut
do write mem
\\\\\\\
#R2##
en
conf t
ipv6 unicast-routing
int g0/0
ipv6 add 2003::2/64
no shut
exit
int lo 0
ipv6 add 2002:0001::1/64
no shut
exit
int lo 1
ipv6 address 2002:0002::2/64
no shut
do write mem
##Enable MP BGP on Each Router##
router bgp 100
bgp router-id 1.0.0.1
nei 2003::2 remote-as 200
address-family ipv4
no nei 2003::2 activate
exit
address-family ipv6
nei 2003::2 activate
net 2001:0001::/64
net 2001:0002::/64
\\\\\\\\\\\\\\\\\\\
##R2##
router bgp 200
bgp router-id 1.0.0.2
nei 2003::1 remote-as 100
address-family ipv4
no nei 2003::1 activate
exit
address-family ipv6
nei 2003::1 activate
net 2002:0001::/64
net 2002:0002::/64
Trouble Shooting
sh ip bgp all
ping 2002:2::1 source lo 0
Comments
Post a Comment