ON THIS PAGE
Example: Configuring Service Chaining for LAN to WAN Routing through Third-party VNFs on NFX250 NextGen Devices
This example shows how to configure service chaining for LAN to WAN routing through third-party VNFs on NFX250 NextGen devices.
Requirements
This example uses an NFX250 NextGen device running Junos OS Release 19.1R1.
Overview
This example explains how to configure the various layers of the device to enable traffic from the LAN network to enter the device, flow through the OVS bridge and third-party VNFs, exit the device, and enter the WAN network.
Topology
This example uses the topology shown in Figure 1.

Configuration
- Configuring the Layer 2 Datapath (JCP LAN Interfaces)
- Configuring the VNF Interfaces for Creating the Service Chain
- Configuring the Layer 3 Datapath
- Configuring the Layer 2 Datapath (JCP WAN Interfaces)
Configuring the Layer 2 Datapath (JCP LAN Interfaces)
Step-by-Step Procedure
Connect to the JCP.
user@host:~ # cli user@host> user@host> configure [edit] user@host#
Configure VLANs for the LAN-side interfaces.
user@host# set vlans vlan1 vlan-id 77
Configure the LAN-side front panel ports and add them to the LAN-side VLANs. The LAN-side port is typically an access port, and can be a trunk port if required
user@host# set interfaces ge-0/0/0.0 family ethernet-switching vlan members vlan1
Configure the internal-facing interface, sxe-0/0/0, as a trunk port and add it to the LAN-side VLAN. The internal-facing interfaces are typically trunk ports as they must support traffic from multiple front panel ports and VLANs.
user@host# set interfaces sxe-0/0/0.0 family ethernet-switching interface-mode trunk user@host# set interfaces sxe-0/0/0.0 family ethernet-switching vlan members vlan1
Configuring the VNF Interfaces for Creating the Service Chain
Step-by-Step Procedure
Configure the vmhost instance with the vlans for connecting to the OVS bridge for service chaining:
user@host# set vmhost vlans vlan1 vlan-id 77 user@host# set vmhost vlans glue-vlan1 vlan-id 123 user@host# set vmhost vlans vlan2 vlan-id 1177
Instantiate the VNF (vnf-name1) with one virtio interface mapped to the VLAN vlan1 and the other virtio interface mapped to the VLAN glue-vlan1:
user@host# set virtual-network-functions vnf-name1 interfaces eth2 mapping vlan members vlan1 user@host# set virtual-network-functions vnf-name1 interfaces eth3 mapping vlan members glue-vlan1
Instantiate the second VNF (vnf-name2) with one interface mapped to the VLAN glue-vlan1 and and the second interface mapped to VLAN vlan2:
user@host# set virtual-network-functions vnf-name2 interfaces eth2 mapping vlan members glue-vlan1 user@host# set virtual-network-functions vnf-name2 interfaces eth3 mapping vlan members vlan2
Configuring the Layer 3 Datapath
Step-by-Step Procedure
Configure the internal-facing L3 Dataplane interface as a VLAN-tagged interface and assign an IP address to it:
user@host# set interfaces ge-1/0/0 vlan-tagging user@host# set interfaces ge-1/0/0.0 vlan-id 1177 user@host# set interfaces ge-1/0/0.0 family inet address 33.33.33.1/30
Map the Layer 3 interface to the Open vSwitch (OVS) and commit the configuration:
user@host# set vmhost virtualization-options interfaces ge-1/0/1 user@host# commit
Configure the external-facing L3 Dataplane interface as a VLAN-tagged interface and assign an IP address to it:
user@host# set interfaces ge-1/0/1 vlan-tagging user@host# set interfaces ge-1/0/1.0 vlan-id 1178 user@host# set interfaces ge-1/0/1.0 family inet address 203.0.113.2/30
Configuring the Layer 2 Datapath (JCP WAN Interfaces)
Step-by-Step Procedure
Configure a VLAN for the WAN-side JCP interfaces:
user@host# set vlans vlan3 vlan-id 1178
Configure the WAN-side internal-facing interface as a trunk port and add it to the WAN-side VLAN:
user@host# set interfaces sxe-0/0/1.0 family ethernet-switching interface-mode trunk user@host# set interfaces sxe-0/0/1.0 family ethernet-switching vlan members vlan3
Configure the WAN-side front panel port and add it to the WAN-side VLAN:
user@host# set interfaces xe-0/0/12.0 family ethernet-switching interface-mode access user@host# set interfaces xe-0/0/12.0 family ethernet-switching vlan members vlan3
Commit the configuration:
user@host# commit
Verification
Verifying the Status of the Interfaces
Purpose
Verify the status of the Layer 2 and Layer 3 interfaces.
Action
Verify the status of the Layer 2 (ge-0/0/x) and Layer 3 (ge-1/0/x) interfaces.
user@host> show interfaces interface-name statistics
For example:
user@host> show interfaces ge-0/0/0 statistics Physical interface: ge-0/0/0, Enabled, Physical link is Up Interface index: 144, SNMP ifIndex: 518 Link-level type: Ethernet, MTU: 9192, LAN-PHY mode, Speed: 1000mbps, BPDU Error: None, Loop Detect PDU Error: None, Ethernet-Switching Error: None, MAC-REWRITE Error: None, Loopback: Disabled, Source filtering: Disabled, Flow control: Enabled Device flags : Present Running Interface flags: SNMP-Traps Internal: 0x4000 Link flags : None CoS queues : 8 supported, 8 maximum usable queues Current address: 00:00:5e:00:53:43, Hardware address: 00:00:5e:00:53:43 Last flapped : 2018-04-18 05:38:22 UTC (2d 10:07 ago) Statistics last cleared: Never Input rate : 0 bps (0 pps) Output rate : 0 bps (0 pps) Input errors: 0, Output errors: 0 Active alarms : None Active defects : None PCS statistics Seconds Bit errors 0 Errored blocks 0 Ethernet FEC statistics Errors FEC Corrected Errors 0 FEC Uncorrected Errors 0 FEC Corrected Errors Rate 0 FEC Uncorrected Errors Rate 0 PRBS Statistics : Disabled Interface transmit statistics: Disabled Logical interface ge-0/0/0.0 (Index 333) (SNMP ifIndex 524) Flags: Up SNMP-Traps 0x24024000 Encapsulation: Ethernet-Bridge Input packets : 147888 Output packets: 22 Protocol eth-switch, MTU: 9192 Flags: Is-Primary