Cs6551 Computer Networks Notes

November 1, 2017 | Author: Vaisa Gan | Category: Network Topology, Computer Network, Osi Model, Communications Protocols, Coaxial Cable
Share Embed Donate


Short Description

notes...

Description

JEPPIAAR ENGINEERING COLLEGE DEPARTMENT OF INFORMATION TECHNOLOGY

CS6551- COMPUTER NETWORKS NOTES

CS6551 COMPUTER NETWORKS UNIT I FUNDAMENTALS & LINK LAYER 9 Building a network – Requirements - Layering and protocols - Internet Architecture – Network software – Performance ; Link layer Services - Framing - Error Detection - Flow control UNIT II MEDIA ACCESS & INTERNETWORKING 9 Media access control - Ethernet (802.3) - Wireless LANs – 802.11 – Bluetooth - Switching and bridging – Basic Internetworking (IP, CIDR, ARP, DHCP, ICMP) UNIT III ROUTING 9 Routing (RIP, OSPF, metrics) – Switch basics – Global Internet (Areas, BGP, IPv6), Multicast – addresses – multicast routing (DVMRP, PIM) UNIT IV TRANSPORT LAYER 9 Overview of Transport layer - UDP - Reliable byte stream (TCP) - Connection management Flow control - Retransmission – TCP Congestion control - Congestion avoidance (DECbit, RED) – QoS – Application requirements UNIT V APPLICATION LAYER 9 Traditional applications -Electronic Mail (SMTP, POP3, IMAP, MIME) – HTTP – Web Services – DNS - SNMP TEXT BOOK: 1. Lary L. Peterson, Bruce S. Davie, ―Computer Networks: A Systems Aproach‖, Fifth Editon,Morgan Kaufman Publishers, 201.4 REFERENCES: 1. James F. Kurose, Keith W. Ross, ―Computer Networking - A Top-Down Approach Featuring the Internet‖, Fifth Edition, Pearson Education, 2009. 2. Nader. F. Mir, ―Computer and Communication Networks‖, Pearson Prentice Hall Publishers, 2010. 3. Ying-Dar Lin, Ren-Hung Hwang, Fred Baker, ―Computer Networks: An Open Source Approach‖, Mc Graw Hill Publisher, 2011. 4. Behrouz A. Forouzan, ―Data communication and Networking‖, Fourth Edition, Tata McGraw – Hill, 2011.

1|Page

CS6551 COMPUTER NETWORKS

Sl.

Topics

No.

No of

Book

Hours

No.

UNIT-I : FUNDAMENTALS & LINK LAYER 1

Building a network

1

T(Pg 1-6)

2

Requirements

1

T(Pg 6- 24)

3

Layering and protocols

1

4 5

Internet Architecture Network software

1 1

T(Pg 33-36)

6

Performance

1

T(Pg 44-55)

7

Link layer Services - Framing

2

T(Pg 81-91)

8

Error Detection

2

9

Flow control

1

T(Pg 24-33),

T(Pg 36-44)

T(Pg 91-102),

T(Pg 102-119)

UNIT – II : MEDIA ACCESS & INTERNETWORKING 10

Media access control

1

T(Pg534-539) ,

11

Ethernet (802.3)

1

T(Pg 119-128)

12

Wireless LANs – 802.11

1

T(Pg 128-142),

13

Bluetooth

1

T(Pg 142-144),

14

Switching and bridging

2

T(Pg 170-203)

15

Basic Internetworking - IP

2

16

CIDR, ARP

1

17

DHCP, ICMP

1

T(Pg 203-224),

T(Pg 225-231),

T(Pg 231-235),

UNIT – III : ROUTING Sl. No.

Topics

No of

Book

Hours

No. T(Pg 240-252),

2|Page

CS6551 COMPUTER NETWORKS

18

Routing - RIP

1

T(Pg 183-187),

19

Routing - OSPF

1

20

Routing - Metrics

1

T(Pg 262-266)

21

Switch basics

1

T(Pg 267-270)

22

Global Internet (Areas, BGP, IPv6)

2

23

Multicast - addresses

1

T(Pg 338-341)

24

Multicast routing (DVMRP, PIM)

2

T(Pg 341-354)

T(Pg 252-262),

T(Pg 308-338),

UNIT-IV : TRANSPORT LAYER 25

Overview of Transport layer, UDP

1

T(Pg 391-396),

26

Reliable byte stream (TCP)

1

T(Pg 396-402),

27

Connection management

1

T(Pg 402-407),

28

Flow control

1

T(Pg 407-414)

29

Retransmission

1

T(Pg 414-422)

30

TCP Congestion control

2

T(Pg 499-514),

31

Congestion avoidance (DECbit, RED)

1

32

QoS, Application requirements

1

T(Pg 530-558)

T(Pg 698-700) T(Pg 700-708),

T(Pg 514-530),

UNIT-V : APPLICATION LAYER 33

Traditional applications

1

34

Electronic Mail (SMTP, POP3, IMAP, MIME)

2

35

HTTP

1

T(Pg 708-718),

36

Web Services

2

T(Pg 718-727)

37

DNS

2

38

SNMP

1

3|Page

T(Pg 745-755),

T(Pg 756-758)

CS6551 COMPUTER NETWORKS

UNIT I FUNDAMENTALS & LINK LAYER Building a network – Requirements - Layering and protocols - Internet Architecture – Network software – Performance ; Link layer Services - Framing - Error Detection - Flow control

BUILDING A NETWORK To build a computer network, that has the potential to grow to global proportions and to support applications as diverse as teleconferencing, video-on-demand, electronic commerce, distributed computing, and digital libraries. What is network? Network meant the set of serial lines used to attach dumb terminals to mainframe computers. To some, the term implies the voice telephone network. To others, the only interesting network is the cable network used to disseminate video signals. The main thing these networks have in common is that they are specialized to handle one particular kind of data (keystrokes, voice, or video) and they typically connect to special-purpose devices (terminals, hand receivers, and television sets). COMPUTER NETWORKS  DEFINTION: A computer network is defined as the interconnection of two or more computers. It is done to enable the computers to communicate and share available resources.  APPLICATIONS: i. Sharing of resources such as printers ii. Sharing of expensive software's and database iii. Communication from one computer to another computer iv. Exchange of data and information among users via network v. Sharing of information over geographically wide areas. Connectivity Connectivity occurs between two computers through physical medium like coaxial cable or an optical fiber.  Physical Medium – Link  Computers -Nodes  When a physical link occurs between a pair of nodes then it is referred as point-to-point.  When more than two nodes share a single physical link then it is referred as Multiple access.

(a) point-to-point (b) Multiple-access. Data communication between the nodes is done by forwarding the data from one link to another. The systematic way of organizing these forwarding nodes form a switched network. Two common types of switched network are  Circuit switched – e.g. Telephone System  Packet switched – e.g. Postal System 4|Page

CS6551 COMPUTER NETWORKS

Packet Switched Network In this network nodes send discrete blocks of data to each other. These blocks can be called as packet or message. Store and forward strategy: This network follows this technique. It means ―Each node receives a complete packets over the link, stores in internal memory and then forwards to next node‖. Circuit Switched Network It first establishes a circuit across the links and allows source node to send stream of bits across this circuit to the destination node The representation of network is given by cloud symbol

Fig: Switched network. Cloud represents the network Nodes inside the cloud (Switches) – Implement the network Nodes outside the cloud (host) Use the network COMPONENTS OF COMPUTER NETWORK  Two or more computers  Cables as links between the computers  A network interfacing card(NIC) on each computer  Switches  Software called operating system(OS) Five components of data communication The five components are : 1. Message - It is the information to be communicated. Popular forms of information include text, pictures, audio, video etc. Text is converted to binary, number doesnt converted, image is converted to pixels, etc. 2. Sender - It is the device which sends the data messages. It can be a computer, workstation, telephone handset etc. 3. Receiver - It is the device which receives the data messages. It can be a computer, workstation, telephone handset etc. 4. Transmission Medium - It is the physical path by which a message travels from sender to receiver. Some examples include twisted-pair wire, coaxial cable, radio waves etc. 5. Protocol - It is a set of rules that governs the data communications. It represents an agreement between the communicating devices. Without a protocol, two devices may be connected but not communicating. Direction of data Flow: Simplex unidirectional; one transmits, other receives 5|Page

CS6551 COMPUTER NETWORKS

Half-duplex – each can transmit/receive; communication must alternate

Full-duplex – both can transmit/receive simultaneously

Topology  Physical or logical arrangement  Topology of a network is the geometric representation of the relationship of all the links and linking devices to one another  5 basic types: mesh, star, bus, ring,Tree  May often see hybrid Categories of topology

Mesh Topology

 Dedicated point-to-point links to every other device  n(n-1)/2 links an each device will have n-1 I/O ports  Advantages  Dedicated links – no traffic problems  Robust  Privacy/Security  Easy fault identification and isolation  Disadvantages  more amount of cabling and I/O ports requirement  Installation and reconnection is difficult  Expensive 6|Page

CS6551 COMPUTER NETWORKS

Star Topology

 Dedicated point-to-point links to central controller (hub)  Controller acts as exchange  Advantages  less expensive  robustness  Disadvantages  More cabling requirement than ring and bus topologies  If central hub fails the whole network fails to operate Bus Topology

   

Multipoint configuration One cable acts as a backbone to link all devices Advantages : Ease of installation, less cabling Disadvantages : Difficult reconnection and fault isolation, a fault/break in the bus cable stops all transmission Ring Topology

    

Dedicated point-to-point configuration to neighbors Signal is passed from device to device until it reaches destination Each device functions as a repeater Advantages : easy to install and reconfigure Disadvantages :limited ring length and no: of devices; break in a ring can disable entire network

TREE TOPOLOGY

7|Page

CS6551 COMPUTER NETWORKS

It has a root node and all other nodes are connected to it forming a hierarchy. It is also called hierarchical topology. It should at least have three levels to the hierarchy. Features of Tree Topology 1. Ideal if workstations are located in groups. 2. Used in Wide Area Network. Advantages of Tree Topology 1. Extension of bus and star topologies. 2. Expansion of nodes is possible and easy. 3. Easily managed and maintained. 4. Error detection is easily done. Disadvantages of Tree Topology 1. Heavily cabled. 2. Costly. 3. If more nodes are added maintenance is difficult. 4. Central hub fails, network fails. Categories Of Networks  Based on size, ownership, distance covered, and physical architecture  Local Area Network (LAN) – smaller geographical area  Metropolitan Area Network (MAN) – network extended over an entire city  Wide Area Network (WAN) – large geographical area

CATEGORIES OF NETWORKS: There are three primary categories are, 1. Local area network. 2. Metropolitan area network. 3. Wide area network. 1. Local Area Network: They are usually privately owned and link the devices in a single office, building and campus. Currently LAN size is limited to a few kilometers. It may be from two PC‘s to throughout a company. The most common LAN topologies are bus, ring and star. They have data rates from 4 to 16 Mbps. Today the speed is on increasing and can reach 100 mbps. 2. Metropolitan Area Network: They are designed to extend over an entire city. It may be a single network or connecting a number of LANs into a large network. So the resources are shared between LANs. Example of MAN is, telephone companies provide a popular MAN service called switched multi megabit data service (SMDS). 3. Wide Area Network: 8|Page

CS6551 COMPUTER NETWORKS

It provides a long distance transmission of data, voice, image and video information over a large geographical are like country, continent or even the whole world. PHYSICAL LINKS

Guided Media Guided media conduct signals from one device to another include Twisted-pair cable, Coaxial Cable and Fiber-optic cable. A signal traveling along any of these media is directed and contained by the physical limits of the medium. Twisted-pair and coaxial cable use metallic (copper) conductors that accept and transport signals in the form of electric current. Optical fiber is a glass cable that accepts and transports signals in the form of light. Twisted Pair Cable A twisted pair consists of two conductors (normally copper) each with its own plastic insulation, twisted together.  One of the wires is used to carry signals to the receiver  Other is used as ground reference

Interference and cross talk may affect both the wires and create unwanted signals, if the two wires are parallel. By twisting the pair, a balance is maintained. Suppose in one twist one wire is closer to noise and the other is farther in the next twist the reverse is true. Twisting makes it probable that both wires are equally affected by external influences. Twisted Pair Cable comes into two forms:  Unshielded  Shielded Unshielded versus shielded Twisted-Pair Cable  Shielded Twisted-Pair (STP) Cable has a metal foil or braided-mesh covering that encases each pair of insulated conductors.  Metal casing improves that quality of cable by preventing the penetration of noise or cross talk.  It is more expensive. The following figure shows the difference between UTP and STP

Applications 9|Page

CS6551 COMPUTER NETWORKS

 Twisted Pair cables are used in telephone lines to provide voice and data channels.  Local area networks also use twisted pair cables. Connectors The most common UTP connector is RJ45. Coaxial Cable Coaxial cable (coax) carries signals of higher frequency ranges than twisted pair cable. Instead of having two wires, coax has a central core conductor of solid or stranded wire (usually copper) enclosed in an insulating sheath, and with outer conductor of metal foil. The outer metallic wrapping serves both as a shield against noise and as the second conductor and the whole cable is protected by a plastic cover.

Categories of coaxial cables Category

Impedance

Use

RG-59

75

Cable TV

RG-58

50

Thin Ethernet

RG-11

50

Thick Ethernet

Applications  It is used in analog and digital telephone networks  It is also used in Cable TV networks  It is used in Ethernet LAN Connectors  BNC connector – to connect the end of the cable to a device  BNC T - to branch out network connection to computer  BNC terminator - at the end of the cable to prevent the reflection of the signal. Fiber Optic Cable A fiber-optic cable is made of glass or plastic and transmits signals in the form of light. Properties of light  Light travels in a straight line as long as it moves through a single uniform substance. If traveling through one substance suddenly enters another, ray changes its direction. Bending of light ray

If the angle of incidence(the angle the ray makes with the line perpendicular to the interface between the two medium) is less than the critical angle the ray refracts and move closer to the surface. If the angle of incidence is equal to the critical angle, the light bends along the interface. 10 | P a g e

CS6551 COMPUTER NETWORKS

If the angle of incidence is greater than the critical angle, the ray reflects and travels again in the denser substance. Critical angle differs from one medium to another medium. Optical fiber use reflection to guide light through a channel.

A Glass or plastic core is surrounded by a cladding of less dense glass or plastic. Propagation Modes Mode Multimode Step-Index

Single mode Graded - Index

Multimode In the multiple mode, multiple light beams from a source move through the core in different paths.

 Multimode-Step-Index fiber: The density of core remains constant from the centre to the edge. A ray of light moves through this constant density in a straight line until it reaches the interface of the core and the cladding. At the interface there is an abrupt change to a lower density that changes the angle of the beam‘s motion.  Multimode- Graded -Index fiber: The density is varying. Density is highest at the centre of the core and decreases gradually to its lowest at the edge. Single Mode 11 | P a g e

CS6551 COMPUTER NETWORKS

Single mode uses step-index fiber and a highly focused source of light that limits beams to a small range of angles, all close to the horizontal.The single mode fiber itself is manufactured with a much smaller diameter than that of multimedia fiber. Connectors  Subscriber channel (SC) connector is used for cable TV.  Straight-tip (ST) connector is used for connecting cable to networking devices. Advantages of Optical Fiber  Noise resistance  Less signal attenuation  Light weight Disadvantages  Cost  Installation and maintenance  Unidirectional  Fragility (easily broken) Unguided media Unguided media transport electromagnetic waves without using a physical conductor. This type of communication is often referred to as wireless communication. Signals are normally broadcast through air and thus available to anyone who has device capable of receiving them. Unguided signals can travel from the source to destination in several ways:  Ground propagation – waves travel through lowest portion on atmosphere.  Sky propagation – High frequency waves radiate upward into ionosphere and reflected back to earth.  Line-of-sight propagation – Very high frequency signals travel in a straight line

Radio Waves Electromagnetic waves ranging in frequencies between 3 kHz and 1 GHz are normally called radio waves. Properties  Radio waves are omnidirectional. When an antenna transmits radio waves, they are propagated in all directions. This means that the sending and receiving antennas do not have to be aligned.  A sending antenna sends waves that can be received by any receiving antenna.  Radio waves, particularly those of low and medium frequencies, can penetrate walls. Fig: Omnidirectional antenna Disadvantages 12 | P a g e

CS6551 COMPUTER NETWORKS

 The omnidirectional property has a disadvantage, that the radio waves transmitted by one antenna are susceptible to interference by another antenna that may send signals using the same frequency or band.  As Radio waves can penetrate through walls, we cannot isolate a communication to just inside or outside a building. Applications Radio waves are used for multicast communications, such as radio and television, and paging systems. Microwaves Electromagnetic waves having frequencies between 1 and 300 GHz are called microwaves. Properties  Microwaves are unidirectional.  Sending and receiving antennas need to be aligned  Microwave propagation is line-of-sight  Very high-frequency microwaves cannot penetrate walls

a) ParabolicDish antenna b)Horn antenna  Parabolic Dish antenna focus all incoming waves into single point  Outgoing transmissions are broadcast through a horn aimed at the dish. Disadvantage  If receivers are inside buildings, they cannot receive these waves Applications  Microwaves are used for unicast communication such as cellular telephones, satellite networks, and wireless LANs. Infrared  Electromagnetic waves with frequencies from 300 GHz to 400 THz are called infrared rays  Infrared waves, having high frequencies, cannot penetrate walls. Applications  Infrared signals can be used for short-range communication in a closed area using line-of-sight propagation. REQUIREMENTS Connectivity Cost-Effective Resource Sharing Support for Common Services Performance Requirements differ according to the perspective: 1. Application programmer List the services that his or her application needs. Example: A guarantee that each message it sends will be delivered without error within a certain amount of time. 13 | P a g e

CS6551 COMPUTER NETWORKS

2. Network designer List the properties of a cost-effective design. Example: The network resources efficiently utilized and fairly allocated to different users.\ 3. Network provider List the characteristics of a system that is easy to administer and manage. Example: Fault can be easily isolated and it is easy to account for usage. Connectivity A network must provide connectivity among a set of computers Links and Nodes Types of Links or Connections Direction of Data Flow Unicast, Broadcast and Multicast

Cost-Effective Resource Sharing Multiplexing is a way that a system resource is shared among multiple users.

  

Two or more simultaneous transmissions on a single circuit. Transparent to end user. Multiplexing cost less.

14 | P a g e

CS6551 COMPUTER NETWORKS

 

It allows the transmission of multiple signal across a single data link. Type o Frequency division multiplexing (FDM) o Time division multiplexing (TDM) o Wave division multiplexing (WDM) Frequency Division Multiplexing  FDM  Each signal is modulated to a different carrier frequency.  Carrier frequencies separated so signals do not overlap (guard bands)  e.g. broadcast radio  Channel allocated even if no data

Wave Division Multiplexing  Multiple beams of light at different frequency  Carried by optical fiber  Same general architecture as other FDM  Number of sources generating laser beams at different frequencies  Multiplexer consolidates sources for transmission over single fiber  Optical amplifiers amplify all wavelengths  Demux separates channels at the destination Time Division Multiplexing  Multiple digital signals interleaved in time  May be at bit level of blocks  Time slots preassigned to sources and fixed  Time slots allocated even if no data  Time slots do not have to be evenly distributed amongst sources  Type  Synchronous  Asynchronous.

15 | P a g e

CS6551 COMPUTER NETWORKS

Support for Common Services A computer network provides more than packet delivery between nodes. We don‘t want application developers to rewrite for each application higher layer networking services. The channel is a pipe connecting two applications. How to fill the gap between the underlying network capability and applications requirements? a set of common services– Delivery guarantees, security, delay. Types of Applications  Interactive terminal and computer sessions:– Small packet length, small delay, high reliability.  File transfer:– High packet length, high delay, high reliability  Voice application:– Small packet length, small delay, small reliability, high arrival rate  Video-on-demand:– Variable/high packet length, fixed delay, small reliability  Video-conferencing– Variable/high packet length, small delay, small reliability NETWORK CRITERIA A network must be able to meet a certain number of criteria. The most important of these are performance, reliability, and security. Performance: Performance can be measured in many ways, including transit time and response time. Transit time is the amount of time required for a message to travel from one device to another. Response time is the elapsed time between an inquiry and a response. The performance of a network depends on a number of factors, including the number of users, the type of transmission medium, the capabilities of the connected hardware, and the efficiency of the software. Performance is often evaluated by two networking metrics: throughput and delay. We often need more throughputs and less delay. However, these two criteria are often contradictory. If we try to send more data to the network, we may increase throughput but we increase the delay because of traffic congestion in the network. Reliability: In addition to accuracy of delivery, network reliability is measured by the frequency of failure, the time it takes a link to recover from a failure, and the network's robustness in a catastrophe. Security: Network security issues include protecting data from unauthorized access, protecting data from damage and development, and implementing policies and procedures for recovery from breaches and data losses.

16 | P a g e

CS6551 COMPUTER NETWORKS

NETWORK ARCHITECTURE A computer network must provide general, cost effective, fair and robust among a large number of computers. It must evolve to accommodate changes in both the underlying technologies. To help to deal this network designers have developed general blueprints called network architecture that guide the design and implementation of networks. LAYERING AND PROTOCOL To reduce the complexity of getting all the functions maintained by one a new technique called layering technology was introduced. In this, the architecture contains several layers and each layer is responsible for certain functions. The general idea is that the services offered by underlying hardware, and then add a sequence of layers, each providing a higher level of service. The services provided at the higher layers are implemented in terms of the services provided by the lower layers. A simple network has two layers of abstraction sandwiched between the application program and the underlying hardware.

The layer immediately above the hardware in this case might provide host to host connectivity, and the layer above it builds on the available host to host communication service and provides support for process to process channels. Features of layering are: 1. It decomposes the problem of building a network into more manageable components. 2. It provides a more modular design. Addition of new services and modifications are easy to implement.

In process to process channels, they have two types of channels. One for request\reply service and the other for message stream service. A protocol provides a communication service that higher level objects use to exchange message. Each protocol defines two different interfaces. First it defines a service interface to other objects on the same system that want to use its communication services. This interface defines the operations that local objects can perform on the protocol. Second a protocol defines a peer interface to its counterpart on another machine. It defines the form and meaning of message exchanged between protocol peers to implement the communication service.

17 | P a g e

CS6551 COMPUTER NETWORKS

There are potentially multiple protocols at any given level, each providing a different communication service. It is known as protocol graph that make up a system.

ISO / OSI MODEL: ISO refers International Standards Organization was established in 1947, it is a multinational body dedicated to worldwide agreement on international standards. OSI refers to Open System Interconnection that covers all aspects of network communication. It is a standard of ISO. Here open system is a model that allows any two different systems to communicate regardless of their underlying architecture. Mainly, it is not a protocol it is just a model. OSI MODEL The open system interconnection model is a layered framework. It has seven separate but interrelated layers. Each layer having unique responsibilities.

ARCHITECTURE The architecture of OSI model is a layered architecture. The seven layers are, 1. Physical layer 2. Datalink layer 3. Network layer 4. Transport layer 5. Session layer 6. Presentation layer 7. Application layer The figure shown below shows the layers involved when a message sent from A to B pass through some intermediate devices. 18 | P a g e

CS6551 COMPUTER NETWORKS

Both the devices A and B are formed by the framed architecture. And the intermediate nodes only having the layers are physical, Datalink and network. In every device each layer gets the services from the layer just below to it. When the device is connected to some other device the layer of one device communicates with the corresponding layer of another device. This is known as peer to peer process. Each layer in the sender adds its own information to the message. This information is known is header and trailers. When the information added at the beginning of the data is known as header. Whereas added at the end then it called as trailer. Headers added at layers 2, 3, 4, 5, 6. Trailer added at layer 2. Each layer is connected with the next layer by using interfaces. Each interface defines what information and services a layer must provide for the layer above it.

ORGANIZATION OF LAYERS The seven layers are arranged by three sub groups. 1. Network Support Layers 2. User Support Layers 3. Intermediate Layer Network Support Layers: Physical, Datalink and Network layers come under the group. They deal with the physical aspects of the data such as electrical specifications, physical connections, physical addressing, and transport timing and reliability. User Support Layers: Session, Presentation and Application layers comes under the group. They deal with the interoperability between the software systems. Intermediate Layer The transport layer is the intermediate layer between the network support and the user support layers. FUNCTIONS OF THE LAYERS PHYSICAL LAYER The physical layer coordinates the functions required to transmit a bit stream over a physical medium. It deals with the mechanical and electrical specifications of the interface and the transmission medium.

19 | P a g e

CS6551 COMPUTER NETWORKS

The functions are, 1. Physical Characteristics Of Interfaces and Media:  It defines the electrical and mechanical characteristics of the interface and the media.  It defines the types of transmission medium 2. Representation of Bits  To transmit the stream of bits they must be encoded into signal.  It defines the type of encoding weather electrical or optical. 3. Data Rate  It defines the transmission rate i.e. the number of bits sent per second. 4. Synchronization of Bits  The sender and receiver must be synchronized at bit level. 5. Line Configuration  It defines the type of connection between the devices.  Two types of connection are, 1. point to point 2. multipoint 6. Physical Topology  It defines how devices are connected to make a network.  Five topologies are, 1. mesh 2. star 3. tree 4. bus 5. ring 7. Transmission Mode It defines the direction of transmission between devices. Three types of transmission are, 1. simplex 2. half duplex 3. full duplex DATALINK LAYER Datalink layer responsible for node-to-node delivery.

20 | P a g e

CS6551 COMPUTER NETWORKS

The responsibilities of Datalink layer are, 1. Framing It divides the stream of bits received from network layer into manageable data units called frames. 2. Physical Addressing  It adds a header that defines the physical address of the sender and the receiver.  If the sender and the receiver are in different networks, then the receiver address is the address of the device which connects the two networks. 3. Flow Control  It imposes a flow control mechanism used to ensure the data rate at the sender and the receiver should be same. 4. Error Control  To improve the reliability the Datalink layer adds a trailer which contains the error control mechanism like CRC, Checksum etc. 5. Access Control  When two or more devices connected at the same link, then the Datalink layer used to determine which device has control over the link at any given time. NETWORK LAYER When the sender is in one network and the receiver is in some other network then the network layer has the responsibility for the source to destination delivery.

The responsibilities are, 1. Logical Addressing

21 | P a g e

CS6551 COMPUTER NETWORKS



If a packet passes the network boundary that is when the sender and receiver are places in different network then the network layer adds a header that defines the logical address of the devices.

2. Routing  When more than one networks connected and to form an internetwork, the connecting devices route the packet to its final destination.  Network layer provides this mechanism. TRANSPORT LAYER The network layer is responsible for the end to end delivery of the entire message. It ensures that the whole message arrives in order and intact. It ensures the error control and flow control at source to destination level.

The responsibilities are, 1. Service point Addressing  A single computer can often run several programs at the same time.  The transport layer gets the entire message to the correct process on that computer.  It adds a header that defines the port address which used to identify the exact process on the receiver. 2. Segmentation and Reassembly  A message is divided into manageable units called as segments.  Each segment is reassembled after received that information at the receiver end.  To make this efficient each segment contains a sequence number. 3. Connection Control  The transport layer creates a connection between the two end ports.  It involves three steps. They are, 1. connection establishment 2. data transmission 3. connection discard 22 | P a g e

CS6551 COMPUTER NETWORKS

4. Flow Control  Flow control is performed at end to end level 5. Error Control  Error control is performed at end to end level. SESSION LAYER It acts as a dialog controller. It establishes, maintains and synchronizes the interaction between the communication devices.

The responsibilities are, 1. Dialog Control  The session layer allows two systems to enter into a dialog.  It allows the communication between the devices. 2. Synchronization It adds a synchronization points into a stream of bits. PRESENTATION LAYER The presentation layer is responsible for the semantics and the syntax of the information exchanged.

The responsibilities are, 1. Translation  Different systems use different encoding systems.  The presentation layer is responsible for interoperability between different systems. 23 | P a g e

CS6551 COMPUTER NETWORKS



The presentation layer t the sender side translates the information from the sender dependent format to a common format. Likewise, at the receiver side presentation layer translate the information from common format to receiver dependent format.

2. Encryption  To ensure security encryption/decryption is used  Encryption means transforms the original information to another form  Decryption means retrieve the original information from the encrypted data 3. Compression  It used to reduce the number of bits to be transmitted. APPLICATION LAYER The application layer enables the user to access the network. It provides interfaces between the users to the network.

The responsibilities are, 1. Network Virtual Terminal  It is a software version of a physical terminal and allows a user to log on to a remote host. 2. File Transfer, Access, and Management  It allows a user to access files in a remote computer, retrieve files, and manage or control files in a remote computer. 3. Mail Services  It provides the basis for e-mail forwarding and storage. 4. Directory Services  It provides distributed database sources and access for global information about various objects and services.

24 | P a g e

CS6551 COMPUTER NETWORKS

Summary of layers

Internet architecture The Internet architecture, also called the TCP/IP architecture after its two main protocols, is depicted in Fig.1. An alternative representation is given in Fig.2.

Fig.1 Internet protocol graph.

Fig Alternative view of the Internet architecture. At the lowest level are a wide variety of network protocols, denoted NET1, NET2, and so on. The Internet Protocol (IP) supports the interconnection of multiple networking technologies into a single, logical internetwork The third layer contains two main protocols: the Transmission Control Protocol (TCP) and the User Datagram Protocol (UDP). TCP and UDP provide alternative logical channels to application programs: TCP provides a reliable byte-stream channel, and UDP provides an unreliable datagram delivery channel. The Internet architecture has three features: 1. The application is free to bypass the defined transport layers and to directly use IP or one of the underlying networks.

25 | P a g e

CS6551 COMPUTER NETWORKS

2. IP serves as the focal point for the architecture—it defines a common method for exchanging packets among a wide collection of networks. Above IP can be arbitrarily many transport protocols, each offering a different channel abstraction to application programs. Below IP, the architecture allows for arbitrarily many different network technologies, ranging from Ethernet to FDDI to ATM to single point-to-point links. 3. The existence of working implementations is required for standards to be adopted by the IETF. NETWORK SOFTWARE

How to implement network software is an essential part of understanding computer networks. This section first introduces some of the issues involved in implementing an application program on top of a network, and then goes on to identify the issues involved in implementing the protocols running within the network. In many respects, network applications and network protocols are very similar—the way an application engages the services of the network is pretty much the same as the way a high-level protocol invokes the services of a lowlevel protocol. Application Programming Interface (Sockets) Most network protocols are implemented in software (especially those high in the protocol stack), and nearly all computer systems implement their network protocols as part of the operating system, when we refer to the interface ―exported by the network,‖ we are generally referring to the interface that the OS provides to its networking subsystem. This interface is often called the network application programming interface (API). The advantage of industry-wide support for a single API is that applications can be easily ported from one OS to another, and that developers can easily write applications for multiple OSs. Just because two systems support the same network API does not mean that their file system, process, or graphic interfaces are the same. Still, understanding a widely adopted API like Unix sockets gives us a good place to start. Each protocol provides a certain set of services, and the API provides a syntax by which those services can be invoked in this particular OS.  int socket(int domain, int type, int protocol)  int bind(int socket, struct sockaddr *address, int addr_len)  int listen(int socket, int backlog)  int accept(int socket, struct sockaddr *address, int *addr_len)  int connect(int socket, struct sockaddr *address, intaddr_len)  int send(int socket, char *message, int msg_len, int flags)  int recv(int socket, char *buffer, int buf_len, int flags) 26 | P a g e

CS6551 COMPUTER NETWORKS

Example Application The implementation of a simple client/server program that uses the socket interface to send messages over a TCP connection is discussed. The program also uses other Unix networking utilities, Our application allows a user on one machine to type in and send text to a user on another machine. It is a simplified version of the Unix talk program, which is similar to the program at the core of a web chat room. CLIENT PROGRAM: #include #include #include #include int main(int argc,char *argv[]) { socklen_t len; int sockfd,n; struct sockaddr_in servaddr,cliaddr; char buff[1024]; char srt[1024]; sockfd=socket(AF_INET,SOCK_STREAM,0); if(sockfd bandwidth is important Relative importance of bandwidth and latency depends on application For large file transfer, bandwidth is critical For small messages (HTTP, NFS, etc.), latency is critical Variance in latency (jitter) can also affect some applications (e.g., audio/video conferencing) How many bits the sender must transmit before the first bit arrives at the receiver if the sender keeps the pipe full takes another one-way latency to receive a response from the receiver If the sender does not fill the pipe send a whole delay × bandwidth product‘s worth of data before it stops to wait for a signal the sender will not fully utilize the network Delay × Bandwidth Product The product of these two metrics, often called the delay × bandwidth product. A channel between a pair of processes as a hollow pipe , where the latency corresponds to the length of the pipe and the bandwidth gives the diameter of the pipe, then the delay × bandwidth product gives the volume of the pipe—the maximum number of bits that could be in transit through the pipe at any given instant. For example, a transcontinental channel with a one-way latency of 50 ms and a bandwidth of 45 Mbps is able to hold 50×10−3 sec×45×106 bits/sec = 2.25 ×106 bits or approximately 280 KB of data. In other words, this example channel (pipe) holds as many bytes as the memory of a personal computer from the early 1980s could hold. 29 | P a g e

CS6551 COMPUTER NETWORKS

The delay × bandwidth product is important to know when constructing highperformance networks because it corresponds to how many bits the sender must transmit before the first bit arrives at the receiver. High-Speed Networks The bandwidths available on today‘s networks are increasing at a dramatic rate, and there is eternal optimism that network bandwidth will continue to improve. This causes network designers to start thinking about what happens in the limit, or stated another way, what is the impact on network design of having infinite bandwidth available Although high-speed networks bring a dramatic change in the bandwidth available to applications, in many respects their impact on how we think about networking comes in what does not change as bandwidth increases: the speed of light. Application Performance Needs A network-centric view of performance; that is, we have talked in terms of what a given link or channel will support. The unstated assumption has been that application programs have simple needs—they want as much bandwidth as the network can provide. This is certainly true of the aforementioned digital library program that is retrieving a 25-MB image; the more bandwidth that is available, the faster the program will be able to return the image to the user. If the application needs to support a frame rate of 30 frames per second, then it might request a throughput rate of 75 Mbps. The ability of the network to provide more bandwidth is of no interest to such an application because it has only so much data to transmit in a given period of time. FRAMING The stream of bits is not advisable to maintain in networks. When an error occurs, then the entire stream has to retransmitted. To avoid this, the framing concept is used. In this, the stream of bits is divided into manageable bit units called frames. To achieve, we are using several ways. They are, To transmit frames over the node it is necessary to mention start and end of each frame. There are three techniques to solve this frame  Byte-Oriented Protocols (BISYNC, PPP, DDCMP)  Bit-Oriented Protocols (HDLC)  Clock-Based Framing (SONET) Byte Oriented protocols In this, view each frame as a collection of bytes (characters) rather than a collection of bits. Such a byte-oriented approach is exemplified by the BISYNC (Binary Synchronous Communication) protocol and the DDCMP (Digital Data Communication Message Protocol) Sentinel Approach The BISYNC protocol illustrates the sentinel approach to framing; its frame format is

Fig: BISYNC Frame format 30 | P a g e

CS6551 COMPUTER NETWORKS

 The beginning of a frame is denoted by sending a special SYN (synchronization) character.  The data portion of the frame is then contained between special sentinel characters: STX (start of text) and ETX (end of text).  The SOH (start of header) field serves much the same purpose as the STX field.  The frame format also includes a field labeled CRC (cyclic redundancy check) that is used to detect transmission errors. The problem with the sentinel approach is that the ETX character might appear in the data portion of the frame. BISYNC overcomes this problem by ―escaping‖ the ETX character by preceding it with a DLE (data-link-escape) character whenever it appears in the body of a frame; the DLE character is also escaped (by preceding it with an extra DLE) in the frame body. This approach is called character stuffing. Point-to-Point Protocol (PPP) The more recent Point-to-Point Protocol (PPP). The format of PPP frame is

Fig: PPP Frame Format  The Flag field has 01111110 as starting sequence.  The Address and Control fields usually contain default values  The Protocol field is used for demultiplexing.  The frame payload size can he negotiated, but it is 1500 bytes by default.  The PPP frame format is unusual in that several of the field sizes are negotiated rather than fixed.  Negotiation is conducted by a protocol called LCP (Link Control Protocol).  LCP sends control messages encapsulated in PPP frames—such messages are denoted by an LCP identifier in the PPP Protocol. Byte-Counting Approach The number of bytes contained in a frame can he included as a field in the frame header. DDCMP protocol is used for this approach. The frame format is

Fig: DDCMP frame format  COUNT Field specifies how many bytes are contained in the frame‘s body.  Sometime count field will be corrupted during transmission, so the receiver will accumulate as many bytes as the COUNT field indicates. This is sometimes called a framing error.  The receiver will then wait until it sees the next SYN character. Bit-Oriented Protocols (HDLC) In this, frames are viewed as collection of bits. High level data link protocol is used. The format is Fig: HDLC Frame Format  HDLC denotes both the beginning and the end of a frame with the distinguished bit sequence 01111110.  This sequence might appear anywhere in the body of the frame, it can be avoided by bit stuffing.

31 | P a g e

CS6551 COMPUTER NETWORKS

 On the sending side, any time five consecutive 1‘s have been transmitted from the body of the message (i.e., excluding when the sender is trying to transmit the distinguished 01111110 sequence), the sender inserts a 0 before transmitting the next bit.  On the receiving side, five consecutive 1‘s arrived, the receiver makes its decision based on the next bit it sees (i.e., the bit following the five is).  If the next bit is a 0, it must have been stuffed, and so the receiver removes it. If the next bit is a 1, then one of two things is true, either this is the end-of-frame marker or an error has been introduced into the bit stream.  By looking at the next bit, the receiver can distinguish between these two cases: 7 If it sees a 0 (i.e., the last eight bits it has looked at are 01111110), then it is the end-offrame marker. 8 If it sees a 1 (i.e., the last eight bits it has looked at are 01111111), then there must have been an error and the whole frame is discarded. Clock-Based Framing (SONET)  Synchronous Optical Network Standard is used for long distance transmission of data over optical network.  It supports multiplexing of several low speed links into one high speed links.  An STS-1 frame is used in this method.

 It is arranged as nine rows of 90 bytes each, and the first 3 bytes of each row are overhead, with the rest being available for data.  The first 2 bytes of the frame contain a special bit pattern, and it is these bytes that enable the receiver to determine where the frame starts.  The receiver looks for the special bit pattern consistently, once in every 810 bytes, since each frame is 9 x 90 = 810 bytes long.

 The STS-N frame can he thought of as consisting of N STS-1 frames, where the bytes from these frames are interleaved; that is, a byte from the first frame is transmitted, then a byte from the second frame is transmitted, and so on.  Payload from these STS-1 frames can he linked together to form a larger STS-N payload, such a link is denoted STS-Nc. One of the bit in overhead is used for this purpose.

32 | P a g e

CS6551 COMPUTER NETWORKS

What is an Error ? • Whenever bits flow from one point to another, they are subject to unpredictable changes because of interference • The interference can change the shape of the signal, thus the bit value either from ―1‖ to ―0‖ or from ―0‖ to ―1‖ Error Detection • Data can be corrupted during transmission due to… • storms, accidents, sudden increase in electricity and voltage / decrease in signal power over distance • For reliable communication, errors must be detected and corrected Two Types of Errors • Single-Bit Errors : only one bit in the data unit has changed



Burst Errors of length „n‟ : 2 or more bits in the data unit have changed ( ‗n‘ is the distance between the FIRST and LAST errors in the data block )

Error Detection-General • Sender transmits every data unit twice • Receiver performs bit-by-bit comparison between that two versions of data • Any mismatch would indicate an error, which needs error correction • Advantage: very accurate • Disadvantage: time consuming : requires [ 2 x Transmission Time + Comparison Time ] Error Detection- Redundancy • Instead of repeating the entire data stream, a shorter group of bits may be appended to the end of each unit • Called as ―redundancy‖ because the extra bits are redundant to the information • Redundant information will be discarded as soon as the accuracy of the information has been determined

Types of Redundancy Checks 33 | P a g e

CS6551 COMPUTER NETWORKS



Parity Check – Vertical Redundancy Check (VRC) – Longitudinal Redundancy Check (LRC) • Cyclic Redundancy Check (CRC) • Check Sum Error Detection-Parity Check • A redundant bit called ―Parity Bit‖ is added to every data unit • Even Parity : total number of 1‘s in the data unit becomes even • Odd Parity : total number of 1‘s in the data unit becomes odd

Example of Using Parity Bits:

Data: w o r l d 1110111 1101111 1110010 1101100 1100100 Sent As: 11101110 11011110 11100100 11011000 11001001 Corrupted: 11111110 11011110 11101100 11011000 11001001 Parity Check – Performance • Can detect all single-bit errors • Can also detect burst errors if the total number of bits changed is odd (1,3,5,..) • Cannot detect errors where the total number of bits changed is even • Detects about 50% of errors 34 | P a g e

CS6551 COMPUTER NETWORKS

LONGITUDINAL REDUNDANCY CHECK • In this, a block of bits is organized in a table (rows and columns). • For example, instead of sending a block of 32 bits, we organize them in a table made of four rows and eight columns. • We then calculate the parity bit for each column and create a new row of eight bits which are the parity bits for the whole block

LRC – Performance • Detects all burst errors up to length n (number of columns) • If two bits in one data unit are damaged and two bits in exactly same positions in another data unit are also damaged, the checker will not detect an error VERTICAL REDUNDANCY CHECK:  It is also known as parity check. In this technique a redundant bit called a parity bit is appended to every data unit so that the total number of 1s in the unit including the parity bit becomes even for even parity or odd for odd parity.  In even parity, the data unit is passed through the even parity generator. It counts the number of 1s in the data unit. If odd number of 1s, then it sets 1 in the parity bit to make the number of 1s as even.  If the data unit having even number of 1s then it sets in the parity bit to maintain the number of 1s as even.

35 | P a g e

CS6551 COMPUTER NETWORKS



When it reaches its destination, the receiver puts all bits through an even parity checking function.  If it counts even number of 1s than there is no error. Otherwise there is some error. EXAMPLE: The data is : 01010110 The VRC check : 010101100  In odd parity, the data unit is passed through the odd parity generator. It counts the number of 1s in the data unit.  If even number of 1s, then it sets 1 in the parity bit to make the number of 1s as odd. If the data unit having odd number of 1s then it sets in the parity bit to maintain the number of 1s as odd.  When it reaches its destination, the receiver puts all bits through an odd parity checking function. If it counts odd number of 1s than there is no error. Otherwise there is some error. EXAMPLE The data is: 01010110 The VRC check: 01010111 CYCLIC REDUNDANCY CHECK CRC is based on binary division. In this a sequence of redundant bits, called CRC remainder is appended to the end of a data unit so that the resulting data unit becomes exactly divisible by a second predetermined binary number. At its destination, the incoming data unit is divided by the same number. If at this step there is no reminder, the data unit is assumed to be intact and therefore accepted. A remainder indicates that the data unit has been changed in transit and therefore must be rejected. Here, the remainder is the CRC. It must have exactly one less bit than the divisor, and appending it to the end of the data string must make the resulting bit sequence exactly divisible by the divisor.

First, a string of n-1 0s is appended to the data unit. The number of 0s is one less than the number of bits in the divisor which is n bits. Then the newly elongated data unit is divided by the divisor using a process called binary division. The remainder is CRC. The CRC replaces the appended 0s at the end of the data unit. The data unit arrives at the receiver first, followed by the CRC. The receiver treats whole string as the data unit and divides it by the same divisor that was used to find the CRC remainder. If the remainder is 0 then the data unit is error free. Otherwise it having some error and it must be discarded. Error Detection- CRC Generator 36 | P a g e

CS6551 COMPUTER NETWORKS

Error Detection- CRC Checker

Error Detection- CRC Polynomials • The divisor in the CRC generator is most often represented as an algebraic Polynomial. • Reasons: – It is short – It can be used to prove the concept mathematically

CHECKSUM The error detection method used by the higher layer protocols is called checksum. It consists of two arts. They are, 1. checksum generator 2. checksum checker Checksum Generator: • The sender follows these steps: – The data unit is divided into ―k‖ sections, each of ―n‖ bits 37 | P a g e

CS6551 COMPUTER NETWORKS

– All sections are added using one‘s complement to get the sum – The sum is complemented and becomes the checksum. – The checksum is appended and sent with the data. Checksum Checker: • The receiver follows these steps: – The unit is divided into ―k‖ sections, each of ―n‖ bits – All sections are added using one‘s complement to get the sum. – The sum is complemented. – If the result is zero, the data are accepted; otherwise, rejected

EG:

Error Correction Techniques • Retransmission  When an error is discovered, the receiver can ask the sender to retransmit the entire data unit 38 | P a g e

CS6551 COMPUTER NETWORKS



Forward Error Correction : • A receiver can use an error-correcting code, which automatically corrects certain errors • Single-bit errors: • Can be detected by the addition of parity bit which helps to find ―error‖ or ―no error‖ which is sufficient to detect errors • To correct errors the receiver can simply invert 0 to 1 or 1 to 0, but the problem is ―locating‖ the position of error • To do so requires enough redundancy bits • Condition: 2r >= m + r + 1

Error Correction-Hamming Code • Hamming Code can be applied to data units of any length and uses the relationship between data and redundancy bits • For example: a 7-bit ASCII code requires 4 redundancy bits that can be added to the end of the data unit or mixed with the original data bits, which are placed in positions 1, 2, 4 and 8 i.e x0,x1,x2,x3 and so on.



In the Hamming Code, each “r” bit for one combination of data bits as below: r1: bits 1, 3, 5, 7, 9, 11 r2: bits 2, 3, 6, 7, 10, 11 r3: bits 4, 5, 6, 7 r4: bits 8, 9, 10, 11

39 | P a g e

CS6551 COMPUTER NETWORKS

Example of Redundancy bit Calculation

Error Correction-Burst Error Correction • Instead of sending all the bits in a data unit together, we can organize ―N‖ units in a column and then send the first bit of each , followed by the second bit of each and so on • In this way, if a burst error of M bits occurs (M
View more...

Comments

Copyright ©2017 KUPDF Inc.
SUPPORT KUPDF