54 lines
1.7 KiB
Text
54 lines
1.7 KiB
Text
|
router bgp 65001
|
||
|
bgp router-id 192.0.2.1
|
||
|
no bgp network import-check
|
||
|
neighbor 203.0.113.1 remote-as 65002
|
||
|
neighbor 203.0.113.1 description r2
|
||
|
neighbor 203.0.113.1 timers 3 10
|
||
|
neighbor 203.0.113.3 remote-as 5555
|
||
|
neighbor 203.0.113.3 description r5
|
||
|
neighbor 203.0.113.3 timers 3 10
|
||
|
!
|
||
|
address-family ipv4 unicast
|
||
|
network 100.64.0.0/32
|
||
|
network 100.64.0.1/32
|
||
|
network 100.64.0.2/32
|
||
|
network 100.64.0.3/32
|
||
|
network 100.64.0.4/32
|
||
|
network 100.64.0.5/32
|
||
|
neighbor 203.0.113.1 route-map set-as-paths out
|
||
|
neighbor 203.0.113.3 route-map set-as-paths out
|
||
|
exit-address-family
|
||
|
!
|
||
|
ip prefix-list match-0 seq 5 permit 100.64.0.0/32
|
||
|
ip prefix-list match-1 seq 5 permit 100.64.0.1/32
|
||
|
ip prefix-list match-2 seq 5 permit 100.64.0.2/32
|
||
|
ip prefix-list match-3 seq 5 permit 100.64.0.3/32
|
||
|
ip prefix-list match-4 seq 5 permit 100.64.0.4/32
|
||
|
!
|
||
|
! all private
|
||
|
! at r3/r4, as-path should only have r2's asn
|
||
|
route-map set-as-paths permit 10
|
||
|
match ip address prefix-list match-0
|
||
|
set as-path prepend 4200000000 4200000001 4200000002
|
||
|
!
|
||
|
! all private, include r3's asn
|
||
|
! at r3/r4, as-path should only have r2's asn
|
||
|
route-map set-as-paths permit 20
|
||
|
match ip address prefix-list match-1
|
||
|
set as-path prepend 65003 4200000000 4200000001 4200000002 65003
|
||
|
!
|
||
|
! mix of private/public
|
||
|
route-map set-as-paths permit 30
|
||
|
match ip address prefix-list match-2
|
||
|
set as-path prepend 4200000000 1000 4200000001 2000 4200000002
|
||
|
!
|
||
|
! mix of private/public, include r3's asn multiple times
|
||
|
route-map set-as-paths permit 40
|
||
|
match ip address prefix-list match-3
|
||
|
set as-path prepend 65003 4200000000 1000 4200000001 2000 4200000002 65003
|
||
|
!
|
||
|
! all public
|
||
|
route-map set-as-paths permit 50
|
||
|
match ip address prefix-list match-4
|
||
|
set as-path prepend 1000 2000 2000 3000
|