Showing results for 
Search instead for 
Did you mean: 

Q: Vlans on layer 2


Hi all,

My experience is not great in the field of Cisco, because I have been working on Microsoft networks for a long time.

But I have a question now I download, and I drew the attached diagram and created a number of vlans also I put a computer on each switch and take automatic IP.


But the problem is that the computer devices do not read each other and are not ping for switches.


I know that the switches in the diagram are from the Layer 2, but on the program does not accept the "ip route xxxx" command, also the existing router as shown in the diagram is a normal router, not a Cisco router to configure routing.


Is there a solution to this problem and that the devices and switches can read each other on this situation, and if there is a need to change the switch is possible to change the first switch only "Main"


Thanks for your support and I'm a waiting your reply

6 Replies 6

Martin L
VIP Advisor VIP Advisor
VIP Advisor


L2 switch works at layer 2 with mac addresses and vlans, but does not do any routing.  L3 sw and routers do routing.
L2 devices do not accept ip route; only L3 switches and routers. 
L2 switch should have 1 IP on interface Vlan x and ip default-gateway x.x.x.x (of a router).  All PCs' default gateway should be a router;  not L2 switch. 

you can replace L2 sw with L3 sw but then PCs default gateway should be that L3 sw.


Regards, ML
**Please Rate All Helpful Responses **

@Martin L wrote:

Regards, ML
**Please Rate All Helpful Responses **

 Thanks Martin for reply need change all SW or main switch, and you can give me example like I attached at first topic by layer 3




the main one; in your topology, the main sw should be L3 with a router playing role of ISP connector, WAN router.

L3 can have following (just example)

interface vlan  100

ip address

interface vl 200

ip address

interface vlan 300

ip address /24



you still need a trunks from L3 to L2 switches and one interface vlan x going to router. you can then enable ip routing on L3 switch and add protocol or static route. ip default gateway  should be pointing to router.


There are samples in PT; i think u should be able to find couple of them where switches are L3 and l2.


Regards, ML
**Please Rate All Helpful Responses **

I updated and add new designed scheme of 2 L3 switches. I think called collapsed backbone design.
get PT file from

@Martin L wrote:

I updated and add new designed scheme of 2 L3 switches. I think called collapsed backbone design.
get PT file from

Thanks Martin

But also not ping from PC to other "attached", also I need ask why when I press DHCP in any SW L2 get different IP from any Vlan "attached"

I think I see Default gateway on PC is not on the same network / subnet as IP of PCs.


ip 10,10,1,12 /24

default  gateway


u can  attach your work if u want , pt file


Regards, ML
**Please Rate All Helpful Responses **

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Recognize Your Peers