Читать книгу Kali Linux Penetration Testing Bible - Gus Khawaja - Страница 58
IPv4 Private Address Ranges
ОглавлениеInternal IP addresses (aka private IP addresses) for IPv4 have multiple ranges: classes A, B, and C.
Class A: 10.0.0.0 to 10.255.255.255 or 10.0.0.0/8 (up to 16,777,214 hosts)
Class B: 172.16.0.0 to 172.31.255.255 or 172.16.0.0/12 (up to 1,048,574 hosts)
Class C: 192.168.0.0 to 192.168.255.255 or 192.168.0.0/24 (up to 254 hosts)
The biggest range is class A for corporations, but you can use it at home. (No one will stop you from doing that, and guess what? I use it myself for my home network.) The second, class B, is for small/midrange/big companies (depending on the number of hosts). The third is class C; this range is limited but is suitable for home users and small office/home office (SOHO) environments.
Let's take a quick look at our Kali host IP address. To get the information about our network interface, execute the popular ifconfig
command (take note that there has been a shift to use the ip addr
command lately instead of ifconfig
).
According to Figure 1.17, we have two network interfaces. The first one on the top, eth0
, is the Ethernet adapter that connects my Kali host with the internal network. If we had a second Ethernet adapter, it would be eth1
. (Take note that if you're using a wireless adapter on your host, then you will see wlan0
, wlan1
, etc.)
Figure 1.17 Kali Network Interfaces
There are two important facts to understand about our Ethernet adapter eth0
. First, inet 10.0.0.246
represents the Kali host IP address that was assigned automatically by the DHCP server. The second part is the netmask, which means that we're using a /24 subnet; in other words, we only need 254 hosts to be assigned on this IP range.
The second interface is lo
, which represents a local loopback; you will never touch this since the network infrastructure will need it to operate correctly.
There are two common other interfaces that you will encounter; the first one is the wireless interface if you're connected wirelessly instead of the wire. The second is the VPN interface, if you're connected to a remote VPN server.