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.
----- "Boris Epstein" borepstein@gmail.com escreveu:
De: "Boris Epstein" borepstein@gmail.com Para: "CentOS mailing list" centos@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:
- eht0 does not come up at all.
ifup eth0 Device eth0 does not seem to be present, delaying initialization
eth0.3 comes up fine.
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.
On Fri, May 30, 2014 at 3:59 PM, Boris Epstein borepstein@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. The
Actually 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:
- 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?
eth0.3 comes up fine.
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@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/...)
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/softwa...).
--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:
- eht0 does not come up at all.
ifup eth0 Device eth0 does not seem to be present, delaying initialization
eth0.3 comes up fine.
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@centos.org http://lists.centos.org/mailman/listinfo/centos
On Fri, May 30, 2014 at 3:23 PM, Blake Hudson blake@ispn.net wrote:
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/...)
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.
The sub-interface files should also have: VLAN=yes
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
Don't forget: switchport trunk encapsulation dot1q for interoperation with non-cisco stuff.
Also note that you can assign the IP for the untagged vlan (default 1 on the cisco) to the eth0 interface instead of having an eth0.1 subinterface. I'd guess that the problem with the interfaces not coming up has to do with the DEVICE= names being wrong. They should come up OK (but not actually work) even if there is a mismatch at the other end.
Hello everyone,
Thanks for thoughtful and thorough advice. No luck so far, though.
I have two VLAN's now - 0003 and 0004, named "vlan3" and "vlan4" respectively - and still for some reason the CentOS fails to recognize them as one would expect. So I am puzzled as to what is still missing from the picture? Could the NIC itself (the hardware) introduce some undesired weirdness into the picture?
Thanks.
Boris.
On Fri, May 30, 2014 at 4:23 PM, Blake Hudson blake@ispn.net wrote:
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/... )
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/softwa... ).
--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:
- eht0 does not come up at all.
ifup eth0 Device eth0 does not seem to be present, delaying initialization
eth0.3 comes up fine.
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@centos.org http://lists.centos.org/mailman/listinfo/centos
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
On Mon, Jun 2, 2014 at 12:55 PM, Boris Epstein borepstein@gmail.com wrote:
Hello everyone,
Thanks for thoughtful and thorough advice. No luck so far, though.
I have two VLAN's now - 0003 and 0004, named "vlan3" and "vlan4" respectively - and still for some reason the CentOS fails to recognize them as one would expect. So I am puzzled as to what is still missing from the picture? Could the NIC itself (the hardware) introduce some undesired weirdness into the picture?
You haven't given enough info for anyone to help. Can you post your ifcfg-eth0 and ifcfg-eth0.3 files along with the error messages you see if there are any?
Les and everyone,
Thanks!
I have just redone the whole setup and discovered the following: the problem appears to have been on the Cisco side all along. The default (natiive) VLAN on the trunk port was set to VLAN 3. Apparently, it had to be set to VLAN 1. Once I did it the port started to work exactly as expected, whether a VLAN is named or not!
Problem solved!
Thank you all very much again. This was an obscure one for sure.
Cheers,
Boris.
On Mon, Jun 2, 2014 at 2:11 PM, Les Mikesell lesmikesell@gmail.com wrote:
On Mon, Jun 2, 2014 at 12:55 PM, Boris Epstein borepstein@gmail.com wrote:
Hello everyone,
Thanks for thoughtful and thorough advice. No luck so far, though.
I have two VLAN's now - 0003 and 0004, named "vlan3" and "vlan4" respectively - and still for some reason the CentOS fails to recognize
them
as one would expect. So I am puzzled as to what is still missing from the picture? Could the NIC itself (the hardware) introduce some undesired weirdness into the picture?
You haven't given enough info for anyone to help. Can you post your ifcfg-eth0 and ifcfg-eth0.3 files along with the error messages you see if there are any?
-- Les Mikesell lesmikesell@gmail.com _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos