11 computer network

Upload: khalid-saleh

Post on 03-Apr-2018

215 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/28/2019 11 Computer Network

    1/17

    1. Computer NetworksIntroductionWhat Is a Network?A network is nothing more than two or more computers connected to each other so that they canexchange information, such as e-mail messages or documents, or share resources, such as diskstorage or printers. In most cases, this connection is made via electrical cables that carry the

    information in the form of electrical signals. But in some cases, other types of connections are used.For example, fiber-optic cables let computers communicate at extremely high speeds by usingimpulses of light. Wireless networks let computers communicate by using radio signals, so thecomputers arent restricted by physical cables. In addition to the hardware that comprises thenetwork, a network also requires special software to enable communications. In the early days ofnetworking, you had to add this software to each computer on the network. Nowadays, networksupport is built into all major operating systems, including all current versions of Windows,Macintosh operating systems, and Linux.A group of computers and associated peripheral devices connected by a communication channelcapable of sharing files and other resources among several users is computer network. A network canrange from a peer-to-peer network connecting a small number of users in an office or department, to

    a LAN connecting many users over permanently installed cables and dial-up lines, to a MAN orWAN connecting users on several networks spread over a wide geographic area.Uses of computer network1. Business Applications

    Resource sharing the goal is to make all programs, equipment, and especially data available

    to anyone on the network without regard to the physical location of the resource and the user.An obvious and widespread example is having a group of office workers share a commonprinter. None of the individuals really needs a private printer, and a high-volume networkedprinter is often cheaper, faster, and easier to maintain than a large collection of individualprinters.

    Communication medium A second goal of setting up a computer network has to do with

    people rather than information or even computers. A computer network can provide apowerful communication medium among employees. Virtually every company that has two ormore computers now has e-mail (electronic mail), which employees generally use for a greatdeal of daily communication. In fact, a common gripe around the water cooler is how much e-mail everyone has to deal with, much of it meaningless because bosses have discovered thatthey can send the same (often content-free) message to all their subordinates at the push of abutton.

    A third goal for increasingly many companies is doing business electronically with other

    companies, especially suppliers and customers. For example, manufacturers of automobiles,aircraft, and computers, among others, buy subsystems from a variety of suppliers and thenassemble the parts. Using computer networks, manufacturers can place orders electronically as

    needed. Being able to place orders in real time (i.e., as needed) reduces the need for largeinventories and enhances efficiency.

    E-commerce (electronic commerce) A fourth goal that is starting to become more importantis doing business with consumers over the Internet. Airlines, bookstores, and music vendorshave discovered that many customers like the convenience of shopping from home.Consequently, many companies provide catalogs of their goods and services online and takeorders on-line. This sector is expected to grow quickly in the future. It is called e-commerce(electronic commerce).

    2. Home Applications

    Access to remote information Access to remote information comes in many forms. Itcan be surfing the World Wide Web for information or just for fun. Information availableincludes the arts, business, cooking, government, health, history, hobbies, recreation,science, sports, travel, and many others. Fun comes in too many ways to mention, plus

    Page 1 of 171

    4/28/2012file://D:\Documents and Settings\Shishir\Desktop\notesof cn.htm

  • 7/28/2019 11 Computer Network

    2/17

    some ways that are better left unmentioned.

    Person-to-person communication The second broad category of network use is person-to-person communication, basically the 21st century's answer to the 19th century'stelephone. E-mail is already used on a daily basis by millions of people all over the worldand its use is growing rapidly. It already routinely contains audio and video as well as

    text and pictures. Smell may take a while.

    Interactive entertainment Our third category is entertainment, which is a huge andgrowing industry. The killer application here (the one that may drive all the rest) is videoon demand. A decade or so hence, it may be possible to select any movie or televisionprogram ever made, in any country, and have it displayed on your screen instantly. Newfilms may become interactive, where the user is occasionally prompted for the storydirection (should Macbeth murder Duncan or just bide his time?) with alternativescenarios provided for all cases. Live television may also become interactive, with theaudience participating in quiz shows, choosing among contestants, and so on.

    Electronic commerce Our fourth category is electronic commerce in the broadest senseof the term. Home shopping is already popular and enables users to inspect the on-linecatalogs of thousands of companies. Some of these catalogs will soon provide the abilityto get an instant video on any product by just clicking on the product's name. After thecustomer buys a product electronically but cannot figure out how to use it, on-linetechnical support may be consulted.

    3. Mobile UsersMobile computers, such as notebook computers and personal digital assistants (PDAs), are one of

    the fastest-growing segments of the computer industry. Many owners of these computers havedesktop machines back at the office and want to be connected to their home base even when awayfrom home or en route. Since having a wired connection is impossible in cars and airplanes, there isa lot of interest in wireless networks. In this section we will briefly look at some of the uses ofwireless networks.A common reason to use this is the portable office. People on the road often want to use theirportable electronic equipment to send and receive telephone calls, faxes, and electronic mail, surf theWeb, access remote files, and log on to remote machines. And they want to do this from anywhereon land, sea, or air. For example, at computer conferences these days, the organizers often set up awireless network in the conference area. Anyone with a notebook computer and a wireless modemcan just turn the computer on and be connected to the Internet, as though the computer were pluggedinto a wired network. Similarly, some universities have installed wireless networks on campus so

    students can sit under the trees and consult the library's card catalog or read their e-mail.Wireless networks are of great value to fleets of trucks, taxis, delivery vehicles, and repairpersons forkeeping in contact with home. For example, in many cities, taxi drivers are independent

    Page 2 of 171

    4/28/2012file://D:\Documents and Settings\Shishir\Desktop\notesof cn.htm

  • 7/28/2019 11 Computer Network

    3/17

    businessmen, rather than being employees of a taxi company. In some of these cities, the taxis have adisplay the driver can see. When a customer calls up, a central dispatcher types in the pickup anddestination points. This information is displayed on the drivers' displays and a beep sounds. The firstdriver to hit a button on the display gets the call.Wireless networks are also important to the military. If you have to be able to fight a war anywhereon earth on short notice, counting on using the local networking infrastructure is probably not a goodidea. It is better to bring your own.Although wireless networking and mobile computing are often related, they are not identical. Herewe see a distinction between fixed wireless and mobile wireless. Even notebook computers aresometimes wired. For example, if a traveler plugs a notebook computer into the telephone jack in ahotel room, he has mobility without a wireless network.

    Table: Combinations of wireless networks and mobile computing.

    On the other hand, some wireless computers are not mobile. An important example is a company thatowns an older building lacking network cabling, and which wants to connect its computers.Installing a wireless network may require little more than buying a small box with some electronics,unpacking it, and plugging it in. This solution may be far cheaper than having workmen put in cableducts to wire the building.

    But of course, there are also the true mobile, wireless applications, ranging from the portable officeto people walking around a store with a PDA doing inventory. At many busy airports, car rental

    return clerks work in the parking lot with wireless portable computers. They type in the license platenumber of returning cars, and their portable, which has a built-in printer, calls the main computer,gets the rental information, and prints out the bill on the spot.

    As wireless technology becomes more widespread, numerous other applications are likely to emerge.Let us take a quick look at some of the possibilities. Wireless parking meters have advantages forboth users and city governments. The meters could accept credit or debit cards with instantverification over the wireless link. When a meter expires, it could check for the presence of a car (bybouncing a signal off it) and report the expiration to the police. It has been estimated that citygovernments in the U.S. alone could collect an additional $10 billion this way. Furthermore, betterparking enforcement would help the environment, as drivers who knew their illegal parking was sure

    to be caught might use public transport instead.

    Food, drink, and other vending machines are found everywhere. However, the food does not get intothe machines by magic. Periodically, someone comes by with a truck to fill them. If the vendingmachines issued a wireless report once a day announcing their current inventories, the truck driverwould know which machines needed servicing and how much of which product to bring. Thisinformation could lead to more efficient route planning. Of course, this information could be sentover a standard telephone line as well, but giving every vending machine a fixed telephoneconnection for one call a day is expensive on account of the fixed monthly charge.

    Another area in which wireless could save money is utility meter reading. If electricity, gas, water,

    and other meters in people's homes were to report usage over a wireless network, there would be noneed to send out meter readers. Similarly, wireless smoke detectors could call the fire departmentinstead of making a big noise (which has little value if no one is home). As the cost of both the radiodevices and the air time drops, more and more measurement and reporting will be done with wireless

    Page 3 of 171

    4/28/2012file://D:\Documents and Settings\Shishir\Desktop\notesof cn.htm

  • 7/28/2019 11 Computer Network

    4/17

    networks.

    4. Social Issues

    The widespread introduction of networking has introduced new social, ethical, and politicalproblems. The trouble comes when newsgroups are set up on topics that people actually care about,

    like politics, religion, or sex. Views posted to such groups may be deeply offensive to some people.Worse yet, they may not be politically correct. Furthermore, messages need not be limited to text.High-resolution color photographs and even short video clips can now easily be transmitted overcomputer networks. Some people take a live-and-let-live view, but others feel that posting certainmaterial (e.g., attacks on particular countries or religions, pornography, etc.) is simply unacceptableand must be censored. Different countries have different and conflicting laws in this area. Thus, thedebate rages.

    Another fun area is employee rights versus employer rights. Many people read and write e-mail atwork. Many employers have claimed the right to read and possibly censor employee messages,including messages sent from a home computer after work. Not all employees agree with this.

    Even if employers have power over employees, does this relationship also govern universities andstudents? How about high schools and students? In 1994, Carnegie-Mellon University decided toturn off the incoming message stream for several newsgroups dealing with sex because the universityfelt the material was inappropriate for minors (i.e., those few students under 18). The fallout fromthis event took years to settle.

    Another key topic is government versus citizen. The FBI has installed a system at many Internetservice providers to snoop on all incoming and outgoing e-mail for nuggets of interest to it (Blazeand Bellovin, 2000; Sobel, 2001; and Zacks, 2001). The system was originally called Carnivore butbad publicity caused it to be renamed to the more innocent-sounding DCS1000. But its goal is still tospy on millions of people in the hope of finding information about illegal activities. Unfortunately,the Fourth Amendment to the U.S. Constitution prohibits government searches without a searchwarrant. Whether these 54 words, written in the 18th century, still carry any weight in the 21stcentury is a matter that may keep the courts busy until the 22nd century.

    The government does not have a monopoly on threatening people's privacy. The private sector doesits bit too. For example, small files called cookies that Web browsers store on users' computers allowcompanies to track users' activities in cyberspace and also may allow credit card numbers, socialsecurity numbers, and other confidential information to leak all over the Internet (Berghel, 2001).

    Along with the good comes the bad. Life seems to be like that. The Internet makes it possible to findinformation quickly, but a lot of it is ill-informed, misleading, or downright wrong. The medicaladvice you plucked from the Internet may have come from a Nobel Prize winner or from a highschool dropout. Computer networks have also introduced new kinds of antisocial and criminalbehavior. Electronic junk mail (spam) has become a part of life because people have collectedmillions of e-mail addresses and sell them on CD-ROMs to would-be marketers. E-mail messagescontaining active content (basically programs or macros that execute on the receiver's machine) cancontain viruses that wreak havoc.

    Identity theft is becoming a serious problem as thieves collect enough information about a victim toobtain get credit cards and other documents in the victim's name. Finally, being able to transmitmusic and video digitally has opened the door to massive copyright violations that are hard to catchand enforce.

    A lot of these problems could be solved if the computer industry took computer security seriously. Ifall messages were encrypted and authenticated, it would be harder to commit mischief. This

    Page 4 of 171

    4/28/2012file://D:\Documents and Settings\Shishir\Desktop\notesof cn.htm

  • 7/28/2019 11 Computer Network

    5/17

    technology is well established. The problem is that hardware and software vendors know that puttingin security features costs money and their customers are not demanding such features. In addition, asubstantial number of the problems are caused by buggy software, which occurs because vendorskeep adding more and more features to their programs, which inevitably means more code and thusmore bugs. A tax on new features might help, but that is probably a tough sell in some quarters. Arefund for defective software might be nice, except it would bankrupt the entire software industry inthe first year.

    Network building blocksClient computers: The computers that end users use to access the resources of the network. Clientcomputers are typically located on users desks. They usually run a desktop version of Windowssuch as Windows XP Professional, along with application software such as Microsoft Office. Clientcomputers are sometimes referred to as workstations.Server computers: Computers that provide shared resources, such as disk storage and printers, aswell as network services, such as e-mail and Internet access. Server computers typically run aspecialized network operating system such as Windows Server 2003, NetWare, or Linux, along withspecial software to provide network services. For example, a server may run Microsoft Exchange toprovide e-mail services for the network, or it may run Apache Web Server so that the computer canserve Web pages.Network interface cards (NICs): A card installed in a computer that enables the computer tocommunicate over a network. Almost all NICs implement a networking standard called Ethernet.Newer computers come with either Ethernet cards already installed or with Ethernet support builtinto the motherboard so a separate card is not required. Every client and every server computer musthave a network interface card (or a built-in network port) in order to be a part of a network.Cable: Computers in a network are usually physically connected to each other using cable. Althoughseveral types of cable have been popular over the years, the most commonly used cable today iscalled twisted pair, also known by its official designation 10BaseT. Another type of cable commonlyused is coaxial, also called 10Base2. For high-speed network connections, fiber-optic cable issometimes used. In many cases, the cables run through the walls and converge on a central room

    called a wiring closet. But for smaller networks, the cables are often just strung along the floor.Switches: Network cable usually doesnt connect computers directly to each other. Instead, eachcomputer is connected by cable to a device known as a switch. The switch, in turn, connects to therest of the network. Each switch contains a certain number of ports, typically 8 or 16.Thus, you canuse an eight-port switch to connect up to eight computers. Switches can be connected to each otherto build larger networks. Older networks may use a more primitive type of device called a hubinstead of a switch. A hub provides the same function as a switch, but it isnt as efficient. The termhub is sometimes used to mean switch, even though hubs and switches are not technically the samething.Wireless networks: In many networks, cables and switches are making way for wireless networkconnections, which enable computers to communicate via radio signals. In a wireless network, radio

    transmitters and receivers take the place of cables. The main advantage of wireless networking is itsflexibility. With a wireless network, you dont have to run cables through walls or ceilings, and yourclient computers can be located anywhere within range of the network broadcast. The maindisadvantage of wireless networking is that it is inherently less secure than a cabled network.Network software: Although network hardware is essential, what really makes a network work issoftware. A whole bunch of software has to be set up just right in order to get a network working.Server computers typically use a special network operating system (also known as a NOS) in orderto function efficiently, and client computers need to have their network settings configured properlyin order to access the network. One of the most important networking choices to make is whichnetwork operating system youll use on the networks servers. Thats because much of the task ofbuilding a new network and managing an existing one is setting up and maintaining the network

    operating system on the servers.

    Network Hardware

    Page 5 of 171

    4/28/2012file://D:\Documents and Settings\Shishir\Desktop\notesof cn.htm

  • 7/28/2019 11 Computer Network

    6/17

    Broadly speaking, there are two types of transmission technology that are in widespread use. Theyare as follows:

    1. Broadcast links.

    2. Point-to-point links.

    Broadcast networks have a single communication channel that is shared by all the machines on thenetwork. Short messages, called packets in certain contexts, sent by any machine are received by allthe others. An address field within the packet specifies the intended recipient. Upon receiving apacket, a machine checks the address field. If the packet is intended for the receiving machine, thatmachine processes the packet; if the packet is intended for some other machine, it is just ignored.

    As an analogy, consider someone standing at the end of a corridor with many rooms off it andshouting Watson, come here. I want you. Although the packet may actually be received (heard) bymany people, only Watson responds. The others just ignore it. Another analogy is an airportannouncement asking all flight 644 passengers to report to gate 12 for immediate boarding.

    Broadcast systems generally also allow the possibility of addressing a packet to all destinations byusing a special code in the address field. When a packet with this code is transmitted, it is receivedand processed by every machine on the network. This mode of operation is called broadcasting.Some broadcast systems also support transmission to a subset of the machines, something known asmulticasting. One possible scheme is to reserve one bit to indicate multicasting. The remaining n - 1address bits can hold a group number. Each machine can ''subscribe'' to any or all of the groups.When a packet is sent to a certain group, it is delivered to all machines subscribing to that group.

    In contrast, point-to-point networks consist of many connections between individual pairs ofmachines. To go from the source to the destination, a packet on this type of network may have tofirst visit one or more intermediate machines. Often multiple routes, of different lengths, arepossible, so finding good ones is important in point-to-point networks. As a general rule (althoughthere are many exceptions), smaller, geographically localized networks tend to use broadcasting,whereas larger networks usually are point-to-point. Point-to-point transmission with one sender andone receiver is sometimes called unicasting.

    Local Area Networks

    Local area networks, generally called LANs, are privately-owned networks within a single buildingor campus of up to a few kilometers in size. They are widely used to connect personal computers andworkstations in company offices and factories to share resources (e.g., printers) and exchangeinformation. LANs are distinguished from other kinds of networks by three characteristics: (1) theirsize, (2) their transmission technology, and (3) their topology.

    LANs are restricted in size, which means that the worst-case transmission time is bounded andknown in advance. Knowing this bound makes it possible to use certain kinds of designs that wouldnot otherwise be possible. It also simplifies network management.

    LANs may use a transmission technology consisting of a cable to which all the machines areattached, like the telephone company party lines once used in rural areas. Traditional LANs run atspeeds of 10 Mbps to 100 Mbps, have low delay (microseconds or nanoseconds), and make very fewerrors. Newer LANs operate at up to 10 Gbps. We will adhere to tradition and measure line speeds inmegabits/sec (1 Mbps is 1,000,000 bits/sec) and gigabits/sec (1 Gbps is 1,000,000,000 bits/sec).

    Various topologies are possible for broadcast LANs. Figure shows two of them. In a bus (i.e., alinear cable) network, at any instant at most one machine is the master and is allowed to transmit. All

    Page 6 of 171

    4/28/2012file://D:\Documents and Settings\Shishir\Desktop\notesof cn.htm

  • 7/28/2019 11 Computer Network

    7/17

    other machines are required to refrain from sending. An arbitration mechanism is needed to resolveconflicts when two or more machines want to transmit simultaneously. The arbitration mechanismmay be centralized or distributed. IEEE 802.3, popularly called Ethernet, for example, is a bus-basedbroadcast network with decentralized control, usually operating at 10 Mbps to 10 Gbps. Computerson an Ethernet can transmit whenever they want to; if two or more packets collide, each computerust waits a random time and tries again later.

    Figure: Two broadcast networks. (a) Bus. (b) Ring.

    A second type of broadcast system is the ring. In a ring, each bit propagates around on its own, notwaiting for the rest of the packet to which it belongs. Typically, each bit circumnavigates the entirering in the time it takes to transmit a few bits, often before the complete packet has even beentransmitted. As with all other broadcast systems, some rule is needed for arbitrating simultaneousaccesses to the ring. Various methods, such as having the machines take turns, are in use. IEEE802.5 (the IBM token ring), is a ring-based LAN operating at 4 and 16 Mbps. FDDI is anotherexample of a ring network.

    Broadcast networks can be further divided into static and dynamic, depending on how the channel isallocated. A typical static allocation would be to divide time into discrete intervals and use a round-robin algorithm, allowing each machine to broadcast only when its time slot comes up. Staticallocation wastes channel capacity when a machine has nothing to say during its allocated slot, somost systems attempt to allocate the channel dynamically (i.e., on demand).

    Dynamic allocation methods for a common channel are either centralized or decentralized. In thecentralized channel allocation method, there is a single entity, for example, a bus arbitration unit,which determines who goes next. It might do this by accepting requests and making a decisionaccording to some internal algorithm. In the decentralized channel allocation method, there is nocentral entity; each machine must decide for itself whether to transmit. You might think that thisalways leads to confusion, but it does not.

    Metropolitan Area Networks

    A metropolitan area network, or MAN, covers a city. The best-known example of a MAN is thecable television network available in many cities. This system grew from earlier community antennasystems used in areas with poor over-the-air television reception. In these early systems, a largeantenna was placed on top of a nearby hill and signal was then piped to the subscribers' houses.

    At first, these were locally-designed, ad hoc systems. Then companies began jumping into thebusiness, getting contracts from city governments to wire up an entire city. The next step wastelevision programming and even entire channels designed for cable only. Often these channels werehighly specialized, such as all news, all sports, all cooking, all gardening, and so on. But from theirinception until the late 1990s, they were intended for television reception only.

    Starting when the Internet attracted a mass audience, the cable TV network operators began to

    Page 7 of 171

    4/28/2012file://D:\Documents and Settings\Shishir\Desktop\notesof cn.htm

  • 7/28/2019 11 Computer Network

    8/17

    realize that with some changes to the system, they could provide two-way Internet service in unusedparts of the spectrum. At that point, the cable TV system began to morph from a way to distributetelevision to a metropolitan area network. To a first approximation, a MAN might look somethinglike the system shown in figure. In this figure we see both television signals and Internet being fedinto the centralized head end for subsequent distribution to people's homes.

    Figure: A metropolitan area network based on cable TV.

    Cable television is not the only MAN. Recent developments in high-speed wireless Internet accessresulted in another MAN, which has been standardized as IEEE 802.16.

    Wide Area Networks

    A wide area network, or WAN, spans a large geographical area, often a country or continent. Itcontains a collection of machines intended for running user (i.e., application) programs. We willfollow traditional usage and call these machines hosts. The hosts are connected by a communication

    subnet, or just subnet for short. The hosts are owned by the customers (e.g., people's personalcomputers), whereas the communication subnet is typically owned and operated by a telephonecompany or Internet service provider. The job of the subnet is to carry messages from host to host,ust as the telephone system carries words from speaker to listener. Separation of the pure

    communication aspects of the network (the subnet) from the application aspects (the hosts), greatlysimplifies the complete network design.

    In most wide area networks, the subnet consists of two distinct components: transmission lines andswitching elements. Transmission lines move bits between machines. They can be made of copperwire, optical fiber, or even radio links. Switching elements are specialized computers that connectthree or more transmission lines. When data arrive on an incoming line, the switching element must

    choose an outgoing line on which to forward them. These switching computers have been called byvarious names in the past; the name router is now most commonly used. In this model, shown infigure, each host is frequently connected to a LAN on which a router is present, although in somecases a host can be connected directly to a router. The collection of communication lines and routers(but not the hosts) form the subnet.

    Figure: Relation between hosts on LANs and the subnet

    Page 8 of 171

    4/28/2012file://D:\Documents and Settings\Shishir\Desktop\notesof cn.htm

  • 7/28/2019 11 Computer Network

    9/17

    Network TopologyThe term network topology refers to the shape of how the computers and other network componentsare connected to each other. There are several different types of network topologies, each withadvantages and disadvantages.Node: A node is a device that is connected to the network. A node is the same as a computer.Network topology deals with how the nodes of a network are connected to each other.Packet: A packet is a message that is sent over the network from one node to another node. The

    packet includes the address of the node that sent the packet, the address of the node the packet isbeing sent to, and data.Bus topologyThe first type of network topology is called a bus, in which nodes are strung together in a line, asshown in figure below. Bus topology is commonly used for LANs.

    Figure: Bus topologyInformation sent from a node travels along the backbone until it reaches its destination node. Eachend of a bus network must be terminated with a resistor to keep the signal that is sent by a nodeacross the network from bouncing back when it reaches the end of the cable. In a bus topology, everynode on the network can see every packet thats sent on the cable. Each node looks at each packet todetermine whether the packet is intended for it. If so, the node claims the packet. If not, the nodeignores the packet. This way, each computer can respond to data sent to it and ignore data sent toother computers on the network. If the cable in a bus network breaks, the network is effectivelydivided into two networks. Nodes on either side of the break can continue to communicate with eachother, but data cant span the gap between the networks, so nodes on opposite sides of the breakcant communicate with each other.

    Star topologyIn a star topology, each network node is connected to a central device called a hub or a switch, asshown in figure. The hub takes a signal that comes from any node and passes it along to all the other

    Page 9 of 171

    4/28/2012file://D:\Documents and Settings\Shishir\Desktop\notesof cn.htm

  • 7/28/2019 11 Computer Network

    10/17

    nodes in the network. A hub does not perform any type of filtering or routing of the data. It is simplya junction that joins all the different nodes together. Star topologies are also commonly used withLANs. If a cable in a star network breaks, only the node connected to that cable is isolated from thenetwork. The other nodes can continue to operate without interruption unless, of course, the nodethats isolated because of the break happens to be the file server.You should be aware of the somewhat technical distinction between a hub and a switch. Simply put,a hub doesnt know anything about the computers that are connected to each of its ports. So when acomputer connected to the hub sends a packet to a computer thats connected to another port, the hubsends a duplicate copy of the packet to all its ports. In contrast, a switch knows which computer isconnected to each of its ports. As a result, when a switch receives a packet intended for a particularcomputer, it sends the packet only to the port that the recipient is connected to.Strictly speaking, only networks that use switches have a true star topology. If the network uses ahub, the network topology has the physical appearance of a star, but is actually a bus. Thats becausewhen a hub is used, each computer on the network sees all the packets sent over the network, justlike in a bus topology. In a true star topology, as when a switch is used, each computer sees onlythose packets that were sent specifically to it, as well as broadcast packets that were specifically sentto all computers on the network.

    Figure: Star topologyExpanding starsPhysicists tell us that the universe isexpanding, and network administrators knowtheyre right. A simple bus or star topology issuitable only for small networks, with a dozenor so computers, but small networksinevitably become large networks as more

    computers are added. For larger networks, itscommon to create more complicatedtopologies that combine stars and buses.For example, a bus can be used to connectseveral stars. In this case, two or more hubs orswitches are connected to each other using abus. Each of these hubs or switches is then the

    center of a star that connects two or more computers to the network.Figure: A typical star bus network

    This type of arrangement is commonly used in buildings that have two or more distinct workgroups.The bus that connects the switches is sometimes called a backbone.

    Another way to expand a star topology is to use a technique called daisy- chaining. When you usedaisy-chaining, a hub or switch is connected to another hub or switch as if it were one of the nodeson the star. Then, this second hub or switch serves as the center of a second star. Nodes in particular

    Page 10 of 171

    4/28/2012file://D:\Documents and Settings\Shishir\Desktop\notesof cn.htm

  • 7/28/2019 11 Computer Network

    11/17

    areas are connected to hubs (creating stars), and the hubs are connected together along the networkbackbone (like a bus network).Ring topologyA third type of network topology is called a ring, shown in figure. Like a bus network, rings have thenodes daisy-chained. The difference is that the end of the network comes back around to the firstnode, creating a complete circuit. In a ring network, each node takes a turn sending and receivinginformation through the use of a token. The token, along with any data, is sent from the first node tothe second node, which extracts the data addressed to it and adds any data it wishes to send. Then,the second node passes the token and data to the third node, and so on until it comes back around tothe first node again. Only the node with the token is allowed to send data. All other nodes must waitfor the token to come to them. In a ring topology, packets are sent around the circle from computerto computer. Each computer looks at each packet to decide whether the packet was intended for it. Ifnot, the packet is passed on to the next computer in the ring.Years ago, ring topologies were common in LANs, as two popular networking technologies usedrings: ARCNET and Token Ring. ARCNET is still used for certain applications such as factoryautomation, but is rarely used in business networks. Token Ring is a popular network technology forIBM midrange computers. Although plenty of Token Ring networks are still in existence, not manynew networks use Token Ring any more.

    Ring topology was also used by FDDI, one of the first types of fiber-optic network connections.FDDI has given way to more efficient fiber-optic techniques, however. So ring networks have all butvanished from business networks.

    Page 11 of 171

    4/28/2012file://D:\Documents and Settings\Shishir\Desktop\notesof cn.htm

  • 7/28/2019 11 Computer Network

    12/17

    Figure: Ring topologyMesh topologyA fourth type of network topology, known as mesh, has multiple connections between each of thenodes on the network, as shown in figure. The advantage of a mesh topology is that if one cablebreaks, the network can use an alternative route to deliver its packets.Mesh networks are not very practical in a LAN setting. For example, to network eight computers in amesh topology, each computer would have to have seven network interface cards, and 28 cableswould be required to connect each computer to the seven other computers in the network. Obviously,this scheme isnt very scalable. However, mesh networks are common for metropolitan or wide areanetworks.These networks use devices called routers to route packets from network to network. For reliabilityand performance reasons, routers are usually arranged in a way that provides multiple paths betweenany two nodes on the network in a mesh-like arrangement.

    Figure: Mesh topology

    1.1 Protocol Hierarchies or Protocol StackComputer networks aredesigned in a highlystructured way to reducetheir design complexity.Most networks areorganized as a series oflayers or levels. Thenumber of layers, thename of each layer, and

    the function of each layerdiffers from network tonetwork. However, in allnetworks, each layerclearly defines variousdata communicationfunctions and logicaloperations. Each level isfunctionally independentof the others, but buildson its predecessor. In

    order to function, higherlevels depend on correctoperation of the lowerlevels. Figure aside

    Page 12 of 171

    4/28/2012file://D:\Documents and Settings\Shishir\Desktop\notesof cn.htm

  • 7/28/2019 11 Computer Network

    13/17

    illustrates 7-layernetwork architecture. Layer (level) n on one computer carries on communication with layer n onanother computer. The set of rules and conventions that encompasses electrical, mechanical andfunctional characteristics of a data link, as well as the control procedures for such communication iscalled the layer n protocol.

    Figure: Layers, protocols and interfaces

    The communication between two layers at the same level (layer n, n = 1) of two differentcomputers is called virtual communication. Here, each layer passes data and control information tothe layer immediately below it, until the lowest layer (layer 1). At layer 1, information from onecomputer is physically transferred to layer 1 of the other (physical communication). The interfacebetween each pair of adjacent layers defines which operations and services the lower layer offers tothe upper one. The network architecture thus can be defined as the set of layers and protocols.The ISO and other modelsFigure below shows the reference model of the Open Systems Interconnection (OSI), which has beendeveloped by the International Standards Organization (ISO). We will briefly define the functionsand operation of each layer of this architecture in turn.

    Figure: The OSI model

    Layer 1: the physical layerThis layer is concerned with transmitting an electrical signal representation of data over acommunication link. Typical conventions would be: voltage levels used to represent a 1 and a 0,duration of each bit, transmission rate, mode of transmission, and functions of pins in a connector.An example of a physical layer protocol is the RS-232 standard.The bottom layer of the OSI Model is the Physical Layer. It addresses the physical characteristics ofthe network, such as the types of cables used to connect devices, the types of connectors used, howlong the cables can be, and so on. For example, the Ethernet standard for 100BaseT cable specifiesthe electrical characteristics of the twisted-pair cables, the size and shape of the connectors, themaximum length of the cables, and so on. Another aspect of the Physical Layer is that it specifies the

    Page 13 of 171

    4/28/2012file://D:\Documents and Settings\Shishir\Desktop\notesof cn.htm

  • 7/28/2019 11 Computer Network

    14/17

    electrical characteristics of the signals used to transmit data over cables from one network node toanother. The Physical Layer doesnt define any particular meaning for those signals other than thebasic binary values 0 and 1. The higher levels of the OSI model must assign meanings to the bitstransmitted at the Physical Layer.One type of Physical Layer device commonly used in networks is a repeater. A repeater is used toregenerate signals when you need to exceed the cable length allowed by the Physical Layer standardor when you need to redistribute a signal from one cable onto two or more cables.An old-style 10BaseT hub is also Physical Layer device. Technically, a hub is a multi-port repeaterbecause its purpose is to regenerate every signal received on any port on the entire hubs other ports.Repeaters and hubs dont examine the contents of the signals that they regenerate. If they did, theywould be working at the Data Link Layer, and not at the Physical LayerLayer 2: the data link layerThis layer is concerned with error-free transmission of data units. The data unit is an abbreviation ofthe official name ofdata-link-service-data-units; it is sometimes called the data frame. The functionof the data link layer is to break the input data stream into data frames, transmit the framessequentially, and process the acknowledgement frame sent back by the receiver. Data frames fromthis level when transferred to layer 3 are assumed to be error free.The Data Link Layer is the lowest layer at which meaning is assigned to the bits that are transmitted

    over the network. Data-link protocols address things such as the size of each packet of data to besent, a means of addressing each packet so that its delivered to the intended recipient, and a way toensure that two or more nodes dont try to transmit data on the network at the same time.The Data Link Layer also provides basic error detection and correction to ensure that the data sent isthe same as the data received. If an uncorrectable error occurs, the data-link standard must specifyhow the node is to be informed of the error so it can retransmit the data.At the Data Link Layer, each device on the network has an address known as the Media AccessControl address, or MAC address. This is the actual hardware address, assigned to the device at thefactory.You can see the MAC address for a computers network adapter by opening a command window andrunning the ipconfig /all command, as shown in figure. In this example, the MAC address (identified

    as the physical address in the output) of the network card is 00-50-BA-84-39-11.One of the most import functions of the Data Link Layer is to provide a way for packets to be sentsafely over the physical media without interference from other nodes attempting to send packets atthe same time. Ethernet uses a technique called CSMA/CD to accomplish this.Switches are the most commonly used Data Link Layer devices in most networks. A switch issimilar to a hub, but instead of regenerating incoming signals of every port, a switch examines theMAC address of every incoming packet to determine which port to send the packet to.

    Page 14 of 171

    4/28/2012file://D:\Documents and Settings\Shishir\Desktop\notesof cn.htm

  • 7/28/2019 11 Computer Network

    15/17

    Figure: Displaying the MAC address of your network adapterLayer 3: the network layerThis layer is the network control layer, and is sometimes called the communication subnet layer. It isconcerned with intra-network operation such as addressing and routing within the subnet. Basically,messages from the source host are converted topackets. The packets are then routed to their properdestinations.

    The Network Layer handles the task of routing network messages from one computer to another. Thetwo most popular Layer-3 protocols are IP (which is usually paired with TCP) and IPX (normallypaired with SPX for use with Novell and Windows networks).One important function of the Network Layer is logical addressing. As you know, every networkdevice has a physical address called a MAC address, which is assigned to the device at the factory.When you buy a network interface card to install in a computer, the MAC address of that card isfixed and cant be changed. But what if you want to use some other addressing scheme to refer to thecomputers and other devices on your network? This is where the concept of logical addressingcomes in; a logical address lets gives a network device a place where it can be accessed on thenetwork using an address that you assign.Logical addresses are created and used by Network Layer protocols such as IP or IPX. The Network

    Layer protocol translates logical addresses to MAC addresses. For example, if you use IP as theNetwork Layer protocol, devices on the network are assigned IP addresses such as 207.120.67.30.Because the IP protocol must use a Data Link Layer protocol to actually send packets to devices, IPmust know how to translate the IP address of a device into the correct MAC address for the device.You can use the ipconfig command to see the IP address of your computer. The IP address shown inthat figure is 192.168.1.100.Another important function of the Network layer is routing finding an appropriate path throughthe network. Routing comes into play when a computer on one network needs to send a packet to acomputer on another network.In this case, a Network Layer device called a router forwards the packet to the destination network.An important feature of routers is that they can be used to connect networks that use different Layer-

    2 protocols. For example, a router can be used to connect a local area network that uses Ethernet to awide area network that runs on a different set of low-level protocols, such as T1.Layer 4: the transport layerThis layer is a transport end-to-end control layer(i.e. source-to-destination). A program on the

    Page 15 of 171

    4/28/2012file://D:\Documents and Settings\Shishir\Desktop\notesof cn.htm

  • 7/28/2019 11 Computer Network

    16/17

    source computer communicates with a similar program on the destination computer using themessage headers and control messages, whereas all the lower layers are only concerned withcommunication between a computer and its immediate neighbors, not the ultimate source anddestination computers.The transport layer is often implemented as part of the operating system. The data link and physicallayers are normally implemented in hardware.The Transport Layer is the basic layer at which one network computer communicates with anothernetwork computer. The Transport Layer is where youll find one of the most popular networkingprotocols: TCP. The main purpose of the Transport Layer is to ensure that packets move over thenetwork reliably and without errors. The Transport Layer does this by establishing connectionsbetween network devices, acknowledging the receipt of packets, and resending packets that are notreceived or are corrupted when they arrive.In many cases, the Transport Layer protocol divides large messages into smaller packets that can besent over the network efficiently. The Transport Layer protocol reassembles the message on thereceiving end, making sure that all packets contained in a single transmission are received and nodata is lost.Layer 5: the session layerThe session layer is the users interface into the network. This layer supports the dialogue through

    session control, if services can be allocated. A connection between users is usually called a session.A session might be used to allow a user to log into a system or to transfer files between twocomputers. A session can only be established if the user provides the remote addresses to beconnected. The difference between session addresses and transport addresses is that sessionaddresses are intended for users and their programs, whereas transport addresses are intended fortransport stations.The Session Layer establishes sessions (instances of communication and data exchange) betweennetwork nodes. A session must be established before data can be transmitted over the network. TheSession Layer makes sure that these sessions are properly established and maintained.Layer 6: the presentation layerThis layer is concerned with transformation of transferred information. The controls include message

    compression, encryption, peripheral-device-coding and formatting.The Presentation Layer is responsible for converting the data sent over the network from one type ofrepresentation to another. For example, the Presentation Layer can apply sophisticated compressiontechniques so fewer bytes of data are required to represent the information when its sent over thenetwork. At the other end of the transmission, the Transport Layer then uncompresses the data.The Presentation Layer also can scramble the data before it is transmitted and unscramble it at theother end, using a sophisticated encryption technique that would be difficult to break.Layer 7: the application layerThis layer is concerned with the application and system activities. The content of the applicationlayer is up to the individual user.The highest layer of the OSI model, the Application Layer, deals with the techniques that application

    programs use to communicate with the network. The name of this layer is a little confusing becauseapplication programs (such as Excel or Word) arent actually part of the layer. Rather, theApplication Layer represents the level at which application programs interact with the network,using programming interfaces to request network services. One of the most commonly known usedapplication layer protocols is HTTP, which stands for HyperText Transfer Protocol. HTTP is thebasis of the World Wide Web.

    Presentation of OSI modelIn this presentation you will see how open system interconnection reference model or OSI modeldescribes the process by which data is sent over a network. The OSI model is divided into seven

    layers. Each layer represents different stage in the process of preparing data for transmission over anetwork. The process starts at the application layer on the sending host where applications areconnected to networking software. The data to be sent is put in a packet that passes down througheach layer accumulating, routing and tracking information until it reaches the physical layer where it

    osi_model.exe

    Page 16 of 171

    4/28/2012file://D:\Documents and Settings\Shishir\Desktop\notesof cn.htm

  • 7/28/2019 11 Computer Network

    17/17

    is sent out over a network to its destination. You follow a similar process when you send a letter.Here is an example of the similarities between the functions that each layer of the OSI model and theprocess of the letter being sent by the private delivery service. You start the process by creating adocument and sending it through interoffice mail through a translator. The interoffice mail representsthe application layer of the OSI model where the connection between an application and the networksoftware is made. The next stage is the presentation layer where your text is translated into recipientlanguage. In the OSI model the source and the destination client choose common communicationsyntax at this layer. Next your document goes to the mail room where the destination address ischecked to make sure the service delivers to that area and then your document is put into anenvelope. This is similar to the session layer of OSI model where the connection is made betweenthe sending and receiving clients. If you ask for guarantee delivery of your letter a tracking numberis assigned to it. In the OSI model the transport layer is where reliable or unreliable protocol ischoosen. The address is then added to the envelope. In the OSI model the network layer is wheredestination address is added to the packet. The next step is where secure seal is applied to theenvelope and the type of transportation is choosen. In the OSI model the data link layer is where thepacket is put into the correct format for transmission. The physical layer is the last stage. Theenvelope is put on an aeroplane and taken to its destination. This is similar to putting the packet on tothe network cable at the physical layer of the OSI model. When you put the seven stages together,

    you have seven layers of the OSI model. Applied to a network the OSI model defines the followingfunctions. At the application layer network access is applied to an application such as the ability ofyour word processor to load files from your server or send a document to a print device. At thepresentation layer client computer that are communicating with each other choose the best syntaxthat they have in common. At the session layer protocols maintain the connection between thecommunicating clients. At the transport layer either of reliable or unreliable protocol is choosen tomake the connection to the recipient depending on which type is needed by the communicatingclients. At the network layer the destination address is added to each packet. Also when reliableconnection is made at the transport layer protocols at the network layer do the tracking and checkingneeded to insure the connection reliability. At the data link layer the packet that has been assembledin the previous layers is prepared for transmission over the networking hardware. At the physical

    layer information about the networking hardware is used to send the packet out on to the network.The process works in the opposite way on the client that receives the packet. As it goes up throughthe layer the information that was attached to the packet before sent is checked or removed at thesame layer on the receiving host. When it reaches the application layer only the original dataremains. A phrase that may help you remember the order of the OSI layer is All People Seem ToNeed Data Processing. In this presentation you have seen how the OSI model describes the processby which data is prepared and sent over a network.1.1.1 Switching

    Page 17 of 171

    Shishir Modak