Cisco Support Community
Community Member

accesing thru router from mulitple vlan

I have 2 segment network for etc 192.168.1.x & 192.168.2.x.

My router fastethernet is under 192.168.1.x. and is connecting back to a L3 switch.How should I configure it inorder to allow both segment to go out thru the router.All the ws gateway is pointing to the vlan gateway.

I had put the IP route 192.168.2.x/24 on the router but I'm not sure which gateway to insert.


Re: accesing thru router from mulitple vlan

Let me see if I understand this correctly. You have two VLANs, let's call them VLAN 10 and VLAN 20. Each VLAN has an IP subnet: VLAN 10 is 192.168.1.x, and VLAN 20 is 192.168.2.x.

The VLANs connect through a L3 switch, which serves as the default gateway for each VLAN. So, the L3 switch has two IP addresses: let's say, for VLAN 10, and for VLAN 20. If a workstation is on VLAN 10 then its default gateway is; and if it is on VLAN 20 then its default gateway is

You also have a router on VLAN 10; let's say its IP address is You want both VLANs to be able to send traffic through that router.

What to do on the ROUTER:

If you are not using routing protocols to let the router learn about IP subnets that it is NOT directly connected to, then you need to put a static route on the router to tell it how to reach the users on VLAN 20. The router would have to go through the L3 switch to get there, so the static route would look like this:

ip route

The router probably already has a default route configured, that sends traffic for all other not-directly-connected subnets to the next hop on the most likely path to get there. It probably looks something like this:

ip route next.hop.ip.address

What to do on the L3 SWITCH:

The L3 switch is where the workstations send all their IP traffic when they're trying to reach something on another subnet. If the traffic is between VLAN 10 and VLAN 20, the L3 switch knows how to do that since it's directly connected to each network. But, to make sure it sends IP traffic for any other destination via the router, you need to give the L3 switch a default route that points to the router. If it were a Cisco switch, then the route would look like this:

ip route

Hope this helps.

CreatePlease to create content