Centos 5 + vlan -> centos6 + vlan = what has changed?
Good afternoon,
I transfer the system to new hardware and at the same time the OS. There was Centos 5. x, one physical network + 2 vlans (eth1, vlan16, vlan31). Everything works like clockwork for many years.
Now CentOS 6.5, one physical network + 2 of the same vlans. Plugged into the same port on the switch (this means that all vlans are configured there). All the same, hostnames, ip - all..
Eth0
[root@pg ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0 | grep -vP '^#'DEVICE=eth0BOOTPROTO=noneONBOOT=yesHWADDR=08:60:6e:d6:9e:00
Eth0.16
[root@pg ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0.16 | grep -vP '^#'VLAN=yesDEVICE=eth0.16ONBOOT=yesBOOTPROTO=staticTYPE=EthernetIPADDR=192.168.16.33NETMASK=255.255.255.0BROADCAST=192.168.16.255GATEWAY=192.168.16.1
Eth0.31
[root@pg ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0.31| grep -vP '^#'VLAN=yesDEVICE=eth0.31ONBOOT=yesBOOTPROTO=staticTYPE=EthernetIPADDR=192.168.31.33NETMASK=255.255.255.0BROADCAST=192.168.31.255GATEWAY=192.168.31.1
Module loaded
[root@pg ~]# lsmod | grep 8021q8021q 25349 0garp 7152 1 8021q[root@pg ~] /etc/init.d/network restartДеактивируется интерфейс eth0.16: [ OK ]Деактивируется интерфейс eth0.31: [ OK ]Деактивируется интерфейс eth0: [ OK ]Деактивируется интерфейс-петля: [ OK ]Активируется интерфейс loopback: [ OK ]Активируется интерфейс eth0: [ OK ]Активируется интерфейс eth0.16: Determining if ip address 192.168.16.33 is already in use for device eth0.16... [ OK ]Активируется интерфейс eth0.31: Determining if ip address 192.168.31.33 is already in use for device eth0.31... [ OK ][root@pg ~]# routeKernel IP routing tableDestination Gateway Genmask Flags Metric Ref Use Iface192.168.16.0 * 255.255.255.0 U 0 0 0 eth0.16192.168.31.0 * 255.255.255.0 U 0 0 0 eth0.31link-local * 255.255.0.0 U 1002 0 0 eth0link-local * 255.255.0.0 U 1005 0 0 eth0.16link-local * 255.255.0.0 U 1006 0 0 eth0.31default 192.168.31.1 0.0.0.0 UG 0 0 0 eth0.31
The interfaces are raised, but only eth0. 31 works (it pings both inside and outside, eth0. 16 does not pass anything). What's wrong?
I've always done it only on CentOS 5, everything works there..
P. s. I created files for vlans in the form of ifcfg-ethX.id, and as ifcfg-vlanid
2 answers
You don't have any physical interfaces defined in your virtual interfaces settings.
PHYSDEV=eth0
Here is my config:
VLAN=yesDEVICE=eth0.8PHYSDEV=eth0BOOTPROTO="static"IPADDR=192.168.18.10NETMASK=255.255.255.0ONBOOT=yes
Check the route to the airlock.According to your route table, all traffic goes to the gateway 192.168.31.1 You need to register the routes correctly.