Hello all, I have a CentOS box that has a NIC (eth0) on which I defined 4 VLAN's (counting the NIC itself): eth0, eth0.1, eth0.2 and eht0.3. Initially the Cisco switch was not partitioned into VLAN's which means that the only VLAN running on it was the default one (VLAN 1). I have then played with VLAN's a bit on the switch and at this point have two: VLAN 1 (which is default and can not be deleted) and VLAN 3. The CentOS box is plugged into a trunk port on VLAN 3 which by virtue of being a trunk should belong to all VLANs. However, this does not seem to work as expected. What I get is the following: 1) eht0 does not come up at all. ifup eth0 Device eth0 does not seem to be present, delaying initialization 2) eth0.3 comes up fine. 3) Other VLAN's do not come up. No error messages, just never show up. Any insight into this would be most welcome. Primarily, I fail to understand why all those VLAN's came up on VLAN 1 and why now even VLAN 1 does not come up - even though the trunk port the device is plugged into is supposed to be a member of all VLAN's. Thanks in advance. Boris.
Antonio da Silva Martins Junior
2014-May-30 20:11 UTC
[CentOS] Centos box and Cisco 3750 VLAN's
----- "Boris Epstein" <borepstein at gmail.com> escreveu:> De: "Boris Epstein" <borepstein at gmail.com> > Para: "CentOS mailing list" <centos at centos.org> > Enviadas: Sexta-feira, 30 de Maio de 2014 16:59:41 (GMT-0300) Auto-Detected > Assunto: [CentOS] Centos box and Cisco 3750 VLAN's > > Hello all, > > I have a CentOS box that has a NIC (eth0) on which I defined 4 VLAN's > (counting the NIC itself): eth0, eth0.1, eth0.2 and eht0.3. Initially > the Cisco switch was not partitioned into VLAN's which means that the only > VLAN running on it was the default one (VLAN 1). > > I have then played with VLAN's a bit on the switch and at this point > have two: VLAN 1 (which is default and can not be deleted) and VLAN 3. The > CentOS box is plugged into a trunk port on VLAN 3 which by virtue of > being a trunk should belong to all VLANs. However, this does not seem to > work as expected. > > What I get is the following: > > 1) eht0 does not come up at all. > > ifup eth0 > Device eth0 does not seem to be present, delaying initialization > > 2) eth0.3 comes up fine. > > 3) Other VLAN's do not come up. No error messages, just never show > up. > > Any insight into this would be most welcome. Primarily, I fail to > understand why all those VLAN's came up on VLAN 1 and why now even > VLAN 1 does not come up - even though the trunk port the device is plugged > into is supposed to be a member of all VLAN's.Hi Boris, Well, can you send to us the result of the "show run interface" on the switch interface? Maybe seeing the switch configuration we can help :D On the VLAN1 matter, you cannot "disabled" it. But, you can shut it down, and can restrict the access to it on that port. If it was needed. :D Thanks, Antonio. -- Antonio da Silva Martins Jr. Analista de Suporte NPD - N?cleo de Processamento de Dados UEM - Universidade Estadual de Maring? email: asmartins at uem.br fone: +55 (44) 3011-4015 / 3011-4411 inoc-dba: 263076*100 "Real Programmers don?t need comments ? the code is obvious." -- Esta mensagem foi verificada pelo sistema de antivirus e acredita-se estar livre de perigo.
On Fri, May 30, 2014 at 3:59 PM, Boris Epstein <borepstein at gmail.com> wrote:> Hello all, > > I have a CentOS box that has a NIC (eth0) on which I defined 4 VLAN's > (counting the NIC itself): eth0, eth0.1, eth0.2 and eht0.3. Initially the > Cisco switch was not partitioned into VLAN's which means that the only VLAN > running on it was the default one (VLAN 1). >I take eth0 is then an untagged vlan?> I have then played with VLAN's a bit on the switch and at this point have > two: VLAN 1 (which is default and can not be deleted) and VLAN 3. TheActually you can make the default vlan be someone else. And, risking going on a tangent, it is a good idea not leaving vlan1 as the default one in a cisco device. Also, just to be sure, this vlan is tagged in this trunk port in the cisco side, right?> CentOS box is plugged into a trunk port on VLAN 3 which by virtue of being > a trunk should belong to all VLANs. However, this does not seem to work as > expected. > > What I get is the following: > > 1) eht0 does not come up at all. > > ifup eth0 > Device eth0 does not seem to be present, delaying initialization >How are you bringing them up: network manager or not? Do dmesg and the logs show anything interesting?> 2) eth0.3 comes up fine. > > 3) Other VLAN's do not come up. No error messages, just never show up. >Do the interfaces show up?> Any insight into this would be most welcome. Primarily, I fail to > understand why all those VLAN's came up on VLAN 1 and why now even VLAN 1 > does not come up - even though the trunk port the device is plugged into is > supposed to be a member of all VLAN's.This is how the vlans I defined one of my centos boxes to know (more like act like they care) of: cat /proc/net/vlan/config VLAN Dev name | VLAN ID Name-Type: VLAN_NAME_TYPE_RAW_PLUS_VID_NO_PAD eth0.10 | 10 | eth0 eth0.2 | 2 | eth0 eth0.3 | 3 | eth0 eth0.4 | 4 | eth0 eth0.8 | 8 | eth0 Not trying to second guess you, but here is what a trunk I defined in a cisco switch looks like: ! interface FastEthernet0/2 description 802.1Q Trunk to vmhost switchport trunk encapsulation dot1q switchport trunk native vlan 2 switchport trunk allowed vlan 1-15,1002-1005 switchport mode trunk !> > Thanks in advance. > > Boris. > _______________________________________________ > CentOS mailing list > CentOS at centos.org > http://lists.centos.org/mailman/listinfo/centos
Boris, I'd suggest reviewing the guide from Redhat on configuring your server (https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Deployment_Guide/s2-networkscripts-interfaces_802.1q-vlan-tagging.html) In essence, eth0 is a shell. eth0.x is where all the traffic happens. VLANs will need to be explicitly defined on both the server and the switch in order for traffic to pass. Again, follow the RedHat guide for the server configuration. Be sure to set the interface filename and the device name inside the file to match the VLAN ID you're using. For example, VLAN 1 will be /etc/sysconfig/network-scripts/ifcfg-eth0.1 and the first line of the file should be DEVICE=eth0.1. VLAN 2 should use ifcfg-eth0.2 and DEVICE=eth0.2. It's easy to forget to update the DEVICE field inside the file and conflict with another device on the system so double check all work. On the Cisco switch, define the VLANs:> Switch# configure terminal > Switch(config)# vlan 2 > Switch(config-vlan)# name vlan2 > Switch(config-vlan)# end... repeat for each VLAN And configure the ports:> Switch# configure terminal > Enter configuration commands, one per line. End with CNTL/Z. > Switch(config)# interface gigabitethernet0/1 > Switch(config-if)# switchport mode trunk > Switch(config-if)# switchport trunk allowed vlan 1-4 > Switch(config-if)# end... repeat for other trunk ports. I'd also recommend turning off VTP and setting all non-trunk ports to access mode (http://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst3750x_3560x/software/release/12-2_55_se/configuration/guide/3750xscg/swvlan.html#wp1150876). --Blake Boris Epstein wrote the following on 5/30/2014 2:59 PM:> Hello all, > > I have a CentOS box that has a NIC (eth0) on which I defined 4 VLAN's > (counting the NIC itself): eth0, eth0.1, eth0.2 and eht0.3. Initially the > Cisco switch was not partitioned into VLAN's which means that the only VLAN > running on it was the default one (VLAN 1). > > I have then played with VLAN's a bit on the switch and at this point have > two: VLAN 1 (which is default and can not be deleted) and VLAN 3. The > CentOS box is plugged into a trunk port on VLAN 3 which by virtue of being > a trunk should belong to all VLANs. However, this does not seem to work as > expected. > > What I get is the following: > > 1) eht0 does not come up at all. > > ifup eth0 > Device eth0 does not seem to be present, delaying initialization > > 2) eth0.3 comes up fine. > > 3) Other VLAN's do not come up. No error messages, just never show up. > > Any insight into this would be most welcome. Primarily, I fail to > understand why all those VLAN's came up on VLAN 1 and why now even VLAN 1 > does not come up - even though the trunk port the device is plugged into is > supposed to be a member of all VLAN's. > > Thanks in advance. > > Boris. > _______________________________________________ > CentOS mailing list > CentOS at centos.org > http://lists.centos.org/mailman/listinfo/centos