[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 828
  • Last Modified:

cisco 2950

Dear Experts,

i want to know that why we need default gateway in cisco 2950 , this is layer 2 switch so can we configure default-gateway on it ?

if it is layer-2 switch then how it sens default gateway ?
0
sportsboy
Asked:
sportsboy
3 Solutions
 
selimfelexCommented:
Actually, your switch doesn’t have to have a default gateway configured. However, if you want to be able to communicate with your switch from another subnet, you need to configure a default gateway on the switch so it knows how to get to its local LAN switch.

 Here’s how to configure a default gateway on a switch:
 Switch(config)# ip default-gateway 10.92.103.254
0
 
sportsboyAuthor Commented:
i have different vlans and they are configure on core switch. and my edge switch is connecting to core switch and communicating to other vlans then why i need default gateway ? even i am communicating with other network vlans.
0
 
Marius GunnerudSenior Systems EngineerCommented:
there are two reasons for the default gateway:

reason 1...as Selimfelex mentioned, it helps the switch know where to send packets headed for an un-known network but isn't normally needed for this purpose.

reason 2....The default gateway on a layer 2 switch is mainly used so you can manage the switch remotely by using telnet or SSH.
0
SMB Security Just Got a Layer Stronger

WatchGuard acquires Percipient Networks to extend protection to the DNS layer, further increasing the value of Total Security Suite.  Learn more about what this means for you and how you can improve your security with WatchGuard today!

 
lrmooreCommented:
Agree with above. The Only function of the default-gateway on the 2950 L2 switch is for management purposes of the switch itself. If your network management station is on a different IP subnet than the switch itself, then the switch needs a default gateway configured. If you want to, say, run ntp on the switch to keep the log times accurate, then the switch needs to be able to reach the NTP server which could be on a different subnet. If you want to send syslog data to an external syslog server that maybe sits on a different subnet, you need a gateway. There are myriad management features on the switch and if any feature needs to talk to an external device (on another subnet), then the gateway is required.
0
 
sportsboyAuthor Commented:
thanks all i get a strong idea now, one  more thing that we give the default gateway of the same Vlan in which switch is located. ?

my switch is in vtp client and it has vlan 50,60.70. and my all ports are in vlan 50, and giga ethernet is trunk port.


 
then i will give the default  of vlan 50  or i can give default gateway of another vlan ???

0
 
lrmooreCommented:
Typically, the switch itself has an IP address on VLAN1, or another dedicated network management vlan. If the switch's IP address is on vlan 1 and you actually have a gateway for vlan 1, then use that. If you want to assign the switch an IP address in vlan 50, then you have to create a vlan50 interface to assign the IP to:
Example:
interface vlan 1
 no ip address
 shutdown
interface vlan 50
 ip address 1.2.50.12 255.255.255.0
 no shutdown
ip default-gateway 1.2.50.1
0

Featured Post

[Webinar] Improve your customer journey

A positive customer journey is important in attracting and retaining business. To improve this experience, you can use Google Maps APIs to increase checkout conversions, boost user engagement, and optimize order fulfillment. Learn how in this webinar presented by Dito.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now