cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1596
Views
15
Helpful
18
Replies

load balancing using bgp in dual home CE connected to same ISP

ahmd.anvar
Level 1
Level 1

 

we would like to perform load balance in edge routers connected to same ISP.

 

 

the edge routers are running IBGP between them using IGP protocols as OSPF.

 

the Edge routers connected to ISP are running EBGP.

 

i am trying to follow the example in the link given below

 

https://www.cisco.com/c/en/us/support/docs/ip/border-gateway-protocol-bgp/13762-40.html#anc15 

 

but not able to achive the results.

 

any one can help me out.

 

R3 configuration:

 

router bgp 2

no synchronization

bgp log-neighbor-changes

network 3.3.3.3 mask 255.255.255.255

redistribute ospf 100

neighbor 4.4.4.4 remote-as 2

neighbor 4.4.4.4 update-source Loopback0

neighbor 4.4.4.4 next-hop-self

neighbor 4.4.4.4 soft-reconfiguration inbound

neighbor 172.16.35.5 remote-as 1

neighbor 172.16.35.5 soft-reconfiguration inbound

neighbor 172.16.35.5 route-map R3-R5 out

no auto-summary

 

route-map R3-R5 permit 10

match ip address 2

set as-path prepend 2 2 2

route-map R3-R5 permit 20

match ip address 1

 

Router#sho run | i acce

access-list 1 permit 10.10.10.0

access-list 2 permit 20.20.20.0

 

Router#sho ip bgp neighbors 172.16.35.5 advertised-routes

 

Total number of prefixes 0

Router#

===============================================================

 

Router#sho ip bgp
BGP table version is 93, local router ID is 3.3.3.3
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
* i0.0.0.0 4.4.4.4 0 100 0 1 i
*> 172.16.35.5 0 0 1 i
* i1.1.1.1/32 4.4.4.4 11 100 0 ?
*> 10.1.13.1 11 32768 ?
* i2.2.2.2/32 4.4.4.4 11 100 0 ?
*> 10.1.23.2 2 32768 ?
* i3.3.3.3/32 4.4.4.4 21 100 0 ?
*> 0.0.0.0 0 32768 i
* i4.4.4.4/32 4.4.4.4 0 100 0 ?
*> 10.1.23.2 12 32768 ?
*> 5.5.5.5/32 172.16.35.5 0 0 1 ?
r>i6.6.6.6/32 4.4.4.4 0 100 0 1 ?
r 172.16.35.5 21 0 1 ?
* i7.7.7.7/32 4.4.4.4 11 100 0 1 ?
*> 172.16.35.5 11 0 1 ?
* i10.1.12.0/24 4.4.4.4 1510 100 0 ?
*> 10.1.23.2 1501 32768 ?
--More--

===============================================================

 

Router#sho ip bgp neighbors 172.16.35.5 received-routes
BGP table version is 93, local router ID is 3.3.3.3
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
*> 0.0.0.0 172.16.35.5 0 0 1 i
*> 5.5.5.5/32 172.16.35.5 0 0 1 ?
r 6.6.6.6/32 172.16.35.5 21 0 1 ?
*> 7.7.7.7/32 172.16.35.5 11 0 1 ?
*> 10.1.57.0/24 172.16.35.5 0 0 1 ?
r 10.1.67.0/24 172.16.35.5 20 0 1 ?

Total number of prefixes 6

===============================================================


Router#sho ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route

Gateway of last resort is 172.16.35.5 to network 0.0.0.0

1.0.0.0/32 is subnetted, 1 subnets
O 1.1.1.1 [110/11] via 10.1.13.1, 00:26:05, FastEthernet0/1
2.0.0.0/32 is subnetted, 1 subnets
O 2.2.2.2 [110/2] via 10.1.23.2, 00:26:05, FastEthernet1/0
3.0.0.0/32 is subnetted, 1 subnets
C 3.3.3.3 is directly connected, Loopback0
4.0.0.0/32 is subnetted, 1 subnets
O 4.4.4.4 [110/12] via 10.1.23.2, 00:26:05, FastEthernet1/0
20.0.0.0/32 is subnetted, 1 subnets
O IA 20.20.20.20 [110/11] via 10.1.13.1, 00:26:06, FastEthernet0/1
5.0.0.0/32 is subnetted, 1 subnets
B 5.5.5.5 [20/0] via 172.16.35.5, 00:24:41
6.0.0.0/32 is subnetted, 1 subnets
O E2 6.6.6.6 [110/1] via 10.1.23.2, 00:24:35, FastEthernet1/0
172.16.0.0/24 is subnetted, 2 subnets
S 172.16.46.0 [1/0] via 4.4.4.4
C 172.16.35.0 is directly connected, FastEthernet0/0
7.0.0.0/32 is subnetted, 1 subnets
B 7.7.7.7 [20/11] via 172.16.35.5, 00:24:41
10.0.0.0/8 is variably subnetted, 8 subnets, 2 masks
O IA 10.10.10.10/32 [110/11] via 10.1.13.1, 00:26:06, FastEthernet0/1
O 10.1.14.0/24 [110/21] via 10.1.23.2, 00:26:06, FastEthernet1/0
C 10.1.13.0/24 is directly connected, FastEthernet0/1
O 10.1.12.0/24 [110/1501] via 10.1.23.2, 00:26:06, FastEthernet1/0
O 10.1.24.0/24 [110/11] via 10.1.23.2, 00:26:06, FastEthernet1/0
C 10.1.23.0/24 is directly connected, FastEthernet1/0
B 10.1.57.0/24 [20/0] via 172.16.35.5, 00:24:41
O E2 10.1.67.0/24 [110/1] via 10.1.23.2, 00:24:35, FastEthernet1/0
B* 0.0.0.0/0 [20/0] via 172.16.35.5, 00:25:31

 

 

R4 configuration:

 

router bgp 2

no synchronization

bgp log-neighbor-changes

redistribute ospf 100

neighbor 3.3.3.3 remote-as 2

neighbor 3.3.3.3 update-source Loopback0

neighbor 3.3.3.3 next-hop-self

neighbor 3.3.3.3 soft-reconfiguration inbound

neighbor 172.16.46.6 remote-as 1

neighbor 172.16.46.6 soft-reconfiguration inbound

neighbor 172.16.46.6 route-map R4-R6 out

no auto-summary

 

route-map R4-R6 permit 10

match ip address 2

set as-path prepend 2 2 2

route-map R4-R6 permit 20

match ip address 1

 

 

Router#sho run | i acce

access-list 1 permit 20.20.20.0

access-list 2 permit 10.10.10.0

Router#

 

Router#sho ip bgp neighbors 172.16.46.6 advertised-routes

 

Total number of prefixes 0

 

===============================================================

Router#sho ip bgp
BGP table version is 52, local router ID is 4.4.4.4
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
*>i0.0.0.0 3.3.3.3 0 100 0 1 i
* i1.1.1.1/32 3.3.3.3 11 100 0 ?
*> 10.1.14.1 11 32768 ?
* i2.2.2.2/32 3.3.3.3 2 100 0 ?
*> 10.1.24.2 11 32768 ?
* i3.3.3.3/32 3.3.3.3 0 100 0 i
*> 10.1.14.1 21 32768 ?
* i4.4.4.4/32 3.3.3.3 12 100 0 ?
*> 0.0.0.0 0 32768 ?
r 5.5.5.5/32 172.16.46.6 21 0 1 ?
r>i 3.3.3.3 0 100 0 1 ?
*> 6.6.6.6/32 172.16.46.6 0 0 1 ?
*> 7.7.7.7/32 172.16.46.6 11 0 1 ?
* i 3.3.3.3 11 100 0 1 ?
* i10.1.12.0/24 3.3.3.3 1501 100 0 ?
*> 10.1.14.1 1510 32768 ?
* i10.1.13.0/24 3.3.3.3 0 100 0 ?
Network Next Hop Metric LocPrf Weight Path
*> 10.1.14.1 20 32768 ?
* i10.1.14.0/24 3.3.3.3 21 100 0 ?
*> 0.0.0.0 0 32768 ?
* i10.1.23.0/24 3.3.3.3 0 100 0 ?
*> 10.1.14.1 21 32768 ?
* i10.1.24.0/24 3.3.3.3 11 100 0 ?
*> 0.0.0.0 0 32768 ?
r 10.1.57.0/24 172.16.46.6 20 0 1 ?
r>i 3.3.3.3 0 100 0 1 ?
*> 10.1.67.0/24 172.16.46.6 0 0 1 ?
* i10.10.10.10/32 3.3.3.3 11 100 0 ?
*> 10.1.14.1 11 32768 ?
* i20.20.20.20/32 3.3.3.3 11 100 0 ?
*> 10.1.14.1 11 32768 ?

 

===============================================================

 

Router#sho ip bgp neighbors 172.16.46.6 received-routes
BGP table version is 53, local router ID is 4.4.4.4
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
*> 0.0.0.0 172.16.46.6 0 0 1 i
r 5.5.5.5/32 172.16.46.6 21 0 1 ?
*> 6.6.6.6/32 172.16.46.6 0 0 1 ?
*> 7.7.7.7/32 172.16.46.6 11 0 1 ?
r 10.1.57.0/24 172.16.46.6 20 0 1 ?
*> 10.1.67.0/24 172.16.46.6 0 0 1 ?

Total number of prefixes 6


===============================================================


Router#sho ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route

Gateway of last resort is 172.16.46.6 to network 0.0.0.0

1.0.0.0/32 is subnetted, 1 subnets
O 1.1.1.1 [110/11] via 10.1.14.1, 00:25:44, FastEthernet0/1
2.0.0.0/32 is subnetted, 1 subnets
O 2.2.2.2 [110/11] via 10.1.24.2, 00:25:44, FastEthernet0/0
3.0.0.0/32 is subnetted, 1 subnets
O 3.3.3.3 [110/21] via 10.1.14.1, 00:25:44, FastEthernet0/1
4.0.0.0/32 is subnetted, 1 subnets
C 4.4.4.4 is directly connected, Loopback0
20.0.0.0/32 is subnetted, 1 subnets
O IA 20.20.20.20 [110/11] via 10.1.14.1, 00:25:45, FastEthernet0/1
5.0.0.0/32 is subnetted, 1 subnets
O E2 5.5.5.5 [110/1] via 10.1.14.1, 00:24:27, FastEthernet0/1
6.0.0.0/32 is subnetted, 1 subnets
B 6.6.6.6 [20/0] via 172.16.46.6, 00:24:24
172.16.0.0/24 is subnetted, 1 subnets
C 172.16.46.0 is directly connected, FastEthernet1/0
7.0.0.0/32 is subnetted, 1 subnets
B 7.7.7.7 [20/11] via 172.16.46.6, 00:24:24
10.0.0.0/8 is variably subnetted, 8 subnets, 2 masks
O IA 10.10.10.10/32 [110/11] via 10.1.14.1, 00:25:48, FastEthernet0/1
C 10.1.14.0/24 is directly connected, FastEthernet0/1
O 10.1.13.0/24 [110/20] via 10.1.14.1, 00:25:48, FastEthernet0/1
O 10.1.12.0/24 [110/1510] via 10.1.24.2, 00:25:48, FastEthernet0/0
[110/1510] via 10.1.14.1, 00:25:48, FastEthernet0/1
C 10.1.24.0/24 is directly connected, FastEthernet0/0
O 10.1.23.0/24 [110/21] via 10.1.14.1, 00:25:48, FastEthernet0/1
O E2 10.1.57.0/24 [110/1] via 10.1.14.1, 00:24:30, FastEthernet0/1
B 10.1.67.0/24 [20/0] via 172.16.46.6, 00:24:24
B* 0.0.0.0/0 [20/0] via 172.16.46.6, 00:00:17
Router#

 

the routes are not being advertised to ISP. can any one help me to fix the problem

 

 

 

1 Accepted Solution

Accepted Solutions

Hello.

 

I got it to work with the configuration below. I think the problem is simply that your access lists match /24 addresses, but should match /32 addresses:

 

R3

router bgp 2
bgp log-neighbor-changes
redistribute ospf 100
neighbor 4.4.4.4 remote-as 2
neighbor 4.4.4.4 update-source Loopback0
neighbor 4.4.4.4 next-hop-self
neighbor 4.4.4.4 soft-reconfiguration inbound
neighbor 172.16.35.5 remote-as 1
neighbor 172.16.35.5 soft-reconfiguration inbound
neighbor 172.16.35.5 route-map DEST out
!
ip forward-protocol nd
!
route-map DEST permit 10
match ip address 10
set as-path prepend 2 2 2
!
route-map DEST permit 20
match ip address 20
!
access-list 10 permit 10.10.10.10
access-list 20 permit 20.20.20.20

 

R4

router bgp 2
bgp log-neighbor-changes
redistribute ospf 100
neighbor 3.3.3.3 remote-as 2
neighbor 3.3.3.3 update-source Loopback0
neighbor 3.3.3.3 next-hop-self
neighbor 3.3.3.3 soft-reconfiguration inbound
neighbor 172.16.46.6 remote-as 1
neighbor 172.16.46.6 soft-reconfiguration inbound
neighbor 172.16.46.6 route-map DEST out
!
ip forward-protocol nd
!
route-map DEST permit 10
match ip address 20
set as-path prepend 2 2 2
!
route-map DEST permit 20
match ip address 10
!
access-list 10 permit 10.10.10.10
access-list 20 permit 20.20.20.20

 

R5

R5#sh ip bgp
*> 10.10.10.10/32 172.16.35.3 2 0 2 2 2 2 ?
*> 20.20.20.20/32 172.16.35.3 2 0 2 ?


R6

R6#sh ip bgp
*> 10.10.10.10/32 172.16.46.4 2 0 2 ?
*> 20.20.20.20/32 172.16.46.4 2 0 2 2 2 2 ?

 

View solution in original post

18 Replies 18

Hello,

 

at first glance it looks like you need to advertise the networks that are rereferenced in the access list (additions in bold):

 

R3 configuration:

router bgp 2
no synchronization
bgp log-neighbor-changes
network 3.3.3.3 mask 255.255.255.255
network 10.10.10.0 mask 255.255.255.0
network 20.20.20.0 mask 255.255.255.0
redistribute ospf 100
neighbor 4.4.4.4 remote-as 2
neighbor 4.4.4.4 update-source Loopback0
neighbor 4.4.4.4 next-hop-self
neighbor 4.4.4.4 soft-reconfiguration inbound
neighbor 172.16.35.5 remote-as 1
neighbor 172.16.35.5 soft-reconfiguration inbound
neighbor 172.16.35.5 route-map R3-R5 out
no auto-summary
route-map R3-R5 permit 10
match ip address 2
set as-path prepend 2 2 2
route-map R3-R5 permit 20
match ip address 1

Router#sho run | i acce
access-list 1 permit 10.10.10.0
access-list 2 permit 20.20.20.0

R4 configuration:

router bgp 2
no synchronization
bgp log-neighbor-changes
redistribute ospf 100
network 10.10.10.0 mask 255.255.255.0
network 20.20.20.0 mask 255.255.255.0
neighbor 3.3.3.3 remote-as 2
neighbor 3.3.3.3 update-source Loopback0
neighbor 3.3.3.3 next-hop-self
neighbor 3.3.3.3 soft-reconfiguration inbound
neighbor 172.16.46.6 remote-as 1
neighbor 172.16.46.6 soft-reconfiguration inbound
neighbor 172.16.46.6 route-map R4-R6 out
no auto-summary

route-map R4-R6 permit 10
match ip address 2
set as-path prepend 2 2 2
route-map R4-R6 permit 20
match ip address 1

Router#sho run | i acce

access-list 1 permit 20.20.20.0
access-list 2 permit 10.10.10.0

hey goerge,

 

thank you taking initiative.

 

actually the 10.10.10.0 and 20.20.20.0 networks are present in R1 and there are advertised into OSPF. if you notice that on R3 and R4, they get the routes through ospf .

 

O IA 10.10.10.10/32 [110/11] via 10.1.13.1, 00:26:06, FastEthernet0/1

 

the thing is when i apply route-map these routes are not advertised else they are advertised.

 

 

if it is 10.10.10.0 network it should pass through R3 and if it si 20.20.20.0 network then it should pass through R4

Hello,

 

can you post the full configs of your routers so I can lab this ?

R1:


interface Loopback0
ip address 1.1.1.1 255.255.255.255
!
interface Loopback1
ip address 10.10.10.10 255.255.255.255
!
interface Loopback2
ip address 20.20.20.20 255.255.255.255
!
interface FastEthernet0/0
ip address 10.1.13.1 255.255.255.0
duplex auto
speed auto
!
interface Serial0/0
no ip address
shutdown
clock rate 2000000
!
interface FastEthernet0/1
ip address 10.1.14.1 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet1/0
ip address 10.1.12.1 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet2/0
no ip address
shutdown
duplex auto
speed auto
!
router ospf 100
router-id 1.1.1.1
log-adjacency-changes
network 1.1.1.1 0.0.0.0 area 0
network 10.1.0.0 0.0.255.255 area 0
network 10.10.10.10 0.0.0.0 area 0
network 20.20.20.20 0.0.0.0 area 0






R2:



interface Loopback0
ip address 2.2.2.2 255.255.255.255
!
interface FastEthernet0/0
ip address 10.1.24.2 255.255.255.0
duplex auto
speed auto


!
interface FastEthernet0/1
ip address 10.1.23.2 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet1/0
ip address 10.1.12.2 255.255.255.0
duplex auto
speed auto


!
router ospf 100
router-id 2.2.2.2
log-adjacency-changes
network 2.2.2.0 0.0.0.255 area 0
network 10.1.0.0 0.0.255.255 area 0


R3;


interface Loopback0
ip address 3.3.3.3 255.255.255.255
!
interface FastEthernet0/0
ip address 172.16.35.3 255.255.255.0
duplex auto
speed auto


!
interface FastEthernet0/1
ip address 10.1.13.3 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet1/0
ip address 10.1.23.3 255.255.255.0
duplex auto
speed auto


!
router ospf 100
router-id 3.3.3.3
log-adjacency-changes
redistribute bgp 2 subnets
network 3.3.3.3 0.0.0.0 area 0
network 10.1.0.0 0.0.255.255 area 0
!
router bgp 2
no synchronization
bgp log-neighbor-changes
redistribute ospf 100
neighbor 4.4.4.4 remote-as 2
neighbor 4.4.4.4 update-source Loopback0
neighbor 4.4.4.4 next-hop-self
neighbor 4.4.4.4 soft-reconfiguration inbound
neighbor 172.16.35.5 remote-as 1
neighbor 172.16.35.5 soft-reconfiguration inbound
no auto-summary


!
access-list 10 permit 10.10.10.0 0.0.0.255
access-list 20 permit 20.20.20.0 0.0.0.255
!
route-map DEST permit 10
match ip address 10
set local-preference 555
!
route-map DEST permit 20


R4:


interface Loopback0
ip address 4.4.4.4 255.255.255.255
!
interface FastEthernet0/0
ip address 10.1.24.4 255.255.255.0
duplex auto
speed auto
!


interface FastEthernet0/1
ip address 10.1.14.4 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet1/0
ip address 172.16.46.4 255.255.255.0
duplex auto
speed auto
!


router ospf 100
router-id 4.4.4.4
log-adjacency-changes
redistribute bgp 2 subnets
network 4.4.4.4 0.0.0.0 area 0
network 10.1.0.0 0.0.255.255 area 0
!
router bgp 2
no synchronization
bgp log-neighbor-changes
redistribute ospf 100
neighbor 3.3.3.3 remote-as 2
neighbor 3.3.3.3 update-source Loopback0
neighbor 3.3.3.3 next-hop-self
neighbor 3.3.3.3 soft-reconfiguration inbound
neighbor 172.16.46.6 remote-as 1
neighbor 172.16.46.6 soft-reconfiguration inbound
no auto-summary



!
access-list 10 permit 10.10.10.0 0.0.0.255
access-list 20 permit 20.20.20.0 0.0.0.255
!
route-map DEST permit 10
match ip address 20
set local-preference 555
!
route-map DEST permit 20



R5:

interface Loopback0
ip address 5.5.5.5 255.255.255.255
!
interface FastEthernet0/0
ip address 172.16.35.5 255.255.255.0


!
interface FastEthernet0/1
ip address 10.1.57.5 255.255.255.0


router ospf 1
router-id 5.5.5.5
log-adjacency-changes
redistribute bgp 1 subnets
network 5.5.5.5 0.0.0.0 area 1
network 10.1.57.0 0.0.0.255 area 1
!
router bgp 1
no synchronization
bgp log-neighbor-changes
redistribute ospf 1
neighbor 172.16.35.3 remote-as 2
no auto-summary


R6:

interface Loopback0
ip address 6.6.6.6 255.255.255.255
!
interface FastEthernet0/0
ip address 172.16.46.6 255.255.255.0

!
interface FastEthernet0/1
ip address 10.1.67.6 255.255.255.0


!
router ospf 1
router-id 6.6.6.6
log-adjacency-changes
redistribute bgp 1 subnets
network 6.6.6.6 0.0.0.0 area 1
network 10.1.67.0 0.0.0.255 area 1
!
router bgp 1
no synchronization
bgp log-neighbor-changes
redistribute ospf 1
neighbor 172.16.46.4 remote-as 2
no auto-summary



R7:

interface Loopback0
ip address 7.7.7.7 255.255.255.255
!
interface FastEthernet0/0
ip address 10.1.57.7 255.255.255.0

interface FastEthernet0/1
ip address 10.1.67.7 255.255.255.0

!
router ospf 1
router-id 7.7.7.7
log-adjacency-changes
network 7.7.7.7 0.0.0.0 area 1
network 10.1.57.0 0.0.0.255 area 1
network 10.1.67.0 0.0.0.255 area 1

Hello.

 

I got it to work with the configuration below. I think the problem is simply that your access lists match /24 addresses, but should match /32 addresses:

 

R3

router bgp 2
bgp log-neighbor-changes
redistribute ospf 100
neighbor 4.4.4.4 remote-as 2
neighbor 4.4.4.4 update-source Loopback0
neighbor 4.4.4.4 next-hop-self
neighbor 4.4.4.4 soft-reconfiguration inbound
neighbor 172.16.35.5 remote-as 1
neighbor 172.16.35.5 soft-reconfiguration inbound
neighbor 172.16.35.5 route-map DEST out
!
ip forward-protocol nd
!
route-map DEST permit 10
match ip address 10
set as-path prepend 2 2 2
!
route-map DEST permit 20
match ip address 20
!
access-list 10 permit 10.10.10.10
access-list 20 permit 20.20.20.20

 

R4

router bgp 2
bgp log-neighbor-changes
redistribute ospf 100
neighbor 3.3.3.3 remote-as 2
neighbor 3.3.3.3 update-source Loopback0
neighbor 3.3.3.3 next-hop-self
neighbor 3.3.3.3 soft-reconfiguration inbound
neighbor 172.16.46.6 remote-as 1
neighbor 172.16.46.6 soft-reconfiguration inbound
neighbor 172.16.46.6 route-map DEST out
!
ip forward-protocol nd
!
route-map DEST permit 10
match ip address 20
set as-path prepend 2 2 2
!
route-map DEST permit 20
match ip address 10
!
access-list 10 permit 10.10.10.10
access-list 20 permit 20.20.20.20

 

R5

R5#sh ip bgp
*> 10.10.10.10/32 172.16.35.3 2 0 2 2 2 2 ?
*> 20.20.20.20/32 172.16.35.3 2 0 2 ?


R6

R6#sh ip bgp
*> 10.10.10.10/32 172.16.46.4 2 0 2 ?
*> 20.20.20.20/32 172.16.46.4 2 0 2 2 2 2 ?

 

Hello Goerge,

 

i got it done as you said but i still have confusion on the output which i get because the solution is not complete. as this is wan router, we will need all the networks to pass the wan routers not specifially 10.10.10.10 and 20.20.20.20

 

 

output in R5:

Router#sho ip bgp neighbors 172.16.35.3 received-routes
BGP table version is 27, local router ID is 5.5.5.5
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
*> 10.10.10.10/32 172.16.35.3 3 0 2 ?
*> 20.20.20.20/32 172.16.35.3 3 0 2 2 2 2 ?

Total number of prefixes 2
Router#

 

 

Router#sho ip bgp neighbors 172.16.46.4 received-routes
BGP table version is 29, local router ID is 6.6.6.6
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
*> 10.10.10.10/32 172.16.46.4 11 0 2 2 2 2 ?
*> 20.20.20.20/32 172.16.46.4 11 0 2 ?

Total number of prefixes 2
Router#

 

but i want all the routes to to advertised trhough WAN router R3 and only 20.20.20.20 network through R4  then i am applying the below please is it correct

 

 

R3:

 

ip prefix-list R1 seq 4 permit 10.10.10.10/32
ip prefix-list R1 seq 5 permit 10.1.0.0/16
ip prefix-list R2 seq 5 permit 20.20.20.20/32

 

route-map DEST permit 10
match ip address prefix-list R2
set as-path prepend 2 2 2
route-map DEST permit 20
match ip address prefix-list R1

 

 

R4:

 

Router#sho run | i pre
ip prefix-list R1 seq 4 permit 10.10.10.10/32
ip prefix-list R1 seq 5 permit 10.1.0.0/16
ip prefix-list R2 seq 5 permit 20.20.20.20/32
match ip address prefix-list R1
set as-path prepend 2 2 2
match ip address prefix-list R2

Router#
Router#sho run | s route-map
neighbor 172.16.46.6 route-map DEST out
route-map DEST permit 10
match ip address prefix-list R1
set as-path prepend 2 2 2
route-map DEST permit 20
match ip address prefix-list R2
Router#

 

where 10.1.0.0/16 is internal LAN subnet.

 

please confirm the same.

 

 

also one more question, in the above solution you have specified for /32 network, if i need to advertise the complete subet like/24 or /16 then is it possible?

 

please clarify

 

Hello,

 

just add a third permit statement to your route map on both R3 and R4:

 

route-map DEST permit 10
match ip address 10
set as-path prepend 2 2 2
!
route-map DEST permit 20
match ip address 20
!
route-map DEST permit 30

 

This results in:

 

R5#sh ip bgp neighbors 172.16.35.3 received-routes
BGP table version is 17, local router ID is 5.5.5.5
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

Network Next Hop Metric LocPrf Weight Path
*> 1.1.1.1/32 172.16.35.3 2 0 2 ?
*> 2.2.2.2/32 172.16.35.3 2 0 2 ?
*> 3.3.3.3/32 172.16.35.3 0 0 2 ?
*> 4.4.4.4/32 172.16.35.3 3 0 2 ?
*> 10.1.12.0/24 172.16.35.3 2 0 2 ?
*> 10.1.13.0/24 172.16.35.3 0 0 2 ?
*> 10.1.14.0/24 172.16.35.3 2 0 2 ?
*> 10.1.23.0/24 172.16.35.3 0 0 2 ?
*> 10.1.24.0/24 172.16.35.3 2 0 2 ?
*> 10.10.10.10/32 172.16.35.3 2 0 2 2 2 2 ?
*> 20.20.20.20/32 172.16.35.3 2 0 2 ?

Total number of prefixes 11
R5#

 

 

Dear Goerge,

i applied it but still i see the traffic is not yet diverted.

Router#traceroute 7.7.7.7 source lo1

Type escape sequence to abort.
Tracing the route to 7.7.7.7

1 10.1.13.3 12 msec 28 msec 28 msec
2 172.16.35.5 20 msec 24 msec 28 msec
3 10.1.57.7 24 msec 36 msec 28 msec
Router#traceroute 7.7.7.7 source lo2

Type escape sequence to abort.
Tracing the route to 7.7.7.7

1 10.1.13.3 36 msec 12 msec 12 msec
2 172.16.35.5 24 msec 32 msec 24 msec
3 10.1.57.7 24 msec 56 msec 44 msec
Router#sho ip int bri
Router#sho ip int brief
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 10.1.13.1 YES NVRAM up up
Serial0/0 unassigned YES NVRAM administratively down down
FastEthernet0/1 10.1.14.1 YES NVRAM up up
FastEthernet1/0 10.1.12.1 YES NVRAM up up
FastEthernet2/0 unassigned YES NVRAM administratively down down
Loopback0 1.1.1.1 YES NVRAM up up
Loopback1 10.10.10.10 YES NVRAM up up
Loopback2 20.20.20.20 YES NVRAM up up
Router#

Hello,

 

with the current route map you only influence 10.10.10.10/32 and 20.20.20.20/32. You need to define in the route map which traffic you want to go where (e.g. by applying the as-prepend).

Dear Goerge,

Even for 10.10.10.10 and 20.20.20.20 the traffic is not shift see the trace route results.
Router#sho ip int brief
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 10.1.13.1 YES NVRAM up up
Serial0/0 unassigned YES NVRAM administratively down down
FastEthernet0/1 10.1.14.1 YES NVRAM up up
FastEthernet1/0 10.1.12.1 YES NVRAM up up
FastEthernet2/0 unassigned YES NVRAM administratively down down
Loopback0 1.1.1.1 YES NVRAM up up
Loopback1 10.10.10.10 YES NVRAM up up
Loopback2 20.20.20.20 YES NVRAM up up
Router#
Router#traceroute 7.7.7.7 source lo1

Type escape sequence to abort.
Tracing the route to 7.7.7.7

1 10.1.13.3 36 msec 40 msec 8 msec
2 172.16.35.5 24 msec 40 msec 20 msec
3 10.1.57.7 24 msec 52 msec 16 msec
Router#traceroute 7.7.7.7 source lo2

Type escape sequence to abort.
Tracing the route to 7.7.7.7

1 10.1.13.3 28 msec 12 msec 12 msec
2 172.16.35.5 8 msec 20 msec 24 msec
3 10.1.57.7 20 msec 44 msec 24 msec
Router#

Dear Goerge,

Even for 10.10.10.10 and 20.20.20.20 the traffic is not shift see the trace route results.

Router#sho ip int brief
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 10.1.13.1 YES NVRAM up up
Serial0/0 unassigned YES NVRAM administratively down down
FastEthernet0/1 10.1.14.1 YES NVRAM up up
FastEthernet1/0 10.1.12.1 YES NVRAM up up
FastEthernet2/0 unassigned YES NVRAM administratively down down
Loopback0 1.1.1.1 YES NVRAM up up
Loopback1 10.10.10.10 YES NVRAM up up
Loopback2 20.20.20.20 YES NVRAM up up
Router#
Router#traceroute 7.7.7.7 source lo1

Type escape sequence to abort.
Tracing the route to 7.7.7.7

1 10.1.13.3 36 msec 40 msec 8 msec
2 172.16.35.5 24 msec 40 msec 20 msec
3 10.1.57.7 24 msec 52 msec 16 msec
Router#traceroute 7.7.7.7 source lo2

Type escape sequence to abort.
Tracing the route to 7.7.7.7

1 10.1.13.3 28 msec 12 msec 12 msec
2 172.16.35.5 8 msec 20 msec 24 msec
3 10.1.57.7 20 msec 44 msec 24 msec
Router#

Hello,

 

do you have iBGP configured between R5, R6, and R7 ? These three routers need to be in the same BGP AS (1) and exchange routing tables...

Dear Gorge,

 

yes we can run ibgp but, already we have done bgp/ ospf redistribution in R5 and R6 so by default R7 should have the routes as received by ospf.

 

 

 

Hello,

 

I am running iBGP, let me do some more testing to see if I get it to work with redistribution...

Review Cisco Networking for a $25 gift card