vlan config for rhel & ubuntu

1.  vlan config for RHEL 6ubuntu

# cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
HWADDR=00:17:A4:77:04:1C
TYPE=Ethernet
UUID=a03fe7a7-bade-4cbc-b38f-c46434104a2d
ONBOOT=yes
NM_CONTROLLED=no
BOOTPROTO=none

# cat /etc/sysconfig/network-scripts/ifcfg-eth0.50 
DEVICE=eth0.50
BOOTPROTO=none
ONBOOT=yes
IPADDR=10.245.254.127
PREFIX=24
GATEWAY=10.245.254.1
VLAN=yes

2. vlan config for ubuntu 16.04oop

# cat /etc/network/interfaces
auto lo
iface lo inet loopback

# Physical interface 1
auto enp2s0f0
iface enp2s0f0 inet manual
  bond-master bond0

# Physical interface 2
auto enp2s0f1
iface enp2s0f1 inet manual
  bond-master bond0

# Bond interface 0 (physical interfaces 1 and 2)
auto bond0
iface bond0 inet manual
  bond-mode 1
  bond-miimon 100
  bond-slaves enp2s0f0 enp2s0f1
  bond-downdelay 200
  bond-updelay 200
    
auto bond0.50
iface bond0.50 inet static
  vlan-raw-device bond0
  address 10.245.254.128
  gateway 10.245.254.1
  netmask 255.255.255.0
  dns-nameservers 10.245.254.168
相關文章
相關標籤/搜索