Here are some basics to layering, IP and Ethernet, and how it all works.
Every engineer working with media these days should understand the basics of network addressing, and most of them do. But, network addressing is one of those simple things that quickly grows much more complicated once you really start thinking about it. For example, here are some questions: How do Ethernet addressing and IP addressing relate? Why are the network addresses 192.168.1.nnn and 10.0.0.nnn very common? Why is 255.255.255.0 always entered for a network mask? Is there ever a reason to enter another number?
Let's begin with the difference between Ethernet addressing and IP addressing.
Many years ago, when programmers wanted to write a program that made use of a connection between two computers, they would not only write the application they were concerned with, but also they had to write low-level code to access the networking hardware. I once worked on a project to develop one of the first network-based automation systems where network drivers were an integral part of the application. If the network card changed, the automation system program had to be rewritten.
This approach worked, but it created a monolithic program that incorporated all of the nuances of a particular networking card into the application itself. Clearly, this was not an optimal situation and left something to be desired. Instead, application programmers needed something that would isolate them from the rapid changes that were occurring in networking technology. Eventually, the solution came in the form of a layered approach to networking.
Figure 1 shows a simplified version of the ISO 7 layer network model. Layer 1 describes the network hardware — the characteristics of the data transmitters and receivers, for example, whether the network is optical, wireless or wired. Layer 2 describes how to organize bits to be sent over a particular network — Ethernet, ATM or Token Ring, for example. Layer 3 deals with organizing groups of computers into discreet networks and how computers on those networks are addressed. Protocols operating at Layer 4 format data from an application into datagrams and can provide the ability to recover data under error conditions.
The layered approach allowed engineers to change hardware at Layer 1, and replace the software drivers at Layer 2 without having to completely rewrite the application using network services. As we will see later in this article, the division between Layer 2 and Layer 3 allow designers to organize computers into logical groups.
Ethernet vs. IP
The Ethernet specification defines behavior at both Layer 1 and Layer 2. Therefore, it is both a network protocol and a hardware specification. The hardware specification lays out the electrical signals and voltages on the wire (or the RF transmission scheme in the case of wireless), physical connections, timing signals and so on. It also describes the way Ethernet packets are built and what is contained in Ethernet headers.
Two important pieces of information in the Ethernet header are the source and destination Ethernet addresses. Ethernet addresses are permanently associated with a physical device; they are similar to a Vehicle Identification Number which is used to uniquely identify a particular automobile. Ethernet addresses are sometimes referred to as Media Access Control (MAC).
In Ethernet applications, each card is given its own unique 48-bit MAC address. This address is permanently assigned to the card when it is manufactured. (Security note: In some cases, this address can be changed or spoofed.) The MAC address takes the form nn:nn:nn:nn:nn:nn, where nn can be either a number or letter from “a” to “f.” An example of a valid MAC address is 00:09:6b:8d:79:96.
The IEEE assigns blocks of MAC addresses to a manufacturer. Within that block, it is up to the manufacturer to ensure that each address it assigns is unique. So, the MAC address above can also be written IBM_8d:79:96 because IBM has been assigned the block of MAC addresses beginning with 00:09:6b. Layer 2 Ethernet addresses provide positive identification of a particular computer, but they (usually) cannot be changed and provide no way to organize computers into groups or networks. In practical implementations, the MAC addresses of computers in an engineering department will be entirely random.
For a router on the network to know whether a particular packet was destined for a local computer or for a computer on the Internet, that router would have to store the MAC address of every computer both locally and on the Internet — an almost impossible task. Therefore, while Ethernet addresses uniquely identify a specific computer, they can't be routed, meaning that, from a practical standpoint, you cannot use Ethernet addresses to contact computers over the Internet.
The solution to organizing computers into groups or networks is provided by Layer 3 of the ISO model. In this layer, machines are identified by a user-configurable network address (an IP address). IP addresses are written in “dot” notation, with four numbers between 0 and 255, separated by periods — for example, 127.0.23.41. An engineer can assign a group of computers to a logical network, sometimes called subnet, by assigning the computers' addresses within the subnet range — for example, 127.0.23.0 to 127.0.23.254 with a subnet of 255.255.255.0. Layer 3 allows the network designer to clearly identify a group of computers that belongs together. It also allows routers and switches to forward packets from one switch to another without having to know the exact location and route to the destination computer.
Getting an IP
If MAC addresses are assigned by the IEEE, where does an IP address come from? The answer depends on its intended use.
If you are building your own private network, you are free to assign your own IP addresses. RFC 1918 defines IP addresses for “private networks.” As Table 1 shows, this easy-to-read document sets aside three “blocks” of IP addresses for use inside a facility. The IP addresses we use and the subnet we select will depend upon the number of PCs and network devices we plan to install.
It is important to note that private IP addresses are “unroutable,” which means they can never be used on the public Internet.
We have answered the question of how you get private network addresses, but how do you get a public address? The short answer is that you get this address from your ISP. But, where does the ISP get its addresses?
IP addresses are assigned by the Internet Corporation for Assigned Names and Numbers (ICANN). Many years ago, an individual could have applied for a public IP address. These days, it is impossible for any single individual to get a public IP address. The only practical way is through your ISP.
|Starting address||Ending address||CIDER notation|
How Ethernet and IP relate
In 2012, it is obvious that IP traffic riding on Ethernet networks is the dominant networking technology. But, in the early days of network development, many transport options besides Ethernet existed, and it was not at all clear which one would win. In fact, ATM and Token Ring are still in use today. Like Ethernet, both of these Layer 2 protocols can carry IP traffic. The beauty of IP is that it allowed network designers to assign addresses and logically group computers together regardless of whether the underlying transport was Ethernet, ATM, Token Ring or any one of a number of Layer 2 and Layer 1 technologies that were vying for adoption in the 1970s and 1980s.
The separation between Layer 3 and Layer 2 allowed network engineers to change the underlying network transport without having to alter the logical grouping of computers on the network.
Brad Gilmer is president of Gilmer & Associates, executive director of the Video Services Forum and executive director of the Advanced Media Workflow Association.
Send questions and comments to: email@example.com