/ Debian/Ubuntu/Mint Linux How To Set VLAN in /etc/network/interfaces - rtt - IT Resource

Debian/Ubuntu/Mint Linux How To Set VLAN in /etc/network/interfaces

You can find many ways to specify the VLAN in your network configuration but I find this is the simplest and quickest.

In this case we are talking about a bridged adapter "vmbr0" but it works even if you just had a normal non-bridged interface.

The key here is that in vmbr0 you'll notice there is no IP address.  We just specify "manual".

Below it is a similar stanza for "vmbr0.58" in this case 58 represents the VLAN (change the 58 to the number of your desired VLAN).  Then below it we set the IP address or we could have used DHCP as well.


auto lo
iface lo inet loopback
iface enp2s0 inet manual

auto vmbr0
iface vmbr0 inet manual
    bridge_ports enp2s0
    bridge_stp off
    bridge_fd 0

auto vmbr0.58
iface vmbr0.58 inet static
    address 172.16.58.14
    netmask 255.255.255.0
    gateway 172.16.58.254


Tags:

debian, ubuntu, mint, linux, vlan, etc, interfacesyou, specify, configuration, simplest, quickest, bridged, adapter, quot, vmbr, interface, ll, ip, manual, stanza, represents, desired, dhcp, auto, iface, inet, loopback, enp, bridge_ports, bridge_stp, bridge_fd, static, netmask, gateway,

Latest Articles

  • How Does Cisco CUCM (Cisco Unified Communication Manager) Work?
  • What DNS Options Does Active Directory Offer in Windows Server 2008,2012,2016 ?
  • syntax error, unexpected T_SL in PHP Solution
  • grep regular expression match number range between specific numbers
  • bash how to print out lines of text within a range from the first occurrence
  • bash script how to to check LAN computers for open ports
  • MySQL Using mytop Debug Source of High IO and Slow Performance
  • How To Mathematically Convert and Calculate Binary Value To Decimal Value
  • systemd management using systemctl and journalctl to check systemd logs
  • css how to format code in the code tag
  • css br with extra blank line
  • What is /dev/pts and why do we need it in Linux?
  • Linux What is umask (user mask) for file and directory creation permissions and how to calculate umask and change the defaults
  • Linux Permissions and Groups Real Usecase for Group Access
  • Centos 7 python34 how to install the gi library
  • Centos 7 - Convert Minimal to Graphical GUI GNOME or KDE Desktop
  • AMD Set Fan Speed and Other Powerplay Memory/CPU Timings with a Linux script
  • Ethereum Mining Claymore Nanopool Error
  • genisoimage errors with long filenames and deep directory structures
  • Linux Kernel USB Export Errors