07-03-2016 02:15 AM - edited 03-08-2019 06:28 AM
Hi,
I understand to connect a layer 2 switch with 3 vlans for example (vlan 1-3) to a router, we need to create 3 sub-interfaces on the router port so that we can do inter-vlan routing.
If I connect it with a layer 3 switch with 3 SVI and convert one switchport to a routed port with the 'no switchport' command and connect it to a router port, will inter-vlan routing still work? If yes then does the routed port acts like a 'trunk' that carries all the traffic for the SVI in the switch?
Thanks.
07-03-2016 04:59 AM
Why not use the L3 switch for the routing instead?
What are you trying to achieve?
Martin
07-03-2016 05:29 AM
Disclaimer
The Author of this posting offers the information contained within this posting without consideration and with the reader's understanding that there's no implied or expressed suitability or fitness for any purpose. Information provided is for informational purposes only and should not be construed as rendering professional advice of any kind. Usage of this posting's information is solely at reader's own risk.
Liability Disclaimer
In no event shall Author be liable for any damages wha2tsoever (including, without limitation, damages for loss of use, data or profit) arising out of the use or inability to use the posting's information even if Author has been advised of the possibility of such damage.
Posting
If you configure a L3 switch with SVI, to perform the inter-VLAN routing on it, and then use a switch port as routed, to connect to your router, the router's port would just be configured "normally", i.e. without subinterfaces. You would route between the L3 switch and the router, normally using a p2p subnet.
BTW, when using a L3 switch and router, there are other possible combinations. For example, you might still have a trunk port on the L3 switch that connects to a router port with subinterfaces. Then the router's interfaces and the L3 switch would both have gateway addresses on all your subnets. If you made the SVI the default GW, it would redirect clients to the router for off VLAN traffic. Conversely, the router would send its traffic to the hosts, at L2, bypassing using the switch's L3. (In theory, having some traffic bypass the switch, at L3, would be just a tiny, tiny bit faster, but generally, this isn't worth doing, unless the router was connected to another L2 switch as is the L3 switch. In the latter, you could also configure HSRP between the L3 devices, and if the L3 switch failed, the router would route between VLANs.)
07-03-2016 11:18 AM
Hi Joseph,
Please refer to the diagram.
The switch has 2 routed port with ip 192.168.200.2 and 192.168.10.1.
The switch also has multiple SVI defined by the number of subnets.
In order to route traffic from the switch to the internet, I know I have to do a default route at the switch by issuing ' ip route 0.0.0.0 0.0.0.0 11.11.11.11 '
My question is do I have to issue any commands to route from the various subnets to send traffic to the routed port with ip 192.168.200.2 to get to the internet?
07-03-2016 04:16 PM
The default route would be 0.0.0.0 0.0.0.0 192.168.200.1, the L3 switch is performing inter-VLAN routing.
Martin
07-03-2016 08:00 PM
Thank you Martin
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide