Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

Prefix List in BGP

Hi,

We have one requirement in one my client location.

We configured two ISP(bsnl @ Tulip) in router with MPLS link and bgp protocol.

  LAN Network:10.10.150.0/23

  Bsnl ip : 192.168.36.96

  Tulip Ip : 10.237.9.65

Conf:

router bgp 65301

network 10.10.150.0 mask 255.255.254.0

neighbor 192.168.36.97 remote-as 9856

neighbor 10.237.9.64 remote-as 65002

We want allow traffic from 10.10.150.0/24 should go to Tulip link and the trafiic from 10.10.151.0/24 should go to Bsnl.

It is possible through prefixlist.

can u tell me how to configure the prefix-list.

Everyone's tags (3)
14 REPLIES

Re: Prefix List in BGP

Hi

ip route 10.10.150.0 255.255.255.0 GigabitEthernet0/0              --- put your connected int here

ip route  10.10.151.0 255.255.255.0  GigabitEthernet0/0             --- put your connected int here

ip prefix-list 1_LN seq 5 deny 10.10.150.0/24

ip prefix-list 1_LN seq 10 permit 10.10.151.0/24

ip prefix-list 2_LN seq 5 deny 10.10.151.0/24

ip prefix-list 2_LN seq 10 permit 10.10.150.0/24

router bgp 65301

no network 10.10.150.0 mask 255.255.254.0        --- you do not advertise this network

network 10.10.150.0 mask 255.255.255.0           --- you will advertise two more networks insted

network 10.10.151.0 mask 255.255.255.0           ----

neighbor 192.168.36.97 remote-as 9856

neighbor 192.168.36.97 prefix-list 1_LN out

neighbor 10.237.9.64 remote-as 65002

neighbor 10.237.9.64 prefix-list 2_LN out

thus from one provider incoming traffic only will came to one network and from second to second

dont forget to rate post if helpfull

New Member

Prefix List in BGP

why u put static route in this configuration?

Re: Prefix List in BGP

because BGP will only advertise those routes whith are exist in routing table

New Member

Prefix List in BGP

i am not undrstand .can u tell me in clearly

Re: Prefix List in BGP

as for outgoing traffic for routing based on source address should be used PBR

New Member

Prefix List in BGP

Thanks for your support

Purple

Prefix List in BGP

Hi,

As lastly remarked by ttemirgaliyev, if you want to route differently according to source address then you have to use PBR( Policy based routing).

-On the interface where the src IP arrives: ip policy route-map PBR

-in global config:

access-list 50 permit 10.10.150.0 0.0.0.255

access-list 51 permit 10.10.151.0 0.0.0.255

route-map PBR permit 10

match ip address 50

set ip next-hop 10.237.x.x       Tulip IP

match ip address 51

set ip next-hop 192.168.x.x     Bsnl  IP

Regards.

Alain

Don't forget to rate helpful posts.
New Member

Prefix List in BGP

Now what am i to do for my requirement

I am to  apply the Both prefix-list and PBR or anyone .

Purple

Prefix List in BGP

Hi,

you have to use the PBR as you want to route differently according to source IP but a router routes according to destination subnet only. So don't use the prefix-list.

Don't forget to rate helpful posts.

Regards.

Alain.

Don't forget to rate helpful posts.
New Member

Prefix List in BGP

Thanks for ur valuable support.

Hall of Fame Super Silver

Prefix List in BGP

Hello Dhineshkumar,

it is better if you use only PBR as the first solution with prefix-lists defeats BGP multi-homing by filtering IP prefixes sent to the providers

Also your requirement is on source IP address so PBR is the tool to use.

Hope to help

Giuseppe

New Member

Prefix List in BGP

Thanks for ur support

Hall of Fame Super Silver

Re: Prefix List in BGP

Hello Alain,

it is just a typing mistake for sure but two route-map clauses are needed

route-map PBR permit 10

match ip address 50

set ip next-hop 10.237.x.x       Tulip IP

route-map PBR permit 20

match ip address 51

set ip next-hop 192.168.x.x     Bsnl  IP

Hope to help

Giuseppe

Purple

Prefix List in BGP

Hi giuseppe,

of course , good catch 

Regards.

Alain.

Don't forget to rate helpful posts.
740
Views
12
Helpful
14
Replies