You are on page 1of 85

Computer Networks-1 Sub Code: 06CS55 Dr.N.G.

Goudru `
McGraw-Hill The McGraw-Hill Companies, Inc., 2004

SYLLABUS
Unit Title
1 Introduction

PART-A
Hrs 06 08 06 06

2
3

Data, Signals, and Digital Transmission


Analog Transmission and Multiplexing Transmission Media, Error detection and Correction

PART - B
5 6 7 8
McGraw-Hill

Data Link Control

Multiple Access, Ethernet


Wireless LANs and Connection of LANs hrs Other Technologies

07 07
06

06
The McGraw-Hill Companies, Inc., 2004

Text Books:
1. Data Communication & Networking - Behrouz A. Forouzan 4 th Edition, Tata McGraw-Hill.

Reference Books:
2. Communication Networks - Garcia & Indra Widjaja 3. Data & Computer Communications- William Stallings

4. Computer & Communication Networks Nader F.Mir

McGraw-Hill

The McGraw-Hill Companies, Inc., 2004

Unit - 1 Introduction
Data Communications, Networks, the Internet, Protocols and standards, Layered tasks, The OSI model and the layers in the OSI model, TCP/IP protocol suite.

McGraw-Hill

The McGraw-Hill Companies, Inc., 2004

Data Communication
Data communication is the transfer of data from one device to another via some form of transmission medium. Data may be a text, Picture, audio & video

McGraw-Hill

The McGraw-Hill Companies, Inc., 2004

McGraw-Hill

The McGraw-Hill Companies, Inc., 2004

McGraw-Hill

The McGraw-Hill Companies, Inc., 2004

McGraw-Hill

The McGraw-Hill Companies, Inc., 2004

Fundamental Characteristics
A data communications system must transmit data to the correct destination in an accurate and timely manner. Delivery The system must deliver the data to correct
destination

Accuracy The information should reach the destination


without damage. Timeliness With in specified time data should be delivered.

Jitter
McGraw-Hill

is the variation in packet arrival time.


The McGraw-Hill Companies, Inc., 2004

Components of Data Communication


The components of data communications system are the message, sender, receiver, medium & protocol.

Message Information to be communicated. It may be text, Picture, Sound or Video Sender Device that sends the message. It can be Computer , workstation, Video camera Receiver Device that receives the message. It can be a Computer, Workstation Medium - Transmission path to send the message from Sender to receiver. Protocol Set of rules that governs the communications.
McGraw-Hill The McGraw-Hill Companies, Inc., 2004

Data Representation
Text, numbers, images, audio, and video are different forms of information.
Text English alphabets A Z, a z, Numbers 0 9, are called codes or symbols.

Coding can be done using


ASCII ( American Standard Code for Information Interchange ) It developed by ANSI ( American National Standards Institute). It is a 7 bit representation. Extended ASCII It is a 8 bit representation. Unicode It uses 16 bit representation. ISO ( International Organization for Standardization) uses 32 bit representation. Images Image is divided into pixels. Each pixel is represented by a bit pattern.
McGraw-Hill The McGraw-Hill Companies, Inc., 2004

Direction of Data Flow

Data flow between two devices can occur in one of three wayssimplex, half-duplex, or full-duplex.
Simplex The communication is unidirectional

McGraw-Hill

The McGraw-Hill Companies, Inc., 2004

Half-duplex
Each station can transmit and receive but not at the same time

McGraw-Hill

The McGraw-Hill Companies, Inc., 2004

Full-duplex

Both stations can transmit and receive simultaneously

McGraw-Hill

The McGraw-Hill Companies, Inc., 2004

Types of transmission technology in a network


Broadcasting Transmission of a message to all nodes in a Network. Multicasting Transmission that allows a single packet to be sent to a selected group of nodes. Point-to-Point A dedicated transmission link between two computers.

Unicasting Sending a packet to just one destination.

McGraw-Hill

The McGraw-Hill Companies, Inc., 2004

Example: VTU, July 2006


Explain Unicasting, Multicasting & Broadcasting.

McGraw-Hill

The McGraw-Hill Companies, Inc., 2004

Physical Structure of computers ( Physical Topology)


Topology refers to the physical arrangement of a network.

McGraw-Hill

The McGraw-Hill Companies, Inc., 2004

Mesh Topology In a mesh topology every device has a dedicated pointto-point link to every other device. If n is number of nodes in a topology, each node has (n-1) number of links. The topology has n(n-1)/2 number of physical Links in duplex mode.

McGraw-Hill

The McGraw-Hill Companies, Inc., 2004

Advantages
i) Dedicated link guarantees the transmission of data . ii) No traffic problem.

iii) A mesh topology is robust. If a link fails even then communication can be established.

Disadvantage
i) The amount of cabling, number of I/O devices & other peripherals used increases cost of the network.

ii) Use of more number of devices increases the complexity in installation, configuring & software maintenance.

McGraw-Hill

The McGraw-Hill Companies, Inc., 2004

Star Topology
In a star topology, each device has a dedicated point-to point link to a centralized hub. There is no direct link between the devices. Thus, no direct traffic flow between devices. Hub acts as an exchange for the data communication of devices.

McGraw-Hill

The McGraw-Hill Companies, Inc., 2004

Advantages
i) In star topology each device needs only one link. thus, it is less expensive.

ii) Easy to install the S/W, configure the H/W & Software maintenance. iii) Fault identification is easier. iv) Network monitoring through hub is easier.

Disadvantages
i) The network topology is less robust, because, if one link fails the device is disconnected from the network. iv) The entire network communication is centered at the hub. If hub goes down the entire network communication goes down.
McGraw-Hill The McGraw-Hill Companies, Inc., 2004

Bus Topology A bus topology is a multipoint connection. A long cable acts as a Backbone to link all the hosts. Nodes are connected to the bus cable at Tap using drop line.

McGraw-Hill

The McGraw-Hill Companies, Inc., 2004

Advantages
i) Easy for installation. ii) It uses less cable, and simple tapping devices makes less cost.

Disadvantage
i) Difficult to find the faults in the network. ii) Because of limitation in cable length, more number of hosts can not be added.

iii) Any fault in the back bone cable makes the network down.
McGraw-Hill The McGraw-Hill Companies, Inc., 2004

Ring Topology
A ring topology connects one host to the next and the last host to the first. This creates a physical ring of cable. The data is passed along the ring in one direction from node to node , until it reaches its destination. Each host in the ring incorporates a repeater, to regenerate the signal and passes to next host.

Advantage i) ii)
McGraw-Hill

Easy to install & configure. Addition and deletion of hosts is easy.


The McGraw-Hill Companies, Inc., 2004

Disadvantage i) Unidirectional movement of data is a disadvantage. ii) Any break in the ring can cause the down in the entire network.

Extended star Topology


It connects individual star topologies together by linking the hubs/switches. This will extend the length and size of the network.

Hierarchical Topology
It is created similar to an extended star.

McGraw-Hill

The McGraw-Hill Companies, Inc., 2004

McGraw-Hill

The McGraw-Hill Companies, Inc., 2004

Categories of networks
A network can be categorized as a local area network (LAN), a metropolitan-area network (MAN), a wide area network (WAN)

McGraw-Hill

The McGraw-Hill Companies, Inc., 2004

LAN - LAN is a data communication system within a building, plant, or


campus, or between nearby buildings.

McGraw-Hill

The McGraw-Hill Companies, Inc., 2004

LAN (Continued)

McGraw-Hill

The McGraw-Hill Companies, Inc., 2004

MAN - A MAN is a data communication system covering an area, the size of a city.

McGraw-Hill

The McGraw-Hill Companies, Inc., 2004

Metropolitan Area Networks

A metropolitan area network based on cable TV.


McGraw-Hill The McGraw-Hill Companies, Inc., 2004

WAN - A WAN is a data communication system spanning over states,


countries, & the whole world.

McGraw-Hill

The McGraw-Hill Companies, Inc., 2004

Wide Area Networks (continued)

Relation between hosts on LANs and the subnet.


McGraw-Hill The McGraw-Hill Companies, Inc., 2004

Wide Area Networks (continued)

A stream of packets from sender to receiver


McGraw-Hill The McGraw-Hill Companies, Inc., 2004

McGraw-Hill

The McGraw-Hill Companies, Inc., 2004

A network interface card (NIC) is a printed circuit board that provides network communication capabilities to and from a personal computer. It is also called a LAN adapter, plugs into a motherboard and provides a port for connecting to the network. This card can be designed as an Ethernet card, a Token Ring card, or a Fiber Distributed Data Interface (FDDI) card.
McGraw-Hill The McGraw-Hill Companies, Inc., 2004

Physical address format

McGraw-Hill

The McGraw-Hill Companies, Inc., 2004

Example: A collection of five routers is to be connected in a point to point subnet. Between each pair of routers, the design may put a highspeed line, a medium speed line, a low speed line or no line. If it takes 100 ms of computer time to generate and inspect each topology, how long it takes to inspect all of them. Answer Call the routers A, B, C, D, and E. There are ten potential lines: AB, AC,AD, AE, BC, BD, BE, CD, CE, and DE. Each of these has four possibilities (three speeds or no line), so the total number of topologies is 4 10 = 1,048,576. At 100 ms each, it takes 104,857.6 sec, or slightly more than 29 hours to inspect them all.

McGraw-Hill

The McGraw-Hill Companies, Inc., 2004

The Internet

A Brief History The Internet Today

McGraw-Hill

The McGraw-Hill Companies, Inc., 2004

The Internet
During 1950s,the military telephone system was vulnerable. In 1960, DoD awarded a contract to RAND corporation to find a solution. Paul Baran, an employee of the organization came up with a solution. But Barans network could not built.

(a) Structure of the telephone system. (b) Barans proposed distributed switching system.
McGraw-Hill The McGraw-Hill Companies, Inc., 2004

ARPA- the Advanced Research Project Agency gave a network model called ARPANET during 1968. It consists of micro computers called IMPs-Interface Message Processors. For high reliability each IMP would be connected to two other IMPs.

McGraw-Hill

The McGraw-Hill Companies, Inc., 2004

The ARPANET

Growth of the ARPANET (a) December 1969 (b) July 1970 (c) March 1971 (d) April 1972 (e) September 1972
McGraw-Hill The McGraw-Hill Companies, Inc., 2004

NSFNET
National Science Foundation designed a computer communication network connecting all university research groups.

The NSFNET backbone in 1988.


McGraw-Hill The McGraw-Hill Companies, Inc., 2004

Architecture of the Internet

Overview of the Internet.


McGraw-Hill The McGraw-Hill Companies, Inc., 2004

HOW A COMPUTER CAN BE CONNECTED TO A N/W A Client at home has a dialup internet connection. Modem connected to PC converts digital signals to analog signals. The analog signals are transmitted using public telephone lines to the ISPs POP( Point of Presence). PoP is the termination of the client at local telephone switching office. At PoP signals from telephone line are connected to the regional network. At PoP the analog signals becomes fully digital and packet switched. The ISPs regional network operate at large international Backbone network. All the major international Backbones are connected to NAPs called Network Access Points. The NAPs are connected to local Intranet and then to the destination host.

McGraw-Hill

The McGraw-Hill Companies, Inc., 2004

Protocols and Standards Protocols


Standards Standards Organizations

McGraw-Hill

The McGraw-Hill Companies, Inc., 2004

Protocols
A protocol is a set of rules that governs data communication. A protocol defines what is communicated, how it is communicated, and when it is communicated.

Standards
Standards are necessary to ensure that products from different manufacturers can work together as expected.

Standards Organizations
International Organization for Standardization 2) ITU-T International Telecommunication Union 3) ANSI American National Standards Institute 4) IEEE Institute of Electrical and Electronics Engineers 5) EIA Electronics Industries Association
1) ISO

are some of the organizations involved in standards creation.

McGraw-Hill

The McGraw-Hill Companies, Inc., 2004

Layered Tasks

McGraw-Hill

The McGraw-Hill Companies, Inc., 2004

Sending a letter

McGraw-Hill

The McGraw-Hill Companies, Inc., 2004

To reduce the design complexity, network communication is divided into smaller and simpler parts called Layers. Each layer offer service to the higher layer.

McGraw-Hill

The McGraw-Hill Companies, Inc., 2004

Design issues
1) A layer should be created where a different abstractions (applications) are needed. 2) Each layer should perform a well defined function. 3) The function of each layer can be defined by internationally standardized protocols.

4) The layer boundaries should control the flow of information across the interface.
5) The number of layers should be large enough. 6) At sender side, higher layer take the service of the lower layer.

7) At receiver side, lower layer gives the service to higher layer.

McGraw-Hill

The McGraw-Hill Companies, Inc., 2004

OSI MODEL

McGraw-Hill

The McGraw-Hill Companies, Inc., 2004

Reference Models
The OSI Reference Model
The TCP/IP Reference Model A Comparison of OSI and TCP/IP

McGraw-Hill

The McGraw-Hill Companies, Inc., 2004

The OSI (Open System Interconnection) Reference Model From past three decades there has been a tremendous increase in the number and size of networks. Many of the networks were built using different hardware and software and thus the networks were incompatible.

To address this problem, the International Organization for Standardization (ISO) conducted a research on different network schemes. The ISO recognized that there was a need to create a network model that would help network engineers to build the networks which are flexible, robust, and interoperable. Therefore, ISO released the OSI reference model in 1984.

The OSI reference model released in 1984, provided a set of standards for the manufactures that ensured greater compatibility and interoperability between different types of network technologies.
McGraw-Hill The McGraw-Hill Companies, Inc., 2004

The seven layers of the OSI reference model are: Layer 7: The application layer, Layer6: The presentation layer Layer 5: The session layer, Layer 3: The network layer, Layer 1: The physical layer
McGraw-Hill The McGraw-Hill Companies, Inc., 2004

Layer 4: The transport layer Layer 2: The data link layer

Application Layer

The application layer provide network services to the user. The application layer services include- file transfer, remote access, shared database management, mail services etc. FTP - File Transfer Protocol,

HTTP - Hypertext Transfer Protocol, SMTP - Simple Mail Transfer Protocol, DNS - Domain Name System, TFTP - Trivial File Transfer Protocol
McGraw-Hill The McGraw-Hill Companies, Inc., 2004

Presentation Layer

The presentation layer is responsible for translation, compression & encryption.

McGraw-Hill

The McGraw-Hill Companies, Inc., 2004

Session Layer

The session layer is responsible for dialog control and synchronization. Dialog Control allows the two system into a dialog, either in half duplex or full-duplex mode. Synchronization- Allows the receiver to send the acknowledgement for every receive of a segment of data.
McGraw-Hill The McGraw-Hill Companies, Inc., 2004

Transport layer

Transport layer is responsible for: i) Service point addressing (port address) delivery of data from the process of one computer to the process of other computer. ii) Segmentation & Reassembly Dividing the message in to segments & reassembling. iiii) Error Control - Error control from process to process.

McGraw-Hill

The McGraw-Hill Companies, Inc., 2004

Network Layer

The Network layer is responsible for: i) Delivery- The delivery of individual packets from the Source to the destination.

ii) Logical addressing- Adding network address.


iii) Routing Transmitting the packet from source to destination using shortest path.
McGraw-Hill The McGraw-Hill Companies, Inc., 2004

Data Link Layer

The data link layer is responsible for: i) Framing Transforms the packet in to a frame. ii) Physical Addressing Adding the sender & receiver host addresses. iii) Flow Control Transmit the packets into the network sensing the traffic. iv) Error Control Adding the mechanism for error detection & Correction. v) Access Control When two are more devices are connected to a link, determine which device has control over the link.
McGraw-Hill The McGraw-Hill Companies, Inc., 2004

Physical Layer

The physical layer deals with: i) The electrical, mechanical, procedural, and functional specifications for activating, maintaining, and deactivating the physical link between end systems. Bit representation.
The McGraw-Hill Companies, Inc., 2004

ii)

iii) Movement of bits from hop to hop.


McGraw-Hill

iv) It represent the bit rate.


v) Bit synchronization. vi) Transmission mode deals with Point-to-point, simplex,

half-duplex, full-duplex.
vii) Physical Topology .

McGraw-Hill

The McGraw-Hill Companies, Inc., 2004

The TCP / IP Model


U.S. Department of Defense (DoD) developed the TCP/IP reference model before the release of OSI reference model. The TCP/IP reference model with its TCP/IP protocol stack make data communication possible between any two computers, anywhere in the world, at nearly the speed of light.

McGraw-Hill

The McGraw-Hill Companies, Inc., 2004

TCP/IP Model

The TCP/IP model has four layers 1) Host to - Network layer, 2) The Internet layer 3) The transport layer, & 4) The application layer

McGraw-Hill

The McGraw-Hill Companies, Inc., 2004

McGraw-Hill

The McGraw-Hill Companies, Inc., 2004

Application Layer The Application Layer of TCP/ IP has higher level protocols. Application layer includes the functionalities of session and presentation layer details of OSI model. FTP - File Transfer Protocol, HTTP - Hypertext Transfer Protocol, SMTP - Simple Mail Transfer Protocol, DNS - Domain Name System, TFTP - Trivial File Transfer Protocol

Transport Layer The transport layer deals with the issues like reliability, flow control, and error control. One of its protocols, the Transmission Control Protocol (TCP), provide flexible ways to create reliable, flow controlled, low-error network communications. Onother important protocol is User Datagram Protocol (UDP)
McGraw-Hill The McGraw-Hill Companies, Inc., 2004

Internet Layer

The Internet layer sends source packets to the destination using different paths.

The protocol that governs this layer is the Internet Protocol (IP). Best path determination and transmission of IP packets using packet switching technology.

Host-to-Network Layer
It deals with the transmission of IP packets in the LAN and WAN using the links. It has all the functionalities of physical and data link layers of OSI reference model.
McGraw-Hill The McGraw-Hill Companies, Inc., 2004

The OSI model and the TCP/IP model have the following similarities and differences.
Similarities
Both have layers. Both have application layers, but give very different services. Both have comparable transport and the network of OSI is called by Internet layer. Both the models use Packet-switched technology during data transmission.
McGraw-Hill The McGraw-Hill Companies, Inc., 2004

Differences
TCP/IP combines the OSI presentation and session layer issues into its

application layer. TCP/IP combines the OSI data link and physical layers into Host-toNetwork layer. TCP/IP appears simpler because it has fewer layers. TCP/IP protocols are the standards around which the Internet developed, so the TCP/IP model gains credibility just because of its protocols. OSI model is used as a guide in the development of internet. OSI has both connection-oriented and connectionless service in the network layer, but only connection-oriented service in the transport layer. TCI/IP has connectionless in the Internet layer and both in transport layer.
McGraw-Hill The McGraw-Hill Companies, Inc., 2004

Peer-to-peer Communication
In order for data packets to travel from the source to the destination, each layer of the model at the source must communicate with its peer layer at the destination. This form of communication is referred to as Peer-to-Peer Communications. During this process, each layer's protocol exchanges information, called protocol data units (PDUs), between peer layers.

McGraw-Hill

The McGraw-Hill Companies, Inc., 2004

A PROTOCOL is a set of rules that governs how two or more communicating devices are to interact. The layer n of source carries conversation with layer n of destination. The rules and conversations are collectively called as LAYER- N- PROTOCOL.

McGraw-Hill

The McGraw-Hill Companies, Inc., 2004

Network Devices

LAYER 1 - Transceiver, Repeater, & Hub. LAYER 2 Bridge, Switch, & NIC. LAYER 3 - Router
McGraw-Hill The McGraw-Hill Companies, Inc., 2004

Example Which of the OSI layers handles each of the following: a) Dividing the transmitted bit stream into frames. b) Determining which route through the subnet to use. Answer a) Data link layer divide the transmitted bit stream into frames. b) Network layer determine which route through the subnet to use for transmission of the frame. Example If the unit exchanged at the data link level is called a frame and the unit exchanged at the network level is called a packet. Do frames encapsulate packets or do packets encapsulate frames? Explain your answer. Answer Frames encapsulate packets. When a packet arrives at the data link layer, the header, trailer, etc. is added, and the entire packet is put in an envelope (the frame).

McGraw-Hill

The McGraw-Hill Companies, Inc., 2004

Example ; VTU, July 2007


A system has an n layer protocol hierarchy. Applications generate message of length M bytes. At each of the layers, an h byte header is added. What fraction of the network bandwidth is filled with the headers?

Answer n- layers protocol adds h- bytes per layer. The total number of header bytes per message is hn. The space added on headers is hn. So, the total message size is M + nh

The fraction of bandwidth wasted on headers is hn / (M + hn).

McGraw-Hill

The McGraw-Hill Companies, Inc., 2004

Example
What is the main difference between TCP & UDP? Answer

TCP is connection oriented, whereas UDP is a connectionless service.


Example The internet is roughly doubling in size every 18 months. One estimate put the number of hosts on it at 100 million in 2001.use these data and compute the expected number of internet hosts in the year 2010. Answer 0 month -100 M, 18 months-200 M, 36months- 400 M, 72 months - 1600 M, 180 months - 6400 M =6.4 billion hosts.

McGraw-Hill

The McGraw-Hill Companies, Inc., 2004

Connection-Oriented and Connectionless Services


A layer can offer two types of services to the layer above them. These services are Connection-Oriented and Connectionless service.

i) Connection-Oriented

The sender establishes a connection, uses the connection and releases the connection. Example- Telephone System, File transfer system etc.

McGraw-Hill

The McGraw-Hill Companies, Inc., 2004

Connectionless

Each packet carries destination address and travel to the destination using different paths. Example- Postal service, Unreliable datagram etc.

McGraw-Hill

The McGraw-Hill Companies, Inc., 2004

Addressing
Four levels of addressing are used in an internet.
1) Physical address It is used to identify the host on the network. It is a 48 bit size, represented in hexadecimal. It is a permanent address printed on the NIC. Example 07:01:02:01:2C:4B 2) Logical address It is also called as IP address or Network address. It is a 32 bits size. It is represented in 4 decimal dots. Example- 10. 25. 26.45 3) Port address - It defines a process running on a host. It is a 16 bits decimal representation. Example: TELNET -23, FTP-21, SMTP- 25, DNS 53. 4) specific address User friendly address are known as specific addresses. It is also called as URL (Universal Resource locator) or Domain Name System (DSN) address. Example www.hotmail.com
McGraw-Hill The McGraw-Hill Companies, Inc., 2004

McGraw-Hill

The McGraw-Hill Companies, Inc., 2004

VTU Examination Questions


1)What is a Computer Network?. How is it different from distributed system?. Distinguish between LAN & WAN. VTU, February 2006 2) What are the different types of services provided by layer?. VTU, February 2006

3) What are service primitives?. Distinguish between services and protocols. VTU, February 2006
4) Explain LAN structure and functions of Network Interface Card. VTU, February 2006

McGraw-Hill

The McGraw-Hill Companies, Inc., 2004

5) Clearly bring out the differences between LAN,MAN & WAN. Give examples. VTU, July 2006 6) Distinguish between connection oriented & Connection less service. VTU, July 2006 7) Explain the functional units of a Network interface card. VTU, July 2006 8) Illustrate with a diagram the layered architecture and design issues in typical computer network. What is the purpose of adding headers at the layer?. VTU, Jan 2007
McGraw-Hill The McGraw-Hill Companies, Inc., 2004

9) Discuss different applications of computer networks. VTU, Jan 2007 Discuss the key design issues for various layers in computer networks. VTU, Jan 2008 11) Distinguish between broadcast networks & point to point networks. VTU, Jan 2007 12) Differentiate connection-oriented service & connection-less service. VTU, Jan 2007
McGraw-Hill The McGraw-Hill Companies, Inc., 2004

13) What are headers and trailers?. How do they get added and removed in different layers of internet architecture?. VTU, July 2008 14) Give the comparison between LAN, MAN & WAN with an example. VTU, July 2008 15) Explain the transmission technologies used in computer network with an example to each technology. VTU, Jan 2009
16) What are service primitives?. Why they are needed?. Distinguish between services and protocol. VTU, Jan 2009
McGraw-Hill The McGraw-Hill Companies, Inc., 2004

17) What is Data Communication?. What are its characteristics ?. Explain. VTU, JAN 2009 18) Define following terms: i) Protocol, ii) Internet VTU, JAN 2009 19) Describe with neat diagram the functionalities of each layer in the OSI model. VTU, JAN 2009

McGraw-Hill

The McGraw-Hill Companies, Inc., 2004

You might also like