Wednesday, 29 August 2012
BGP Route Aggregation, Route Unsuppression, Default-Route Injection
Objectives
1.AS12 aggregate 203.81.0.0/16 and advertise including the AS path whose advertised prefixes falls within the supernet
2.AS3 needs to receive supernet and 5.5.5.0.24
3.AS3 needs to prevent not to become transit AS between two ISPs
4.AS3 should use cheap ISP as the primary ISP
5,AS4 is the customer who wants all the specific prefixes
6.AS6 needs only default-route to reach the rest of the network
7.AS 4 and AS6 should use the direct link between them to reach each other prefixes
R1 Config
interface Loopback0
ip address 203.81.1.1 255.255.255.0
!
interface FastEthernet0/0
ip address 192.168.12.1 255.255.255.0
!
interface FastEthernet0/1
ip address 192.168.15.1 255.255.255.0
!
interface FastEthernet1/0
ip address 192.168.16.1 255.255.255.0
!
router bgp 12
no synchronization
bgp router-id 1.1.1.1
bgp log-neighbor-changes
network 203.81.1.0
aggregate-address 203.81.0.0 255.255.0.0 as-set summary-only advertise-map REMOVE-AS3_PATH
neighbor 192.168.12.2 remote-as 12
neighbor 192.168.12.2 next-hop-self
neighbor 192.168.15.5 remote-as 5
neighbor 192.168.16.6 remote-as 6
neighbor 192.168.16.6 default-originate
neighbor 192.168.16.6 route-map DENY-ALL out
no auto-summary
!
ip prefix-list R3 seq 5 permit 203.81.3.0/24
!
route-map REMOVE-AS3_PATH deny 10
match ip address prefix-list R3
!
route-map REMOVE-AS3_PATH permit 100
!
route-map DENY-ALL deny 10
R2 Config
interface Loopback0
ip address 203.81.2.2 255.255.255.0
!
interface FastEthernet0/0
ip address 192.168.12.2 255.255.255.0
!
interface FastEthernet0/1
ip address 192.168.24.2 255.255.255.0
!
interface FastEthernet1/0
ip address 192.168.23.2 255.255.255.0
!
router bgp 12
no synchronization
bgp router-id 2.2.2.2
bgp log-neighbor-changes
network 203.81.2.0
aggregate-address 203.81.0.0 255.255.0.0 as-set summary-only advertise-map REMOVE-AS3_PATH
neighbor 192.168.12.1 remote-as 12
neighbor 192.168.12.1 next-hop-self
neighbor 192.168.23.3 remote-as 3
neighbor 192.168.24.4 remote-as 4
neighbor 192.168.24.4 unsuppress-map SPECIFIC_PREFIXES
no auto-summary
!
ip prefix-list SPECIFIC_PREFIXES seq 5 permit 203.81.3.0/24
ip prefix-list SPECIFIC_PREFIXES seq 10 permit 203.81.1.0/24
ip prefix-list SPECIFIC_PREFIXES seq 15 permit 203.81.2.0/24
ip prefix-list SPECIFIC_PREFIXES seq 20 permit 203.81.6.0/24
!
route-map REMOVE-AS3_PATH deny 10
match ip address prefix-list R3
!
route-map REMOVE-AS3_PATH permit 100
!
route-map SPECIFIC_PREFIXES permit 10
match ip address prefix-list SPECIFIC_PREFIXES
R3 Config
interface Loopback0
ip address 203.81.3.3 255.255.255.0
!
interface FastEthernet0/0
ip address 192.168.23.3 255.255.255.0
!
interface FastEthernet0/1
ip address 192.168.35.3 255.255.255.0
!
router bgp 3
no synchronization
bgp router-id 3.3.3.3
bgp log-neighbor-changes
network 203.81.3.0
neighbor 192.168.23.2 remote-as 12
neighbor 192.168.23.2 route-map PREPEND-AS in
neighbor 192.168.23.2 route-map PREVENT-TRANSIT-AS out
neighbor 192.168.35.5 remote-as 5
neighbor 192.168.35.5 route-map PREVENT-TRANSIT-AS out
no auto-summary
!
route-map PREVENT-TRANSIT-AS permit 10
match as-path 1
!
route-map PREPEND-AS permit 10
set as-path prepend 3 3 3
R4 Config
interface Loopback0
ip address 203.81.4.4 255.255.255.0
!
interface FastEthernet0/0
ip address 192.168.24.4 255.255.255.0
!
interface FastEthernet0/1
ip address 192.168.46.4 255.255.255.0
!
router bgp 4
no synchronization
bgp router-id 4.4.4.4
bgp log-neighbor-changes
network 203.81.4.0
neighbor 192.168.24.2 remote-as 12
neighbor 192.168.46.6 remote-as 6
neighbor 192.168.46.6 route-map R4-PREFIX out
no auto-summary
!
ip prefix-list R4 seq 5 permit 203.81.4.0/24
!
route-map R4-PREFIX permit 10
match ip address prefix-list R4
R5 Config
interface Loopback0
ip address 5.5.5.5 255.255.255.0
!
interface FastEthernet0/0
ip address 192.168.15.5 255.255.255.0
!
interface FastEthernet0/1
ip address 192.168.35.5 255.255.255.0
!
router bgp 5
no synchronization
bgp router-id 5.5.5.5
bgp log-neighbor-changes
network 5.5.5.0 mask 255.255.255.0
neighbor 192.168.15.1 remote-as 12
neighbor 192.168.35.3 remote-as 3
no auto-summary
R6 Config
interface Loopback0
ip address 203.81.6.6 255.255.255.0
!
interface FastEthernet0/0
ip address 192.168.16.6 255.255.255.0
!
interface FastEthernet0/1
ip address 192.168.46.6 255.255.255.0
!
router bgp 6
no synchronization
bgp router-id 6.6.6.6
bgp log-neighbor-changes
network 203.81.6.0
neighbor 192.168.16.1 remote-as 12
neighbor 192.168.46.4 remote-as 4
neighbor 192.168.46.4 route-map R6-PREFIX out
no auto-summary
!
ip prefix-list R6 seq 5 permit 203.81.6.0/24
!
route-map R6-PREFIX permit 10
match ip address prefix-list R6
Verification
R5#show ip bgp
Network Next Hop Metric LocPrf Weight Path
*> 5.5.5.0/24 0.0.0.0 0 32768 i
*> 203.81.0.0/16 192.168.15.1 0 0 12 {6,4} i
*> 203.81.3.0 192.168.35.3 0 0 3 i
R3#show ip bgp
Network Next Hop Metric LocPrf Weight Path
* 5.5.5.0/24 192.168.23.2 0 3 3 3 12 5 i
*> 192.168.35.5 0 0 5 i
*> 203.81.0.0/16 192.168.35.5 0 5 12 {6,4} i
* 192.168.23.2 0 0 3 3 3 12 {4,6} i
*> 203.81.3.0 0.0.0.0 0 32768 i
R3#show ip bgp neighbor 192.168.35.5 advertised-routes
Network Next Hop Metric LocPrf Weight Path
*> 203.81.3.0 0.0.0.0 0 32768 i
R3#show ip bgp neighbor 192.168.23.2 advertised-routes
Network Next Hop Metric LocPrf Weight Path
*> 203.81.3.0 0.0.0.0 0 32768 i
R4#show ip bgp
Network Next Hop Metric LocPrf Weight Path
*> 5.5.5.0/24 192.168.24.2 0 12 5 i
*> 203.81.2.0 192.168.24.2 0 0 12 i
*> 203.81.3.0 192.168.24.2 0 12 3 i
*> 203.81.4.0 0.0.0.0 0 32768 i
*> 203.81.6.0 192.168.46.6 0 0 6 i
R6#show ip bgp
Network Next Hop Metric LocPrf Weight Path
*> 0.0.0.0 192.168.16.1 0 0 12 i
*> 203.81.4.0 192.168.46.4 0 0 4 i
*> 203.81.6.0 0.0.0.0 0 32768 i
Labels:
bgp
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment