Unable to access VLAN host from VLAN interface in CentOS

Posted by Amrit on Server Fault See other posts from Server Fault or by Amrit
Published on 2013-08-21T04:37:46Z Indexed on 2014/05/30 3:31 UTC
Read the original article Hit count: 608

Filed under:
|
|
|
|

I am playing with VLAN (Virtual LAN) configuration on CentOS 6.4. I have 2 interfaces, eth0 and eth1.

I have configured 2 VLAN interfaces eth0.20 and eth0.30 as

#file: ifcfg-eth0.20
#-------------

VLAN=yes
DEVICE=eth0.20
TYPE=Ethernet
ONBOOT=yes
NM_CONTROLLED=no
BOOTPROTO=static
IPADDR=192.168.20.1
GATEWAY=192.168.20.1
NETMASK=255.255.255.0
USERCTL=no


#file: ifcfg-eth0.30
#-------------
VLAN=yes
DEVICE=eth0.30
TYPE=Ethernet
ONBOOT=yes
NM_CONTROLLED=no
BOOTPROTO=static
IPADDR=192.168.30.1
GATEWAY=192.168.30.1
NETMASK=255.255.255.0
USERCTL=no

Then connected a desktop to interface eth0 port using LAN cable and assigned 192.168.30.2/24 IP.

When I try to ping 192.168.30.1 from 192.168.30.2 machine, It shows destination host unreachable. I am also not able to ping 192.168.130.2 from 192.168.30.1.

However ping -I eth0 192.168.30.2 works fine. Any pointers?

© Server Fault or respective owner

Related posts about linux

Related posts about networking