VLAN Trunking with DD-WRT and a Catalyst 2950-24
I’ve been a bit lazy lately with setting up my home lab, mostly because I wanted to do everything in order. I had already gotten vSphere on all 4 of my servers, but I needed to setup my switch to communicate with the outside word. I was having a bit of difficultly since I wanted to have VLANs for this setup and I only have a L2 switch. And an FYI, I am by no means a networking person, take my experience with a grain of salt.
The most fundamental thing that resolved my issue was the free firmware provided by DD-WRT for the WRT54GL’s and various other models, this was the only firmware I found that had VLAN and VLAN tagging.
Cisco switch configuration:
All of the ports on VLAN 1 are currently unused.
Cisco#show vlan VLAN Name Status Ports ---- -------------------------------- --------- ------------------------------- 1 default active Fa0/13, Fa0/14, Fa0/15, Fa0/16 Fa0/17, Fa0/18, Fa0/19, Fa0/20 Fa0/21, Fa0/22 2 Network active Fa0/2, Fa0/3, Fa0/5, Fa0/6 Fa0/8, Fa0/9, Fa0/11, Fa0/12 Fa0/23 3 Storage active 4 Management active Fa0/1, Fa0/4, Fa0/7, Fa0/10
Here is how I ended up setting my VLANs up.
Cisco#show ip int brief Interface IP-Address OK? Method Status Protocol Vlan1 10.0.0.254 YES manual up up Vlan2 10.1.1.1 YES manual administratively down down Vlan3 10.2.2.1 YES manual administratively down down Vlan4 10.10.10.1 YES manual administratively down down
FA0/24 is connected to my router and I configured it as a trunk using these commands:
Cisco#conf t Enter configuration commands, one per line. End with CNTL/Z. Cisco(config)#int fa0/24 Cisco(config-if)#switchport mode trunk Cisco(config-if)#switchport trunk native vlan 1 Cisco(config-if)#switchport trunk allowed vlan 1-4 Cisco(config-if)#^Z Cisco# 00:23:46: %SYS-5-CONFIG_I: Configured from console by console
Now lets take a look at the finished product.
Cisco#show int trunk Port Mode Encapsulation Status Native vlan Fa0/24 on 802.1q trunking 1 Port Vlans allowed on trunk Fa0/24 1-4 Port Vlans allowed and active in management domain Fa0/24 1-4 Port Vlans in spanning tree forwarding state and not pruned Fa0/24 1-4
Everything looks fine now, we must now configure my router to mirror the setup.
First we will configure Port 4, which is connected to FA0/24 to use VLAN tagging.. From the Setup tab, go to VLANs and click on Tagged at the bottom, then select the VLANs you need.
Now click on the Networking tab and fill the VLANs out the same way you had them configured on the switch.
After this, the setup should work. I tested with my laptop connected to FA0/23 on VLAN2 with a static address of 10.1.1.20 255.255.255.0 and the Gateway of 10.1.1.1 and I could reach outside of the switch perfectly.