Tuesday, 20 August 2013

Unable to access VLAN host from VLAN interface in CentOS

Unable to access VLAN host from VLAN interface in CentOS

I am playing with Vlan 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.20
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.
Please let me know any pointers in this regard.

No comments:

Post a Comment