2/1/2022

What Determines Your Ip Address

  1. What Determines My Ip Address

Do you know what’s on your network? In this guide, we’ll show you a few simple ways you can find an IP address on your network. We’ll also go over a few great tools that can speed up this process and give you further insight into your network.

Whether you’re managing an office network, or just doing some troubleshooting at home, knowing how to find a device’s IP address is critical in solving a number of networking problems.

  1. The subnet mask or CIDR notation determines how the IP address is divided into network and host parts. The term subnet mask is only used within IPv4. Both IP versions however use the CIDR concept and notation. In this, the IP address is followed by a slash and the number (in decimal) of bits used for the network part, also called the routing.
  2. You can attempt to ping an IP address on your network by typing ping 192.168.XX.XXX (Replace the X’s with your IP address.) Most devices will answer the ping and reply back. This is a quick and easy way to determine if there are any latency issues between your PC and that device.
  3. An IP address is made up of 4 numbers in the following format: aaa.bbb.ccc.ddd. Each number can be in the range of 0-255. An IP address is defined as 'a numerical label assigned to each devices (e.g., computer, printer) participating in a computer network that uses Internet Protocol for communication'.

Let’s start with the most basic method of finding your own local IP address in two easy steps.

When you’re at home, an IP address is assigned to your computer by your Internet service provider (think Time Warner Cable, Cox Communications, or AT&T). Since they are the ones giving you access to the Internet, it’s their role to assign an IP address to your.

  1. Open a command line window. In Windows, you can do this by pressing Windows Key + R, and then typing cmd in the Run box and hitting enter. In Linux, this can be done by pressing Ctrl+Alt+T.
  2. Type ipconfig in the command line if you’re on Windows, and ifconfig if you’re on Linux. Press enter to get a list of your PC’s IP configuration.

In the command prompt, you’ll find your IPv4 address towards the top. Under it, you’ll see your subnet mask and your default gateway. This information is vital, especially if you’re having issues connecting to the internet.

But what about finding other IP addresses that might be on your network?

To find other IP addresses that are on your local network, type arp -a in the same command prompt window and press enter. A list of IP addresses will populate on your screen along with additional information you might find helpful.

IP Addresses

In the far left-hand column you’ll see a list of IP addresses that were discovered on your network. Towards the bottom of the list, you may see some addresses starting with 224, 239, or 255. These addresses are generally reserved by your router for administrative purposes, so these can be looked over.

Physical Addresses

In the second column under Physical Addresses we’ll see each device’s physical address. This is also commonly referred to as a MAC address. A physical address is a unique identifier that every network device comes with. Unlike IP addresses, this number cannot be changed. Knowing a device’s physical address is important, especially if you want to identify exactly what is on your network.

Type

The last column displays the address’s type. There are two types of IP addresses, dynamic and static. A dynamic address means that a DHCP server gave that device an IP address. A static address means that the device was configured to use a specific IP address, one that won’t change.

Static addresses are great for devices that are permanent, like printers or servers. Most home networks will be fine using DHCP to hand out IP addresses. DHCP servers assign IP addresses that have leases. Once that lease is up, that device might get a different IP address.

Troubleshooting

From your command prompt, you’re a bit limited in how you can interact with devices on the network. You can attempt to ping an IP address on your network by typing ping 192.168.XX.XXX (Replace the X’s with your IP address.)

Most devices will answer the ping and reply back. This is a quick and easy way to determine if there are any latency issues between your PC and that device. For further troubleshooting, we’re going to need to use some network analyzer tools.

These tools are great for quickly finding devices on your local network and spotting problems fast. They also provide a lot more details than your trusty old command prompt can give you.

Below are three of my favorite network scanning programs.

SolarWinds Port Scanner (FREE TOOL)

If you need more detail and functionality from your Port Scanner then SolarWinds has you covered. You can easily scan your network by IP ranges and filter by ports to identify what services a device is running. SolarWinds Port Scanner is currently a Windows tool only.

SolarWinds Port Scanner also automatically resolves hostnames to help you identify what devices are on your network faster. The GUI interface is easy to use and boasts a cleaner display than Angry IP Scanner.

For those who live in the command line, you’ll be glad to hear this tool comes with a fully functional CLI and support for batch scripting.

While these tools are great, they won’t proactively alert you to problems on your network such as duplicate IP addresses, or DHCP exhaustion.

If you’re a small business administrator, or just a curious tech looking for a bit more insight into your network, SolarWinds Port Scanner is an excellent tool and is available as a free download.

Paessler PRTG Network Scanning Tools (FREE TRIAL)

If you’re a network administrator like myself, you’ll find PRTG Network Monitor an extremely valuable tool when it comes to troubleshooting problems across your network. PRTG is really the evolution of a scanning tool and more of a complete network monitor.

PRTG first scans the entire network in its network discovery process, listing any devices it can find. Once the scan is complete it keeps a real-time inventory of all devices and records when any are removed or added.

PRTG’s sensors are perfect for in-depth testing across your networks. Ping sensors can easily monitor a device’s connectivity over the long term, and alert you to those intermittent connection problems that can be difficult to pin down.

The PRTG scanner goes a step further by also incorporating database monitoring into its suite of tools. This sensor will alert you to any outages or long wait times in almost any SQL environment. Database monitoring can help identify small problems such as stalled processes before they cause major downtime.

Lastly, PRTG can thoroughly monitor bandwidth and network utilization for your environment. When things slow to a crawl, you’ll be able to quickly identify which IP addresses are using the most bandwidth and pinpoint exactly what that traffic is.

Is someone streaming too much Netflix? With the usage monitoring sensor, you’ll never have to guess what is hogging up your bandwidth again. This data is beautifully displayed as a chart, and broken down by IP address, protocol, or top connections.

When you have a sample of data you’d like to save, you can easily export it to XML or CSV. You can even tap into the PRTG API and export your data in real-time.

PRTG is a powerful on-premise tool and is geared mostly for medium to large businesses. It installs in a Windows server environment and gives you full control of what sensors you’d like to activate. If you’d like to test it out yourself you can download a 30-day free trial.

Angry IP Scanner

One of my favorite free tools is the Angry IP Scanner. It’s compatible with Mac, Linux, and Windows and allows you to quickly find detailed information about devices that are on your network.

Simply select an IP range at the top and let Angry IP Scanner work its magic. Almost instantly Angry IP will begin pulling information about the IP range you specified.

At a glance you’ll be able to see what IP addresses are open for assignment, taken by devices, and how many ports each device has open.

If you’re having trouble finding a device on your network, Angry IP Scanner makes it simple to track down that device for further troubleshooting.

Angry IP Scanner has personally helped me find devices that have lost their static IP address without having to physically go to the device.

What Determines Your Ip Address

If you’re looking to export and save your findings, you can easily download your results in CSV, XML, or text format. It is available as a free download.

Final Thoughts

No matter what size network you’re troubleshooting, understanding how to find a device’s IP address is essential.

Whether you’re quickly looking up the ARP table with the arp -a command, or utilizing a network tool like PRTG, having a solid grasp of what’s on your network will help keep all of your device safe, and yourself headache free.

We will begin by implementing Static NAT.

Static NAT is used to do a one-to-one mapping between an inside address and an outside address. Static NAT also allows connections from an outside host to an inside host. Usually, static NAT is used for servers inside your network. For example, you may have a web server with the inside IP address 192.168.0.10 and you want it to be accessible when a remote host makes a request to 209.165.200.10. For this to work, you must do a static NAT mapping between those to IPs. In this example, we will use the FastEthernet 0/1 as the inside NAT interface, the interface connecting to our network, and the Serial 0/0/0 interface as the outside NAT interface, the one connecting to our service provider.

Router(config)#ip nat inside source static 192.168.0.10 209.165.200.10
Router(config)#interface FastEthernet 0/1
Router(config-if)#ip nat inside
Router(config-if)#interface Serial 0/0/0
Router(config-if)#ip nat outside

Static NAT provides a permanent mapping between the internal and the public IP address. In our example the private IP address 192.168.0.10 will always correspond to the public IP address 209.165.200.10.

Dynamic NAT is used when you have a “pool” of public IP addresses that you want to assign to your internal hosts dynamically. Don’t use dynamic NAT for servers or other devices that need to be accessible from the Internet.

In this example, we will define our internal network as 192.168.0.0/24. We also have the pool of public IP addresses from 209.165.200.226 to 209.165.200.240 and our assigned netmask is 255.255.255.224. When you configure dynamic NAT, you have to define an ACL to permit only those addresses that are allowed to be translated.

Router(config)#ip nat pool NAT-POOL 209.165.200.226 209.165.200.240 netmask 255.255.255.224
Router(config)#access-list 1 permit 192.168.0.0 0.255.255.255
Router(config)#ip nat inside source list 1 pool NAT-POOL
Router(config)#interface FastEthernet 0/1
Router(config-if)#ip nat inside
Router(config-if)#interface Serial 0/0/0
Router(config-if)#ip nat outside

We used the same interface configuration as from our static NAT example. This configuration allows addresses in the 192.168.0.0/24 to be translated to a public IP address in the 209.165.200.226 – 209.165.200.240 range. When an inside host makes a request to an outside host, the router dynamically assigns an available IP address from the pool for the translation of the private IP address. If there’s no public IP address available, the router rejects new connections until you clear the NAT mappings. However, you have as many public IP addresses as hosts in your network, you won’t encounter this problem.

NAT Overload, sometimes also called PAT, is probably the most used type of NAT. You can configure NAT overload in two ways, depending on how many public IP address you have available.

The first case, and one of the most often seen cases, is that you have only one public IP address allocated by your ISP. In this case, you map all your inside hosts to the available IP address. The configuration is almost the same as for dynamic NAT, but this time you specify the outside interface instead of a NAT pool.

Router(config)#access list 1 permit 192.168.0.0 0.255.255.255
Router(config)#ip nat inside source list 1 interface serial 0/0/0 overload
Router(config)#interface FastEthernet 0/1
Router(config-if)#ip nat inside
Router(config-if)#interface Serial 0/0/0
Router(config-if)#ip nat outside

In this case, the router automatically determines what public IP address to use for the mappings by checking what IP is assigned to the Serial 0/0/0 interface. All the inside addresses are translated to the only public IP address available on your router. Routers are able to recognize the traffic flows by using port numbers, specified by the overload keyword.

The second case is that your ISP gave you more than one public IP addresses, but not enough for a dynamic or static mapping. The configuration is the same as for dynamic NAT, but this time we will add overload for the router to know to use traffic flow identification using port numbers, instead of mapping a private to a public IP address dynamically.

Router(config)#ip nat pool NAT-POOL 209.165.200.226 209.165.200.240 netmask 255.255.255.224
Router(config)#access-list 1 permit 192.168.0.0 0.255.255.255
Router(config)#ip nat inside source list 1 pool NAT-POOL overload
Router(config)#interface FastEthernet 0/1
Router(config-if)#ip nat inside
Router(config-if)#interface Serial 0/0/0
Router(config-if)#ip nat outside

If you feel sometimes works wrong in your configuration, you can always check the NAT translations and statistics with help of the show commands.
Router#show ip nat statistics

Total translations: 2 (0 static, 2 dynamic; 0 extended)
Outside interfaces: Serial0
Inside interfaces: Ethernet1
Hits: 135 Misses: 5
Expired translations: 2
Dynamic mappings:
— Inside Source
access-list 1 pool net-208 refcount 2
pool net-208: netmask 255.255.255.240
start 172.16.233.208 end 172.16.233.221
type generic, total addresses 14, allocated 2 (14%), misses 0

If you have to clear the NAT translation table, you can do it with clear ip nat translation.
Router#clear ip nat translation *
Router#show ip nat translations

Router#
When you begin to troubleshoot, first use the available show commands. If the show commands are not enough, you still have the debug. Careful when you use debug, because debug commands are using a lot of resource and you may end up disconnected from the router and being unable to reconnect.

An asterisk (*) next to NAT indicates that the translations occurs in the fast-switched path. The first packet of a connection is always process-switched, which is slower. The next packets go through the fast-switched path.

s=192.168.1.95->172.31.233.209 indicates that the source (s=) IP address 192.168.1.95 is translated to 172.31.233.209.
d=172.31.2.132 refers to the destination address.

[6825] is the IP identification number, which is useful for debugging and it enables correlation with other protocol analyzers.

What Determines My Ip Address

This concludes our lesson. The information found here and in the other two articles is everything you need to know for passing the Cisco CCNA exam. You can also use this information for implementing NAT in real-life, in your home network, or at your job.