• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 4015
  • Last Modified:

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.

2 Solutions
can you get into the switch?  you can also find out what all the ip addresses in use are by doing a broadcast ping then go through them 1 by one  or just check another known working machine.

at a command prompt type ipconfig /all this should return the information you are looking for.
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.
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

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 or 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 network with a gateway of 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.

(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.)

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.


Featured Post

2018 Annual Membership Survey

Here at Experts Exchange, we strive to give members the best experience. Help us improve the site by taking this survey today! (Bonus: Be entered to win a great tech prize for participating!)

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