Networking: Finding your IP and MAC address


At DePaul, we use both IP addresses and MAC addresses when performing incident response to computer security violations on the university network. This tutorial is a brief demonstration on the steps required​ to find your IP and MAC address.

Finding Your IP Address on Windows

From the Windows Desktop click Start, then type cmd and press [ENTER].

Enlarge the window (the output may be fairly large).

From the command line, type ipconfig /all and press [ENTER]. You will see the following output.

C:\>ipconfig /all

Windows IP Configuration

Host Name . . . . . . . . . . . . . : winos
Primary DNS Suffix . . . . . . . :
Node Type . . . . . . . . . . . . . : Unknown
IP Routing Enabled. . . . . . . : No
WINS Proxy Enabled. . . . . . : No
DNS Suffix Search List. . . . . : depaul.edu


Ethernet adapter Local Area Connection:

Connection-specific DNS Suffix . : depaul.edu
Description . . . . . . . . . . . . . . . : Intel(R) PRO/100 VE Network Connection
Physical Address. . . . . . . . . . . : 00-0D-FF-DD-EE-FF
Dhcp Enabled. . . . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
IP Address. . . . . . . . . . . . . . . : 140.192.21.254
Subnet Mask . . . . . . . . . . . . . : 255.255.255.128
Default Gateway . . . . . . . . . . : 140.192.21.248
DHCP Server . . . . . . . . . . . . : 140.192.1.50
DNS Servers . . . . . . . . . . . . : 140.192.0.2
140.192.239.2
Lease Obtained. . . . . . . . . . . : Tuesday, April 06, 2004 4:08:57 PM
Lease Expires . . . . . . . . . . . . : Tuesday, April 13, 2004 4:08:57 PM

In this example, the IP address of the computer is 140.192.21.254 and the MAC address (aka. physical address) is 00-0D-FF-DD-EE-FF.

Finding Your IP on MAC OS

Start a Terminal, found in the /Applications folder.

Type /sbin/ifconfig -a. You will see the following output.

prettyos$ /sbin/ifconfig -a

lo0: flags=8049 mtu 16384
inet6 ::1 prefixlen 128
inet6 fe80::1 prefixlen 64 scopeid 0x1
inet 127.0.0.1 netmask 0xff000000
gif0: flags=8010 mtu 1280
stf0: flags=0<> mtu 1280
en0: flags=8863 mtu 1500
inet6 fe80::203:93ff:fed1:c5ac prefixlen 64 scopeid 0x4
inet 140.192.21.254 netmask 0xffffff80 broadcast 140.192.21.255
ether 00:0d:ff:dd:ee:ff
media: autoselect (1000baseTX ) status: active
supported media: none autoselect 10baseT/UTP

In this example, the IP address of the computer is 140.192.21.254 and the MAC address (aka. physical address) is 00:0d:ff:dd:ee:ff.

Finding Your IP Address on FreeBSD, OpenBSD, Linux and other UNIX Variants

Enter a terminal.

Ensure that /usr/sbin and /sbin are included in your $PATH, then type ifconfig -a. To execute the command using a full path, type /sbin/ifconfig -a or /usr/sbin/ifconfig -a. You will see the following type of output.

secureos$ /sbin/ifconfig -a

lo0: flags=8049 mtu 33224
inet 127.0.0.1 netmask 0xff000000
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x6
fxp0: flags=8843 mtu 1500
address: 00:0d:ff:dd:ee:ff
media: Ethernet autoselect (1000baseTX)
status: active
inet 140.192.21.254 netmask 0xffffff80 broadcast

In the above example, the IP address is 140.192.21.254 and the hardware address is 00:0d:ff:dd:ee:ff. Variants of Linux or Solaris may vary; consult your vendors' documentation for more details.

Finding Your IP Address from Behind a Gateway / Router

In some network configurations (such as most home wireless routers), your PC will be behind a gateway or router which will mask your address to the Internet. In this type of case, the above instructions will give you your "private" or internal network address.

If you need to find the external (or public) IP address, use your web browser to go to https://www.whatismyip.com.