- By William Stanek
Getting and using IPv4 addresses
As discussed previously, there are two categories of IPv4 addresses:
- Public. Public addresses are assigned by Network Solutions (formerly this was InterNIC) and can also be purchased from the IANA/ICANN. Most organizations don’t need to purchase their IPv4 addresses directly, however. Instead, they get the IPv4 addresses they need from their Internet service provider (ISP).
- Private. Private addresses are reserved for Class A, B, and C networks and can be used without specific assignment. Most organizations follow the private addressing scheme determined by their Information Technology (IT) department; in this case they request IPv4 addresses from the IT department.
If you are planning your organization’s network infrastructure, you must determine how you want to structure the network. In many cases you’ll want to isolate the internal systems from the public Internet and place them on their own private network. An example of this is shown in Figure 2-7.
Figure 2-7 Overview diagram for connecting a private network to the Internet.
In this example hosts on the internal network connect to a switch. The switch, in turn, connects to a router, which performs the necessary internal-to-external IPv4 address translation using NAT. The NAT router, in turn, is connected to a firewall, and the firewall connects to the Internet. If the internal network ID is 192.168.1.0/24, the internal IPv4 addresses range from 192.168.1.1 to 192.168.1.254 and all hosts use the network mask 255.255.255.0. After this occurs, the hosts might include the following:
- A router with IPv4 address 192.168.1.1 on the interface facing the internal network
- A manageable switch with IPv4 address 192.168.1.2
- Computers with IPv4 addresses 192.168.1.20 to 192.168.149
- Servers with IPv4 addresses 192.168.1.150 to 192.168.199
- A network printer with the IPv4 address 192.168.1.200
You can then determine the number of public IPv4 addresses you need by assessing the number of public Internet-facing nodes you need. In this example the NAT router needs a public IPv4 address, as does the external firewall. To be able to send and receive email, you’ll need an IPv4 address for the organization’s email server. To set up a public website, you’ll need an IPv4 address for the organization’s web server.
That’s a total of four IPv4 addresses (six, including the network ID address and the broadcast address). In this case your ISP might assign you a /29 subnet, giving you a total of six usable addresses. If you think you might need more than this, you could ask for a /28 subnet. However, keep in mind that you might have to pay a per–IPv4 address leasing fee.