Junos
Highlighted
Junos

Routing between PE and CE

[ Edited ]
‎03-07-2020 11:56 AM

PC-CE.JPG

set system host-name MX-PE1

set interfaces ge-0/0/0 unit 0 family inet address 10.10.10.1/24
set interfaces ge-0/0/1 unit 0 family inet address 172.16.10.1/24
set interfaces ge-0/0/1 unit 0 family mpls
set interfaces lo0 unit 0 family inet address 22.22.22.22/32
set interfaces lo0 unit 10 family inet address 99.99.99.99/24

Facing MX-P
set protocols ospf traffic-engineering
set protocols ospf area 0.0.0.20 interface ge-0/0/1.0
set protocols ospf area 0.0.0.20 interface lo0.0

set protocols rsvp interface all
set protocols ldp interface ge-0/0/1.0

set routing-options autonomous-system 65200

set protocols bgp group ToMXPE2 type internal
set protocols bgp group ToMXPE2 local-address 22.22.22.22
set protocols bgp group ToMXPE2 family inet unicast
set protocols bgp group ToMXPE2 family inet-vpn any
set protocols bgp group ToMXPE2 peer-as 65200
set protocols bgp group ToMXPE2 neighbor 44.44.44.44

Facing MX-CE1
set routing-instances CustA instance-type vrf
set routing-instances CustA interface ge-0/0/0.0
set routing-instances CustA interface lo0.10
set routing-instances CustA route-distinguisher 200:10
set routing-instances CustA vrf-target import target:2000:2000
set routing-instances CustA vrf-target export target:2000:2000
set routing-instances CustA protocols ospf export exportBGP
set routing-instances CustA protocols ospf area 0.0.0.10 interface ge-0/0/0.0

set policy-options policy-statement exportBGP term t1 from protocol bgp
set policy-options policy-statement exportBGP then accept

Why ospf not needed to redistribute into bgp to be carried over to MX-PE2 as cisco does?

root@MX-CE2> show route protocol bgp

inet.0: 7 destinations, 7 routes (7 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

10.10.10.0/24      *[BGP/170] 01:21:01, localpref 100
                      AS path: 65004 65200 I, validation-state: unverified
                    > to 20.20.20.1 via ge-0/0/1.0
11.11.11.11/32     *[BGP/170] 01:21:01, localpref 100
                      AS path: 65004 65200 I, validation-state: unverified
                    > to 20.20.20.1 via ge-0/0/1.0
99.99.99.0/24      *[BGP/170] 01:21:01, localpref 100
                      AS path: 65004 65200 I, validation-state: unverified
                    > to 20.20.20.1 via ge-0/0/1.0
99.99.99.99/32     *[BGP/170] 01:21:01, localpref 100
                      AS path: 65004 65200 I, validation-state: unverified
                    > to 20.20.20.1 via ge-0/0/1.0

thanks !!

12 REPLIES 12
Highlighted
Junos

Re: Routing between PE and CE

‎03-07-2020 08:52 PM

Hi

 

Please check below link which has some information on why we do not need to redistribute the ospf route into bgp:

 

https://www.juniper.net/documentation/en_US/junose15.1/topics/concept/mbgp-ospf-routes-distribution-...

 

 

Highlighted
Junos

Re: Routing between PE and CE

‎03-07-2020 11:32 PM

Hello,

 


@gongyayu wrote:

Why ospf not needed to redistribute into bgp to be carried over to MX-PE2 as cisco does?

root@MX-CE2> show route protocol bgp

inet.0: 7 destinations, 7 routes (7 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

10.10.10.0/24      *[BGP/170] 01:21:01, localpref 100
                      AS path: 65004 65200 I, validation-state: unverified
                    > to 20.20.20.1 via ge-0/0/1.0
11.11.11.11/32     *[BGP/170] 01:21:01, localpref 100
                      AS path: 65004 65200 I, validation-state: unverified
                    > to 20.20.20.1 via ge-0/0/1.0
99.99.99.0/24      *[BGP/170] 01:21:01, localpref 100
                      AS path: 65004 65200 I, validation-state: unverified
                    > to 20.20.20.1 via ge-0/0/1.0
99.99.99.99/32     *[BGP/170] 01:21:01, localpref 100
                      AS path: 65004 65200 I, validation-state: unverified
                    > to 20.20.20.1 via ge-0/0/1.0

 


 

If You are asking about routes 10.10.10.0/24,  99.99.99.0/24 and 99.99.99.99/32 then they are NOT OSPF routes in PE1.

They are covered by "protocols ospf area X interface BLAH.blah" statement but they are direct routes in PE1 VRF table.

And JUNOS "vrf-target" knob redistributes direct+static routes as expected.

HTH

Thx

Alex 

 

 

_____________________________________________________________________

Please ask Your Juniper account team about Juniper Professional Services offerings.
Juniper PS can design, test & build the network/part of the network as per Your requirements

+++++++++++++++++++++++++++++++++++++++++++++

Accept as Solution = cool !
Accept as Solution+Kudo = You are a Star !
Highlighted
Junos

Re: Routing between PE and CE

‎03-08-2020 06:47 AM
10.10.10.0/24
99.99.99.0/24
99.99.99.99/32

The above 3 prefixes look correct. They are local/direct routes on PE1.

 

Who is owning 11.11.11.11/32? 


Mengzhe Hu
JNCIE x 3 (SP DC ENT)
Highlighted
Junos

Re: Routing between PE and CE

‎03-08-2020 08:28 AM

MX-CE1 owns 11.11.11.11.

 

thanks for taking a look at it.

Highlighted
Junos

Re: Routing between PE and CE

‎03-08-2020 08:37 AM

thanks for the information.

Here I am more interested in 11.11.11.11 which originates from MX-CE1. I did not redistribute it, how does MX-CE2 see it ?

Highlighted
Junos

Re: Routing between PE and CE

‎03-08-2020 08:39 AM

I see,

 

You must have leaked the route via, though I don't remember seeing such behavior Smiley Happy 

set routing-instances CustA vrf-target import target:2000:2000
set routing-instances CustA vrf-target export target:2000:2000

 

If you want more controlable import/export, please sue vrf-import/vrf-export  


Mengzhe Hu
JNCIE x 3 (SP DC ENT)
Highlighted
Junos

Re: Routing between PE and CE

‎03-08-2020 08:40 AM

I am interested in 11.11.11.11 which originates from MX-CE1 and advertises via OSPF.

 

thanks !!

Highlighted
Junos
Solution
Accepted by topic author gongyayu
‎03-08-2020 03:48 PM

Re: Routing between PE and CE

‎03-08-2020 10:02 AM

Why ospf not needed to redistribute into bgp to be carried over to MX-PE2 as cisco does?

<Vishal> For the route learned from CE (local route) you don't need specific policy to advertise those route to remote PE. All the local routes will be advertised to remote PE unless to apply a specific export policy.

Refer the Example Below:


set logical-systems r1 routing-instances test instance-type vrf
set logical-systems r1 routing-instances test interface xe-1/3/1.1
set logical-systems r1 routing-instances test route-distinguisher 100:11111
set logical-systems r1 routing-instances test vrf-target target:100:111111  <<< no export policy
set logical-systems r1 routing-instances test protocols ospf export mpbgp_to_ospf
set logical-systems r1 routing-instances test protocols ospf area 0.0.0.0 interface xe-1/3/1.1


labroot@rigel-re0# run show route logical-system r1 table test.inet.0

test.inet.0: 6 destinations, 8 routes (6 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

1.1.1.0/30 *[Direct/0] 00:02:31
> via xe-1/3/1.1
1.1.1.2/32 *[Local/0] 00:02:31
Local via xe-1/3/1.1
192.168.1.100/32 *[OSPF/10] 00:01:39, metric 1   <<<< this is the local CE loopback leanred from OSPF

 

labroot@rigel-re0# run show route advertising-protocol bgp 192.168.1.104 logical-system r1
test.inet.0: 6 destinations, 8 routes (6 active, 0 holddown, 0 hidden)
Prefix Nexthop MED Lclpref AS path
* 1.1.1.0/30 Self 100 I
* 192.168.1.100/32 Self 1 100 I   <<<<< getting advertised to RR

PS: Please accept my response as solution if it answers you query, kudos are appreciated too!

Thanks
Vishal


Highlighted
Junos

Re: Routing between PE and CE

‎03-08-2020 03:51 PM

Do you have links to any documentation related to this ?

Seems this is different from Cisco.

 

thanks !!

Highlighted
Junos

Re: Routing between PE and CE

‎03-08-2020 04:01 PM

I can't find where I leak this.

 

thanks !!

Highlighted
Junos

Re: Routing between PE and CE

‎03-08-2020 04:10 PM
router bgp 65100
 bgp log-neighbor-changes
 no bgp default ipv4-unicast
 neighbor 4.4.4.4 remote-as 65100
 neighbor 4.4.4.4 update-source Loopback0
 !
 address-family ipv4
 exit-address-family
 !
 address-family vpnv4
  neighbor 4.4.4.4 activate
  neighbor 4.4.4.4 send-community both
 exit-address-family
 !
 address-family ipv4 vrf CustA
  redistribute eigrp 10
  red ospf 20
 exit-address-family

I have redistribute ospf 20 in cisco configuration.  wondering no need for Junos ?

Highlighted
Junos

Re: Routing between PE and CE

‎03-09-2020 01:57 PM

Hi gongyayu,

 

Including the vrf-target statement in the configuration for a VRF target community causes default VRF import and export policies to be generated that accept and tag routes with the specified target community. By default, all routes in the bgp.l3vpn.0 routing table are exported to the IBGP peers

 

https://www.juniper.net/documentation/en_US/junos/topics/topic-map/l3-vpns-distributing-routes.html

 

In the example configuration that I had shared in my response you can check the policy that junos created upon vrf-target configuration. You can see there is no term matching any protocol.

Config:

set logical-systems r1 routing-instances test vrf-target target:100:111111
set logical-systems r1 routing-instances test protocols ospf export mpbgp_to_ospf

labroot@rigel-re0# run show policy logical-system r1 __vrf-export-test-internal__   < default export policy
Policy __vrf-export-test-internal__:
Term unnamed:
then community + __vrf-community-test-common-internal__ [target:100:111111 ] accept

labroot@rigel-re0# run show policy logical-system r1 mpbgp_to_ospf
Policy mpbgp_to_ospf:
Term unnamed:
from proto BGP     < manually configured policy has the protocol
then accept

PS: If you found my response useful, kudos are appreciated.

Thanks
Vishal