Saturday, 8 December 2012
Controlling BGP routes
Provider AS
AS12*(Regional)
AS34*(BackBone)
AS8(Tier1)
AS9(SH)
AS10(ST)
AS13(Tier1)
* Under a Single ISP
AS12(Regional) Import Community tag definition
12:110(Routes learn from ST)
12:19(Routes learn from SH)
12:134(Routes learn from BB)
12:111(Transit route)
12:112(Routes learn from full route customer)*1
12:113(Routes learn from Local route customer)*2
12:11(Routes learn from R1 POP)
12:12(Routes learn from R2 POP)
*1 full route means domestic routes + international route
*2 Local customer doesn't have international route
AS12(Regional) Export Community tag definition
12:210(Going to ST via local peering)
12:29(Going to SH via local peering)
12:234(Going to BB via local peering)
12:221(Going to Local route customer)
12:220(Going to Local+International)
12:222(Going to International route customer)
AS34(BB) Import Community tag definition
34:1012(Routes learn from Regional AS)
34:111(International routes)
34:112(Routes learn from full route customer)*1
34:113(Routes learn from Local route customer)*2
*1 full route means domestic routes + international route
*2 Local customer doesn't have international route
AS34(BB) Export Community tag definition
34:221(Going to Local route customer)
34:220(Going to Local+International)
34:222(Going to International route customer)
34:34(Specific routes)
AS9(SH) Import and Export Community tag definition
9:111(Routes learn from International)
9:113(Routes learn from Local peering)
9:222(Routes going to International)
10:222(International routes learn from ST)
AS10(ST) Import and Export Community tag definition
10:111(Routes learn from International)
10:113(Routes learn from Local peering)
10:222(Routes going to International)
9:222(International routes learn from SH)
BGP Peering
AS12
R1<IBGP>R2
AS34
R3<IBGP>R4
AS12 and AS9
R2<Local Peering>R9
AS12 and AS10
R1<Local Peering>R10
R2<Local Peering>R10
AS12 and AS34
R1<Local Peering>R4
R2<Local Peering>R3
R1<International Peering>R3
AS9 and AS10
R9<Local+International Peering>R10
AS34 and AS8
R4<International Peering>R8
AS9 and AS8
R9<International Peering>R8
AS10 and AS13
R10<International Peering>R13
AS8 and AS13
R8<International Peering>R13
Local Route Customer Peering
R1<>R7
R4<>R17
Full Route Customer Peering
R1<>R5
R2<>R12
R3<>R6
R9<>R11
R10<>R11
Peering Policy
Peering policy of AS12(Regional)
1.Local Peering with AS9(SH)
-AS9 sends routes originated locally,routes from its customers, and routes from ST peering
-AS12 sends routes originated locally, routes from customers(both Local route customer and Full route customer) and routes learn from AS34(BB)
Customization
- routes originated from AS9 are set higher LP on R2
-AS12 doesn't send to AS9 international routes learn from AS34
-R2 set lower local preference for the routes learn from AS 9 if the routes has as-path ^9_10
-AS9 alos doesn't send to AS12 international routes learn from AS8 and AS10(ST)
-AS9 sets higher local preference to routes learn from AS12 compared to routes learn from ST peering
2.Local Peering with AS10(ST)
..To be continued..
Full Configuration
R1 Config
interface Loopback0
ip address 1.1.1.1 255.255.255.255
!
interface Loopback1
ip address 1.1.11.1 255.255.255.0
!
interface FastEthernet0/0
ip address 192.168.12.1 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet0/1
ip address 192.168.17.1 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet1/0
ip address 192.168.13.1 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet2/0
ip address 192.168.14.1 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet3/0
ip address 192.168.101.1 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet4/0
ip address 192.168.15.1 255.255.255.0
duplex auto
speed auto
!
router ospf 1
log-adjacency-changes
network 1.1.1.1 0.0.0.0 area 0
network 192.168.12.1 0.0.0.0 area 0
!
router bgp 12
no synchronization
bgp log-neighbor-changes
network 1.1.11.0 mask 255.255.255.0
neighbor 2.2.2.2 remote-as 12
neighbor 2.2.2.2 update-source Loopback0
neighbor 2.2.2.2 next-hop-self
neighbor 2.2.2.2 send-community
neighbor 192.168.13.3 remote-as 34
neighbor 192.168.13.3 send-community
neighbor 192.168.13.3 soft-reconfiguration inbound
neighbor 192.168.13.3 route-map IPT_IN in
neighbor 192.168.13.3 route-map IPT_OUT out
neighbor 192.168.14.4 remote-as 34
neighbor 192.168.14.4 send-community
neighbor 192.168.14.4 soft-reconfiguration inbound
neighbor 192.168.14.4 route-map BB_PEERING_IN in
neighbor 192.168.14.4 route-map BB_PEERING_OUT out
neighbor 192.168.15.5 remote-as 5
neighbor 192.168.15.5 send-community
neighbor 192.168.15.5 route-map FULL_CUST_IN in
neighbor 192.168.15.5 route-map FULL_CUST_OUT out
neighbor 192.168.17.7 remote-as 7
neighbor 192.168.17.7 send-community
neighbor 192.168.17.7 route-map LOCAL_CUST_IN in
neighbor 192.168.17.7 route-map LOCAL_CUST_OUT out
neighbor 192.168.101.10 remote-as 10
neighbor 192.168.101.10 route-map ST_IN in
neighbor 192.168.101.10 route-map ST_OUT out
no auto-summary
!
ip forward-protocol nd
!
ip bgp-community new-format
ip community-list standard BB_OUT permit 12:234
ip community-list standard R2_POP permit 12:2 12:234
ip community-list standard FULL_ROUTE_CUST permit 12:220
ip community-list standard LOCAL_IN permit 12:113
ip community-list expanded ST_OUT permit 12:2[1-2]0
ip community-list expanded SH_OUT permit 12:2[2|9].
ip community-list expanded LOCAL_OUT permit 12:22[0|1]
ip community-list expanded FULL_OUT permit 12:2[0-9][0-9]
ip as-path access-list 1 deny ^$
ip as-path access-list 1 permit .*
ip as-path access-list 2 permit ^9_10
ip as-path access-list 3 permit ^10_9
ip as-path access-list 4 permit ^10$
ip as-path access-list 5 permit ^9$
!
no ip http server
no ip http secure-server
!
!
ip prefix-list AS11_1 seq 5 permit 11.11.0.0/17 le 24
!
ip prefix-list DEFAULT seq 5 permit 0.0.0.0/0
!
ip prefix-list SMALL_PREFIXES seq 5 permit 0.0.0.0/0 ge 25
!
route-map FULL_CUST_IN deny 10
match ip address prefix-list DEFAULT SMALL_PREFIXES
!
route-map FULL_CUST_IN permit 20
set community 12:112 12:220
!
route-map BB_PEERING_OUT deny 10
match ip address prefix-list DEFAULT SMALL_PREFIXES
!
route-map BB_PEERING_OUT permit 20
match community R2_POP
set metric 100
!
route-map BB_PEERING_OUT permit 30
match community BB_OUT
!
route-map BB_PEERING_OUT deny 40
match as-path 1
!
route-map BB_PEERING_OUT permit 50
set metric 100
!
route-map LOCAL_CUST_OUT deny 10
match ip address prefix-list DEFAULT SMALL_PREFIXES
!
route-map LOCAL_CUST_OUT permit 20
match community LOCAL_OUT
!
route-map LOCAL_CUST_OUT deny 30
match as-path 1
!
route-map LOCAL_CUST_OUT permit 40
!
route-map IPT_IN deny 10
match ip address prefix-list DEFAULT SMALL_PREFIXES
!
route-map IPT_IN permit 20
set community 12:111 12:222
!
route-map ST_OUT deny 10
match ip address prefix-list DEFAULT SMALL_PREFIXES
!
route-map ST_OUT permit 20
match community ST_OUT
!
route-map ST_OUT deny 30
match as-path 1
!
route-map ST_OUT permit 40
!
route-map BB_PEERING_IN deny 10
match ip address prefix-list DEFAULT SMALL_PREFIXES
!
route-map BB_PEERING_IN permit 20
set local-preference 150
set community 12:29 12:134 12:210 12:221
!
route-map FULL_CUST_OUT deny 10
match ip address prefix-list DEFAULT SMALL_PREFIXES
!
route-map FULL_CUST_OUT permit 20
match community FULL_OUT
!
route-map FULL_CUST_OUT deny 30
match as-path 1
!
route-map FULL_CUST_OUT permit 40
!
route-map LOCAL_CUST_IN deny 10
match ip address prefix-list DEFAULT SMALL_PREFIXES
!
route-map LOCAL_CUST_IN permit 20
set community 12:29 12:113 12:210 12:221 12:234
!
route-map IPT_OUT deny 10
match ip address prefix-list DEFAULT SMALL_PREFIXES
!
route-map IPT_OUT deny 20
match community LOCAL_IN
!
route-map IPT_OUT permit 30
match community FULL_ROUTE_CUST
!
route-map IPT_OUT deny 40
match as-path 1
!
route-map IPT_OUT permit 50
!
route-map ST_IN deny 10
match ip address prefix-list DEFAULT SMALL_PREFIXES
!
route-map ST_IN permit 20
match ip address prefix-list AS11_1
set local-preference 200
set community 12:1 12:110 12:221 12:234
!
route-map ST_IN permit 30
match as-path 4
set local-preference 200
set community 12:1 12:110 12:221 12:234
!
route-map ST_IN permit 40
match as-path 3
set local-preference 140
set community 12:1 12:110 12:221 12:234
!
route-map ST_IN permit 50
set local-preference 150
set community 12:1 12:110 12:221 12:234
R2 Config
interface Loopback0
ip address 2.2.2.2 255.255.255.255
!
interface FastEthernet0/0
ip address 192.168.12.2 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet0/1
ip address 192.168.212.2 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet1/0
ip address 192.168.23.2 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet2/0
ip address 192.168.102.2 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet3/0
ip address 192.168.29.2 255.255.255.0
duplex auto
speed auto
!
router ospf 1
log-adjacency-changes
network 2.2.2.2 0.0.0.0 area 0
network 192.168.12.2 0.0.0.0 area 0
!
router bgp 12
no synchronization
bgp log-neighbor-changes
neighbor 1.1.1.1 remote-as 12
neighbor 1.1.1.1 update-source Loopback0
neighbor 1.1.1.1 next-hop-self
neighbor 1.1.1.1 send-community
neighbor 192.168.23.3 remote-as 34
neighbor 192.168.23.3 send-community
neighbor 192.168.23.3 soft-reconfiguration inbound
neighbor 192.168.23.3 route-map BB_PEERING_IN in
neighbor 192.168.23.3 route-map BB_PEERING_OUT out
neighbor 192.168.29.9 remote-as 9
neighbor 192.168.29.9 send-community
neighbor 192.168.29.9 route-map SH_IN in
neighbor 192.168.29.9 route-map SH_OUT out
neighbor 192.168.102.10 remote-as 10
neighbor 192.168.102.10 send-community
neighbor 192.168.102.10 route-map ST_IN in
neighbor 192.168.102.10 route-map ST_OUT out
neighbor 192.168.212.12 remote-as 12
neighbor 192.168.212.12 send-community
neighbor 192.168.212.12 route-map FULL_CUST_IN in
neighbor 192.168.212.12 route-map FULL_CUST_OUT out
no auto-summary
!
ip forward-protocol nd
!
ip bgp-community new-format
ip community-list standard BB_OUT permit 12:234
ip community-list standard R1_POP permit 12:1 12:234
ip community-list expanded LOCAL_OUT permit 12:22[0|1]
ip community-list expanded ST_OUT permit 12:2[1-2]0
ip community-list expanded SH_OUT permit 12:2(9)|(20)
ip community-list expanded FULL_OUT permit 12:2[0-9][0-9]
ip as-path access-list 1 deny ^$
ip as-path access-list 1 permit .*
ip as-path access-list 2 permit ^9_10
ip as-path access-list 3 permit ^10_9
ip as-path access-list 4 permit ^10$
ip as-path access-list 5 permit ^9$
!
no ip http server
no ip http secure-server
!
!
ip prefix-list AS11 seq 5 permit 11.11.0.0/16 le 24
!
ip prefix-list AS11_2 seq 5 permit 11.11.128.0/17 le 24
!
ip prefix-list DEFAULT seq 5 permit 0.0.0.0/0
!
ip prefix-list SMALL_PREFIXES seq 5 permit 0.0.0.0/0 ge 25
!
route-map FULL_CUST_IN deny 10
match ip address prefix-list DEFAULT SMALL_PREFIXES
!
route-map FULL_CUST_IN permit 20
set community 12:112 12:220
!
route-map SH_OUT deny 10
match ip address prefix-list DEFAULT SMALL_PREFIXES
!
route-map SH_OUT permit 20
match community SH_OUT
!
route-map SH_OUT deny 30
match as-path 1
!
route-map SH_OUT permit 40
!
route-map BB_PEERING_OUT deny 10
match ip address prefix-list DEFAULT SMALL_PREFIXES
!
route-map BB_PEERING_OUT permit 20
match community R1_POP
set metric 100
!
route-map BB_PEERING_OUT permit 30
match community BB_OUT
!
route-map BB_PEERING_OUT deny 40
match as-path 1
!
route-map BB_PEERING_OUT permit 50
set metric 100
!
route-map ST_OUT deny 10
match ip address prefix-list DEFAULT SMALL_PREFIXES
!
route-map ST_OUT permit 20
match community ST_OUT
!
route-map ST_OUT deny 30
match as-path 1
!
route-map ST_OUT permit 40
!
route-map SH_IN deny 10
match ip address prefix-list DEFAULT SMALL_PREFIXES
!
route-map SH_IN permit 20
match ip address prefix-list AS11
set local-preference 140
set community 12:2 12:19 12:221 12:234
!
route-map SH_IN permit 30
match as-path 5
set local-preference 200
set community 12:2 12:19 12:221 12:234
!
route-map SH_IN permit 40
match as-path 2
set local-preference 130
set community 12:2 12:19 12:221 12:234
!
route-map SH_IN permit 50
set local-preference 200
set community 12:2 12:19 12:221 12:234
!
route-map BB_PEERING_IN deny 10
match ip address prefix-list DEFAULT SMALL_PREFIXES
!
route-map BB_PEERING_IN permit 20
set local-preference 200
set community 12:29 12:134 12:210 12:221
!
route-map FULL_CUST_OUT deny 10
match ip address prefix-list DEFAULT SMALL_PREFIXES
!
route-map FULL_CUST_OUT permit 20
match community FULL_OUT
!
route-map FULL_CUST_OUT deny 30
match as-path 1
!
route-map FULL_CUST_OUT permit 40
!
route-map ST_IN deny 10
match ip address prefix-list DEFAULT SMALL_PREFIXES
!
route-map ST_IN permit 20
match ip address prefix-list AS11_2
set local-preference 200
set community 12:2 12:110 12:221 12:234
!
route-map ST_IN permit 30
match as-path 4
set local-preference 200
set community 12:2 12:110 12:221 12:234
!
route-map ST_IN permit 40
match as-path 3
set local-preference 140
set community 12:2 12:110 12:221 12:234
!
route-map ST_IN permit 50
set local-preference 200
set community 12:2 12:110 12:221 12:234
R3 Config
interface Loopback0
ip address 3.3.3.3 255.255.255.255
!
interface Loopback1
ip address 3.4.34.3 255.255.255.0
!
interface FastEthernet0/0
ip address 192.168.36.3 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet0/1
ip address 192.168.34.3 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet1/0
ip address 192.168.13.3 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet2/0
ip address 192.168.23.3 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet3/0
no ip address
shutdown
duplex auto
speed auto
!
router ospf 1
log-adjacency-changes
network 3.3.3.3 0.0.0.0 area 0
network 192.168.34.3 0.0.0.0 area 0
!
router bgp 34
no synchronization
bgp log-neighbor-changes
redistribute connected route-map REDIS_CONNECTED
redistribute static route-map REDIS_STATIC
neighbor 4.4.4.4 remote-as 34
neighbor 4.4.4.4 update-source Loopback0
neighbor 4.4.4.4 next-hop-self
neighbor 4.4.4.4 send-community
neighbor 192.168.13.1 remote-as 12
neighbor 192.168.13.1 send-community
neighbor 192.168.13.1 remove-private-as
neighbor 192.168.13.1 soft-reconfiguration inbound
neighbor 192.168.13.1 route-map REG_IPT_IN in
neighbor 192.168.13.1 route-map REG_IPT_OUT out
neighbor 192.168.23.2 remote-as 12
neighbor 192.168.23.2 send-community
neighbor 192.168.23.2 remove-private-as
neighbor 192.168.23.2 soft-reconfiguration inbound
neighbor 192.168.23.2 route-map LOCAL_PEERING_IN in
neighbor 192.168.23.2 route-map LOCAL_PEERING_OUT out
neighbor 192.168.36.6 remote-as 6
neighbor 192.168.36.6 send-community
neighbor 192.168.36.6 remove-private-as
neighbor 192.168.36.6 route-map FULL_CUST_IN in
neighbor 192.168.36.6 route-map FULL_CUST_OUT out
no auto-summary
!
ip forward-protocol nd
ip route 3.3.0.0 255.255.192.0 Null0
!
ip bgp-community new-format
ip community-list standard IPT_OUT permit 34:111 34:222
ip community-list standard IPT_IN permit 34:111
ip community-list standard SPECIFIC permit 34:34
ip community-list standard LOCAL_IN permit 34:113
ip community-list standard FULL_ROUTE_CUST permit 12:220
ip community-list expanded LOCAL_OUT permit 34:22[0|1]
ip community-list expanded FULL_OUT permit 34:2[0-9][0-9]
ip as-path access-list 1 deny ^$
ip as-path access-list 1 permit .*
ip as-path access-list 2 permit ^$
ip as-path access-list 3 permit _12_
!
no ip http server
no ip http secure-server
!
!
ip prefix-list DEFAULT seq 5 permit 0.0.0.0/0
!
ip prefix-list SMALL_PREFIXES seq 5 permit 0.0.0.0/0 ge 25
!
route-map FULL_CUST_IN deny 10
match ip address prefix-list DEFAULT SMALL_PREFIXES
!
route-map FULL_CUST_IN permit 20
set community 34:112 34:220
!
route-map LOCAL_PEERING_IN deny 10
match ip address prefix-list DEFAULT SMALL_PREFIXES
!
route-map LOCAL_PEERING_IN permit 20
set local-preference 200
set community 34:113 34:221
!
route-map REDIS_STATIC permit 10
match source-protocol static
set community 34:220 34:221 34:222
!
route-map REG_IPT_IN deny 10
match ip address prefix-list DEFAULT SMALL_PREFIXES
!
route-map REG_IPT_IN permit 20
set community 34:220 34:1012
!
route-map LOCAL_PEERING_OUT deny 10
match ip address prefix-list DEFAULT SMALL_PREFIXES
!
route-map LOCAL_PEERING_OUT deny 20
match community IPT_IN
!
route-map LOCAL_PEERING_OUT deny 30
match community SPECIFIC
!
route-map LOCAL_PEERING_OUT permit 40
match community LOCAL_OUT
!
route-map LOCAL_PEERING_OUT permit 50
match as-path 2
!
route-map REDIS_CONNECTED permit 10
match interface Loopback1
set community 34:34
!
route-map FULL_CUST_OUT deny 10
match ip address prefix-list DEFAULT SMALL_PREFIXES
!
route-map FULL_CUST_OUT deny 15
match community SPECIFIC
!
route-map FULL_CUST_OUT permit 20
match community FULL_OUT
!
route-map FULL_CUST_OUT permit 30
match as-path 2
!
route-map REG_IPT_OUT deny 10
match ip address prefix-list DEFAULT SMALL_PREFIXES
!
route-map REG_IPT_OUT deny 20
match community SPECIFIC
!
route-map REG_IPT_OUT deny 30
match community LOCAL_IN
!
route-map REG_IPT_OUT permit 40
match community IPT_OUT
!
route-map REG_IPT_OUT permit 50
match community FULL_ROUTE_CUST
!
route-map REG_IPT_OUT permit 60
match as-path 2
R4 Config
interface Loopback0
ip address 4.4.4.4 255.255.255.255
!
interface FastEthernet0/0
ip address 192.168.174.4 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet0/1
ip address 192.168.34.4 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet1/0
ip address 192.168.14.4 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet2/0
ip address 192.168.48.4 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet3/0
no ip address
shutdown
duplex auto
speed auto
!
router ospf 1
log-adjacency-changes
network 4.4.4.4 0.0.0.0 area 0
network 192.168.34.4 0.0.0.0 area 0
!
router bgp 34
no synchronization
bgp log-neighbor-changes
neighbor 3.3.3.3 remote-as 34
neighbor 3.3.3.3 update-source Loopback0
neighbor 3.3.3.3 next-hop-self
neighbor 3.3.3.3 send-community
neighbor 192.168.14.1 remote-as 12
neighbor 192.168.14.1 send-community
neighbor 192.168.14.1 remove-private-as
neighbor 192.168.14.1 soft-reconfiguration inbound
neighbor 192.168.14.1 route-map LOCAL_PEERING_IN in
neighbor 192.168.14.1 route-map LOCAL_PEERING_OUT out
neighbor 192.168.48.8 remote-as 8
neighbor 192.168.48.8 remove-private-as
neighbor 192.168.48.8 route-map IPT_IN in
neighbor 192.168.48.8 route-map IPT_OUT out
neighbor 192.168.174.17 remote-as 65535
neighbor 192.168.174.17 route-map LOCAL_CUST_IN in
neighbor 192.168.174.17 route-map LOCAL_CUST_OUT out
no auto-summary
!
ip forward-protocol nd
!
ip bgp-community new-format
ip community-list standard IPT_IN permit 34:111
ip community-list standard SPECIFIC permit 34:34
ip community-list standard FULL_ROUTE_CUST permit 34:220
ip community-list standard TRANSIT permit 34:220 34:1012
ip community-list standard LOCAL_IN permit 34:113
ip community-list expanded LOCAL_OUT permit 34:22[0|1]
ip as-path access-list 1 deny ^$
ip as-path access-list 1 permit .*
ip as-path access-list 2 permit ^$
ip as-path access-list 3 permit _12_
!
no ip http server
no ip http secure-server
!
!
ip prefix-list DEFAULT seq 5 permit 0.0.0.0/0
!
ip prefix-list SMALL_PREFIXES seq 5 permit 0.0.0.0/0 ge 25
!
route-map LOCAL_PEERING_IN deny 10
match ip address prefix-list DEFAULT SMALL_PREFIXES
!
route-map LOCAL_PEERING_IN permit 20
set local-preference 200
set community 34:113 34:221
!
route-map LOCAL_CUST_OUT deny 10
match ip address prefix-list DEFAULT
!
route-map LOCAL_CUST_OUT deny 15
match community SPECIFIC
!
route-map LOCAL_CUST_OUT permit 20
match community LOCAL_OUT
!
route-map LOCAL_CUST_OUT permit 30
match as-path 2
!
route-map IPT_IN deny 10
match ip address prefix-list DEFAULT SMALL_PREFIXES
!
route-map IPT_IN deny 20
match as-path 3
!
route-map IPT_IN permit 30
set community 34:111 34:222
!
route-map LOCAL_PEERING_OUT deny 10
match ip address prefix-list DEFAULT SMALL_PREFIXES
!
route-map LOCAL_PEERING_OUT deny 20
match community IPT_IN
!
route-map LOCAL_PEERING_OUT deny 30
match community SPECIFIC
!
route-map LOCAL_PEERING_OUT permit 40
match community LOCAL_OUT
!
route-map LOCAL_PEERING_OUT deny 50
match as-path 1
!
route-map LOCAL_PEERING_OUT permit 60
!
route-map LOCAL_CUST_IN deny 10
match ip address prefix-list DEFAULT SMALL_PREFIXES
!
route-map LOCAL_CUST_IN permit 20
set community 34:113 34:221
!
route-map IPT_OUT deny 10
match ip address prefix-list DEFAULT SMALL_PREFIXES
!
route-map IPT_OUT deny 20
match community SPECIFIC
!
route-map IPT_OUT deny 30
match community LOCAL_IN
!
route-map IPT_OUT permit 40
match community FULL_ROUTE_CUST
!
route-map IPT_OUT permit 50
match community TRANSIT
!
route-map IPT_OUT deny 60
match as-path 1
!
route-map IPT_OUT permit 70
R5 Config
interface Loopback1
ip address 5.5.1.5 255.255.255.0
!
interface FastEthernet0/0
no ip address
shutdown
duplex auto
speed auto
!
interface FastEthernet0/1
no ip address
shutdown
duplex auto
speed auto
!
interface FastEthernet1/0
ip address 192.168.15.5 255.255.255.0
duplex auto
speed auto
!
router bgp 5
no synchronization
bgp log-neighbor-changes
network 5.5.1.0 mask 255.255.255.0
neighbor 192.168.15.1 remote-as 12
no auto-summary
R6 Config
interface Loopback1
ip address 6.6.1.6 255.255.255.0
!
interface FastEthernet0/0
ip address 192.168.36.6 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet0/1
no ip address
shutdown
duplex auto
speed auto
!
router bgp 6
no synchronization
bgp log-neighbor-changes
network 6.6.1.0 mask 255.255.255.0
neighbor 192.168.36.3 remote-as 34
no auto-summary
R7 Config
interface Loopback1
ip address 7.7.1.7 255.255.255.0
!
interface FastEthernet0/0
ip address 192.168.17.7 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet0/1
no ip address
shutdown
duplex auto
speed auto
!
interface FastEthernet1/0
no ip address
shutdown
duplex auto
speed auto
!
interface FastEthernet2/0
no ip address
shutdown
duplex auto
speed auto
!
router bgp 7
no synchronization
bgp log-neighbor-changes
network 7.7.1.0 mask 255.255.255.0
neighbor 192.168.17.1 remote-as 12
no auto-summary
R8 Config
interface Loopback1
ip address 8.8.1.8 255.255.255.0
!
interface FastEthernet0/0
ip address 192.168.138.8 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet0/1
no ip address
shutdown
duplex auto
speed auto
!
interface FastEthernet1/0
ip address 192.168.48.8 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet2/0
ip address 192.168.89.8 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet3/0
ip address 192.168.108.8 255.255.255.0
duplex auto
speed auto
!
router bgp 8
no synchronization
bgp log-neighbor-changes
network 8.8.1.0 mask 255.255.255.0
neighbor 192.168.48.4 remote-as 34
neighbor 192.168.89.9 remote-as 9
neighbor 192.168.138.13 remote-as 13
no auto-summary
R9 Config
interface Loopback1
ip address 9.9.1.9 255.255.255.0
!
interface FastEthernet0/0
ip address 192.168.119.9 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet0/1
ip address 192.168.109.9 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet1/0
ip address 192.168.29.9 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet2/0
ip address 192.168.89.9 255.255.255.0
duplex auto
speed auto
!
router bgp 9
no synchronization
bgp log-neighbor-changes
network 9.9.1.0 mask 255.255.255.0
neighbor 192.168.29.2 remote-as 12
neighbor 192.168.29.2 route-map LOCAL_PEERING_IN in
neighbor 192.168.29.2 route-map LOCAL_PEERING_OUT out
neighbor 192.168.89.8 remote-as 8
neighbor 192.168.89.8 route-map IPT_IN in
neighbor 192.168.89.8 route-map IPT_OUT out
neighbor 192.168.109.10 remote-as 10
neighbor 192.168.109.10 send-community
neighbor 192.168.109.10 soft-reconfiguration inbound
neighbor 192.168.109.10 route-map ST_PEERING_IN in
neighbor 192.168.109.10 route-map ST_PEERING_OUT out
neighbor 192.168.119.11 remote-as 11
neighbor 192.168.119.11 route-map CUST in
no auto-summary
!
ip forward-protocol nd
!
ip bgp-community new-format
ip community-list standard IPT_IN permit 9:111
ip community-list standard LOCAL_IN permit 9:113
ip community-list standard IPT_OUT permit 9:222
ip community-list standard ST_IPT permit 10:222
ip as-path access-list 1 permit ^10_12
ip as-path access-list 2 permit ^11$
!
no ip http server
no ip http secure-server
!
!
ip prefix-list DEFAULT seq 5 permit 0.0.0.0/0
!
ip prefix-list SMALL_PREFIXES seq 5 permit 0.0.0.0/0 ge 25
!
route-map LOCAL_PEERING_IN deny 10
match ip address prefix-list DEFAULT SMALL_PREFIXES
!
route-map LOCAL_PEERING_IN permit 20
set local-preference 200
set community 9:113
!
route-map ST_PEERING_OUT deny 10
match ip address prefix-list DEFAULT SMALL_PREFIXES
!
route-map ST_PEERING_OUT permit 20
match community IPT_IN
set comm-list IPT_IN delete
!
route-map ST_PEERING_OUT permit 30
set community none
!
route-map CUST permit 10
match as-path 2
set local-preference 200
!
route-map IPT_IN deny 10
match ip address prefix-list DEFAULT SMALL_PREFIXES
!
route-map IPT_IN permit 20
set local-preference 150
set community 9:111 9:222
!
route-map LOCAL_PEERING_OUT deny 10
match ip address prefix-list DEFAULT SMALL_PREFIXES
!
route-map LOCAL_PEERING_OUT deny 20
match community IPT_IN
!
route-map LOCAL_PEERING_OUT permit 30
!
route-map ST_PEERING_IN deny 10
match ip address prefix-list DEFAULT SMALL_PREFIXES
!
route-map ST_PEERING_IN permit 20
match community ST_IPT
set local-preference 140
set community 9:111 9:113
!
route-map ST_PEERING_IN permit 30
match as-path 1
set local-preference 160
!
route-map ST_PEERING_IN permit 40
set local-preference 150
!
route-map IPT_OUT deny 10
match ip address prefix-list DEFAULT SMALL_PREFIXES
!
route-map IPT_OUT deny 20
match community LOCAL_IN
!
route-map IPT_OUT permit 30
R10 Config
interface FastEthernet0/0
ip address 192.168.110.10 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet0/1
ip address 192.168.109.10 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet1/0
ip address 192.168.101.10 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet2/0
ip address 192.168.102.10 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet3/0
ip address 192.168.113.10 255.255.255.0
duplex auto
speed auto
!
router bgp 10
no synchronization
bgp log-neighbor-changes
neighbor 192.168.101.1 remote-as 12
neighbor 192.168.101.1 route-map LOCAL_PEERING_IN in
neighbor 192.168.101.1 route-map LOCAL_PEERING_OUT out
neighbor 192.168.102.2 remote-as 12
neighbor 192.168.102.2 route-map LOCAL_PEERING_IN in
neighbor 192.168.102.2 route-map LOCAL_PEERING_OUT out
neighbor 192.168.109.9 remote-as 9
neighbor 192.168.109.9 send-community
neighbor 192.168.109.9 soft-reconfiguration inbound
neighbor 192.168.109.9 route-map SH_PEERING_IN in
neighbor 192.168.109.9 route-map SH_PEERING_OUT out
neighbor 192.168.110.11 remote-as 11
neighbor 192.168.110.11 route-map CUST in
neighbor 192.168.113.13 remote-as 13
neighbor 192.168.113.13 route-map IPT_IN in
neighbor 192.168.113.13 route-map IPT_OUT out
no auto-summary
!
ip forward-protocol nd
!
ip bgp-community new-format
ip community-list standard IPT_IN permit 10:111
ip community-list standard LOCAL_IN permit 10:113
ip community-list standard IPT_OUT permit 10:222
ip community-list standard SH_IPT permit 9:222
ip as-path access-list 1 permit ^9_12_
ip as-path access-list 2 permit ^11$
!
ip http server
no ip http secure-server
!
!
ip prefix-list DEFAULT seq 5 permit 0.0.0.0/0
!
ip prefix-list SMALL_PREFIXES seq 5 permit 0.0.0.0/0 ge 25
!
route-map LOCAL_PEERING_IN deny 10
match ip address prefix-list DEFAULT SMALL_PREFIXES
set local-preference 200
!
route-map LOCAL_PEERING_IN permit 20
set local-preference 200
set community 10:113
!
route-map CUST permit 10
match as-path 2
set local-preference 200
!
route-map IPT_IN deny 10
match ip address prefix-list DEFAULT SMALL_PREFIXES
!
route-map IPT_IN permit 20
set local-preference 150
set community 10:111 10:222
!
route-map SH_PEERING_OUT deny 10
match ip address prefix-list DEFAULT SMALL_PREFIXES
!
route-map SH_PEERING_OUT permit 20
match community IPT_IN
set comm-list IPT_IN delete
!
route-map SH_PEERING_OUT permit 30
set community none
!
route-map LOCAL_PEERING_OUT deny 10
match ip address prefix-list DEFAULT SMALL_PREFIXES
!
route-map LOCAL_PEERING_OUT deny 20
match community IPT_IN
!
route-map LOCAL_PEERING_OUT permit 30
!
route-map IPT_OUT deny 10
match ip address prefix-list DEFAULT SMALL_PREFIXES
!
route-map IPT_OUT deny 20
match community LOCAL_IN
!
route-map IPT_OUT permit 30
!
route-map SH_PEERING_IN deny 10
match ip address prefix-list DEFAULT SMALL_PREFIXES
!
route-map SH_PEERING_IN permit 20
match community SH_IPT
set local-preference 140
set community 10:111 10:113
!
route-map SH_PEERING_IN permit 30
match as-path 1
set local-preference 160
!
route-map SH_PEERING_IN permit 40
set local-preference 150
R11 Config
interface Loopback1
ip address 11.11.1.11 255.255.255.0
!
interface Loopback129
ip address 11.11.129.11 255.255.255.0
!
interface FastEthernet0/0
ip address 192.168.110.11 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet0/1
ip address 192.168.119.11 255.255.255.0
duplex auto
speed auto
!
router bgp 11
no synchronization
bgp log-neighbor-changes
network 11.11.1.0 mask 255.255.255.0
network 11.11.129.0 mask 255.255.255.0
neighbor 192.168.110.10 remote-as 10
neighbor 192.168.110.10 route-map OUT out
neighbor 192.168.119.9 remote-as 9
neighbor 192.168.119.9 route-map OUT out
no auto-summary
!
ip forward-protocol nd
!
ip bgp-community new-format
ip as-path access-list 1 permit ^$
!
ip http server
no ip http secure-server
!
!
route-map OUT permit 10
match as-path 1
R12 Config
interface FastEthernet0/0
ip address 192.168.212.12 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet0/1
no ip address
shutdown
duplex auto
speed auto
!
router bgp 12
no synchronization
bgp log-neighbor-changes
neighbor 192.168.212.2 remote-as 12
no auto-summary
R13 Config
interface FastEthernet0/0
ip address 192.168.138.13 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet0/1
ip address 192.168.113.13 255.255.255.0
speed 100
full-duplex
!
router bgp 13
no synchronization
bgp log-neighbor-changes
neighbor 192.168.113.10 remote-as 10
neighbor 192.168.138.8 remote-as 8
no auto-summary
R17 Config
interface Loopback1
ip address 17.17.1.17 255.255.255.0
!
interface FastEthernet0/0
ip address 192.168.174.17 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet0/1
no ip address
shutdown
duplex auto
speed auto
!
router bgp 65535
no synchronization
bgp log-neighbor-changes
network 17.17.1.0 mask 255.255.255.0
neighbor 192.168.174.4 remote-as 34
no auto-summary
Labels:
bgp
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment