NetworkTalk & BGP

B.6) summary: BGP setup of ISP-A’s router RT-B. 

router bgp 1000
 
//Ibgp setup with RT-A
neighbor ibgp_client peer-group
neighbor ibgp_client remote-as 1000
neighbor ibgp_client description “Peering with iBGP Core Routers”
neighbor ibgp_client password 7 “…”
neighbor ibgp_client update-source Loopback1
neighbor ibgp_client version 4
neighbor 11.11.226.26 peer-group ibgp_client
 
//Ebgp session with ISP-B
neighbor 20.20.20.85 remote-as 300
neighbor 20.20.20.85 description ISP-B-Ebgp-Session
neighbor 20.20.20.85 version 4
 
//Ebgp session with ISP-C
neighbor 30.30.30.127 remote-as 400
neighbor 30.30.30.127 description ISP-C-Ebgp-Session
neighbor 30.30.30.127 ebgp-multihop 2
neighbor 30.30.30.127 update-source Loopback0
neighbor 30.30.30.127 version 4
!
address-family ipv4
no synchronization
 
//Aggregation network blocks, if router1 is down, /20 and /19 networks are still advertised (pointed to Null0)
network 11.11.224.0 mask 255.255.224.0
network 10.10.192.0 mask 255.255.240.0
 
//Advertisement of /24 blocks (Zone_B and ZoneD_E)
network 11.11.224.0 mask 255.255.255.0
network 11.11.230.0 mask 255.255.255.0
network 11.11.231.0 mask 255.255.255.0
network 11.11.232.0 mask 255.255.255.0
network 11.11.233.0 mask 255.255.255.0
network 11.11.234.0 mask 255.255.255.0
network 11.11.235.0 mask 255.255.255.0
network 11.11.236.0 mask 255.255.255.0
network 11.11.237.0 mask 255.255.255.0
network 11.11.238.0 mask 255.255.255.0
network 11.11.239.0 mask 255.255.255.0
network 11.11.240.0 mask 255.255.255.0
network 11.11.241.0 mask 255.255.255.0
network 11.11.242.0 mask 255.255.255.0
network 11.11.243.0 mask 255.255.255.0
network 11.11.244.0 mask 255.255.255.0
network 11.11.245.0 mask 255.255.255.0
network 11.11.246.0 mask 255.255.255.0
network 11.11.247.0 mask 255.255.255.0
network 11.11.248.0 mask 255.255.255.0
network 11.11.249.0 mask 255.255.255.0
network 11.11.250.0 mask 255.255.255.0
network 11.11.251.0 mask 255.255.255.0
network 11.11.252.0 mask 255.255.255.0
network 11.11.253.0 mask 255.255.255.0
network 11.11.254.0 mask 255.255.255.0
network 11.11.255.0 mask 255.255.255.0
 
network 10.10.192.0 mask 255.255.255.0
network 10.10.193.0 mask 255.255.255.0
network 10.10.194.0 mask 255.255.255.0
network 10.10.195.0 mask 255.255.255.0
network 10.10.196.0 mask 255.255.255.0
network 10.10.197.0 mask 255.255.255.0
network 10.10.198.0 mask 255.255.255.0
network 10.10.199.0 mask 255.255.255.0
network 10.10.200.0 mask 255.255.255.0
network 10.10.201.0 mask 255.255.255.0
network 10.10.202.0 mask 255.255.255.0
network 10.10.203.0 mask 255.255.255.0
network 10.10.204.0 mask 255.255.255.0
 
//Ibgp setup with RT-A
neighbor ibgp_client send-community both
neighbor ibgp_client next-hop-self
neighbor ibgp_client route-map IBGP-Neighbor-IN in
neighbor ibgp_client route-map IBGP-Neighbor-OUT out
neighbor 11.11.226.26 activate
 
//Ebgp setup with ISP-B: downloads BGP table and advertises all networks with different communities attributes.
neighbor 20.20.20.85 activate
neighbor 20.20.20.85 send-community both
neighbor 20.20.20.85 route-map AS-300-INCOMING in
neighbor 20.20.20.85 route-map AS-300-OUTGOING out
 
//Ebgp setup with ISP-C: download BGP table (which will be tagged with localpref 90) , advertises all networks with different communities attributes.
neighbor 30.30.30.127 activate
neighbor 30.30.30.127 send-community both
neighbor 30.30.30.127 route-map AS-400-INCOMING in
neighbor 30.30.30.127 route-map AS-400-OUTGOING out
no auto-summary
 
//AS path access list for ISP-B,ISP-C and ISP-A as- number
ip as-path access-list 1 permit ^400_
ip as-path access-list 2 permit ^$
ip as-path access-list 4 permit ^300_
 
//Aggregation routes if RT-A is down, IP blocks are still advertised
ip route 11.11.224.0 255.255.224.0 Null0 name IPBlock2-Redundancy-Aggregation
ip route 10.10.192.0 255.255.240.0 Null0 name IPBlock1-Redundancy-Aggregation
 
//Static routes for ZONE_G
ip route 11.11.230.0 255.255.255.0 11.11.224.3 name Customer-G-GW
ip route 11.11.231.0 255.255.255.0 11.11.224.3 name Customer-G-GW
ip route 11.11.232.0 255.255.255.0 11.11.224.3 name Customer-G-GW
ip route 11.11.233.0 255.255.255.0 11.11.224.3 name Customer-G-GW
ip route 11.11.234.0 255.255.255.0 11.11.224.3 name Customer-G-GW
ip route 11.11.235.0 255.255.255.0 11.11.224.3 name Customer-G-GW
ip route 11.11.236.0 255.255.255.0 11.11.224.3 name Customer-G-GW
ip route 11.11.237.0 255.255.255.0 11.11.224.3 name Customer-G-GW
ip route 11.11.238.0 255.255.255.0 11.11.224.3 name Customer-G-GW
ip route 11.11.239.0 255.255.255.0 11.11.224.3 name Customer-G-GW
 
ip route 10.10.192.0 255.255.255.0 11.11.224.3 name Customer-G-GW
ip route 10.10.193.0 255.255.255.0 11.11.224.3 name Customer-G-GW
ip route 10.10.194.0 255.255.255.0 11.11.224.3 name Customer-G-GW
ip route 10.10.195.0 255.255.255.0 11.11.224.3 name Customer-G-GW
ip route 10.10.196.0 255.255.255.0 11.11.224.3 name Customer-G-GW
ip route 10.10.197.0 255.255.255.0 11.11.224.3 name Customer-G-GW
ip route 10.10.198.0 255.255.255.0 11.11.224.3 name Customer-G-GW
ip route 10.10.199.0 255.255.255.0 11.11.224.3 name Customer-G-GW
ip route 10.10.200.0 255.255.255.0 11.11.224.3 name Customer-G-GW
ip route 10.10.201.0 255.255.255.0 11.11.224.3 name Customer-G-GW
ip route 10.10.202.0 255.255.255.0 11.11.224.3 name Customer-G-GW
ip route 10.10.203.0 255.255.255.0 11.11.224.3 name Customer-G-GW
ip route 10.10.204.0 255.255.255.0 11.11.224.3 name Customer-G-GW
 
//Static routes for ZONE_B
ip route 11.11.240.0 255.255.255.0 11.11.226.241 name Customer-B-GW
ip route 11.11.241.0 255.255.255.0 11.11.226.241 name Customer-B-GW
ip route 11.11.242.0 255.255.255.0 11.11.226.241 name Customer-B-GW
ip route 11.11.243.0 255.255.255.0 11.11.226.241 name Customer-B-GW
ip route 11.11.244.0 255.255.255.0 11.11.226.241 name Customer-B-GW
ip route 11.11.245.0 255.255.255.0 11.11.226.241 name Customer-B-GW
ip route 11.11.246.0 255.255.255.0 11.11.226.241 name Customer-B-GW
ip route 11.11.247.0 255.255.255.0 11.11.226.241 name Customer-B-GW
ip route 11.11.248.0 255.255.255.0 11.11.226.241 name Customer-B-GW
ip route 11.11.249.0 255.255.255.0 11.11.226.241 name Customer-B-GW
ip route 11.11.250.0 255.255.255.0 11.11.226.241 name Customer-B-GW
ip route 11.11.251.0 255.255.255.0 11.11.226.241 name Customer-B-GW
ip route 11.11.252.0 255.255.255.0 11.11.226.241 name Customer-B-GW
ip route 11.11.253.0 255.255.255.0 11.11.226.241 name Customer-B-GW
ip route 11.11.254.0 255.255.255.0 11.11.226.241 name Customer-B-GW
ip route 11.11.255.0 255.255.255.0 11.11.226.241 name Customer-B-GW
 
//Redundant Static routes for ZONE_D_E if RT-A is down
ip route 11.11.229.0 255.255.255.0 11.11.230.250 name Customer-B-GW1 redundant-aggregate
ip route 10.10.205.0 255.255.255.0 11.11.230.242 name Customer-B-GW2 redundant-aggregate
ip route 10.10.206.0 255.255.255.0 11.11.230.246 name Customer-B-GW3 redundant-aggregate
ip route 10.10.207.0 255.255.255.0 11.11.230.254 name Customer-B-GW4 redundant-aggregate
 
//ISP-C static routes pointing to internal loopback, do not forget to precise physically the interface
ip route 213.144.175.127 255.255.255.255 POS1/1/2 213.144.175.25 name Loopback-Peer-AS400
ip route 213.144.175.127 255.255.255.255 POS1/1/1 213.144.175.21 name Loopback-Peer-AS400
ip route 213.144.175.127 255.255.255.255 POS1/1/3 213.144.175.29 name Loopback-Peer-AS400
 
//Zone_B prefix list which will be labeled to ISP-C with community 100 and to Ebgp4 with 300:80
ip prefix-list ZONE_B seq 120 permit 11.11.240.0/24
ip prefix-list ZONE_B seq 130 permit 11.11.241.0/24
ip prefix-list ZONE_B seq 140 permit 11.11.242.0/24
ip prefix-list ZONE_B seq 150 permit 11.11.243.0/24
ip prefix-list ZONE_B seq 160 permit 11.11.244.0/24
ip prefix-list ZONE_B seq 170 permit 11.11.245.0/24
ip prefix-list ZONE_B seq 180 permit 11.11.246.0/24
ip prefix-list ZONE_B seq 190 permit 11.11.247.0/24
ip prefix-list ZONE_B seq 200 permit 11.11.248.0/24
ip prefix-list ZONE_B seq 210 permit 11.11.249.0/24
ip prefix-list ZONE_B seq 220 permit 11.11.250.0/24
ip prefix-list ZONE_B seq 230 permit 11.11.251.0/24
ip prefix-list ZONE_B seq 240 permit 11.11.252.0/24
ip prefix-list ZONE_B seq 250 permit 11.11.253.0/24
ip prefix-list ZONE_B seq 260 permit 11.11.254.0/24
ip prefix-list ZONE_B seq 270 permit 11.11.255.0/24
!
 
//Zone_D_E prefix list which will be labeled to Ebgp4 with community 300:80 and to Ebgp3 with 400:70
ip prefix-list ZONE_D_E seq 30 permit 10.10.205.0/24
ip prefix-list ZONE_D_E seq 40 permit 10.10.206.0/24
ip prefix-list ZONE_D_E seq 50 permit 10.10.207.0/24
ip prefix-list ZONE_D_E seq 60 permit 11.11.229.0/24
!
 
//Zone_G prefix list which will be labeled to ISP-B with community 300:100 and to ISP-C with 400:70
ip prefix-list ZONE_G seq 60 permit 11.11.232.0/24
ip prefix-list ZONE_G seq 70 permit 11.11.233.0/24
ip prefix-list ZONE_G seq 80 permit 11.11.234.0/24
ip prefix-list ZONE_G seq 90 permit 11.11.235.0/24
ip prefix-list ZONE_G seq 100 permit 11.11.236.0/24
ip prefix-list ZONE_G seq 110 permit 11.11.237.0/24
ip prefix-list ZONE_G seq 120 permit 11.11.238.0/24
ip prefix-list ZONE_G seq 130 permit 11.11.239.0/24
ip prefix-list ZONE_G seq 200 permit 10.10.192.0/24
ip prefix-list ZONE_G seq 210 permit 10.10.193.0/24
ip prefix-list ZONE_G seq 220 permit 10.10.194.0/24
ip prefix-list ZONE_G seq 230 permit 10.10.195.0/24
ip prefix-list ZONE_G seq 240 permit 10.10.196.0/24
ip prefix-list ZONE_G seq 250 permit 10.10.197.0/24
ip prefix-list ZONE_G seq 260 permit 10.10.198.0/24
ip prefix-list ZONE_G seq 270 permit 10.10.199.0/24
ip prefix-list ZONE_G seq 280 permit 10.10.200.0/24
ip prefix-list ZONE_G seq 290 permit 10.10.201.0/24
ip prefix-list ZONE_G seq 300 permit 10.10.202.0/24
ip prefix-list ZONE_G seq 310 permit 10.10.203.0/24
ip prefix-list ZONE_G seq 320 permit 10.10.204.0/24
 
//Route-map to receive full routing table from ISP-C and tag 90
route-map AS-400-INCOMING permit 10
match as-path 1
set local-preference 90
!
 
//Route-map to advertise ZONE_B on ISP-C as 1st ingress link
route-map AS-400-OUTGOING permit 10
match ip address prefix-list ZONE_B
!
 
//Route-map to advertise other zones and aggregated blocks as last backup ingress link on ISP-C
route-map AS-400-OUTGOING permit 20
match as-path 2
set community 400:70
!
 
//Route-map to label with 90, BGP table received from RT-A
route-map IBGP-Neighbor-IN permit 10
set local-preference 90
!
 
//Route-map to send FIB to RT-A (BGP table which includes routes from ZONE_B, ZONE_G etc … )
route-map IBGP-Neighbor-OUT permit 20
!
 
//Route-map to receive full routing table from ISP-B (localpref 100)
route-map AS-300-INCOMING permit 10
match as-path 4
!
//Route-map to advertise ZONE_G on ISP-B as 1st ingress link
route-map AS-300-OUTGOING permit 10
match ip address prefix-list ZONE_G
!
//Route-map to advertise ZONE_B on ISP-B as 2nd backup ingress link
route-map AS-300-OUTGOINGS permit 20
match ip address prefix-list ZONE_B
set community 300:80
!
//Route-map to advertise ZONE_D_E on ISP-B as 2nd backup ingress link
route-map AS-300-OUTGOINGSTM4 permit 30
match ip address prefix-list ZONE_D_E
set community 300:80
!
//Route-map to advertise remaining and aggregated prefixes of ISP-A on ISP-B as last backup ingress link
route-map AS-300-OUTGOINGSTM4 permit 40
match as-path 2
set community 300:70
 

top

Come back to Tutorial Index”

Advertisements