Ed's podcasts

RSS feeds and podcasts created by Ed Nickel
are licensed under a Creative Commons Attribution 3.0
United States License
based on a work at cot.gbcnv.edu.
Creative Commons License



CIT 361: Week 7

DHCP & IP Address Autoconfiguration

To automatically receive new feeds and podcasts you can copy this link: http://cot.gbcnv.edu/~ed/class/cit361/cit361.xml to your RSS reader and/or your iTunes/mp3 software. If you prefer getting the new feeds and podcasts manually you can read these files directly as you are reading this one.

 

We need to start this lesson with a brief explanation of both the background and history of IP addressing. When ARPAnet and later the Internet first started there was no protocol for autoconfiguration and thus addresses were were assigned manually. But, from 1969 to the mid 1970s there were at most only a few 100 hosts connected to ARPAnet and its civilian successor NSFnet which later combined to form the Internet. So this was not a huge problem. However, even those few hosts scattered across a few dozen local networks were causing problems for conflict avoidance since no more than one device can use and IP address at any given time. The book does briefly mention the BOOTP precursor to DHCP and also Microsoft's attempt to have network nodes self-assign IP addresses with no need to a server using APIPA. All of these methods were an attempt to make network connected device configuration easier even before laptops and other mobile devices arrived on the scene causing even greater problems as users moved from one network segment to another.

Please remember, an IP address cannot just be chosen out of the blue for a device to interact properly with a network. Not only must IP address conflicts be avoided but devices on a network segment must use a common network ID, know the IP address of the router to gain access to other segments and the Internet, and also know the basics of a segment's size as determined by the subnet mask. In an IPv4 classful IP address the network ID is defined as the first octet of a class A IP address license, the first and second octets of a class B license, and the first, second, and third octets of a class C license. So on your home network which looks something like 192.168.0.x we see a class C license so 192.168.0 are the first 3 octets and therefore your home network's ID while the .x at the end represents host ID portion of that address and must be unique (from 1-254) so that no two devices on your home network segment have a common address but all can communicate with each other. Please note, the third octet on your home network can be anything from 0-254 but all devices on your network must use the same number in that position.

In IPv4 addressing there are a theoretical total of 2544, 4×109 or, 4,162,314,256 addresses possible world wide, but unfortunately a significant number of those addresses are reserved for special purposes such as routing, network masking, and other administrative purpose. However, lets assume for this discussion that we can connect about 4 billion hosts (devices) to the Internet. Think about your own Internet usage and the hosts you might use on it, a cellphone, a personal laptop, a Netflix connected TV, a computer at work, and a VM in the GBC computer lab for starters. This gives us 5 Internet hosts for each of you (of which some devices move around thus need multiple IP addresses during the day) and as you probably know there are about 8 billion people on Earth which means we would need at least 40 billion IP addresses if everyone has similar connectivity needs but we only have 4 billion addresses in IPv4. Do the math and you see we have a big problem that only gets bigger as each of us gets more devices such as tablets, additional entertainment devices, Internet connected homes with heating and A/C as well as appliances can be controlled via the Internet, cars with network connections for downloading updated GPS maps. and who knows what else is being developed.

I think you can begin to see why the book calls IP autoconfiguration "a TCP/IP network administrator's best friend," and I would agree because static IP address assignment, such as we did with our Raspberry Pi's a couple of weeks ago, and the scale of even a small network very quickly gets to be a big hassle, to put it politely. However, you can also see that we have another problem, because the number of IPv4 hosts exceeded the number of IP addresses back in about the year 2000 and in the last 14 years the need for IP addresses as exploded far beyond the original ARPAnet designers wildest dreams. Officially, the last unassigned block of IPv4 addresses was assigned in February 2011. Yet IPv4 is still the dominant IP addressing scheme in use on the Internet despite the initial work on its replacement, IPv6, back in 1994 and its formal introduction as an Internet protocol in 1999. IPv6 uses a 128 bit addressing scheme which results in a theoretical limit of 3.4×1038 (340 undecillion) addresses. Obviously, something much more robust than DHCP is needed.

Before going on let's look at something I said in that prior paragraph, namely that there were more devices using the Internet then there were IPv4 address way back in 2000, yet we all know that the Internet did not stop due to overuse and conflicting IP addresses 14 years ago. This is due to the use of NAT (Network Address Translation) and IP masquerading. Using this protocol we can have network segments that use the same addresses but but do not conflict. So, all of us in this class can use 192.168.0.x on our home networks without running into IP address conflicts. Most home routers have a pre-configured DHCP server built into them and the vast majority of those are set to use either 192.168.0 or 192.168.1 as their subnet ID. The range of class C IP addresses from 192.168.0.x to 192.168.255.x (as well as specific blocks of class A and class B licenses) are blocked from being routed on the Internet. However, the routers using the blocked addresses in homes and businesses also have a single fully routable IP address on their "Internet" side and they translate all requests for data via the Internet to look like they come from that single routable address even though up to 253 other devices in the non-routable segment are sharing that same router. We will not go into how this is done as that is not important in the context of this class.

At this point what is important to note is that there are potentially billions of devices connected to the Internet using NAT and IP masquerading that do not have unique IDs. Let's assume that a small fraction of these billions of devices are hacked and used by those hackers for illicit purposes. These hackers can then hide their operations from network traces behind oblivious user's networks and IDs. This has been happening for over a decade now and these networks of hacked devices are known as zombie networks doing the bidding of Internet criminals to attack major businesses (TJ Max, Target, Home Depot, and others in the last few years), banks (Chase and JP Morgan in 2014), government agencies, and even home users in an effort to find personally identifying information (credit cards, Social Security Numbers, etc) to sell to identity thieves. If you would like to get an idea of the full scope of this problem check Privacy Rights Clearinghouse which as of this writing in October 2014 lists 929,674,710 known data breaches in the United States alone since 2005. This is equivalent to more than 3 thefts of personal data for each person, regardless of age, in the USA.

I know I took a sidetrack concerning NAT and its potential abuses but as you are about to see this is relevant to DHCP. One of the major improvements in IPv6 is that DHCP can be done away with for many (unfortunately not all) Internet access purposes. If you think back to the beginning of this class you might recall that every "significant" network host has a unique MAC address. As you also read earlier in this post an IP address consists of both a network ID portion and a host ID portion and this is still true in IPv6 just that there are many more of them possible. For most purposes relevant to us, in IPv6 the router is given a network ID for the subnet that it routes and the hosts' MAC addresses are appended to this network ID to form the complete IPv6 address. Since the MAC addresses are unique world wide and the network IDs are fully routable we do not need DHCP, NAT, or IP masquerading thus the Internet criminals have a harder time hiding from attempts to trace them.

Furthermore, if you have a portable device, cellphone, table, laptop, etc. that moves from subnet to subnet in the course of the day, its host ID (MAC address) remains constant while their network IDs get re-assigned by the routers on the subnets to which they connect as needed for full Internet access. This becomes an elegant yet fairly simple, serverless, self-autoconfiguration, process with the added benefit of increased Internet security but with some loss of Internet anonymity.

The book justifiable describes IPv6 DHCP which I have seemingly downplayed here. This is required because there are more and more network connected devices that do not have MAC address. As manufacturers create and sell Internet connected devices that no one ever previously considered to make the so called "Internet of Things" many of these things have no MAC address and therefore we will still need some form of DHCP. (Note, these devices include everything from printers to light bulbs to children's toys to RFID tags to seemingly just about everything being made.) However, since these devices will (probably) not be used for full two way Internet data communications they do not need a MAC address but will still need an IPv6 address.

I think there is enough to think about in this week's lesson to cover discussion posts for the rest of the semester but we will have other topics in future lessons for those discussion. So, pick one or two things from this lesson that really standout for you to comment on.