Link to home
Start Free TrialLog in
Avatar of anumit
anumit

asked on

How to find Gateway

For a given ip address how can I find the gateway on a switch.

ex; i need to find the gateway for 10.60.190.x ipaddress.where can i find the gateway on my core switch.

ASKER CERTIFIED SOLUTION
Avatar of Scotty_cisco
Scotty_cisco

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of bdetchevery
bdetchevery

Another quick trick do a tracert (traceroute in linux) to a internet site such as www.google.com.  The last 10.60.190.x number you see should be the gateway. This may also be the first number you see as well depending on how your routing is configured.
For ipconfig/all there must an active dhcp server. If there isn't tracert will also do the job
" For a given ip address how can I find the gateway on a switch."

A switch doesn't have a gateway...it's just passing traffic (unless it's of course a managed switch in which case it *still* doesn't *need* a gateway unless it requires access to another subnet for...remote firmware upgrades?  Remote management from a different subnet?  You could have every other port of the switch passing traffic on a different subnet, and those subnets may not even HAVE gateway addresses.  What is it you are trying to accomplish?  I would think the answer would be "See your network administrator" unless you are a rouge node trying to circumvent the network's access policies...but in case this does wind up being a non-circumvental queation, here's a tidbit without getting specific since we were not given specific info with which to answer:

Traditionally, gateway addresses are either at the bottom or the top of the subnet...but they can be anywhere the admin decides within the subnet.  It would even be possible for your gateway to be 10.255.255.254 or 10.0.0.1 or anywhere in between.  Not all LAN are */24...you could have a /16, /8, /23, /15, or pretty much any other CIDR mask in between.  I think we need more specifics to give an appropriate answer.  Heck, someone could have configured a 8.0.0.0/6 network with a gateway of 11.6.6.6 that your 10.60.190.x address would be a part of....I've never laid eyeballs on such a network, but it would certainly be possible (with a few quirks affecting certain functionality like a internal workstation trying to access a legit external address that still falls within the "local subnet" like a website that resolves to a public 8.x.y.z address).

We need more info, like:  Why are you needing the subnet "of the switch"....i.e.  what are you needing to do that you are unable to currently accomplish.  Is it a managed switch or unmanaged?  If managed, do you have access to the management interface of the switch?  Can you configure a port to sniff all traffic and get the gateway you need that way?  Are you certain there even exists a gateway on the particular network segment you're connecting to?  What is the netmask for the segment in question?

More info please.

Thanks
(yes, tracert/traceroute ipconfig /all or route print (or just route in linux) would give a gateway address as the other's said......IF the device was configured correctly...I was assuming the asker needed the gateway in order to configure whatever network device in the first place.)

Avatar of giltjr
Is it for YOUR IP address? Or is it for another IP address within a different IP subnet?

If it is for your's then ipconfig /all should show you want it is.  You do NOT need a DHCP server up for this all you need is to have your computer configured correctly.

If it is for another IP address within another IP subnet, then as the whomever does network configuration at your company.