Jason Ruiz

Virtualization, Technology, and Stuff!

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
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                  YES manual up                    up
Vlan2                    YES manual administratively down down
Vlan3                    YES manual administratively down down
Vlan4                  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
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.

DD-WRT configuration:

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 and the Gateway of and I could reach outside of the switch perfectly.

, , , , , , ,

18 thoughts on “VLAN Trunking with DD-WRT and a Catalyst 2950-24

  • Asa says:

    This blog needs more comments. You can delete this one if you want though.

  • alban says:


    I would like to trunk the Vlan 1 with Vlan 100 on port 1 and 2 on my DD-WRT.
    how can i do ?

    (sorry for my english, i”m french)

  • Jason Ruiz says:

    Sorry for the late reply, as far as I know it’s 1:1 tagging, so VLAN 100 isn’t available with DD-WRT.

  • Chris says:

    I’m assuming you are using the Cisco switch as your DHCP then? I did exactly what you said and it’s not getting an IP when I connect to a Port 1 which is Vlan 2, Port 2 is Vlan3, Port3 is Vlan 4. Port 4 is set as default. I only need three vlans.

  • Jason Ruiz says:

    No, it’s a L2 switch, so it doesn’t have DHCP or DNS, you’d have to either use static, or setup a DHCP server for those addresses.

  • Chris says:

    Basically here’s my topology. I’m using a WRT54GS v3 with the mega build installed for DD-WRT. I want to use Port 4 as the trunk port. I have 3 VLANs setup using,, and Port 4 is connected to a HP Procurve 2510-48 switch. I have it connected to port 49 on the switch. I set that port as tagged. The problem I am having is the trunk command HP uses. It says use the command trunk [ethernet] port-list. I’m not a 100% positive on how HP names their ports. I’m familiar with how Cisco does it and can setup a trunk and VLANs quite easy on a 2960, etc.

    It’s been awhile since I got out of the Cisco Academy and my brain is not very freshed with all the VLAN lingo.

  • Chris says:

    Do I need setup the VLAN IPs on the Procurve switch?

  • Chris says:

    Found out my problem and I should shoot myself in the foot. Totally forgot to add the IPs to the VLANs on the switch. Got them working now. All I need to do now is figure out how to setup 3 access points on top of this one and get VLANs to work.

  • Jason Ruiz says:

    Sorry about that, I absolutely got no notification on your posts for some reason.

  • Chris says:

    No worries. I actually reconfigured everything. The thing is, is there a way to use VLAN1 as your native vlan although your WAN port uses it. Also, one guy told me not to assign the VLAN’s to the lan like you did.

  • […] http://blog.coildomain.com/2010/03/14/vlan-trunking-with-dd-wrt-and-a-catalyst-2950-24/ […]

    [WORDPRESS HASHCASH] The comment’s server IP ( doesn’t match the comment’s URL host IP ( and so is spam.

  • mjnshosting says:

    Excellent post. I will be making this apart of my network setup soon to separate my virus plagued customer network and my clean home network. I have to repair a lot of virus infected computers.

  • Mel says:

    Jason, which version of DD-WRT are you referring to? These options do not appear in the current DD-WRT I use for the Buffalo HP WHR-300N (which I know may be Buffalo specific) Firmware: DD-WRT v24SP2-EU-US (08/19/10). For example I do not have the 4 phys ports to which I can set vlans – I only have eth1 representing all 4 ports.

    When you have the vlans, did you also try to enable Wireless SSIDs into these vlans? That is my objective, to allow DHCP for multiple BSSIDs, using VLANs and at the same time, attach wired devices to the WAP/Router belonging to the correct VLAN.

    Otherwise, thanks for putting up your info.

  • Jason Ruiz says:

    I’m not sure, it’s probably not version specific, it’s what the router’s actual chipset supports. I was using a WRT54G when writing this. As for the wireless, I didn’t, this was only for my lab equipment to connect to my home internet.

  • Mel says:

    Ok, thanks for the quick response. Does anyone here know of a WAP that will support Multiple BSSIDs, route to the correct VLAN (support VLAN trunk), and have integrated switch ports which will support VLANs themselves? I know that is a high requirement but necessary as I do not wish to run more cable, and I have devices that are wired requiring to be on separate VLANs.

  • Kevin Johnson says:

    Love this simple article. Thx man.

  • Rob says:

    Hi, great article. I’m curious why the VLAN IP’s are being set on both sides? I understand it works but for a routeable VLAN I have never seen at least the same IP’s on both sides.

  • Jason Ruiz says:

    After learning a bit more networking since I posted that I can understand what you mean. From what I remember, that was the only way I got it working, but I can’t test as I don’t have that hardware anymore.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>