Finding the IP Range of a LAN
Here’s how to quickly know the range of possible IP addresses available on your local area network, say, for example at home or work.
But First …
Step by Step
ifconfig to determine your current IP.
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: wlp2s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000 link/ether 9c:b6:d0:8e:4a:57 brd ff:ff:ff:ff:ff:ff inet 192.168.1.49/24 brd 192.168.1.255 scope global dynamic noprefixroute wlp2s0 valid_lft 86313sec preferred_lft 86313sec inet6 fe80::b3d:1c36:1076:c559/64 scope link noprefixroute valid_lft forever preferred_lft forever
Ignore the loop back
lo network interface.
You are looking for one what starts with
w if you are on wireless or
e if you are connected with a wire.
Look for the
inet stuff. Usually it will have
/24 at the end.
Here is the same thing with
ifconfig (for those older computers).
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 inet6 ::1 prefixlen 128 scopeid 0x10<host> loop txqueuelen 1000 (Local Loopback) RX packets 6509780 bytes 827568296 (827.5 MB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 6509780 bytes 827568296 (827.5 MB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 wlp2s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 192.168.1.49 netmask 255.255.255.0 broadcast 192.168.1.255 inet6 fe80::b3d:1c36:1076:c559 prefixlen 64 scopeid 0x20<link> ether 9c:b6:d0:8e:4a:57 txqueuelen 1000 (Ethernet) RX packets 5796526 bytes 7642151412 (7.6 GB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 1042047 bytes 210715310 (210.7 MB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
Again we are looking for
Once you have the IP address you can safely infer what your range is.
192.168.1.* is the most common. Each of the four numbers ranges from
255. But if you were to look at all the IP numbers of the devices on your network you will see that the first three numbers are always the same. Only the last one changes. (That’s what the
/24 is all about, but that is for a discussion another day).
255 has special meaning and is usually reserved.
When your devices sends a packet to
192.168.1.255 it is actually sent to every device on the network. This is called a broadcast is should be reserved for specific things that need it.
1 is almost always assigned to your main router. This is important because you can use it to connect to your router in order to make changes and stuff. So memorize this IP:
If you have any IP address that begins with
10. you are dealing with a much larger network that can have possibly thousands of devices on it. In such a situation the number of devices depends on how your network administrators have designed your network. The
.255 address is still, however, usually used for broadcasting.