Ubuntu: VLAN

From OnnoWiki
Revision as of 07:32, 13 October 2022 by Onnowpurbo (talk | contribs)
Jump to navigation Jump to search

Edit

/etc/network/interfaces

Konfigurasi

Definisi interface VLAN ada dari nama interface VLAN, dan opsi parameter 'raw-device'.

Interface VLAN diberi nomor 1 hingga 4095. Kita memiliki opsi untuk memiliki nama interface yang diisi nol hingga 4 angka, atau hanya angka biasa tanpa awalan nol. Contoh berikut menunjukkan empat cara untuk membuat VLAN dengan id 1 pada interface eth0. Semuanya menghasilkan nama yang berbeda.


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