Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 01-07-2016, 09:29 PM   #1
Registered: Oct 2010
Posts: 93

Rep: Reputation: 1
Question why two vlans on same switch need no routing

Hi Folks,
Today I saw one comment below:

 vlan 124 and vlan 126 are on same distro switch and need no routing, those are self connected interface on z2-rtr-1/2.
So it meant if two vlans are on the same switch, then no routing is needed for communication between them. I'm not sure how this works, is there any commands on cisco routers/switches that control this behavior?

Thanks in advance!

Last edited by hahacc; 01-07-2016 at 10:26 PM.
Old 01-08-2016, 12:34 AM   #2
Registered: Aug 2015
Posts: 54
Blog Entries: 1

Rep: Reputation: Disabled
You can use Policy Based Routing which CAN forcefully send all the traffic coming reaching the vlan interfaces.

Eg: is the Gateway ip


access-list 100 permit ip any

access-list 110 permit ip any

route-map vlan500 permit 10

match ip address 100

set ip next-hop

route-map vlan600 permit 10

match ip address 110

set ip next-hop

int vlan 500

ip address

ip policy route-map vlan500

int vlan 600

ip address

ip policy route-map vlan600
Old 01-08-2016, 03:50 PM   #3
Senior Member
Registered: Apr 2009
Posts: 1,839

Rep: Reputation: 160Reputation: 160
In general, traffic between two VLAN interfaces need a route. But some product support bridge, it forward packet based on MAC address only, no VLAN. In this case, no route is requested.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
need help with routing to firewall only from vlans onlybrybry Linux - Networking 2 09-24-2012 11:42 AM
CentOS VLANs and Cisco Catalyst switch (router on stick problem) Grejeru Linux - Networking 4 07-28-2011 03:08 PM
Vlans with ClearOS adn Cisco 3560G Layer 3 Switch hladamjr Linux - Networking 0 11-08-2010 10:11 AM
Can We Coexist 2 VLANS on one Unmanageable Switch?? kool_kid Linux - Networking 2 09-15-2008 07:19 AM
A quick question about VLANs and routing djuro-san Linux - Networking 1 09-01-2008 09:11 PM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 08:40 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration