Original Message:
Sent: 04-10-2024 12:16
From: Tom Russell
Subject: Equivalent Junos commands to Cisco BGP VRF redistribute commands
I'm getting closer; after adding the 'vrf-table-label' and making each route distinguisher unique, I'm now seeing the routes showing up in the routing tables of each. However, they are showing as hidden"
bgp.l3vpn.0: 1 destinations, 1 routes (0 active, 0 holddown, 1 hidden)
+ = Active Route, - = Last Active, * = Both
1.1.1.1:1:1.1.1.1/32
[BGP/170] 00:13:35, localpref 100, from 192.168.0.1
AS path: I, validation-state: unverified
Unusable
What else could I be missing...
For reference, here is the config from router A (router B is effectively the same so will only include A)
set interfaces ge-0/0/0 unit 0 family inet address 10.0.12.1/24set interfaces lo0 unit 0 family inet address 192.168.0.1/32set interfaces lo0 unit 1 family inet address 1.1.1.1/32set policy-options policy-statement vrf-a-in term 1 from protocol bgpset policy-options policy-statement vrf-a-in term 1 from community vrf-a-targetset policy-options policy-statement vrf-a-in term 1 then acceptset policy-options policy-statement vrf-a-out term 1 from protocol directset policy-options policy-statement vrf-a-out term 1 then community add vrf-a-targetset policy-options policy-statement vrf-a-out term 1 then acceptset policy-options community vrf-a-target members target:1:1set routing-instances vrf-a instance-type vrfset routing-instances vrf-a interface lo0.1set routing-instances vrf-a route-distinguisher 1.1.1.1:1set routing-instances vrf-a vrf-import vrf-a-inset routing-instances vrf-a vrf-export vrf-a-outset routing-instances vrf-a vrf-target import target:1:1set routing-instances vrf-a vrf-target export target:1:1set routing-instances vrf-a vrf-table-labelset protocols ospf area 0.0.0.0 interface allset protocols ospf area 0.0.0.0 interface fxp0.0 disableset protocols ospf area 0.0.0.0 interface lo0.0 passiveset protocols bgp family inet-vpn unicastset protocols bgp group peers type internalset protocols bgp group peers local-address 192.168.0.1set protocols bgp group peers import vrf-a-inset protocols bgp group peers export vrf-a-outset protocols bgp group peers neighbor 192.168.0.2set protocols bgp local-as 64000set protocols mpls interface all
Router B's route distinguisher is now 2.2.2.2:1. I could be missing something really simple... Do the route targets on each router need to be unique too? I don't feel like that's what it is though.
------------------------------
Tom Russell
Original Message:
Sent: 04-10-2024 07:11
From: Kalle
Subject: Equivalent Junos commands to Cisco BGP VRF redistribute commands
Hi
Maybe I have wrong about RD.
Don't forget this command:
set routing-instances vrf-a vrf-table-label
------------------------------
Kalle Andersson
Original Message:
Sent: 04-10-2024 07:08
From: Tom Russell
Subject: Equivalent Junos commands to Cisco BGP VRF redistribute commands
Ahh okay, doing it with Cisco you can use the same rd on both routers without issue so that's probably where I was going wrong. Will test with another lab later on and let you know how it goes.
Many thanks
------------------------------
Tom Russell
Original Message:
Sent: 04-10-2024 06:05
From: Kalle
Subject: Equivalent Junos commands to Cisco BGP VRF redistribute commands
Hi Tom,
To only redistribute lo0, the config should look as following, I assume that the MPLS part is working.
You had same RD on both routers, it's not correct.
Every router need an unique RD, if same the routes will not be install in routing table.
router A:
set interfaces lo0 unit 1 family inet address 2.2.2.2/32
set policy-options policy-statement vrf-a-in term 1 from protocol bgp
set policy-options policy-statement vrf-a-in term 1 from community vrf-a-target
set policy-options policy-statement vrf-a-in term 1 then accept
set policy-options policy-statement vrf-a-out term 1 from protocol direct
set policy-options policy-statement vrf-a-out term 1 then community add vrf-a-target
set policy-options policy-statement vrf-a-out term 1 then accept
set policy-options community vrf-a-target members target:1:1
set routing-instances vrf-a instance-type vrf
set routing-instances vrf-a interface lo0.1
set routing-instances vrf-a route-distinguisher 192.168.0.2:1
set routing-instances vrf-a vrf-import vrf-a-in
set routing-instances vrf-a vrf-export vrf-a-out
set routing-instances vrf-a vrf-target import target:1:1
set routing-instances vrf-a vrf-target export target:1:1
set routing-instances vrf-a vrf-table-label
router B:
set interfaces lo0 unit 1 family inet address 1.1.1.1/32
set policy-options policy-statement vrf-a-in term 1 from protocol bgp
set policy-options policy-statement vrf-a-in term 1 from community vrf-a-target
set policy-options policy-statement vrf-a-in term 1 then accept
set policy-options policy-statement vrf-a-out term 1 from protocol direct
set policy-options policy-statement vrf-a-out term 1 then community add vrf-a-target
set policy-options policy-statement vrf-a-out term 1 then accept
set policy-options community vrf-a-target members target:1:1
set routing-instances vrf-a instance-type vrf
set routing-instances vrf-a interface lo0.1
set routing-instances vrf-a route-distinguisher 192.168.0.1:1
set routing-instances vrf-a vrf-import vrf-a-in
set routing-instances vrf-a vrf-export vrf-a-out
set routing-instances vrf-a vrf-target import target:1:1
set routing-instances vrf-a vrf-target export target:1:1
set routing-instances vrf-a vrf-table-label
------------------------------
Kalle Andersson
Original Message:
Sent: 04-09-2024 02:34
From: Kalle
Subject: Equivalent Junos commands to Cisco BGP VRF redistribute commands
Hi Tom,
If you want to distribute ospf in to a vrf you need polices.
Here is one way to do it:
set routing-instances VRF-A vrf-import VRF-A_IMPORT
set routing-instances VRF-A vrf-export VRF-A_EXPORT
set policy-options policy-statement VRF-A_IMPORT term 1 from protocol bgp
set policy-options policy-statement VRF-A_IMPORT term 1 from community VRF-A-TARGET
set policy-options policy-statement VRF-A_IMPORT term 1 then accept
set policy-options policy-statement VRF-A_EXPORT term 1 from protocol ospf
set policy-options policy-statement VRF-A_EXPORT term 1 then community add VRF-A-TARGET
set policy-options policy-statement VRF-A_EXPORT term 1 then accept
set policy-options community VRF-A-TARGET members target:64500:100
------------------------------
Kalle Andersson
Original Message:
Sent: 04-08-2024 15:26
From: Tom Russell
Subject: Equivalent Junos commands to Cisco BGP VRF redistribute commands
Hi all,
I am fairly new to Juniper; I was brought up in the Cisco world so for the last few weeks have been doing a crash course learning the fundamentals of Junos.
One thing I am still really struggling with is the equivalent of the following Cisco commands:
router bgp 64000
address-family ipv4 vrf CUST-A
redistribute ospf 2
In Cisco terms, this would allow you to go into BGP configuration, then configure a portion of it just for the routing instance names 'CUST-A' in the case, and redistribute any OSPF routes under that VRF.
I'm trying to configure the equivalent of this setup: https://www.youtube.com/watch?v=9WUjfUVBbIA which is an MPLS BGP/OSPF topology to support multiple potential customers which may have overlapping private address ranges.
Please forgive me if I'm missing something basic, my brain feels like it is melting from how much I'm taking in at the moment!
I have already done quite a bit of digging and have concluded there doesn't appear to be an equivalent 'redistribute' command in BGP. I'm wondering if the only way is configuring policy statements, but I still can't seem to figure out a way to apply these to the main BGP instance.to allow the VRF to learn the OSPF routes.
Would appreciate any assistance. Please also let me know if I've not been clear enough with what I'm asking.
------------------------------
Tom Russell
------------------------------