How to find Gateway

Posted on 2006-06-08
Last Modified: 2008-01-09
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.

Question by:anumit
    LVL 12

    Accepted Solution

    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.

    LVL 7

    Assisted Solution

    at a command prompt type ipconfig /all this should return the information you are looking for.
    LVL 3

    Expert Comment

    Another quick trick do a tracert (traceroute in linux) to a internet site such as  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.
    LVL 3

    Expert Comment

    For ipconfig/all there must an active dhcp server. If there isn't tracert will also do the job
    LVL 9

    Expert Comment

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

    A switch doesn't have a'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 */ 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.

    LVL 9

    Expert Comment

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

    LVL 57

    Expert Comment

    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

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    Some time ago I was asked to set up a web portal PC to put at our entrance. When customers arrive, they could see a webpage 'promoting' our company. So I tried to set up a windows 7 PC as a kiosk PC.......... I will spare you all the annoyances I…
    Data center, now-a-days, is referred as the home of all the advanced technologies. In-fact, most of the businesses are now establishing their entire organizational structure around the IT capabilities.
    After creating this article (, 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…
    In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor ( If you're interested in additional methods for monitoring bandwidt…

    734 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

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now