Linux Network

Basic

 * 1) ifconfig eth0 192.168.0.1 netmask 255.255.255.0 up

Linux Subinterfaces

 * 1) ifconfig eth0:1 192.168.0.2

DEVICE=eth0:1 HWADDR= BOOTPROTO=none TYPE=Ethernet ONBOOT=yes IPADDR=192.168.0.2 NETMASK=255.255.255.0


 * 1) ifup eth0:1


 * Reference:
 * http://linux-101.org/howto/create-sub-interfaces-centos-and-redhat

Linux Subinterfaces with VLANs
DEVICE=eth0 BOOTPROTO=static HWADDR= IPADDR= NETMASK= ONBOOT=yes
 * Linux:

DEVICE=eth0.10 BOOTPROTO=static IPADDR= NETMASK= ONBOOT=yes VLAN=yes

nterface GigabitEthernet1/0 switchport switchport trunk encapsulation dot1q switchport trunk native vlan 20 switchport trunk allowed vlan 10 switchport mode trunk
 * Cisco


 * Reference:
 * Linux Subinterfaces with 802.1Q Tagged VLANs (Cisco and HP)