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

Controlled MPLS Routes

Hello

How do I control sending/receiving of routes on MPLS connection from HQ to Branch

Allow Branch to receive 192.168.1.0/24 & 192.168.2.0/24  routes only from HQ

Allow HQ to recieve 192.168.100.0/24 from branch only

Everyone's tags (2)
1 ACCEPTED SOLUTION

Accepted Solutions
Hall of Fame Super Silver

Re: Controlled MPLS Routes

Hello Vishal,

you just need network commands under router bgp process to advertise the IP subnets, if there are no other routers involved it is enough SP signalling plane will do all the job for you.

This is because network in BGP works differently that in IGP it looks for the IP prefix in the IP routing table and it can install and advertise a route learned by IGP.

You need redistribution of BGP into OSPF to propagate the routes learned in BGP

HQ CE

router bgp

network 192.168.1.0

network 192.168.2.0

neighbor HQ-PE-ip-address remote-as SP-AS

access-list 22 permit 192.168.100.0

route-map BGP-to-OSPF permit 10

match ip address 24

router ospf 1

redistribute bgp  subnets route-map BGP-to-OSPF

Branch CE

router bgp

network 192.168.100.0

neighbor BR-PE-ip-address remote-as SP-AS

access-list 24 permit 192.168.1.0

access-list 24 permit 192.168.2.0

route-map BGP-to-OSPF permit 10

match ip address 24

router ospf 1

redistribute bgp  subnets route-map BGP-to-OSPF

note: all this works if there is no alternative path between the sites, under the hyphothesis the OSPF domains are not joined between the sites.

Hope to help

Giuseppe

8 REPLIES
Community Member

Re: Controlled MPLS Routes

Hi,

What kind of routing do you use between pe and ce?

Regards,

Sent from Cisco Technical Support iPad App

Community Member

Controlled MPLS Routes

PE - to - CE its BGP

LAN its OSPF

Community Member

Re: Controlled MPLS Routes

the simplest thing will be using static route and then redistribute this route to the bgp.

perhaps you can post show run from the HQ and Branch1 CE router.

regards,

Hall of Fame Super Silver

Re: Controlled MPLS Routes

Hello Vishal,

you just need network commands under router bgp process to advertise the IP subnets, if there are no other routers involved it is enough SP signalling plane will do all the job for you.

This is because network in BGP works differently that in IGP it looks for the IP prefix in the IP routing table and it can install and advertise a route learned by IGP.

You need redistribution of BGP into OSPF to propagate the routes learned in BGP

HQ CE

router bgp

network 192.168.1.0

network 192.168.2.0

neighbor HQ-PE-ip-address remote-as SP-AS

access-list 22 permit 192.168.100.0

route-map BGP-to-OSPF permit 10

match ip address 24

router ospf 1

redistribute bgp  subnets route-map BGP-to-OSPF

Branch CE

router bgp

network 192.168.100.0

neighbor BR-PE-ip-address remote-as SP-AS

access-list 24 permit 192.168.1.0

access-list 24 permit 192.168.2.0

route-map BGP-to-OSPF permit 10

match ip address 24

router ospf 1

redistribute bgp  subnets route-map BGP-to-OSPF

note: all this works if there is no alternative path between the sites, under the hyphothesis the OSPF domains are not joined between the sites.

Hope to help

Giuseppe

Community Member

Controlled MPLS Routes

Thanks Giuseppe

I tested your config and it works perfect.

<>

In Branch CE

Router BGP 64500

network 192.168.100.0

I want HQ to receive subnet 192.168.100.0/24 except host 192.168.100.254.

can you tell how to get this working

thanks

Vishal

Hall of Fame Super Silver

Re: Controlled MPLS Routes

Hello Vishal,

>> I want HQ to receive subnet 192.168.100.0/24 except host 192.168.100.254.

This cannot be performed with  routing, it requires the use of an ACL for example applied outbound on interface to PE router

BR-CE:

access-list 121 remark denying access to host

access-list 121 deny ip host 192.168.100.254 192.168.1.0 0.0.1.255 log

access-list 121 permit ip any any

interface type x/y

description interface to BR-PE

ip access-group 121 out

In this way HQ subnets cannot talk with the specific host

Hope to help

Giuseppe

Community Member

Re: Controlled MPLS Routes

hi Giuseppe,

i think the access list is better at the inside interface of HQ-CE (the lan interface). this way the traffic to specific host do not utilizing the network and finally get dropped.

regards,

Community Member

Re: Controlled MPLS Routes

Thanks Giuseppe

All worked perfectly well as u mentioned.

385
Views
0
Helpful
8
Replies
CreatePlease to create content