>_nexthopreachable

JNCIP-ENT Mega Lab Part 2: Branch WAN and Basic Multicast

Ali Bahadır Coşkun16 min read

This is Part 2 of my JNCIP-ENT mega lab series. It continues from the Internet edge and core built in Part 1 and adds two branch WAN designs, one with BGP and one with OSPF. Branch 1 is in AS 65001 and uses redundant eBGP sessions through provider AS 65500, where local preference 200 is preferring WAN-PE01 and the WAN-PE02 path stays as backup in BGP table. Branch 2 is inside the enterprise AS and uses two OSPF area 1 circuits with costs 10 and 100. On top of this, one PIM sparse-mode ASM service is added, with HQ-CORE01 as the static RP.

Overview

DeviceRole
HQ-CORE01enterprise core, Branch 2 ABR, and static RP at 10.0.0.5
HQ-CORE02enterprise core, Branch 2 ABR, and attachment point for the multicast receiver
WAN-PE01primary provider edge in AS 65500
WAN-PE02backup provider edge in AS 65500
BR1-EDGE01Branch 1 edge in AS 65001 with two eBGP sessions
BR2-EDGE01Branch 2 edge in AS 65000 with two OSPF adjacencies
BR1-HOSTunicast endpoint at Branch 1
BR2-SOURCEmulticast source and unicast endpoint at Branch 2
BR2-OT-HOSTsecond unicast endpoint at Branch 2
HQ-RECEIVERreceiver-side endpoint at headquarters

For this part, the tasks are:

  • Build provider transit between WAN-PE01 and WAN-PE02 with OSPF and iBGP.
  • Connect Branch 1 and both headquarters cores to the provider with eBGP.
  • Advertise only the required enterprise aggregates and the exact Branch 1 LAN prefix.
  • Prefer WAN-PE01 at Branch 1 with local preference 200 while keeping WAN-PE02 as a usable backup.
  • Add Branch 2 as normal OSPF area 1 and prefer its circuit to HQ-CORE01 with unequal interface metrics.
  • Configure PIM sparse mode with HQ-CORE01 as a single static RP.
  • Create receiver membership for 239.100.1.1 and verify both shared-tree and source-specific multicast state.
  • Confirm that the Phase 1 OSPF, OSPF3, route-reflector, and authentication configuration remains healthy.

Topology

Building the provider transit network

The provider edges use OSPF for reachability between their loopbacks. They then establish an iBGP session between 10.0.0.7 and 10.0.0.8 to exchange the routes learned from Branch 1 and the headquarters cores.

On WAN-PE01:

junos
set interfaces ge-0/0/0 unit 0 family inet address 172.16.3.2/30set interfaces ge-0/0/1 unit 0 family inet address 172.16.5.2/30set interfaces ge-0/0/2 unit 0 family inet address 10.2.50.1/30set interfaces lo0 unit 0 family inet address 10.0.0.7/32set routing-options router-id 10.0.0.7set routing-options autonomous-system 65500set protocols ospf area 0.0.0.0 interface ge-0/0/2.0 interface-type p2pset protocols ospf area 0.0.0.0 interface lo0.0 passiveset policy-options policy-statement NHS term bgp-routes from protocol bgpset policy-options policy-statement NHS term bgp-routes then next-hop selfset policy-options policy-statement NHS term bgp-routes then acceptset policy-options policy-statement NHS term reject-all then rejectset protocols bgp group INTERNAL type internalset protocols bgp group INTERNAL local-address 10.0.0.7set protocols bgp group INTERNAL family inet unicastset protocols bgp group INTERNAL export NHSset protocols bgp group INTERNAL neighbor 10.0.0.8set protocols bgp group CUST-ENT type externalset protocols bgp group CUST-ENT peer-as 65000set protocols bgp group CUST-ENT family inet unicastset protocols bgp group CUST-ENT neighbor 172.16.3.1set protocols bgp group CUST-BR1 type externalset protocols bgp group CUST-BR1 peer-as 65001set protocols bgp group CUST-BR1 family inet unicastset protocols bgp group CUST-BR1 neighbor 172.16.5.1

WAN-PE02 uses the same policy and mirrored addresses:

junos
set interfaces ge-0/0/0 unit 0 family inet address 172.16.4.2/30set interfaces ge-0/0/1 unit 0 family inet address 172.16.6.2/30set interfaces ge-0/0/2 unit 0 family inet address 10.2.50.2/30set interfaces lo0 unit 0 family inet address 10.0.0.8/32set routing-options router-id 10.0.0.8set routing-options autonomous-system 65500set protocols ospf area 0.0.0.0 interface ge-0/0/2.0 interface-type p2pset protocols ospf area 0.0.0.0 interface lo0.0 passiveset policy-options policy-statement NHS term bgp-routes from protocol bgpset policy-options policy-statement NHS term bgp-routes then next-hop selfset policy-options policy-statement NHS term bgp-routes then acceptset policy-options policy-statement NHS term reject-all then rejectset protocols bgp group INTERNAL type internalset protocols bgp group INTERNAL local-address 10.0.0.8set protocols bgp group INTERNAL family inet unicastset protocols bgp group INTERNAL export NHSset protocols bgp group INTERNAL neighbor 10.0.0.7set protocols bgp group CUST-ENT type externalset protocols bgp group CUST-ENT peer-as 65000set protocols bgp group CUST-ENT family inet unicastset protocols bgp group CUST-ENT neighbor 172.16.4.1set protocols bgp group CUST-BR1 type externalset protocols bgp group CUST-BR1 peer-as 65001set protocols bgp group CUST-BR1 family inet unicastset protocols bgp group CUST-BR1 neighbor 172.16.6.1

By default, iBGP does not change the next hop of a route learned through eBGP. The remote PE would therefore receive the customer route with a next hop on the other PE's customer-facing subnet. Because this subnet is not carried by the provider IGP, the next hop cannot be resolved and the route becomes hidden. The NHS policy replaces it with the advertising PE's loopback, which is reachable through OSPF.

Verify the provider control plane:

junos
show ospf neighborshow route 10.0.0.8/32show bgp summary

Each PE should have one Full OSPF adjacency. The iBGP session should be Established, and the remote PE loopback should be reachable through the inter-PE link.

Branch 1: eBGP with a primary and backup path

BR1-EDGE01 advertises only its LAN, 10.100.111.0/24. Both provider sessions use the same export policy, but routes received from WAN-PE01 get local preference 200. Routes from WAN-PE02 keep the default value of 100.

junos
set interfaces ge-0/0/0 unit 0 family inet address 172.16.5.1/30set interfaces ge-0/0/1 unit 0 family inet address 172.16.6.1/30set interfaces ge-0/0/2 unit 0 family inet address 10.100.111.1/24set interfaces lo0 unit 0 family inet address 10.0.0.9/32set routing-options router-id 10.0.0.9set routing-options autonomous-system 65001set policy-options policy-statement ADV-BR1 term lan from protocol directset policy-options policy-statement ADV-BR1 term lan from route-filter 10.100.111.0/24 exactset policy-options policy-statement ADV-BR1 term lan then acceptset policy-options policy-statement ADV-BR1 term reject-all then rejectset policy-options policy-statement PREFER-PE01 term all then local-preference 200set policy-options policy-statement PREFER-PE01 term all then acceptset protocols bgp group WAN-PE01 type externalset protocols bgp group WAN-PE01 peer-as 65500set protocols bgp group WAN-PE01 family inet unicastset protocols bgp group WAN-PE01 import PREFER-PE01set protocols bgp group WAN-PE01 export ADV-BR1set protocols bgp group WAN-PE01 neighbor 172.16.5.2set protocols bgp group WAN-PE02 type externalset protocols bgp group WAN-PE02 peer-as 65500set protocols bgp group WAN-PE02 family inet unicastset protocols bgp group WAN-PE02 export ADV-BR1set protocols bgp group WAN-PE02 neighbor 172.16.6.2

Local preference is evaluated before AS-path length and is not advertised outside the local AS. For this reason, we can select the preferred exit from Branch 1 without changing what Branch 1 advertises to the provider. The second route remains in the BGP table and becomes active if the primary session fails.

After the enterprise-side sessions are configured, verify both candidate paths on BR1-EDGE01:

junos
show bgp summaryshow route 10.100.0.0/19 detailshow route 10.0.0.0/16 detail

Both eBGP sessions should be Established. Each aggregate should have two BGP paths. The active path should use next hop 172.16.5.2 and show local preference 200, while the path through 172.16.6.2 remains inactive but usable.

The enterprise WAN boundary

Branch 1 needs reachability to the enterprise loopbacks and service networks. Advertising every internal prefix into AS 65500 would expose unnecessary topology information and increase the number of routes carried by the provider. Instead, both headquarters cores advertise the same two summaries. Branch 1 receives these summaries through both PEs, so the primary and backup paths remain available.

The 10.0.0.0/16 aggregate covers infrastructure addresses, while 10.100.0.0/19 covers the headquarters and Branch 2 service networks. The Branch 1 LAN, 10.100.111.0/24, is outside the /19 and is advertised separately toward the enterprise.

junos
set routing-options aggregate route 10.0.0.0/16set routing-options aggregate route 10.100.0.0/19set policy-options policy-statement ADV-WAN term infrastructure from protocol aggregateset policy-options policy-statement ADV-WAN term infrastructure from route-filter 10.0.0.0/16 exactset policy-options policy-statement ADV-WAN term infrastructure then acceptset policy-options policy-statement ADV-WAN term users from protocol aggregateset policy-options policy-statement ADV-WAN term users from route-filter 10.100.0.0/19 exactset policy-options policy-statement ADV-WAN term users then acceptset policy-options policy-statement ADV-WAN term reject-all then rejectset policy-options policy-statement IMPORT-BR1 term branch from protocol bgpset policy-options policy-statement IMPORT-BR1 term branch from route-filter 10.100.111.0/24 exactset policy-options policy-statement IMPORT-BR1 term branch then acceptset policy-options policy-statement IMPORT-BR1 term reject-all then reject

On HQ-CORE01:

junos
set interfaces ge-0/0/3 unit 0 family inet address 172.16.3.1/30set interfaces ge-0/0/4 unit 0 family inet address 10.2.10.1/30set protocols bgp group WAN type externalset protocols bgp group WAN peer-as 65500set protocols bgp group WAN family inet unicastset protocols bgp group WAN import IMPORT-BR1set protocols bgp group WAN export ADV-WANset protocols bgp group WAN neighbor 172.16.3.2

HQ-CORE02 uses the same policies toward WAN-PE02:

junos
set interfaces ge-0/0/3 unit 0 family inet address 172.16.4.1/30set interfaces ge-0/0/4 unit 0 family inet address 10.2.20.1/30set interfaces ge-0/0/5 unit 0 family inet address 10.100.5.1/24set protocols bgp group WAN type externalset protocols bgp group WAN peer-as 65500set protocols bgp group WAN family inet unicastset protocols bgp group WAN import IMPORT-BR1set protocols bgp group WAN export ADV-WANset protocols bgp group WAN neighbor 172.16.4.2

Branch 2: normal OSPF area 1

Branch 2 remains part of enterprise AS 65000 and uses OSPF instead of BGP for WAN routing. Its two routed links belong to area 1, while HQ-CORE01 and HQ-CORE02 connect this area to the existing area 0 backbone as ABRs.

On HQ-CORE01:

junos
set protocols ospf area 0.0.0.1 interface ge-0/0/4.0 interface-type p2pset protocols ospf area 0.0.0.1 interface ge-0/0/4.0 metric 10

On HQ-CORE02:

junos
set protocols ospf area 0.0.0.1 interface ge-0/0/4.0 interface-type p2pset protocols ospf area 0.0.0.1 interface ge-0/0/4.0 metric 100set protocols ospf area 0.0.0.0 interface ge-0/0/5.0 passive

On BR2-EDGE01:

junos
set chassis fpc 0 pic 0 tunnel-servicesset interfaces ge-0/0/0 unit 0 family inet address 10.2.10.2/30set interfaces ge-0/0/1 unit 0 family inet address 10.2.20.2/30set interfaces ge-0/0/2 unit 0 family inet address 10.100.12.1/24set interfaces ge-0/0/4 unit 0 family inet address 10.100.13.1/24set interfaces lo0 unit 0 family inet address 10.0.0.10/32set routing-options router-id 10.0.0.10set routing-options autonomous-system 65000set protocols ospf area 0.0.0.1 interface ge-0/0/0.0 interface-type p2pset protocols ospf area 0.0.0.1 interface ge-0/0/0.0 metric 10set protocols ospf area 0.0.0.1 interface ge-0/0/1.0 interface-type p2pset protocols ospf area 0.0.0.1 interface ge-0/0/1.0 metric 100set protocols ospf area 0.0.0.1 interface ge-0/0/2.0 passiveset protocols ospf area 0.0.0.1 interface ge-0/0/4.0 passiveset protocols ospf area 0.0.0.1 interface lo0.0 passive

The interface metrics make the link through HQ-CORE01 the primary circuit in both directions. The route through HQ-CORE02 remains available with a higher cost and becomes active when the primary adjacency or link fails.

Verify the branch routing table:

junos
show ospf neighborshow route 10.0.0.5/32show route 10.100.5.0/24

Both OSPF neighbors should be Full. The active routes to the RP loopback and headquarters receiver network should use 10.2.10.1, the primary next hop toward HQ-CORE01.

Adding multicast to the Branch 2 WAN

Multicast begins with receiver membership. A host uses IGMP to join a group, and the routers use PIM to build the forwarding tree required to deliver the traffic. Multicast normally uses either Any-Source Multicast or Source-Specific Multicast. With ASM, a receiver joins a group without specifying the sender. It can receive traffic from any source sending to that group. The network uses an RP as the initial meeting point: the receiver-side router builds (*,G) state toward the RP, and the source-side designated router sends PIM Register messages to the RP when a source becomes active. After learning the source, the routers can also build (S,G) state toward it.

With SSM, the receiver requests a particular source and group as an (S,G) channel. SSM normally uses the 232.0.0.0/8 range and IGMPv3 membership reports. Because the source is already known, the routers can build the tree directly toward it. SSM does not require an RP, a shared tree, or PIM Register messages. ASM and SSM describe the receiver service model; the routed interfaces can use PIM sparse mode in both cases.

In this lab we use ASM group 239.100.1.1. HQ-CORE02 represents the receiver side, and BR2-EDGE01 is the designated router for source 10.100.12.10. HQ-CORE01 provides the RP function using its existing 10.0.0.5 loopback. HQ-CORE01 configures this address with rp local, while HQ-CORE02 and BR2-EDGE01 use rp static. Every multicast router therefore maps the ASM group to the same RP.

On HQ-CORE01:

junos
set chassis fpc 0 pic 0 tunnel-servicesset protocols pim rp local family inet address 10.0.0.5set protocols pim interface lo0.0set protocols pim interface ge-0/0/2.0 mode sparseset protocols pim interface ge-0/0/4.0 mode sparse

On HQ-CORE02:

junos
set chassis fpc 0 pic 0 tunnel-servicesset protocols pim rp static address 10.0.0.5set protocols pim interface lo0.0set protocols pim interface ge-0/0/2.0 mode sparseset protocols pim interface ge-0/0/4.0 mode sparseset protocols pim interface ge-0/0/5.0 mode sparseset protocols igmp interface ge-0/0/5.0 version 2set protocols igmp interface ge-0/0/5.0 static group 239.100.1.1

On BR2-EDGE01:

junos
set protocols pim rp static address 10.0.0.5set protocols pim interface lo0.0set protocols pim interface ge-0/0/0.0 mode sparseset protocols pim interface ge-0/0/1.0 mode sparseset protocols pim interface ge-0/0/2.0 mode sparse

Understanding the important multicast commands

set chassis fpc 0 pic 0 tunnel-services enables the tunnel capability used by the PIM Register process on vMX. The source-side designated router encapsulates the first multicast packets in unicast PIM Register messages, and the RP decapsulates them. In this lab, BR2-EDGE01 needs the encapsulation side and HQ-CORE01 needs the decapsulation side.

set protocols pim rp local family inet address 10.0.0.5 makes HQ-CORE01 the RP. The address is taken from its loopback so it stays stable as long as the router remains reachable. The other multicast routers use set protocols pim rp static address 10.0.0.5 to map ASM groups to the same RP. A static RP is not discovered automatically, so this mapping must agree across the PIM domain.

set protocols pim interface <interface> mode sparse enables PIM sparse mode on a routed link. It is needed on every interface that should form a PIM adjacency or carry multicast traffic. Enabling PIM on lo0.0 lets PIM use the stable loopback address locally; the loopback itself does not form a neighbor adjacency.

The receiver-facing commands have a different job. set protocols igmp interface ge-0/0/5.0 version 2 selects IGMPv2, while set protocols igmp interface ge-0/0/5.0 static group 239.100.1.1 creates permanent local receiver interest. HQ-CORE02 therefore sends a PIM join upstream even when the attached lab host does not generate an IGMP report.

After committing the configuration, these are the most useful verification commands:

junos
show pim interfacesshow pim neighborsshow pim rpsshow igmp group 239.100.1.1 detailshow multicast rpf 10.0.0.5show multicast rpf 10.100.12.10show pim join extensive 239.100.1.1show multicast route group 239.100.1.1 extensive

show pim interfaces confirms that the required interfaces are up in sparse mode, while show pim neighbors confirms that PIM hello messages have formed adjacencies on the routed links. These checks prove the PIM control plane is enabled, but they do not by themselves prove that a multicast tree exists.

show pim rps should map the group to 10.0.0.5. show igmp group 239.100.1.1 detail, run on HQ-CORE02, should show the static membership on ge-0/0/5.0. Together, these commands confirm both ends of the shared-tree process: the RP mapping and the receiver interest.

show multicast rpf checks the reverse path used by PIM. For (*,G) state, the important lookup is toward RP 10.0.0.5; for (S,G) state, it is toward source 10.100.12.10. The RPF interface points upstream: multicast data should arrive on it, while PIM joins are sent out through it. On BR2-EDGE01, the RP lookup should point through ge-0/0/0.0 toward HQ-CORE01 because that area 1 circuit has the lower OSPF metric.

Finally, show pim join extensive 239.100.1.1 displays the control-plane tree, including the upstream and downstream interfaces for (*,G) and (S,G) state. show multicast route group 239.100.1.1 extensive displays the forwarding entry installed for the same group. Before the source transmits, it is normal to see receiver-driven (*,G) state without active (S,G) forwarding state. Once 10.100.12.10 sends traffic to 239.100.1.1, the source-specific entry should appear and its incoming interface must agree with the RPF result.

Key points:

  • The two branches use different routing models. Branch 1 is a separate AS and fails over through BGP path selection. Branch 2 is part of the enterprise OSPF domain and fails over according to interface cost.
  • The provider iBGP next hop must be resolvable. The NHS export policy changes customer-route next hops to PE loopbacks carried by OSPF, preventing hidden routes on the remote PE.
  • Local preference selects Branch 1's primary provider edge. A value of 200 on routes from WAN-PE01 makes that path active while the WAN-PE02 path remains available.
  • Exact export and import policies keep the WAN boundary small. The provider receives only 10.0.0.0/16 and 10.100.0.0/19, and the enterprise accepts only the Branch 1 LAN prefix.
  • A normal OSPF area is sufficient for Branch 2. There is no redistribution requirement, and specific inter-area reachability to the RP gives PIM a clear RPF path.
  • PIM depends on the unicast routing table. PIM neighbors may be up while multicast state is still incorrect because the route toward the RP or source points to an unexpected interface.
  • The shared tree and source tree describe different stages of ASM forwarding. (*,G) represents receiver interest through the RP, while (S,G) identifies the active source and group.