Ubuntu: VLAN: Difference between revisions

From OnnoCenterWiki
Jump to navigationJump to search
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..."
 
No edit summary
Line 3: Line 3:
  /etc/network/interfaces
  /etc/network/interfaces


Konfigurasi
==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.
 


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
  iface eth0.1 inet static

Revision as of 00:32, 13 October 2022

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