LANs, IP, and TCP - A summary

This is a short overview of the three "primary" topics of this course. Read this
first, and then you can start working through the specific sections of Peterson &
Davie and you'll have some idea of where all this is going.
LANs, or Local Area Networks, are the "physical" networks that provide the
connection between machines within, say, a school or corporation. LANs are, as
the name says, "local", and so the IP, or "internet protocol" layer provides an
abstraction for connecting multiple LANs into, well, the Internet. Or smaller closed
"internets", as well. Finally, TCP deals with transport and connections and actually
sending data. These three topics are often called "layers"; they consitute the "link
layer", the "internetwork layer", and the "transport layer" respectively. Together
with the "application layer" (the software you use), these form the "four-layer
model" for networks. The LAN (link) layer is often split in two, forming a five-layer
model. If you've read about networks at all, though, you've probably encountered
the notion of the "seven-layer model". This was a standard developed by various
international committees, most notably OSI, and the extra two layers are mostly
wishful thinking. In the real world, there are only 4-5 layers.
LANs are complemented by "point to point links" that tie them together.
Sometimes the distinction between the two isn't too important; normally, when
you connect to an Internet Service Provider via a modem, your connection is
considered a point-to-point link. It would, however, be legitimate to view all the
ISP's links, and the box to which they all connect, as a single LAN; see "Links,
Nodes, and Clouds" in Peterson & Davie (p 5).
The primary LAN today is Ethernet, which comes in different speeds. The original
Ethernet ran at the then-absurdly-fast rate of 10Mbps, or about one megabyte
per second. So-called "fast Ethernet" runs at 100Mbps, and there is a 1Gbps
Ethernet available too (used, at this writing, mostly for backbones). In the early
days of Ethernet, a typical installation was one "physical" Ethernet; nowadays it is
standard to break a physical Ethernet up into multiple smaller ones with
"switches",
or bridges, that are active devices that forward traffic from one link to another.
The ultimate trend is for Ethernet to become a collection of point-to-point-only
links all tied together with switches, further blurring the distinction between LANs
and links. We'll see how all this works in the text; section 2.6 covers physical
Ethernet while 3.2 discusses switching.
A once-common alternative to Ethernet is Token Ring, which is actually a generic
technique that comes in a wide variety of flavors. IBM token ring is perhaps the
best known, and was once upon a time widely used in offices. It ran at 4Mbps,
later upgraded to 16Mbps. Token ring performs, in theory, much better under
heavy load than Ethernet, and so 4Mbps IBM token ring was heralded as ready to
take over from 10Mbps Ethernet. This didn't happen, for two reasons: first,
10Mbps Ethernet is actually about as fast as 6-7Mbps token ring; 4Mbps was a
distinct notch slower. Second, and probably more important, IBM's terms for
licensing token ring were decidedly more expensive than Xerox's terms for
licensing Ethernet; during one formative period in the early 90's a typical
Ethernet board cost about $100 and a typical Token Ring board cost $400 (today,
fall 2000, you can buy quantity-1 Ethernet boards for about $15, and they come
in bulk for as little as $5.) Token ring can interoperate with Ethernet, by the way,
through switches.
Another LAN alternative, this time with a radically different basis, is ATM, which
stands in theory for Asynchronous Transfer Mode. Because it is brought to you by
the telephone companies -- and was originally intended to combine data and
voice in one network -- and supports a central-office model of connection rather
than the fully "distributed" model for early Ethernet, some folks argue it really
stands for A Tariffing Mechanism. Another interpretation is, more bluntly, A
Terrible Mistake. You'll learn more about ATM in section 3.3; suffice it to say that

1

LANs work by allowing connected machines to send packets. IP works by providing two fundamental things. Nowadays we tend to see large "internetworks" as single "networks" themselves. bridged Ethernet can accomodate entire campuses of up to. the header contains various bits (literally) of LAN-specific and delivery-related information. Again. not surprisingly. Routing and addressing are fundamentally intertwined. in decimal. brand of LAN. which stands for Internetwork Protocol (or just "Internet Protocol". no more and no less. it wouldn't do alone until everyone switched. or who use the same brand of LAN as you use but between you and them there's some incompatible point-to-point link. We'll learn more about this division later. These addresses are 4-byte numeric quantities. LANs were the "networks". to other hosts connected to the same LAN. but at the time IP was created "internet" just meant "internetwork". the workstation on my desk has IP address 147. it provides an addressing scheme. How LANs keep track of addresses. for example. and until that time everyone would still run something else on top (that being IP. if an address on my LAN is the same as an address on your LAN. and how senders learn new LAN addresses. "Internetworking" means getting different brands and types of LANs (and links) to talk to one another. The main problem with LANs is that they are local. They often come with built-in size/scale limitations. we'll consider only The Internet in this course. for Ethernet. IP addresses are assigned administratively according to where the machine in question is connected to the network. so the LAN knows to where the packet should be delivered. separated by dots. There's also the issue of address uniqueness. below) to permit interoperation. section 2. Each host on the LAN has a unique address. but that it costs 10 to 100 times more than Ethernet. by which every host on the Internet can receive an address. then we can't directly interconnect without changing something even though both LANs should work just fine in isolation. Packet sizes are typically about 1Kbyte. or short messages. so as to provide a framework for routing. Even if ATM became cost-competitive with Ethernet. IP addresses are globally unique. Although private IP internets can and do exist. While IP addresses and LAN addresses play similar roles. IP is the protocol that ties all of the host of the Internet together. and "internetworking" just meant "inter-connection of LANs". the issue of scale is not clear-cut. whereby a packet sent from one host to another can be forwarded from one router to the next along a path to its final destination.5 for example.6. although ATM uses 48 bytes at the low end and there are others who feel that packets larger than 64Kbytes would be a good thing. The most important part of the header is a destination address. 100. IP provides a common abstract interface for sending a packet from one machine to another. and because of that there would be no incentive for everyone to switch. incompatible. at Loyola the first 16 bits 2 . A packet consists mostly of data. are "burned in" to Ethernet cards at the factory.2. LANs are seldom regarded as significant standalone entities any more. and even if they did not. well. there was no modern "Internet").000 users. they are in principle not related numerically. is one of the things you'll learn about in. across a wide range of hodgepodge intermediate LANs and links. although proponents claim it can replace the IP and TCP functionality as well. IP addresses are divided into two parts: the network address and the host address. Normally the four bytes of an IP addess are written individually. and hard-core ATM proponents claim that ATM can scale to support all the world's net traffic (but at a cost that makes this unlikely to say the least). known as IP addresses. IP All this brings us to IP. they are. say. there are people you'd probably like to communicate with who use some different. First. or forwarding.126. Ethernet LAN addresses. with a header attached to the front.ATM does work well as a LAN.

The router looks up Dnet in the table (generally there is a catchall default entry. The packet's IP header remains essentially unchanged. although the LAN destination address will be that of R. from router to router.) Let's start with the sending host S. until it finally arrives at a router that is connected to Dnet. The router first checks to see if it is on the same LAN as D. it gets a new IP address simply because it gets a new network address.126) and the last 16 bits denote the specific host at Loyola (2. If the answer is yes. (Machines can be both hosts and routers. but leaves the IP address. although the router most likely attaches an entirely new LAN header. the LAN is assigned an IP network address and then the host address bits are assigned by the LAN administrator.next-hop> tables will be a major topic itself. for that matter. and are not directly visible to users. Each host on the LAN gets different host bits. You can find further information in section 4. There's a sample routing table on pages 266 and 267.5 for my machine). Just how routers build their <destnet. It extracts the destination D. Now let's look at a simple example of how routing works. your router is at the other end of your modem connection. S's address). then the router consults its internal routing table consisting of a list of networks each with an associated next-hop address. and can do direct delivery. If. The IP header of the packet contains D's IP address (and. as above. If. however. Most ordinary hosts have only a single router to which they connect. which we'll denote by Dnet. (If there are multiple routers. but the routing is a "best-effort" mechanism. so the table doesn't have to be huge). Snet and Dnet don't match. Note that the IP destination address in the packet remains D in this case.1. In principle. which means packets can and do get lost 3 . on the other hand. The packet continues being forwarded like this. this network/host address allocation thus means that every host on the Internet has a unique IP address. It looks up (never mind how) the appropriate LAN address for D. This is done by looking at the network part of the destination address. The router strips off any LAN address from the incoming packet. is equal numerically to Snet).denote the network (147. Dnet is not one to which the router is connected directly. If a host moves to another LAN. and uses direct LAN delivery to get the packet to the corresponding next-hop machine. Next-hop addresses are chosen so that the router can always reach them via direct LAN delivery. making this choice very simple.4 on page 264. again using direct delivery over the LAN.) If you are a dialup user. with a single network connection) or routers (these do packet-forwarding only. generally they are other routers. every host on the same LAN has the same network portion of the address. S must determine whether D is on the same LAN as the sender or not. First of all. attaches a LAN header to the packet in front of the IP header. then S figures D is on the same LAN as itself. S looks up the best one using the router-table algorithm in the following paragraph. it is then delivered directly to D. then the router does direct delivery to the destination. delivering to a destination host D. Machines can be thought of as either hosts (user machines. and it serves as a "transport" layer for application data. S then forwards the packet to the router. recall that the router connects to at least one additional network besides the one for S. IP packets are sent from one host to another. Or you can just wait until you get to Chapter 4 following along in sequence. but this is tricky. and sends the packet straight to D via the LAN. then S looks up a router to use. and then looks at Dnet. TCP TCP stands for Transmission Control Program. If this net address is the same as S's (that is. and essentially always have at least two different network interfaces representing different networks that the router is connecting).

or 100KB at a time. although the realtime performance of TCP is not predictable and so sound/video types of applications tend to use something different. TCP is ubiquitous. and then sending the appropriate request for data (an HTML GET or POST request). data sent over that connection needs no further addressing  stream-oriented: The application can write 1 byte at a time. one wants to send to a given application running on that host. buffering. When you launch a web browser. 4 . Email and web traffic. and holds early-arriving out-oforder packets for delivery at the correct time. Finally. IP only supports sending to a specific host. that is. or two different peoples' web sessions. TCP will buffer and/or divide up the data into appropriate sized packets. it starts up by opening a TCP connection to your designated Home Page. Subsequent pages are also viewed by opening TCP connections to the appropriate host. and keeps track of which are lost and retransmits them after a timeout. The sending application has to keep track of division into packets.sometimes. Data that does arrive can arrive out of order. should not be commingled! TCP extends IP with the following services:  reliability: TCP numbers each packet. normally.  TCP supports connections  connection-oriented: Once a TCP "connection" is made.