# Multiple vlans, one internet access



## benkvi (Feb 4, 2011)

Hi.

I'm setting up a Cisco 3750 layer 3 switch with several vlans. 

I thought enabling routing would route between the vlans, but no such luck.

What I want is to share the internet access of vlan 100 with the other vlans/ip-nets.

How can I do that?


----------



## Wand3r3r (Sep 17, 2010)

You would put all vlans on the port for internet


----------



## snedie (Feb 9, 2008)

Okay so depending how VLAN 100 is getting connectivity to the internet is going to depend on the solution.

If it directly connects to a layer 3 gateway, then enable trunking between these devices and allow the VLAN's that require internet access on this trunk and block all others except for the Native VLAN (Unless you have an explicit reason.*). On the layer 3 device use static routes to direct traffic from each VLAN Subnet to the egress internet connection (The DSL interface etc). Do not use a routing protocol unless you want to allow connectivity between the vlan's (Or use access lists if you do).

If this switch is part of a switched network segment and does not connect directly to a layer 3 gateway, then enable trunking on the switch egress interface and on the switch connecting to the gateway enable the configuration described above. On your DHCP Server(s) change the default gateway to associated gateway IP address for each VLAN.


If you can't do the above for some reason and don't mind making the VLAN's practically irrelevant for segmentation of devices then simply enable static routing on the switch and route between the VLAN's.


----------

