Table of ContentsLibraryView in Frames

Configuring a VLAN

Using the ifconfig command, you can configure all the parameters for a VLAN interface that you can for a physical interface.

Step

  1. Enter the following command:

    ifconfig ifname-vlanid IP_address netmask mask

ifname-vlanid is the VLAN interface name.

IP_address is the IP address for this interface.

mask is the network mask for this interface.

Example of configuring a VLAN interface

You can configure a VLAN interface e4-10, created in the previous example, using the following command:

ifconfig e4-10 172.25.66.11 netmask 255.255.255.0

To configure the VLAN interface e4-10 with an IPv6 address, use the following command: ifconfig e4-10 2001:0db8:85a3:0:0:8a2e:0370:99 prefixlen 64

Note: You can configure the following parameters:
  • IP address (IPv4 and IPv6)
  • Network mask
  • Prefix length
  • Interface status
  • Media type
  • MTU size
  • Flow control
  • Partner