Technical SupportSkip Navigation
About | Conferences and Events | Online Resources | Programs | Security | Services | Shared Network | Technical Support | Training | Contact | Site Map | MyMOREnet Login

Home » Technical Support » Networks » TCP/IP » How to Locate IP, Gateway, Subnet and DNS Information
Submenu Header
Spacer Graphic

How to Locate IP, Gateway, Subnet and DNS Information

An Internet Protocol (IP) address is a unique number that can identify each host (computers, routers, switches, etc.) on a network. When a host sends information to the IP address of a second receiving host it includes IP of origination, IP of destination and other information. Knowing the IP address of key network components such as routers, firewalls and servers, can be useful when troubleshooting network problems. Use of utilities like Ping or Trace Route can help isolate problem areas.

A knowledge of relevant network topology and settings including DNS, gateway and subnet mask can also be useful when exploring network issues.

Domain Name Service (DNS) numbers are IP addresses that a workstation or server uses to refer to specific servers that resolve domain names to IP addresses.

A gateway IP refers to a device on a network which sends local network traffic to other networks.

The subnet mask number helps to define the relationship between the host (computers, routers, switches, etc.) and the rest of the network.

System Requirements

IP addresses are a part of the Transmission Control Protocol/Internet Protocol (TCP/IP) suite of protocols and will be present on every system that is connected to the Internet. The IP protocol is installed by default on most operating systems.

Windows 95/98

  1. Select Start > Programs > DOS Prompt

  2. In the resulting command line window, type winipcfg.

    A new window will open up displaying IP network information for that host.

  3. IP Configuration dialog box

  4. In the first selection box, click on the down arrow and select the proper network interface. There will be a network connection listed for a dial-up, and one listed for each network card installed in the computer.

  5. Click on the More Info button to see additional IP information.

  6. To view additional DNS information click on the box next to the first DNS number marked "...".

Back to Top

Windows NT/Me/2000/XP

  1. Select Start > Run. Type command into the dialog box, then click OK.
  2. In the resulting command line window, type ipconfig /all.

C:\>ipconfig /all

Windows 2000 IP Configuration Host Name . . . . . . . . . . . . : tss-avery-babel Primary

DNS Suffix . . . . . . . :
Node Type . . . . . . . . . . . . : Hybrid
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No
DNS Suffix Search List. . . . . . :

Ethernet adapter Local Area Connection:

Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : 3Com EtherLink 10/100 PCI For Complete PC Management NIC (3C905C-TX)
Physical Address. . . . . . . . . : 00-01-03-AB-0E-6P
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
IP Address. . . . . . . . . . . . :
Subnet Mask . . . . . . . . . . . :
Default Gateway . . . . . . . . . :
DHCP Server . . . . . . . . . . . :
DNS Servers . . . . . . . . . . . : Primary
WINS Server . . . . . . . :
Secondary WINS Server . . . . . . :
Lease Obtained. . . . . . . . . . : Wednesday, January 1, 2003 11:17:41 AM
Lease Expires . . . . . . . . . . : Friday, January 3, 2003 11:17:41 AM

The IP address will be listed in the current command line window. Other information such as the gateway address and DNS numbers will also be displayed.

Mac OS 8-9.x

  1. Click on the Apple Menu (in the upper left corner of the display) > Control Panel > TCP/IP.

    Mac OS 8-9 TCP/IP dialog box

    A new window will open, the TCP/IP Control Panel. This window will contain information such as IP address, subnet mask, router address (gateway), name server address (DNS) and other IP information.

Mac OS 10.x

  1. Click on the Apple Menu > System Preferences.

  2. Click on Network.

    If the network settings are grayed out select the click the lock to make changes button. Then enter in the admin account name and password to proceed with viewing the network settings.

  3. Choose the ethernet port by clicking the double arrows next to Show Fields and select Built in Ethernet.

  4. Click on the TCP/IP tab.

    Mac OS X TCP/IP dialog box

    The IP address, subnet mask, router (gateway) and domain name servers (DNS) will be displayed in the active window.

Back to Top

Novell 4.11-6

At the System Console screen, type config.

The last two lines of the information displayed on the screen will be the IP address and the subnet. To find the DNS numbers and gateway, follow these steps:

  1. At the System Console screen, type load inetcfg.nlm. The Internetworking Configuration tool will launch.

  2. Select Protocols > TCP/IP. Press Enter and the TCP/IP Protocol Configuration window will display.

  3. TCP/IP Protocol Configuration window

  4. Press the down arrow to LAN Static Routing Table. Press Enter.

  5. The default route listed will be the gateway address.

  6. Press Esc until the TCP/IP Protocol Configuration window is again visible.

  7. Press the down arrow to DNS Resolver Configuration. Press Enter.
    The three DNS numbers, along with the name of the server, will be listed here. Press Esc four times and press Enter to exit out of inetcfg back to the main console screen.


Note: Root access may be required to run these commands. These commands will all be launched from the command line.

  1. Launch a command line interface. (This will vary depending on operating system distribution.)
  2. In the resulting command line window or screen, type ifconfig.
  3. Press Enter.

For example:

Typing ifconfig at the command line:

[sygny@linuxbox /home]# ifconfig

Will result in something similar to the following:

eth0 Link encap:Ethernet HWaddr 00:10:5A:1A:DC:65
inet addr: Bcast: Mask:
RX packets:18940 errors:1 dropped:0 overruns:0 frame:2
TX packets:11554 errors:0 dropped:0 overruns:0 carrier:0
collisions:2 txqueuelen:100
RX bytes:4087250 (3.8 Mb) TX bytes:2499423 (2.3 Mb)
Interrupt:11 Base address:0xd000

In the example above, the IP address is labeled inet addr:

The subnet mask is listed as Mask:

The location of the gateway address can be found by typing netstat -rn at the command line. The output will look similar to:














The gateway IP in the above instance is

DNS information is most often found in a text file called resolv.conf. This file can be read using the cat command. A common place for this DNS file is:

/etc/resolv.conf although the name and location of this file may vary by Linux distribution.

To access this file type:

cat /etc/resolv.conf

The output will display the DNS numbers assigned to the machine, in this case:


Back to Top

Other IP Tools and Information — Shows the IP address of the host machine visiting the link. (May show the IP address of a firewall instead of the local machine, if the local machine is behind a firewall.)

Copyright © 2002 MOREnet. All rights reserved. Reviewed January 3, 2003.
Contact DMCA and other copyright information.
Site Information: Copyright, accessibility, privacy and other information about this site.
PageMinder: Receive an e-mail notice when this page updates.

Search MOREnet  Advanced Search