cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
775
Views
0
Helpful
8
Replies

Controlled MPLS Routes

vishal.rane
Level 1
Level 1

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

1 Accepted Solution

Accepted Solutions

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

View solution in original post

8 Replies 8

handoko wiyanto
Level 3
Level 3

Hi,

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

Regards,

Sent from Cisco Technical Support iPad App

PE - to - CE its BGP

LAN its OSPF

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,

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

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

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

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,

Thanks Giuseppe

All worked perfectly well as u mentioned.

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:

Review Cisco Networking products for a $25 gift card