I would like to know if it is possible to configure inter-vlan routing on a level 3 switch with a default route per vlan.

Actualy, I have one switch with 3 VLAN (VLAN1, VLAN2, VLAN3) and a router with 3 ADSL box connected. Each VLAN have a specific ADSL box for Internet connection and on the same VLAN, specific IP can use différent ADSL box. Inter-vlan routing is provide by the router, it's working well, but inter-vlan connection speed is very slow : 160Mb/s or 20Mo/s.

I would like to use my switch to do inter-vlan routing but I can't define a default static route per vlan.

Do you know a switch that is capable of doing this or do you have any idea how I could do it without static route per vlan ?

Thanks for your help !

  • An L3 switch can route between the VLANs, just activate routing. To enable multiple-WAN routing you don't need VLANs, you need a router supporting load balancing. Alternatively, you can try distributing traffic by setting up your clients to use one of the routers. – Zac67 Jun 11 '17 at 17:09
  • You right, but my 3 ADSL box is not for load balancing. It's use for specific connection on service with différent public IP. One ADSL box it's use for VOIP, other for connection on specific server with ACL IP based, etc. – Kawastaguta Jun 11 '17 at 17:39
  • This sounds very much like consumer-grade hardware which is explicitly off-topic here. – Zac67 Jun 11 '17 at 17:40
  • I don't understand. My question is general, No relation to any particular material. – Kawastaguta Jun 11 '17 at 17:43
  • In general, you have a central, multi-WAN capable router that you can use for load balancing. You use your L3 switch as default gateway for the clients and inter-VLAN routing. On the L3 switch you set up your central router as default gateway for Internet connectivity and the router do the load balancing/distribution. – Zac67 Jun 11 '17 at 17:51

The underlying "issue" is that routing decisions are made using the destination address.

Each one of your source VLANs will do a route table lookup on their destination and follow the configured or learned default route in the global routing table (assuming their destination is not local).

If you wanted to influence this decision, such that source A goes out ISP A; source B goes out ISP B; and source C goes out ISP C, you would need to use either policy based routing or VRF-Lite.

With policy based routing, you would utilize a route-map to match the desired source traffic, and then set the desired next hop address (upstream to ISP X).

With VRF-Lite, you would separate each VLAN's SVI and the ISP uplink into their own unique VRF. Each VRF would then have it's own unique default route. However, this would also prevent the VLANs from communicating with each other without additional considerations.

If you wanted to load-share the traffic from all three sources, out all three lines, then you would configure 3 distinct equal cost default routes.

In an enterprise environment, you would typically see multiple ISPs connected to one or more routers so that traffic can be load balanced across using things like BGP attributes. The actual method would depend on if you were looking to load balance traffic, or define an active/standby.

  • It's perfect ! VRF-Lite it's just I need. I check PBR already and if I understand, PBR need to be configured on switch L3 and I need 3 IP adress on router (each one for ADSL box). That's it ? – Kawastaguta Jun 12 '17 at 20:18

Yes you can give default route for each vlan on the switch . You will need a later 3 interface on the switch . Once u create a layer 3 interface for a specific vlan assign an IP ADDRESS to it in the same subnet as the host in the vlan.

Once done add that ip as the default gw for the host . Now on the switch , add static routes (or routing protocols) Based on the network topology and you can achieve inter vlan communication. Though I can't understand how using a router can create such large descrepencies in the throughout


Clients, computers or hosts connected via DHCP send all their traffic to their default route which is usually a routable address on the switch. Therefore the clients will have one gateway per vlan. If you want VLAN A to use one gateway, and VLANs B to use a different; then the host computers receiving their request via DHCP would receive the desired Gateway per Subnet (A/B) to the destination. Typically the switch has one routing-table that affect all VLANs. The next-hop address has be reachable. If you assign the next-hop of a default route to an address that is located in the subnet of a specific VLAN, that is where all VLANs traffic will be sent. The switch however will still only have 1 default gateway.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.