Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Example: N+1 Support for BNG M:N Subscriber Service Redundancy

Use this configuration example to configure and verify the N+1 support for BNG subscribers service redundancy on your device. The configuration works for multiple primary BNG gateways and a single over-subscribed backup BNG gateway.

Tip:
Table 1: Readability Score and Time Estimates

Readability Score

  • Flesch reading ease: 34

  • Flesch-Kincaid reading grade level: 11.9

Reading Time

Less than 20 minutes.

Configuration Time

Less than an hour.

Example Prerequisites

Hardware requirements

MX204, MX10003 with MPC7 or later, and EX4200 switch.

Software requirements

Junos OS Release 25.2 or later

Before You Begin

Benefits

  • Significantly reduces deployment costs for backup gateways by enabling a single backup gateway to support multiple primary gateways.

  • Increases efficiency of backup processes, enabling the backup gateway to handle a larger number of subscribers during a primary gateway failure.

  • Facilitates a seamless transition during failover events by initially managing traffic with basic statistics, then gradually activating additional services without interrupting subscriber access.

Know more

M:N Subscriber Redundancy on BNG

Learn more

Deploying Junos Subscriber Management On-Demand

Functional Overview

Interfaces

 

Pseudowire (PS) interface

Two PS interfaces with VRF loopback IPs as the local inet address:

  • Primary BNG 1 – ps1.0

  • Primary BNG 2 – ps4.0

  • Backup BNG - ps1.0 and ps4.0

Loopback interface

Global loopback IP addresses for core router. VRF loopback IP addresses for BNG routers:

  • Primary BNG 1 - 66.66.0.0 for VRF 3000

  • Primary BNG 2 – 88.88.0.0 for VRF 4000

  • Backup BNG:

    • 77.77.0.0 for VRF 3000

    • 99.99.0.0 for VRF 4000

Layer 2

 

Layer 2 Circuit

Two Layer 2 circuits connecting the access switch to primary BNG 1 and backup BNG router, and to primary BNG 2 and backup BNG router.

VRFs

  • VRF 3000 for primary BNG 1

  • VRF 4000 for primary BNG 2

  • Global Routing instance for BNG interfaces facing the core router and access switch

VLANS

  • VLAN 80 for the interface towards access switch

  • VLAN 5 for the interface towards core router associated with VRF 3000

  • VLAN 140 for the interface towards core router associated with VRF 4000

DHCP

 

DHCP subscribers

Two DHCP subscribers:

  • Subscriber 1 – 10.80.20.43

  • Subscriber 2 – 10.80.20.44

Active Lease Query (ALQ)

Two ALQs inside the VRFs for peering between:

  • Primary BNG 1 and backup BNG using VRF 3000

  • Primary BNG 2 and backup BNG using VRF 4000

Profiles

 

Dynamic Profile

  • Dynamic profile dhcp for standard DHCP subscriber configuration

  • Dynamic profile DHCP-STACKED-VLAN-PROFILE for stacked‑VLAN DHCP subscriber configuration

Protocols

 
BGP

BGP peering between the core router and BNG routers to exchange subscriber and service routes

Access-internal

For primary BNGs to advertise subscriber routes

Other supporting protocols
  • OSPF

  • LDP and RSVP

  • MPLS

Primary verification tasks

  • Verify subscriber binding and redundancy state on the primary BNG.

  • Initiate a failover on the access switch.

  • Verify switchover of redundancy state after failover.

Topology Overview

This topology implements N+1 support for M:N subscriber redundancy by using two primary Broadband Network Gateways (BNGs) and a shared backup BNG to ensure uninterrupted subscriber services. Subscriber devices connect through an access switch, which forwards traffic to the BNGs over layer 2 circuits (pseudowires) for transparent L2 transport. All BNGs connect to a core router that provides service reachability and connectivity to external networks. OSPF runs across all nodes to maintain infrastructure and loopback reachability, ensuring fast convergence and stable control‑plane paths. Each BNG uses BGP to exchange service routes with the core route; primary BNGs advertise the learned subscriber routes to the core so the network forwards return traffic to the active gateway correctly.

DHCP and AAA integration drive subscriber onboarding and service delivery. BNGs support DHCP local server, DHCP relay, and DHCP relay‑proxy modes, allowing flexibility in how IP addresses are assigned while enabling the BNG to act as the DHCP agent toward an external DHCP server. RADIUS server provides subscriber authentication, authorization, and service policy selection, with subscriber‑specific settings applied via dynamic profiles. Active Leasequery (ALQ) proactively synchronizes subscriber state from primary BNGs to backup BNG, enabling immediate traffic redirection to backup BNG through existing Layer‑2 circuits upon primary BNG failure. Virtual Routing and Forwarding (VRF) configuration enables service isolation for subscribers. Replicating primary BNG configurations on the backup BNG—including Layer‑2 circuits, subscriber‑facing interfaces, and associated VRFs—ensures accurate subscriber identification and seamless service association during failover. The backup BNG initially forwards traffic in service activation on failover mode, which minimizes forwarding plane resource usage, and then progressively restores full services such as CoS and firewall policies.

Hostname

Role

Function

Primary BNG 1 and Primary BNG 2 Routers

Primary gateways

Active BNGs that manage subscriber sessions

Backup Router

Backup gateway

Serves as a failover or standby gateway to take over subscriber session management if the primary BNG fails, ensuring continuous service availability

Access Switch

Edge device

Connects subscribers to the network topology

Core Router

Core network manager

Provides centralized routing and transport connectivity between BNGs and external networks

RADIUS Server

External AAA (authentication, authorization, accounting) server

Controls subscriber access by providing centralized authentication, authorization, and accounting (AAA) services

DHCP Server

Address authority

Serves as the source of IP addressing used by subscribers during normal operation and failover

DHCP Clients

Subscribers

End‑devices behind the access switch that request IP configuration via DHCP and consume network and Internet services

Internet

External network

Provides access to public network through the core router

Topology Illustration

Figure 1: N+1 Support for BNG M:N Subscriber Service Redundancy

N+1 Support for BNG M:N Subscriber Service Redundancy

Step-by-step Configuration on Primary BNG 1

Follow the steps below to configure Primary BNG 1 router.

  1. Configure system settings and enable subscriber management services.
  2. Configure chassis support for aggregated interfaces, pseudowire logical (ps) interfaces and subscriber management.
  3. Configure the loopback interfaces as well as interfaces to the core router, access switch and the backup BNG gateway
  4. Configure routing options including router-id, autonomous system (AS), and static routes to the internal network hosting the DHCP and Radius servers, internet traffic and loopback address of the access switch.
  5. Configure OSPF for the core network.
  6. Configure a dynamic profile for the router to automatically assign subscriber management settings when configured as a DHCP relay agent. The dynamic profile uses access-internal route to add a high preference direct route to the subscriber’s IP address and configures a dynamic demux subscriber interface.
  7. Configure the router as a DHCP relay agent. Attach the dynamic profile to apply subscriber management settings.
  8. Configure the dynamic profile to create stacked VLANs for the subscriber.
  9. Configure the pseudowire subscriber interface. Attach the dynamic profile to configure stacked VLANs.
  10. Configure Layer 2 circuit pseudowire tunnel between the access node and BNG gateway.
  11. Configure iBGP peering between the access node and the BNG gateway to advertise access-internal routes.
  12. Configure customer VRF for service isolation for subscribers, including iBGP peering between the primary gateway, core router and backup BNG gateway, OSPF for the core network and DHCP relay agent configuration. The interface towards the core router and backup BNG gateway are part of the VRF.
  13. Configure a domain map to map access options and session parameters for subscriber sessions, including setting the routing instance of the subscriber context to the customer VRF.
  14. Configure the primary BNG gateway for N+1 redundancy with the backup BNG gateway using VRRP. The service-activation-on-failover flag is enabled to allow the backup BNG to forward traffic instantly on traffic switchover with basic statistics.

Step-by-step Configuration on Primary BNG 2

Follow the steps below to configure Primary BNG 2 router.

  1. Configure system settings and enable subscriber management services.
  2. Configure chassis support for aggregated interfaces, pseudowire logical (ps) interfaces and subscriber management.
  3. Configure the loopback interfaces as well as interfaces to the core router, access switch and the backup BNG gateway.
  4. Configure routing options including router-id, autonomous system (AS), and static routes to the internal network hosting the DHCP and Radius servers, internet traffic and loopback address of the access switch.
  5. Configure OSPF for the core network.
  6. Configure a dynamic profile for the router to automatically assign subscriber management settings when configured as a DHCP relay agent. The dynamic profile uses access-internal route to add a high preference direct route to the subscriber’s IP address and configures a dynamic demux subscriber interface.
  7. Configure the router as a DHCP relay agent. Attach the dynamic profile to apply subscriber management settings.
  8. Configure the dynamic profile to create stacked VLANs for the subscriber.
  9. Configure the pseudowire subscriber interface. Attach the dynamic profile to configure stacked VLANs.
  10. Configure Layer 2 circuit pseudowire tunnel between the access node and BNG gateway.
  11. Configure iBGP peering between the access node and the BNG gateway to advertise access-internal routes.
  12. Configure customer VRF for service isolation for subscribers. Configuration includes iBGP peering between the primary gateway, core router and backup BNG gateway, OSPF for the core network and DHCP relay agent configuration. The interface towards the core router and backup BNG gateway are a part of the VRF.
  13. Configure a domain map to map access options and session parameters for subscriber sessions, including setting the routing instance of the subscriber context to the customer VRF.
  14. Configure the primary BNG gateway for N+1 redundancy with the backup BNG gateway using VRRP. The service-activation-on-failover flag is enabled to allow the backup BNG to forward traffic instantly on traffic switchover with basic statistics.

Step-by-step Configuration on Backup BNG Router

Follow the steps below to configure the backup BNG to take over subscribers from primary BNGs during failover.

  1. Configure system settings and enable subscriber management services.
  2. Configure chassis support for aggregated interfaces, pseudowire logical (ps) interfaces and subscriber management.
  3. Configure the loopback interfaces as well as interfaces to the core router, access switch and the primary BNG gateways. Statically define VLANs on the interfaces toward the core router and access switch to ensure immediate Layer‑2 availability during failover, while primary BNGs create VLAN interfaces dynamically only for active subscribers.
  4. Configure routing options including router-id, autonomous system (AS), and static routes to the internal network hosting the DHCP and Radius servers, internet traffic and loopback address of the access switch.
  5. Configure OSPF for the core network.
  6. Configure a dynamic profile for the router to automatically assign subscriber management settings when configured as a DHCP relay agent. The dynamic profile uses access-internal route to add a high preference direct route to the subscriber’s IP address and configures a dynamic demux subscriber interface.
  7. Configure the router as a DHCP relay agent, associating the dynamic profile to apply subscriber management settings, and applying a static group for DHCP continuity during failover.
  8. Configure the dynamic profile to create stacked VLANs for the subscriber.
  9. Configure the pseudowire subscriber interface for primary BNG 1 subscribers. Attach the dynamic profile to configure stacked VLANs.
  10. Configure the pseudowire subscriber interface for primary BNG 2 subscribers. Attach the dynamic profile to configure stacked VLANs.
  11. Configure Layer 2 circuit pseudowire tunnels between the access node and BNG gateway. Create two tunnels, one each for Primary BNG 1 and Primary BNG 2 subscriber traffic.
  12. Configure iBGP peering between the access node and the BNG gateway to advertise access-internal routes.
  13. Configure the customer VRF shared with primary BNG 1 to provide service isolation for subscriber traffic. This configuration includes iBGP peering between the primary gateway, core router and backup BNG gateway, OSPF for the core network and DHCP relay agent configuration. The interfaces toward the core router and primary BNG 1 gateway are part of the VRF.
  14. Configure the customer VRF shared with primary BNG 2 to provide service isolation for subscriber traffic. This configuration includes iBGP peering between the primary gateway, core router and backup BNG gateway, OSPF for the core network and DHCP relay agent configuration. The interfaces toward the core router and primary BNG 2 gateway are part of the VRF.
  15. Configure a domain map to map access options and session parameters for subscriber sessions, including setting the routing instance of the subscriber context to the customer VRFs.
  16. Define a local IPv4 address‑assignment pool to enable subscriber IP allocation when the router transitions to an active role during failover.
  17. Configure the backup gateway for N+1 redundancy with the primary BNG gateways using VRRP. Enable service‑activation‑on‑failover option on both redundancy group interfaces so the backup BNG can forward traffic immediately during switchover with basic statistics.

Verification

Use the show commands in this section to verify status of subscribers before and after failover of a primary BNG.

Command Verification Task

show l2circuit connections brief

Verify Layer 2 circuit connections

show dhcp relay active-leasequery routing-instance 3000

Verify ALQ status

show bgp summary

Verify BGP connection

show dhcp server binding

Verify DHCP binding

show subscribers

Verify subscribers

show route protocol bgp

Verify routes for subscribers before failover

show system subscriber-management redundancy-state interface ps1.0

Verify redundancy state for subscribers before failover

request l2circuit-switchover neighbor 192.168.1.2

Initiate failover from primary BNG 1 to backup BNG

show system subscriber-management redundancy-state interface ps1.0

Verify redundancy state for subscribers after failover

show route protocol bgp

Verify routes for subscribers after failover

show l2circuit connections brief, request l2circuit-switchover neighbor 192.168.1.3 virtual-circuit-id 10, and show route protocol access-internal

Verify restoring of backup BNG to primary BNG

Verify layer 2 circuit connections

Purpose

Verify layer 2 circuit connections between the access switch and BNG servers.

Action

Verify on the access switch:

Meaning

Access switch and primary BNG 1 have an L2circuit with virtual circuit ID 10. Access switch and primary BNG 2 have an L2circuit with virtual circuit ID 40. Access switch and backup BNG have an L2circuit with virtual circuit IDs 10 and 40. All connections are up.

Verify ALQ status

Purpose

Verify active-leasequery status between the primary and backup BNG servers. The output below shows the peering between primary BNG 1 and backup BNG within the routing instance 3000.

Action

Verify on the primary BNG 1 router:

Verify on the backup BNG router:

Meaning

ALQ is running in the routing instance and the primary and backup BNG servers are successfully peered.

Verify BGP connection

Purpose

Verify BGP peering between the core router and the BNG servers.

Action

Verify BGP peering on the core router:

Meaning

BGP peering is successful.

Verify DHCP binding

Purpose

Verify DHCP binding from the DHCP server.

Action

Verify on the DHCP server:

Meaning

Two subscribers are in the bound state.

Verify subscribers

Purpose

Verify subscribers and their mapped routing instances in the backup BNG.

Action

Verify on the backup BNG router:

Meaning

Two subscribers are logged in to the backup BNG—subscriber1 (IP address 10.80.20.43) is in routing instance 4000, and subscriber2 (IP address 10.80.20.44) is in routing instance 3000.

Verify routes for subscribers before failover

Purpose

Verify how the core router routes subscriber traffic before a layer 2 circuit switchover occurs between the primary and backup BNG server.

Action

Verify on the core router:

Meaning

Routes for the subscribers are advertised only by the primary BNG servers. During a failover, the system replaces the advertising primary BNG with the backup BNG, which takes over as the primary.

Verify redundancy state for the subscribers before failover

Purpose

Verify the transition of N+1 redundancy services when the layer 2 circuit switchover from primary BNG 1 to backup BNG. Repeat this step after initiating a layer 2 circuit switchover to verify failover between the primary and backup BNG servers.

Action

Verify on the primary BNG 1 router:

Meaning

The output displays Service Activation Programming and Forwarding State statuses before failover. These output field statuses will change after a successful Layer 2 circuit switchover.

Initiate failover from primary to backup BNG

Purpose

Initiate failover from primary BNG 1 to backup BNG by using the request l2circuit-switchover command in the access switch.

Action

Initiate on the access switch:

Meaning

Switchover is initiated from the access switch to verify failover in the next steps.

Verify redundancy state for the subscribers after failover

Purpose

Verify the transition of N+1 redundancy services after the layer 2 circuit switchover from primary BNG 1 to backup BNG.

Action

Verify on the primary BNG 1 router before failover:

Verify on the primary BNG 1 router after failover:

Meaning

The Forwarding State of primary BNG 1 transitioned from Active (primary) to Inactive (backup) and the Service Activation Programming state shows the failover is completed successfully.

Verify routes for subscribers after failover

Purpose

Verify how the subscriber traffic is routed on the core router after encountering a L2circuit switchover between the primary BNG 1 and the backup BNG.

Action

Verify on the core router:

Meaning

Routes for subscriber2 (IP address 10.80.20.44) are now advertised by the backup BNG.

Verify restoring of backup BNG to primary BNG

Purpose

Verify switchover reverts primary BNG 1 to its original primary state.

Action

Verify on the access switch:

Verify access-internal routes on the primary BNG 1 router after failover to backup BNG:

Verify access-internal routes on the primary BNG 1 router after reverting to primary state:

Meaning

The failover is successful. The primary BNG 1 returns to the primary state after failover. The Primary BNG 1 server advertises the access-internal protocol route once it transitions from backup to primary server.

Appendix 1: Set Commands on All Devices

Primary BNG 1

Primary BNG 2

Backup BNG

Access Switch

Core Router

DHCP Server

Appendix 2: Show Configuration Output on DUT

Primary BNG 1

Backup BNG