cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1426
Views
12
Helpful
14
Replies

Prefix List in BGP

kumarpmt83
Level 1
Level 1

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.

14 Replies 14

Tagir Temirgaliyev
Spotlight
Spotlight

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

why u put static route in this configuration?

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

i am not undrstand .can u tell me in clearly

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

Thanks for your support

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.

Now what am i to do for my requirement

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

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.

Thanks for ur valuable support.

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

Thanks for ur support

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

Hi giuseppe,

of course , good catch 

Regards.

Alain.

Don't forget to rate helpful posts.
Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: