Solved

default gateway L2 switch

Posted on 2014-12-05
6
838 Views
Last Modified: 2014-12-06
Hi,

Want to get my head around default gateway on L 2 switch.

ok 3 VLANs on L2 switch. vlan 2 vlan 3
vlan 4 is reachable through route

I have management on vlan 2 - I have an IP address 192.168.2.1 on vlan 2
I have an IP address on vlan 3 - 192.168.3.1 - I can ssh to manage switch on both of these IPs on vlan 2 and 3
vlan 4 is 192.168.4.0/24
my default gateway on the L2 switch is to my L3 switch  IP 192.168.3.3

I ssh to the L2 switch on vlan 2 192.168.2.1.   Can I then from this ssh session on the switch ping to VLAN 4
the default gateway L2 is not on VLAN 2 ?  Does it matter that I have come into the L2 switch by ssh  on vlan 2 - or do i need to ssh to VLAN 3 which has an IP on same subnet as the L2 gateway in order to ping another VLAN ??  - when I try to ping an IP on vlan 4   does it use the default gateway set on the L2 switch?

thanks
0
Comment
Question by:philb19
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 50

Expert Comment

by:Don Johnston
ID: 40484231
I'm really having a difficult time following you...

If you have a true layer-2 switch, then you can only have one SVI (VLAN interface) up.  

So I don't understand how you have IP addresses on multiple VLANs.

And the default gateway has to be on the same network as the host.
0
 

Author Comment

by:philb19
ID: 40484372
Actually Ive just confused myself I think
correct me if wrong
The default gateway on a L2 switch is just for management traffic. And its just the gateway for that subnet only. ie gateway of the IP range that its on. So default gateway 192.168.2.254 on a L2 switch  is gateway for 192.168.2.0/24 "only" - otherwise its not used.

The gateway for VLAN 3 on 193.168.3.0/24 - would need to be on 192.168.3.0/24 and be a router interface.  When I ssh to Vlan3 and ping different subnet Id go via the gateway for this vlan. This question rose into my head as somehow we got couldn't reach a L2 switch management IP - and it was due to its default router not being on the management range IP subnet.

"If you have a true layer-2 switch, then you can only have one SVI (VLAN interface) up. " - here im not sure about. - We definitely have a L2 stack with multiple vlan interfaces on it. I can ssh to both of these interface IPs example vlan 3 192.168.3.1 and vlan 2 192.168.2.1 ?? - and im on the same switch
0
 
LVL 37

Expert Comment

by:Neil Russell
ID: 40484455
Save all the back and forth, would be easier if you just give make and model of switch.
0
Building an interactive eFuture classroom

Watch and learn how ATEN provided a total control system solution including seamless switching matrix switch, HDBaseT extenders, PDU, lighting control to build an interactive eFuture classroom.

 

Author Comment

by:philb19
ID: 40484461
Cisco 2960 sstack
0
 
LVL 50

Accepted Solution

by:
Don Johnston earned 500 total points
ID: 40484486
The 2960 is not a true layer-2 switch. It can do basic layer-3 routing (but static routes, no routing protocols).  But layer-3 routing is disabled by default.

The default gateway on a L2 switch is just for management traffic.
Correct.
And its just the gateway for that subnet only. ie gateway of the IP range that its on.
No. Just for the management of the switch
The gateway for VLAN 3 on 193.168.3.0/24...
This where I get confused. If we're talking about layer-2 switches, the only gateway is the one for the management VLAN.
"If you have a true layer-2 switch, then you can only have one SVI (VLAN interface) up. " - here im not sure about. - We definitely have a L2 stack with multiple vlan interfaces on it. I can ssh to both of these interface IPs example vlan 3 192.168.3.1 and vlan 2 192.168.2.1 ?? - and im on the same switch
This could be the result of the 2960 not being a true layer-2 only switch.  It is possible (I've never tried to do this) that even with layer-3 routing disabled that you would be able to have multiple SVI's up at the same time. The switch would still not be able to route traffic between the different networks, but you could have multiple VLAN interfaces up.
0
 

Author Comment

by:philb19
ID: 40484632
sorry should have explained myself better

The gateway for VLAN 3 on 193.168.3.0/24...

the gateway for vlan 3 is via trunked uplink  to the L3 core- the gateway resides itself on the L3 router core.

thanks very much for detailed explanation - awesome help
0

Featured Post

Connect further...control easier

With the ATEN CE624, you can now enjoy a high-quality visual experience powered by HDBaseT technology and the convenience of a single Cat6 cable to transmit uncompressed video with zero latency and multi-streaming for dual-view applications where remote access is required.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
tamper proof asset tags - benefits 4 60
BGP Local Preference 5 48
Logging into A Cisco switch from another switch or router 2 27
Router speed limit 7 62
How to set-up an On Demand, IPSec, Site to SIte, VPN from a Draytek Vigor Router to a Cyberoam UTM Appliance. A concise guide to the settings required on both devices
Most of the applications these days are on Cloud. Cloud is ubiquitous with many service providers in the market. Since it has many benefits such as cost reduction, software updates, remote access, disaster recovery and much more.
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question