The topology is like this :
In R2, we configure bgp attributes using weight :
Router bgp 7
no synchronization
bgp log-neighbor-changes
network 7.7.23.0 mask 255.255.255.0
network 7.7.24.0 mask 255.255.255.0
redistribute connected
neighbor 7.7.23.3 remote-as 33
neighbor 7.7.23.3 soft-reconfiguration inbound
neighbor 7.7.23.3 route-map A in
neighbor 7.7.24.4 remote-as 44
neighbor 7.7.24.4 soft-reconfiguration inbound
neighbor 7.7.24.4 route-map B in
no auto-summary
Match loopback in R5
access-list 101 permit ip host 5.5.5.5 any
access-list 102 permit ip host 50.50.50.50 any
Creating Route-map to set weight and match loopback
route-map A permit 10
match ip address 101
set weight 1000
!
route-map A permit 20 // match others ip addresses
!
route-map B permit 10
match ip address 102
set weight 1000
!
route-map B permit 20 // match others ip addresses
This is what we get in R2
R2#sh ip bgp
BGP table version is 18, local router ID is 20.20.20.20
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
* 2.2.2.2/32 7.7.24.4 0 0 44 ?
* 7.7.23.3 0 0 33 ?
*> 0.0.0.0 0 32768 ?
* 5.5.5.5/32 7.7.24.4 0 44 55 i
*> 7.7.23.3 1000 33 55 i
* 7.7.23.0/24 7.7.23.3 0 0 33 i
*> 0.0.0.0 0 32768 i
* 7.7.24.0/24 7.7.24.4 0 0 44 i
*> 0.0.0.0 0 32768 i
* 7.7.27.0/24 7.7.24.4 0 0 44 ?
* 7.7.23.3 0 0 33 ?
*> 0.0.0.0 0 32768 ?
* 7.7.35.0/24 7.7.24.4 0 44 55 i
*> 7.7.23.3 0 0 33 i
*> 7.7.45.0/24 7.7.24.4 0 0 44 i
* 7.7.23.3 0 33 55 i
* 20.20.20.20/32 7.7.24.4 0 0 44 ?
Network Next Hop Metric LocPrf Weight Path
* 7.7.23.3 0 0 33 ?
*> 0.0.0.0 0 32768 ?
*> 50.50.50.50/32 7.7.24.4 1000 44 55 i
* 7.7.23.3 0 33 55 i
if we do traceroute, this is what we get in R7 :
It moves to R3 then to R5
R7#traceroute 5.5.5.5
Type escape sequence to abort.
Tracing the route to 5.5.5.5
1 7.7.27.2 4 msec 4 msec 8 msec
2 7.7.23.3 4 msec 12 msec 8 msec
3 7.7.35.5 8 msec * 32 msec
It flows from R4 to R5
R7#traceroute 50.50.50.50
Type escape sequence to abort.
Tracing the route to 50.50.50.50
1 7.7.27.2 4 msec 4 msec 4 msec
2 7.7.24.4 8 msec 12 msec 8 msec
3 7.7.45.5 8 msec * 12 msec
This is according to the requirements from R2 point of view. We will explore more in the next posting. I have attached the gns3 file and initial configuration in here :
http://www.4shared.com/rar/uTg2U06B/BGP_Policy.html
Happy labbing
{ 0 comments... read them below or add one }
Post a Comment