Ubuntu: VLAN

From OnnoWiki
Revision as of 08:46, 10 July 2020 by Onnowpurbo (talk | contribs) (Created page with "Edit /etc/network/interfaces Konfigurasi Vlan interface definitions exist of the vlan interface name, and an optional ´raw-device´ parameter. Vlan interfaces are numbe...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Edit

/etc/network/interfaces

Konfigurasi

Vlan interface definitions exist of the vlan interface name, and an optional ´raw-device´ parameter. Vlan interfaces are numbered 1 to 4095. You have the option to have interface names zero-padded to 4 numbers, or just the plain digits without leading zero. The following example shows four ways to create a vlan with id 1 on interface eth0. They all result in different names.

iface eth0.1 inet static
      address 192.168.1.1
      netmask 255.255.255.0
iface vlan1 inet static
      vlan-raw-device eth0
      address 192.168.1.1
      netmask 255.255.255.0
iface eth0.0001 inet static
      address 192.168.1.1
      netmask 255.255.255.0
iface vlan0001 inet static
      vlan-raw-device eth0
      address 192.168.1.1
      netmask 255.255.255.0
# We don't have br support out of the box
iface br0.2 inet static
      vlan-raw-device br0
      address 192.168.1.1
      netmask 255.255.255.0
# Aliases are ignored
iface br0.2:1 inet static
      address 192.168.1.1
      netmask 255.255.255.255