home

Supported platforms

Vyatta documentation

Learn how to install, configure, and operate the Vyatta Network Operating System (Vyatta NOS) and Orchestrator, which help drive our virtual networking and physical platforms portfolio.

VLAN configuration

This example shows how to configure the R1 router to have a vif for VLAN 40 on the dp0p1p2 Ethernet interface. After configuring this VLAN, the R1 router has the following interfaces:

  • One interface (dp0p1p1) that is configured as only a standard Ethernet interface. The IP address for this interface is 172.16.0.65.
  • One interface (dp0p1p2) that is configured as both a physical Ethernet interface and a VLAN interface. The IP address for the physical Ethernet interface is 10.10.30.65. The VLAN interface connects to VLAN 40 (the identifier of the vif) and has an IP address of 10.10.40.65.
Note: By default, the VLAN tag is the same as the vif. Only if vlan-id is defined does it override the tag value.

When you finish the example, the interfaces are configured as shown in the following figure.

Figure 1. VLAN configuration

To create and configure a VLAN interface, perform the following steps in configuration mode.

Table 1. Simultaneous Ethernet and VLAN operation

Step

Command

Assign an IP address directly to the dp0p1p1 untagged Ethernet interface.

vyatta@R1# set interfaces dataplane dp0p1p1 address 172.16.0.65/24 

Assign an IP address directly to the dp0p1p2 untagged Ethernet interface.

vyatta@R1# set interfaces dataplane dp0p1p2 address 10.10.30.65/24 

Create the configuration node for the vif. Assign the vif VLAN ID 40. Assign the IP address for the vif.

vyatta@R1# set interfaces dataplane dp0p1p2 vif 40 address 10.10.40.65/24

Commit the configuration.

vyatta@R1# commit

Commit and view the configuration.

vyatta@R1# show interfaces dataplane
 dataplane dp0p1p1 {
    address 172.16.0.65/24
 }
 dataplane dp0p1p2 {
    address 10.10.30.65/24
    vif 40 {
     address 10.10.40.65/24
    }
 }