{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}


Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: UCSD DEPARTMENT OF COMPUTER SCIENCE CS123 Computer Communications: Lecture 1, Overview and Layering In this rst lecture, I hope to provide a very quick overview of all the networking lectures we are going to study in this class. I do so because when I study things I nd it much easier to rst see the big picture sketched in outline before I proceed to understand the detailed drawings of each of the gures in the picture. This is particularly important because I will use a bottom-up traversal of networking topics. In particular, I will start with the most unfamiliar topicsto CSE majors: sending bits over a wire using energy. When you are struggling to grasp the arcane details of how noise a ects the maximum bit rate of a modem Shannon limit, it may help you to realize that this is part of sending a group of bits over a single hop, which is part of sending a group of bits between two ends of a network, which in turn is used to send arbitrary data across the Internet using say the web. Thus in this lecture I will use a very quick broad-brush, top-down traversal of networking functions corresponding to the rst two lectures followed by a more detailed bottom-up traversal in the remaining 18 or so lectures. While I hope this overview will provide you with enough material to have some idea about how say email or a web page moves across the Internet, I also hope to convince you that there are many hard and interesting issues that I have glossed over. The study of these remaining issues will occupy our attention for the remaining 18 lectures. 1 Increased Productivity via Layering The best way to understand the structure of networks is to see it like an onion composed of several layers or onion skins, and to understand brie y what each layer does. Before we do so, it may help to understand that layering is just a manifestation of a very universal idea: division of labor. So please be patient with this brief digression into philosophy. In the business world, we hear the buzzword outsourcing all the time. Business pundits urge companies to concentrate on their core competencies and to outsource other functions to others who can provide this function more e ciently. Similarly, any study of history shows that civilization as we know it only took place when society invented the concept of division of labor. While Paleolithic man spent all his time on hunting and Neolithic man on growing food, today only a small percent of the U.S. is actively engaged in growing food. This frees up the rest of us to engage in various specialities e.g., make movies, teach classes, attend classes, design wireless chips that allows society to be more productive as a whole. Computer systems have taken the outsourcing and division of labour mantras quite seriously. Even if the same group of people have to solve a big problem, computer scientists like to break up a big problem into manageable pieces, using what they call divide and conquer. They then solve each smaller problem in turn and combine the results. Thus to sort a large array, we break up the array into 2 equal parts, recursively sort the parts, and then merge the two sorted subarrays. Similarly, in your home PC, you may run Quicken's Turbo Tax, which runs on top of Microsoft 1 Windows, which runs on top of a Dell PC, which in turn consists of a board that has chips made by Intel and others. The PC illustrates a particularly interesting form of division of labor that we call layering. In layering, a hierarchy of software and hardware layers interpose between the raw hardware and the nal user, with each layer improving upon the services of the next layer below to o er a superior service to the next layer up. For example, the Windows Operating Systems abstracts the details of the Intel processor, the disk and display features etc., by a series of services presented in a so-called Application Programmer Interface API. This enormously increases the productivity of the Application Programmer writing Turbo Tax because the Windows programming interface is much simpler to deal with than the details of the raw hardware. However, the end user deals with a point-and click interface that is even simpler than the Windows API. Thus each layer improves the services" of the layer below by o ering a simpler and more functional interface to the layer above. Simple interfaces allow increased productivity not just for the end-user but for each group of people that work on implementing a layer. For example, some people feel that its easier to develop application programs for Unix than for Windows because of the simplicity and orthogonality of the UNIX API. In summary, the PC takes complicated chips with esoteric interfaces such as MOV R, P5" e.g., Pentium instruction that only a nerd like you and I can follow, and reduces them eventually using a series of layers to a simple point-and-click interface to Turbo-Tax that anyone can master in minutes. All computer systems such as operating systems and databases attempt to pull o the same magic. In this class we will study how the various network layers take a collection of physical channels that can send energy that only nerd like us can understand and put them together to make a Web interface that anyone can understand. 2 From Hats to Networking Just to show you that there is nothing particularly clever or innovative about the way networking is structured, let me start with a hypothetical structure for how hats may be shipped between countries in the real world. I will then show that the hat transfer structure has a direct one-to-one analogy with the way networks are structured. The analogy introduces a new idea that you may not have seen in PC or OS layering | distributed layers with communicating peer layer entities. The analogy also suggest other areas of interest and potential problems that occur in real life and may carry over to networks. Thus in Section 2.1, I describe the Hazel's Hats structure. I move on to describe the corresponding Internet structure in Section 2.2. I end this section by doing a more careful analysis of the similarities and di erences between hat and data transfer in Section 2.3. 2.1 Transferring Hats using the Postal System Figure 1 shows the layered structure of a hat transfer application that wishes to transfer hats, on demand, between the Hazel's Hats store in Boston and the Hazel's Hats factory in Morocco, Africa. The two Hazel's Hats entities are shown at the top of the picture. The basic problem to be solved is to transfer hats from the factory in Africa to the store in Boston, whenever requested by the 2 HAT TRANSFER ANALOGY "A Plumed Hat, Please" HAZELS "3 HATS BOSTON Shipments of Plumed Hats" "Check Inventory" HAZELS MOROCCO BIGWIG IMPORT EXPORT "Did shipment arrive?" "Whoa, too fast" BIGWIG MOROCCO BOSTON POST OFFICE RIO POST OFFICE MOROCCO POST OFFICE VARIG AIR (LOGAN) Airline VARIGB.S. CASABLANCA RIO RIO Balloon BALLOON STATION Figure 1: Transferring Hats from Morocco to Boston via a hierarchy of subcontracts store in Boston. How should this problem be solved? Concentrating on core competencies selling and manufacturing hats, Hazel's decides to outsource the actual transfer process to an import-export agency called Bigwig.1 . Bigwig imports and exports things for various companies. Bigwig is an expert in packaging and breaking up large consignments into smaller packages that can be shipped easily; for example 100 hats may be packed into 50 hatboxes. Bigwig also keeps track of package deliveries, ensuring that any lost or missing packages get tracked down and possibly resent. Bigwig also understands the formalities of moving between countries such as customs. Again concentrating on core competencies, Bigwig feels no compulsion to physically ship the packages itself. After all, there are other agencies such as the global mail system, UPS, FedEx etc. After some inspection of alternatives, Bigwig chooses the postal mail system. Please note that although Bigwig does not physically ship packages, Bigwig does add value" in terms of reliability, packaging, dealing with customs etc. If a layer does not add value in the networking or business world, we might as well dispense with that layer. The interface to the post o ce is a simple one. Any hat package that needs to be sent from Bigwig's in Morocco is labeled with the address of Bigwig's in Boston, and the necessary postage is paid. The biggest value-add" of the postal service is to compute a route from Morocco to Boston, and to update this route in case of failures | say, a bomb threat closing some airports. Once In case you wondered, the names are from a wonderful book about a rabbit society responding to challenges called Watership Down by Richard Adams 1 3 the route is chosen, the package is forwarded from post-o ce to post-o ce on the route. Thus in Figure 1, the package is forwarded from Morocco to Rio De Janerio in Brazil, and from there to Boston. This indirect route may be chosen, for example, because there is no direct route from Morocco to Boston. However, to forward a package from say Morocco to Boston, the Post O ce needs an actual physical carrier that can bridge the distance between the two countries. Rather than provide this service itself, it can subcontract to other carriers. For example, in Figure 1, the Post O ce has chosen to subcontract rst to say Bob's Balloon service from Morocco to Rio, and then to say Delta Airlines from Rio to Boston. Finally, the carriers on each hop use actual physical technology i.e., balloons, planes to actually carry the packages as scheduled by the carrier. The choice of technology used at each hop can depend on the characteristics of the technology: for example, balloons may be convenient because they allow access to remote areas without a landing strip. Back to layering, the layers in the Hazel's Hats structure are Hats, Import-Export, Post O ce, Carrier Logistics, and Carrier Technology. One interesting aspect of the layers in Hazel's Hats which is not present in say the layers of a PC is that the layers are distributed. The people implementing each layer are distributed at di erent locations and must communicate with each other to synchronize the transfers. For example, the Hazel's Hats in Boston may need to send a request to the factory in Morocco for One Dozen Plumed Hats". The two Bigwig locations have to communicate to talk about inventory problems and to acknowledge the receipt of packages that have been successfully shipped. 2.2 Transferring Email using the Internet Figure 2 shows a corresponding picture for how email is transferred across the Internet from say a PC in Boston to a PC in Paris. The corresponding Internet fragment connecting Boston and Paris is shown in Figure 3. First, corresponding to the Hazel's Hat concern distributed in Boston and Morocco, we have a corresponding email program 2 that has a piece of client software in the Boston PC and some server software in the Paris PC. The basic problem to be solved is to transfer an email message saying say Hi Marcel" from say Boston to Paris. How should this problem be solved? Concentrating on core competencies understanding email protocols and features, allowing mail forwarding, aliases etc., the email protocol decides to outsource the actual transfer process to a transport protocol. The most common one used in the Internet is the so-called Transmission Control Protocol TCP. TCP ships data reliably between computers on the Internet on behalf of several application protocols e.g., web, email, FTP. Like Bigwig, TCP must often break up large groups of bits e.g., a huge email attachment into smaller segments that can be shipped through the Internet. This is because the default maximum segment size or MSS used in the Internet is quite small used to be 512 bytes but is now 1500 bytes, much smaller than some application messages. TCP also keeps track of segments that have been delivered, retransmitting missing segments if necessary. Just as Bigwig relied on the Post O ce, TCP does not send out segments itself but relies on 2 in general in place of email, we will have a networking application such as FTP or the web 4 MAIL: POE TO PROUST "Hi, Marcel" POE’S MAIL PROGRAM " New mail" MARCEL’S MAIL PROGRAM POE’S TRANSPORT "Did message arrive?" "Whoa, too fast" MARCEL’S TRANSPORT PROGRAM PROGRAM POE’S ROUTING PROGRAM BOSTON ROUTER MARCEL’S ROUTING PROGRAM ETHERNET ETHER SAT. SATELLITE D.L. I/F I/F D.L. Satellite BOSTON Ethernet Figure 1. Figure 2: Transferring Email using the Internet via a hierarchy of networking layers. Compare this picture carefully with the packet-switching abilities of the Internet Protocol IP. While there are other packet switching protocols such as ATM, Appletalk, Novell Netware etc., IP is by far the dominant protocol. The interface to IP is a simple one. Any segment that needs to be sent from the TCP in Boston is labeled with the destination IP address a 32-bit number instead of a street address as in the post o ce case of the destination workstation in Paris. Again as in the case of the Post O ce, the biggest value-add" of IP is to compute a route from Boston to Paris and to update that route in case of failures | say, a failure of the satellite link from Boston to Paris. Once the route is chosen, the packet3 is forwarded from router to router on the route. At this level of approximation, a router is physically a computer with attachments to multiple links that behaves like an automated post-o ce. Thus in Figure 2, the packet is forwarded to a local router in Boston, and from there directly to the nal workstation in Paris perhaps because that is the shortest route. However, to forward a packet from say the Boston workstation to the local router in Boston, the Post O ce needs an actual physical channel that can bridge the distance. Rather than provide this service itself, it can subcontract to other Data Links that are analogous to the local carriers in Figure 1. For example, in Figure 2, the local Boston network has chosen to use an Ethernet local area network to link local workstations to a local Boston router. Also, the local domain in Boston has chosen to use a transatlantic Internet Service Provider ISP that uses a satellite link from Boston to Paris. The choice of technology used at each hop depends on the characteristics a segment together with an IP header is called a packet; do not confuse the word packet" with our earlier analogy package" 3 5 MAIL FROM BOSTON TO PARIS W/S PARIS Satellite W/S Ethernet BOSTON Figure 3: Internet fragment linking Boston and Paris to send email. The box called a router can be considered to be an automated post-o ce that routes packages of bits that we call packets. of the technology: for example, satellite is convenient because it allows access without requiring a wired infrastructure, while Ethernet wires are cheap for small distances. Back to layering, the layers in the Internet structure are Application Program, Transport e.g., TCP, Routing e.g., IP, Data Link e.g., Ethernet, and Physical e.g., thin Wire Ethernet or RF satellite channels. As in Hazel's Hats, the layers are distributed. The software or hardware implementing each layer are distributed at di erent locations and must communicate with each other to synchronize the transfers. For example, the TCP programs in Paris and Boston may have to synchronize so that segments are not dropped because of lack of bu ers called ow control. Also, the routing layer software in the PCs at Boston and Paris and the router in Paris need to communicate to calculate routes. 2.3 Hats versus Email: A Closer Comparison Section 1 is a reasonable metaphor for understanding Internet transfer as described in Section 2.2. However, any analogy, metaphor, or parable is only partial. For example, when Jesus tells his followers to be like doves in the New Testament, he is clearly telling them to be as gentle as doves and not to grow wings. So what are some interesting di erences in the Internet not captured by the Hat Transfer analogy? 6 First, in Figure 1, we said that Bigwig may handle other issues such as customs. While we don't have tari s on Internet exchanges yet, we do have security issues such as authentication to make sure the right people access the right services. Also, just as an import-export agency seals a package to ensure no tampering or peeking, computers may choose to encrypt or cryptographically seal their packets. TCP today does not do this; such services are often provided in an interposing security layer between the application and TCP. Another interesting di erence at the transport layer is as follows. It is really easy for TCP to deal with losses by retransmitting a stored copy of the segment. Its much harder for Bigwig to replicate a real package containing say cookies! without asking the user to do so. Second, in the post-o ce in Figure 1, the interface required letters to be addressed and postage paid. Today, accounting in the Internet is more like paying a xed rate e.g., $22 per month to AOL for sending an unlimited amount of postal mail. While this seems unthinkable in regular mail, it has sort of worked because of plentiful bandwidth in the Internet. However, many pundits feel that some form of usage based accounting as in electricity, postal mail is inevitable. What form it will take is anybody's guess. It could be in the form of electronic cash payments similar to stamps, but it could also be simply measuring user tra c and sending a monthly bill, as in the telephone system. Third, the function of the Data Link layer in Figure 2 is mainly to group a set of bits into a unit called a frame while the physical channel sends only bits or symbols at a time; the received bits must be recovered into frames by the receiving Data Link. The sending data link also attaches checksums to detect errors, throwing out erroneous frames. If this were necessary in the postal network of Figure 2, every package would have to be chopped into slices, and each plane or balloon would only be able to deliver one slice at a time! Fortunately, that is not necessary in the world of transportation and fairly large packages can be sent in parallel". However, communication links are essentially serial to reduce the cost of wiring, which then causes a framing problem to slice up packets into bits and then to recover the frame boundaries. Although, the basic function of framing and error detection has no correspondence in say an airline carrier, there is another aspect of multiaccess Data Links like Ethernets that is exactly the value-add" of say Delta Airlines: this is scheduling. Just as carriers must schedule their physical transportation devices to maximize the number of passengers and cargo carried, so also local area network protocols like Ethernet must schedule the transmissions of multiple computers on the same physical wire to maximize throughput bits carried per second. In networking, we call this access control or media access control MAC. Finally, the whole issue of layers communicating is handled in a unique and interesting way in networks. When Bigwig in Boston wants to communicate with Bigwig in Morocco it may choose to make a telephone call, relying on out-of-band communication | i.e., communication outside the normal network in which data is carried. However, in the Internet all control and other information between layers is carried in-band within the network itself.4 For example, when a sending TCP wants to send some information about a segment for instance, saying this is the 100th segment in the email attachment, it piggybacks the information in a special header" attached to the data. Thus every data packet sent in a network carries some 4 The tele...
View Full Document

{[ snackBarMessage ]}