Pertama, install packet vconfig, dan kernel harus support vlan (8021q) module.
Copy konfigurasi eth yg sudah ada
# cp /etc/sysconfig/network-scripts/ifcfg-eth0 /etc/sysconfig/network-scripts/ifcfg-eth0.9
edit ifcfg-eth0 menjadi seperti ini
DEVICE=eth0 ONBOOT=yes BOOTPROTO=none
edit ifcfg-eth0.9 menjadi seperti ini (sesuaikan dengan ip/network/netmask milik anda)
DEVICE=eth0.9 BOOTPROTO=static BROADCAST=192.168.200.255 HWADDR=00:0C:29:21:E0:2E IPADDR=192.168.200.101 NETMASK=255.255.255.0 NETWORK=192.168.200.0 TYPE=Ethernet ONBOOT=yes VLAN=yes
Restart network
# /etc/init.d/network restart
that’s it 🙂
Bro,
How do I make 2 vlan's say.
Eth1 Vlan 100 and Eth 1 Vlan 200.
How do I do it?
# modprobe 8021q
# vconfig add eth1 100
# vconfig add eth1 200
or if you wnat to make it start automaticaly just try like this:
# cp /etc/sysconfig/network-scripts/ifcfg-eth1 /etc/sysconfig/network-scripts/ifcfg-eth0.100
# cp /etc/sysconfig/network-scripts/ifcfg-eth1 /etc/sysconfig/network-scripts/ifcfg-eth0.200
customize each copy of ifcfg-eth1 script
ifcfg-eth1.100
DEVICE=eth0.100
BOOTPROTO=static
BROADCAST=192.168.200.255
HWADDR=00:0C:29:21:E0:2E
IPADDR=192.168.200.101
NETMASK=255.255.255.0
NETWORK=192.168.200.0
TYPE=Ethernet
ONBOOT=yes
VLAN=yes
ifcfg-eth1.200
DEVICE=eth0.200
BOOTPROTO=static
BROADCAST=192.168.200.255
HWADDR=00:0C:29:21:E0:2E
IPADDR=192.168.201.101
NETMASK=255.255.255.0
NETWORK=192.168.200.0
TYPE=Ethernet
ONBOOT=yes
VLAN=yes
i'm not tested it, but i think it should work