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.
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
Select Start > Programs > DOS Prompt
In the resulting command line window, type winipcfg.
A new window will open up displaying IP network information for that host.
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.
Click on the More Info button to see additional IP information.
To view additional DNS information click on the box next to the first DNS number
Back to Top
- Select Start > Run. Type command into the dialog box, then click OK.
- In the resulting command line window, type ipconfig /all.
Windows 2000 IP Configuration Host Name . . . . . . . . . . . . : tss-avery-babel Primary
DNS Suffix . . . . . . . : dns1.someschool.edu
Node Type . . . . . . . . . . . . : Hybrid
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No
DNS Suffix Search List. . . . . . : dns1.someschool.edu
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. . . . . . . . . . . . : 192.168.0.10
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.0.254
DHCP Server . . . . . . . . . . . : 192.168.0.35
DNS Servers . . . . . . . . . . . : 192.168.0.12 192.168.0.13 Primary
WINS Server . . . . . . . : 192.168.0.37
Secondary WINS Server . . . . . . : 192.168.0.38
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
Click on the Apple Menu (in the upper left corner of the display) >
Control Panel > TCP/IP.
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
Click on the Apple Menu > System Preferences.
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.
Choose the ethernet port by clicking the double arrows next to Show Fields
and select Built in Ethernet.
Click on the TCP/IP tab.
The IP address, subnet mask, router (gateway) and domain name servers (DNS) will
be displayed in the active window.
Back to Top
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:
At the System Console screen, type load inetcfg.nlm. The
Internetworking Configuration tool will launch.
Select Protocols > TCP/IP. Press Enter and the TCP/IP Protocol
Configuration window will display.
Press the down arrow to LAN Static Routing Table. Press Enter.
The default route listed will be the gateway address.
Press Esc until the TCP/IP Protocol Configuration window is
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.
- Launch a command line interface. (This will vary depending on operating system
- In the resulting command line window or screen, type ifconfig.
- Press Enter.
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:184.108.40.206 Bcast:220.127.116.11 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:18940 errors:1 dropped:0 overruns:0 frame:2
TX packets:11554 errors:0 dropped:0 overruns:0 carrier:0
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:18.104.22.168.
The subnet mask is listed as Mask:255.255.255.0.
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 192.168.0.1.
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
/etc/resolv.conf although the name and location of this file may vary by Linux
To access this file type:
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.)