cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
321
Views
0
Helpful
3
Replies

config bgp with multi-homed

leungcm
Level 1
Level 1

Dear Sir,

we config the multi-homed setting on 7301 router. there are two providers (provider A and providers B). We also get 4 class C ip address from APNIC. (e.g. 192.100.4.0/22). we would like to achieve following features:

192.100.4.0/24

192.100.5.0/24

192.100.6.0/24

about networks go the provider A first (inbound and out bound, if provider A down, it goes to provider B)

192.100.7.0/24

about network go the provider B first (inbound and out bound, if provider B down, it goes to provider A)

the current setting is following:

--- provider A setting ---

nei 202.100.1.1 remote-as 111

nei 202.100.1.1 version 4

address-family ipv4

neighbor 202.100.1.1 activate

neighbor 202.100.1.1 soft-reconfiguration inbound

neighbor 202.100.1.1 route-map SetLocalPref_A in

neighbor 202.100.1.1 filter-list 200 out

no auto-summary

no synchronization

network 192.100.4.0

network 192.100.5.0

network 192.100.6.0

network 192.100.7.0

exit-address-family

ip as-path access-list 10 permit ^111_

ip as-path access-list 200 permit ^$

route-map SetLocalPref_A permit 10

match as-path 10

set local-preference 300

!

route-map SetLocalPref_A permit 20

-------

--- provider B setting ---

nei 202.100.2.2 remote-as 222

nei 202.100.2.2 version 4

address-family ipv4

neighbor 202.100.2.2 activate

neighbor 202.100.2.2 soft-reconfiguration inbound

neighbor 202.100.2.2 route-map SetLocalPref_B in

neighbor 202.100.2.2 filter-list 100 out

ip as-path access-list 20 permit ^222_

ip as-path access-list 100 permit ^$

route-map SetLocalPref_B permit 10

match as-path 20

set local-preference 200

!

route-map SetLocalPref_B permit 20

------

Could you kindly guide me to config the bgp? Thanks

Best regards

CM Leung

3 Replies 3

bjornarsb
Level 4
Level 4

Hi,

You need an outgoing policy too for BGP updates sent to your providers, or agree with your 2 ISP's.

Have a look at this example. It is doing the same as you want using AS prepends.

HTH

Regards,

Bjornarsb

leungcm
Level 1
Level 1

Dear Sir,

following is the config we modify. detail is following:

we find that we cannot announce the route to providers. the proivder that we send 10000 routes to them, so they stop the bgp session.

currently, we have one router connect with two ISPs. there is no ibgp config with other router.

It would be greatful that you point out what setting incorrect so that I can correct it. (or any suggestion is appreciated)

---- router config

router bgp 10

bgp log-neighbor-changes

!

! provider_a

neighbor 202.100.1.1 remote-as 111

neighbor 202.100.1.1 description connect to provider_a bgp

neighbor 202.100.1.1 version 4

!

! provider_b

neighbor 202.100.2.2 remote-as 222

neighbor 202.100.2.2 description connect to provider_b

neighbor 202.100.2.2 version 4

!

!

address-family ipv4

neighbor 202.100.1.1 activate

neighbor 202.100.1.1 soft-reconfiguration inbound

neighbor 202.100.1.1 route-map SetLocalPref_provider_a in

neighbor 202.100.1.1 route-map Set_ASN_provider_a out

!

neighbor 202.100.2.2 activate

neighbor 202.100.2.2 soft-reconfiguration inbound

neighbor 202.100.2.2 route-map SetLocalPref_provider_b in

neighbor 202.100.2.2 route-map Set_ASN_provider_b out

!

no auto-summary

no synchronization

network 192.100.4.0

network 192.100.5.0

network 192.100.6.0

network 192.100.7.0

exit-address-family

!

!

!

ip as-path access-list 100 permit ^$

!

!announce the route to provider_a

ip as-path access-list 200 permit ^$

!

ip as-path access-list 20 permit ^222_

ip as-path access-list 10 permit ^111_

!

!

access-list 35 permit 202.43.220.0 0.0.0.255

!

access-list 40 permit 192.100.7.0 0.0.0.255

access-list 50 permit 192.100.4.0 0.0.0.255

access-list 50 permit 192.100.5.0 0.0.0.255

access-list 50 permit 192.100.6.0 0.0.0.255

!

!

!

route-map SetLocalPref_provider_a permit 10

match as-path 10

set local-preference 300

!

route-map SetLocalPref_provider_a permit 20

!

!

!

route-map SetLocalPref_provider_b permit 10

match ip address 40

set local-preference 350

route-map SetLocalPref_provider_b permit 20

match as-path 20

set local-preference 200

!

route-map SetLocalPref_provider_b permit 30

!

!

route-map Set_ASN_provider_a permit 10

match ip address 40

set as-path prepend 10 10 10 10 10 10 10

!

route-map Set_ASN_provider_a permit 20

match ip address 50

!

route-map Set_ASN_provider_a permit 30

match as-path 200

!

!

route-map Set_ASN_provider_a permit 40

!

!

route-map Set_ASN_provider_b permit 10

match ip address 40

!

route-map Set_ASN_provider_b permit 20

match ip address 50

set as-path prepend 10 10 10 10 10 10 10

!

route-map Set_ASN_provider_b permit 30

match as-path 100

!

!

route-map Set_ASN_provider_b permit 40

----

Hi again,

Yes, you must make sure that you only send

your own summarized addresses to your provider. issue the cmd:

sh ip bgp neighbors 1.1.1.1 advertised-routes

On your outgoing policy you do not need to have this:

!

route-map Set_ASN_provider_a permit 30

match as-path 200

!

!

and this:

!

route-map Set_ASN_provider_b permit 30

match as-path 100

!

And you only need to prepend with one AS not 10 10 10 10.....

HTH, rate if it does.

BR,

Bjornarsb

Review Cisco Networking products for a $25 gift card