[CentOS] Centos box and Cisco 3750 VLAN's

Fri May 30 20:35:16 UTC 2014
Les Mikesell <lesmikesell at gmail.com>

On Fri, May 30, 2014 at 3:23 PM, Blake Hudson <blake at 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/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.

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.

-- 
   Les Mikesell
      lesmikesell at gmail.com