| [ LiB ] |
From the beginning of history, communication has been an important part of human society. As important as communication has been, the mass distribution of communication through networks is only a recent development. Most early communication was accomplished through horseback riders carrying written messages.
NOTE
Latency
is a communications
The invention of railroads brought a major advancement in communications networks by facilitating the transfer of massive amounts of mail across the world. But communication was still inadequate. While the
throughput
of these
While masses of mail could be sent through railroad networks, it still took weeks for some pieces to reach their destinations, and this was unacceptable to many people.
In 1835, something amazing
The telegraph was
NOTE
It is a commonly held "fact" that
Samuel Morse invented the tele
graph, but there are conflicting
Even though communication in this manner had a low latency (tones were transmitted almost instantly), you can imagine that the throughput of this method of communication was very low. There were no machines back then to convert signals from Morse code to English, so people had to do it by hand.
The
NOTE
Alexander Graham Bell is
The telephone allowed people to encode sound data into an analog electrical pulse, which would then be sent down a wire, to the speaker on the other end (Figure 1.2). This method of communication was an incredible innovation, since with the direct interpretation of voice, communication could be accomplished without people encoding and decoding Morse code. This greatly improved the throughput of the communications, because voice data could now be transmitted in real time.
This method of communication only increased people's
NOTE
Both the telegraph and the tele phone supported two-way communi cations, which Figures 1.1 and 1.2 do not show, for simplicity's sake.
Peer-to-peer networking
connected many telephones to many other telephones. Alexander Graham Bell was a major proponent of this kind of network, and it worked well for small networks. Basically, every node in a peer-to-peer network is physically connected to every other node in the network through wires. This gets to be a major problem as the number of nodes grows, because, as you can probably see, the number of wires needed in this kind of network
|
Nodes |
Wires |
|---|---|
|
2 |
1 |
|
3 |
3 |
|
4 |
6 |
|
5 |
10 |
|
10 |
45 |
|
15 |
105 |
|
500 |
1,225 |
The number of wires needed in a peer-to-peer network follows this formula: ( n * (n-1) )/2. So you can see that any network that gets past a certain size is in the realm of being completely unmanageable.
Because of this, the concept of a centralized communications network was invented, and its implementation was called a circuit-switched network . This kind of network contains any number of nodes and one central switching station , arranged as shown in Figure 1.3.
Since only one conversation could be
There was a human
operator
at the switching station, who
So, with this network, a total of two conversations can be held at the same time, and any single node can talk to any other node, as long as the line is
When a person wanted to call someone at his local switch, the same procedure was followed. When a person wanted to call someone on another switch, the operator connected the person to the operator on the desired switch, and that operator connected the person to the right destination. Each switch had only a certain number of wires connecting it to other switches, and that limited the number of connections that could be made from switch to switch. For example, a switch may have 16 nodes, which allows up to eight
intra-switch
connections at once, but it may have only four wires connecting to an adjacent switch, which means that only four
NOTE
The terms intra and inter refer to "internal" and "external" respec tively. So inter-switch refers to connections between two nodes on one switch, but intra-switch refers to connections of nodes that are on different switches.
Eventually, each switch in the United States was numbered with its own area code, and this led to our current area code system.
It didn't take long for these networks to become such huge messes of wires that it was difficult to make connections. Therefore, an even more centralized system was created. The switches were given centralized switches, sometimes called hubs . Figure 1.6 shows one of these networks.
Traditional circuit switching was great, but it had too many limitations for our growing communications needs. Since traditional circuit-switched networks were so centralized, the main hubs could go down, and half of the communications in the country would instantly be halted. Only one line could be in use at any given time, limiting the number of concurrent connections drastically. There also came a time when it took about seven to eight minutes just to go through all the operators to connect to someone else on the network.
In the 1960s, the United States
Advanced Research Projects Agency
(
ARPA
) invented the first
packet-switched
network. The idea of such a network is to separate data into tiny
In this type of network, instead of only one connection per wire, special machines at the end of each wire accept discrete chunks of data (packets) and send each
Whenever a node has data to send, it puts that data into a discrete-
This kind of network is a great improvement, because it drastically
Since data packets had to be in a form that the routers could understand, and the routers were
digital
computers, it made sense that they would send digital data. Unfortunately, data sent over a wire is
analog
by nature, so the digital data needed to be turned into an analog signal using a device called a
NOTE
Bandwidth is a networking term that generally describes how much data can be sent through a network. In the traditional sense, bandwidth refers to the size of a signal. For example, telephones have 3,000 Hz of bandwidth, from 400 Hz to 3.4 KHz. Telephone wires are not rated to send data above or below those thresholds. AM Radio broad casts use about 10 KHz of bandwidth each, FM Radio broadcasts use about 200 KHz, and VHF/UHF TV broad casts use 6 MHz of bandwidth. Most people, when dealing with packet-switched networks, refer to their throughput as bandwidth as well.
NOTE
Baud
is an old term,
Over the
NOTE
Eventually, all land-based copper wires will be
NOTE
Communications
Broadband communications originally referred to cables that carried more than one type of data at the same time. The first types of broadband included Digital Subscriber Line (DSL) and cable modem technologies. However, the term now generally applies to any Internet communications that are faster than traditional modems, which are limited to 56 kilobits per second.
DSL lines are essentially an extension of the standard telephone lines to your house. While telephone wires are not
officially
supposed to handle data above 3.4 KHz bandwidth, most new telephone wires actually can handle that kind of data. Therefore, digital data can be encoded into an analog electrical signal above 4 KHz and transmitted to the phone company without disrupting the normal phone conversation. The most popular DSL variant is
ADSL
(the "A" stands for
asynchronous
, because it
Unfortunately for me, DSL technology came too late. The year before DSL was standardized, my telephone company installed a digital switch in my neighborhood that encoded the telephone data into a digital stream of data and sent it to the phone company via a fiber-optic cable, ignoring any data outside of the standard telephone range of 400 Hz to 3.4 KHz. Therefore, DSL cannot be used in my neighborhood because the phone technology is too advanced for DSL. Talk about irony!
Cable modems work in a similar way to DSL, except they use the unused bands of the coaxial cable that goes into your house, instead of your telephone line. Cable modems typically use the band of 5 MHz to 65 MHz for upstream data and 850 MHz to 1000 MHz for downstream data. Cable modems use much more bandwidth for their signals, because coaxial cables are typically a lot longer than telephone cables, and signals on them are weaker.
The Internet is a very cool thing, but I'm sure you already knew that. I want to show you how packets actually work, so you can appreciate even more how wonderful the Internet is.The basis of the Internet lies in the Internet Protocol ( IP) . This protocol was invented in 1981, which really wasn't that long ago in the grand scheme of things.
The whole idea of the IP protocol was to define a standard method of communication among routers, switches, and nodes on a network. Basically, every chunk of data that is sent is prefixed with a header , also known as the IP header . Two versions of IP exist today: IPv4 and IPv6.
Figure 1.8 shows the standard layout of an IPv4 header.
The v4 means
version 4
. IPv4 is the current IP standard across the world, but there is a
You don't have to understand all the little details of the header; they're really important only to network engineers. I'll go over the important points, though.
The first thing you should know is that the length of the header is variable. Everything up to the Options parameter (bottom row of the figure) is set in stone, but the Options parameter is variable. That is why there is a parameter that holds the length of the header (the Header Length parameter); any data past the header is the data stored in the packet.
The Total Packet Length parameter describes the entire length of the packet, in bytes, including the header. Since it's 16 bits long, an IP packet can be at most 65,535 bytes long.
The Time To Live (TTL) parameter is particularly interesting; it determines how long, in
The Protocol parameter determines which protocol is being used on top of the IP header. Only a few kinds of protocols
Transmission Control Protocol (TCP)
User Datagram Protocol (UDP)
I describe these protocols in more detail later on. The Header Checksum parameter is an important data integrity measure in IPv4. A
checksum
is a value that represents the data and is computed by a checksum algorithm. The checksum is a simple measure that verifies if data has been changed in the transmission. Whenever a router receives an IP packet, the packet's checksum is calculated and compared to the existing checksum value in the packet. If the numbers match, you can be reasonably certain that the data has not changed; if the numbers don't match, you know the data was somehow changed by an error or interference in the communication
Finally, the two most interesting
NOTE
Under the old addressing system,
organizations such as the University
of California At Berkeley were given
more IP addresses than the entire
country of China. You can see how
the old system just isn't going to
work anymore,
The original Internet addressing scheme
Using 32-bit addresses limits the number of total nodes on a network to a little more than 4 billion, which used to seem like a large number, but it seems smaller and smaller every day. There are already many more than 4 billion people on this planet, so giving every person his own IP address is not even possible anymore. This was the major concern for upgrading the system to IPv6, which I will touch on next.
IPv6 was created in 1995, when the Internet community realized that IPv4 was too constrained. The biggest problem, by far, was the small address space allocated to IPv4. As I've said before, 4 billion addresses is simply not enough to identify all the computers on the planet now or in the future. Most large ISPs dynamically assign an IP address to a customer when he logs on and reuse that number for another customer once he logs off. This method isn't useful anymore, as most people are starting to realize the importance of permanent Internet addresses. How would you like a phone number that changed every day? In addition, as broadband connections are becoming the standard, more and more people are staying online longer and longer, making dynamic IP allocation less
And finally, there are going to be thousands of devices in the future that will need their own IP addresses. IBM has even
Besides the larger address space, IPv6 has a host of new features making it more streamlined and functional, and even better security features have been added. However, if you're interested in those features, you should get a networking book, because this stuff isn't that important to game programming.
Figure 1.9 shows a diagram of an IPv6 header.
IPv6 has been simplified, and the rarely used portions of the IPv4 header have been removed. The other big change is the huge addresses; IPv6 addresses are 128 bits long. That means that there are a total of 3.4x10
38
addresses available. That's 340 undecillion addresses, and when you haven't even heard of a number before, that means you've got enough addresses. But to further illustrate my point, I'm going to show you some more pointless calculations that
NOTE
The surface area of the earth, water
included, is 5.1
x
10
14
At any rate, there should be enough addresses for at least the next few hundred years, so we'll let programmers find more addresses when the time comes. For now, there are places on the Internet where you can obtain a block of a few millionor even billion IPv6 addresses.
The rest of the fields of an IPv6 header are pretty much the same as the important fields in IPv4, with updated
| [ LiB ] |