Cisco Support Community
Showing results for 
Search instead for 
Did you mean: 

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

Vlan & Inter Vlan question

Here is my network layout:

I have a cable modem connecting to a Linksys WRT54GL (DDWRT) router. Port 1 on the WRT54GL is connect to port 01 on the SG300-10 switch.

On the SG300-10 I've created two Vlans (Vlan 30 & Vlan 40). I assigned ports 3 & 4 on the SG300-10 to Vlan 30 and ports 5 & 6 to Vlan 40. Vlan 30 has the IP Address and Vlan 40 has an Address of The default Vlan (Vlan1) has an Address of The default gateway (WRT54GL router) has an Address of I have also enable DHCP relay on the switch and enter the command "ip routing". My question is on either vlan if I wanted to setup static addresses for clients would I use the (WRT54GL) address as the default gateway? Also, what additional configurations do I need to make for the Vlans to be able to talk to each other and be able to access the internet?


New Member

Vlan & Inter Vlan question

Hello masterwu69,

This is possible if the SG300-10 is in Layer 3 mode.

In order for DHCP relay to work you need to configure the "DHCP Relay Interfaces" for VLANs 30 and 40. Then you need to make sure that your DHCP server has a scope set for each VLAN. You also need to check if you are using Option 82 on your DHCP server.

To get the Inter-VLAN routing working in the Layer 3 switch nothing else needs to be configured. As long as the switch is the default-gateway of you clients. However, in order for the clients to get access to the internet you will need to set some static routes on the switch and the router. You will need to set a default-route in the switch to go to the WRT54GL. Then you will need to set two static routes in the router and point them to the switch for VLANs 30 and 40.

I would also suggest that your clients' gateway on your default VLAN remain the WRT router.

This configuration should work for what you are trying to do. Let us know if you have any questions.



New Member

Vlan & Inter Vlan question


Thanks for the reply. The SG300-10 is in layer 3 mode. I have configured the DHCP server accordingly. Here is my setup:

                   cable modem



                   linksys wrt54gl (



                   sg300-10  Vlan1= (manage)

                                  Vlan30= /24 (GW=

                                  Vlan40= /24 (GW=

You said that for inter-Vlan to work I need to set the clients GW to the switch. Would that be the Vlan's gateway for clients in each vlan? For example if a client was in vlan30 their gw would be

The clients are not able to access the internet from the vlan. How would I configure the static on the switch for the vlans to be able to access the internet? Would this work:  ip route

New Member

Re: Vlan & Inter Vlan question


Yes, for Inter-VLAN routing to work the configuration would be the following: 

     Clients on VLAN 1 - the gateway would need to be  //This needs to be the router because it could cause a routing loop if the clients set their gateway to the switch and the router points back to the switch in order to get to the same subnet.

     Clients on VLAN 30 - the gateway would need to be

     Clients on VLAN 40 - the gateway would need to be

Yes, the default route should be "ip route"

However, remember that the router needs to point back to the other two subnets (VLAN 30 & 40).



New Member

Vlan & Inter Vlan question

I am having problems, not sure what I am doing wrong. I am unable to ping from each Vlan. I also can't ping the Vlan IPs from either the SG300 or WRT54GL. On the router, I added routes back to the Vlan network:

                    Network    Mask              Next hop



On the SG300 i added the default route

The SG300 is in layer 3 mode. Not sure what I am missing.

CreatePlease login to create content