TCP/IP
Transmission Control Protocol/Internet Protocol (TCP/IP) is the protocol suite of choice today. It, like other protocols suites, is used to allow local network devices to communicate over a network.
However, TCP/IP is used not only on LANs, but also over WANs and the Internet. Actually, TCP/IP is the only protocol suite in use on the Internet.
Note:
You’ll learn more about TCP/IP in Chapter 3, “TCP/IP Fundamentals.”
In the following sections, TCP/IP addressing, routing, interoperability, and naming concepts will be presented. This is a consolidation of similar information from other parts of the chapter
with a few additional points of interest.
Addressing
As mentioned earlier in the chapter, each host is given (either manually or automatically) a dotted decimal IP address in the format xxx.xxx.xxx.xxx, where xxx is a number from 0 to 255.
Note:
There are several addressing rules, which you will learn more about in Chapter 3.
Because addressing is a Network layer concept, the protocols that deal with addressing can be found at this layer. The Address Resolution Protocol (ARP) is responsible for resolving an IP
address to the MAC address of the receiving host. The MAC address is a Data Link layer address hard-coded to each network interface by the manufacturer. When a TCP/IP packet is sent, at some point a router will need to determine exactly which device the packet is intended for. On Ethernet networks, the router will use an ARP request broadcast. Any device that wants a specific physical
address will send an ARP broadcast on to the immediate link with the IP address of the interface for which it wants the MAC address in the packet header. The device whose interface has the
matching IP address will respond with its interface’s MAC address. Whenever a device sends an ARP request and receives a response, it notes that resolution in a table known as the ARP cache.
When a router receives packets and needs to send them to a particular device on one of its own segments, it examines the IP address of the destination, looks up the MAC address of that device’s interface using ARP, and forwards the packet via Ethernet to the intended destination.
Note:
You’ll learn more about ARP in Chapter 3.
Routing
On TCP/IP networks, routing is a fairly involved process. In order to send a packet through an internetwork (like the Internet), the router must have three pieces of information:
- The IP address of the sender
- The IP address of the destination
- The IP address of the next router to which the packet should be sent
The first two are part of the IP datagram being sent, but the router must figure out the last item itself. The router uses information it receives from other routers about what IP networks their interfaces are members of, as well as other networks they have learned about from their neighbors, in order to build a logical “map” of the network (called a routing table). Then the router can determine the best way to get the datagram to its destination and send the information on to the next router.
Routers build routing tables using dynamic routing protocols, such as RIP and Open Shortest Path First (OSPF), or by having static routes entered manually. The major difference between the two dynamic routing protocols mentioned is that RIP is a distance vector routing protocol and OSPF is a link state routing protocol. The difference between them is pretty simple. Distance vector protocols (like RIP) are used by routers to gather information about the hosts connected to them and to build a table of the addresses and the segment they are on (called a routing table). The router then sends out this information to all the routers it is connected to. All of the routers that receive this information add the route information to their own routing tables and continute to propagate them. Approximately every 30 seconds (varies depending on the protocol), distance vector protocol routers will re-advertise their entire routing table, with each interface having its own independent timer. Eventually, all routers in the internetwork know about
all the other routers and the networks they serve.
Link state routing protocols (like OSPF) work slightly differently. Whereas IP RIP routers will advertise their entire routing table every 30 seconds, a link state router will send out to its “neighbors” only the changes to its routing table, as they occur. Additionally, link state routers have a more directed relationship with their neighbors. Instead of blindly advertising all of their
information to their neighbors, link state protocols (like OSPF) prefer to more intentionally send updates only to a specific list of addresses via unicast or multicast.
Interoperability
Of all the protocols listed in this chapter, no protocol is more flexible or more interoperable than TCP/IP. As the Internet gained popularity, everyone wanted to “get on the Net.” As such,
almost every computer had to have two things: a web browser and some form of TCP/IP connection. Therefore, every computer that is connected to the Internet is running TCP/IP in one way or another. Many companies use the TCP/IP protocol suite to communicate with one another over the Internet. Additionally, because of this phenomenon, every operating system has some form of TCP/IP
protocol stack and, as such, can communicate with other operating systems on some fundamental level.
Naming
TCP/IP hosts are named according to the DNS convention. DNS is a service that resolves FQDNs to IP addresses. For instance, you can use friendly names like www.trainsolutions.com to refer to
computers instead of unfriendly IP addresses like 192.168.24.31.
There are two parts to a DNS name: the host name (e.g., www) and the domain name (e.g., trainsolutions.com). Each of these components is separated by a period. Typically, you would assign a host name that says what the computer’s function is (e.g., www for a web server). The domain name, on the other hand, is usually the name of the company in which the computer resides, or some related name, followed by .com, .edu, .net, or any other top-level
domain suffix.
Note:
You’ll learn more about DNS in Chapter 3.