Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

DCN Notes

Download as pdf or txt
Download as pdf or txt
You are on page 1of 82

Data and Communication network (MCA SEMIII) Data communication network

Data -Information Communication Sharing Information Communicate (Share information)

1. Local (face to face) 2. Remote (separated by geographical distance)

Computer network Definition: large no. of separate but interconnected computers (nodes) is call a computer network

Components of data communication:

Message :It is the information or data to be communicated . It consist of text,sound or video Sender : The sender is the device that sends the data message. Receiver :The receiver is the device that receive the message. Medium ; The physical path by which the message travel from sender to receiver .it could be a twisted pair, co-axial cable fiber optics etc Protocol: is a set of rules that governs data communication. Without protocol two device may be connected but not communicating.

Prepared By : Sangita Oswal( Lecturer VESIT)

Brought to you by :Md. Azaz

Data and Communication network (MCA SEMIII)

Modes of communication
Communication between two device can be simplex ,half-duplex or full duplex

a. Simplex :communication is unidirectional as on a one way street . only one of the two device on a link can transmit the other can only receive e.g k/b , monitor b. Half duplex :each station can both transmit and receive but not at same time .if one device is sending other as to receive e.g. wakie- takie c. Full-Duplex :both station can transmit and receive simultaneously .It is like a two way street traffic flowing in both direction at the same time .e.g telephone line . Topologies It is a geometric representation of the relation of all the links and linking device(nodes) to one another . 1.MESH : every device as a dedicated point to point link to every other device If n is no. of nodes Links = n(n-1)/2.

Prepared By : Sangita Oswal( Lecturer VESIT)

Brought to you by :Md. Azaz

Data and Communication network (MCA SEMIII)

Advantage : 1. use of dedicated links eliminate traffic problem as link is not shared . 2. Robust : if one link becomes unusable ,it does not affect the entire system 3. privacy or security : due to dedicated link only intended receiver sees it other user cannot access to message 4. Fault identification and isolation easy Disadvantage : 1. amount of cabling and no. of I/O port required 2. installation and reconnection is difficult STAR : each device as a dedicate point to point link only to a central controller called HUB.

Advantage : 1. Less cabling needed compare to mesh 2. adding and removing any node is easy 3. roubtness : If one link fails only that is affected

Prepared By : Sangita Oswal( Lecturer VESIT)

Brought to you by :Md. Azaz

Data and Communication network (MCA SEMIII) 4. fault identification and isolation easy BUS : one long cable act as a backbone and all nodes are connected to it by a drop line and tap.

Advantage : 1. easy installation 2. less cabling than mesh and star Disadvantage : 1. it is difficult to add new device bcos signal reflection at tap cause degradation in quality .(it is controlled by limiting the no. of device and spacing between them) 2. fault or break stops transmission ,even if two device on the same side of problem

RING :each device as a dedicated point to point connection only with two device on either side of it. A signal is passed along the ring in one direction from device to device until it reach destination . Advantage: 1. easy to install and reconfigure ,each device is linked only to its immediate neighbors Disadvantage : 1. unidirectional traffic can be disadvantage ,it could be solved by using dual ring.

Analog data /Digital data :


Analog data is produce by human beings when we speak .This analog data is captured in microphone converted to analog signal and send over longer distance in case of telephone system. Digital data is the data in computer represented by 0s and 1s .It is converted into digital signal and transferred between computer memory , cpu etc.

Modulation (analog to analog(radio system)) : Analog-to-analog conversion is the


representation of analog information by an analog signal. One may ask why we need to modulate an analog signal; it is already analog. Modulation is needed if the medium is bandpass in nature or if only a bandpass channel is available to us.

Prepared By : Sangita Oswal( Lecturer VESIT)

Brought to you by :Md. Azaz

Data and Communication network (MCA SEMIII)

Amplitude Modulation (AM)

Carrier signal is modulated so that the amplitude varies with the changing amplitude of the modulating signal ,frequency and phase remains constant . B.W=2*B.W of modulating signal. Carrier frequency in range of 530 to 1700khz

Frequency modulation(FM)

Frequency of carrier is modulated according to changing volatsge level of modulating signal , amplitude and phase remains constant. B.W=10*B.W of modulating signal

Prepared By : Sangita Oswal( Lecturer VESIT)

Brought to you by :Md. Azaz

Data and Communication network (MCA SEMIII) Carrier frequency anywhere in range 88 to 108 mhz.

Phase modulation
Phase of carrier is modulated according to the changing volatsge level of modulating signal,amplitude and frequency remains the same . Definition Carrier signal : in analog transmission the sending device produce a high frequency signal that act as a basic for information signal called carrier signal Modulation : digital information modulate the carrier signal by modifying one or more of its charactertics (A,F,P).this kind of modification is called modulation and information signal is called modulating signal..

Sampling (Analog to digital) PAM: (pulse amplitude modulation) this techniques takes analog signal samples it and
generate a series a pulse based on result of sampling(measuring ampltitude of signal at equal interval). In PAM, the original signal is sampled at equal interval using technique of sample and hold i.e. at a moment the signal level is read and held briefly PAM is not useful bcos it translate the original waveform to series of pulse but these pulses are still amplitude. It is a foundation for PCM

PCM (pulse code modulation) ; PCM modifies the pulse created by PAM to create a
complete digital signal.To do so it first quantize the PAM pulses which is a method of assigning integral values in a specific range to sampled instance. Then assign sign and magnitude to quantized sample. Each value is translated into 7 bit binary equivalent and 8th bit indicate sign. The binary digit are then transformed to a digital signal using line coding techniques .

Prepared By : Sangita Oswal( Lecturer VESIT)

Brought to you by :Md. Azaz

Data and Communication network (MCA SEMIII)

Transmission Impairment:
Signal travel through transmission media which are not perfect. The imperfection cause impairment in the signal this means signal at beginning and end the medium are not the same. Attenuation: means loss of energy. when a signal travel through a medium it loses some of its energy so that it can overcome the resistance of the medium ,that is why a wire carrying electrical signal gets warm (hot).To compensate for this loss amplifiers are used to amplify the signal . Distortion: means that the signal changes its form or shape. Distortion occurs in a composite signal made of different frequencies. Each signal component has its own propagation speed through a medium and therefore its own delay in arriving at the final destination.

Prepared By : Sangita Oswal( Lecturer VESIT)

Brought to you by :Md. Azaz

Data and Communication network (MCA SEMIII) Noise: Several types of noise such as thermal noise, induced noise crosstalk and impulse noise may corrupt the signal. Thermal noise: is a random motion of electron in a wire which create an extra signal not originally send with transmitter Induced noise: comes from source like motor or application Crosstalk is the effect of one wire on the other Impulse noise is a spike (a signal with high energy in a very short period of time) that comes from power lines , lightening

Multiplexing:
Whenever the bandwidth of a medium linking two devices is greater than the bandwidth needs of the devices, the link can be shared. Multiplexing is the set of techniques that allows the simultaneous transmission of multiple signals across a single data link. As data and telecommunications use increases, so does traffic.

Prepared By : Sangita Oswal( Lecturer VESIT)

Brought to you by :Md. Azaz

Data and Communication network (MCA SEMIII)

FDM
FDM is an analog multiplexing technique that combines analog signals which can be applied when B/W of a link is greater than combined B/W of signal to be transmitted. Multiplexing Process: Each telephone generate a signal, inside multiplexer these similar signal are modulated onto different carrier frequency (f1,f2,f3). The resulting modulated signal is then combined into one composite signal then is send over a media link that has enough b/w to accommodate it.

Demultiplexing process: it uses a series of filter to decompose the multiplexed signal into its constitute signal The signal are the passed to demodulator that desperate them from their carrier and pass to waiting receiver.

Prepared By : Sangita Oswal( Lecturer VESIT)

Brought to you by :Md. Azaz

Data and Communication network (MCA SEMIII)

WDM
WDM is an analog multiplexing technique to combine optical signals. Optical signal as a high data rate. WDM is conceptually similar to FDM only the fact that it combines optical signal and use fiber optics cable for transmission

TDM is a digital process that allows several connection to share the high B/W of a link
instead of sharing a portion of B/W as in FDM, time is shared. Each Connection occupies a portion of time in link .link is sectioned on time rather than frequency.

Prepared By : Sangita Oswal( Lecturer VESIT)

Brought to you by :Md. Azaz

10

Data and Communication network (MCA SEMIII)

Switching

Prepared By : Sangita Oswal( Lecturer VESIT)

Brought to you by :Md. Azaz

11

Data and Communication network (MCA SEMIII)

Circuit switching
1.Seeks a physical path all the way from sender to receiver ,this is called circuit switching 2. when a call passes a physical connection is established between lines on which call came in and one of the o/p line 3. It needs an end to end path before any data can be sent. e,g telephone

Message switching:
1. No physical path is established in advance between sender and receiver 2. Instead when sender has a block of data to be sent ,it is stored in first switching office and than forwarded later ,one hop at a time 3. Each block received is inspected for error and then retransmitted called store and forward network e.g telegraph

Packet switching:
1. With message switching there is no limit at all on block size which means router have disk to buffer long blocks 2. Packet switching network places a tight upper bound on block size allowing packet to be buffered in router main memory instead of on disk 3. By making sure that no user can monopolize any transmission line very long it is suited for interactive traffic 4. Also the first packet of a multi-packet can be forwarded before second one has fully arrived reducing delay and increasing throughput. Compare circuit and packet switching

Timings Diagram:
Prepared By : Sangita Oswal( Lecturer VESIT) Brought to you by :Md. Azaz 12

Data and Communication network (MCA SEMIII)

A comparison of circuit switched and packet-switchednetworks. Reference Model

OSI Model (open system interconnection)


The principle that were applied to arrive at the seven layer are 1. layer created where a different abstraction needed 2. each layer should perform well defined function 3. layer boundary should be chosen to minimize the information flow across interface 4. no. of layer should be large enough to distinct function need ,not throw together in same layer

Prepared By : Sangita Oswal( Lecturer VESIT)

Brought to you by :Md. Azaz

13

Data and Communication network (MCA SEMIII)

Physical Layer: is responsible for sending bits from one computer to another
(not concern with meaning of it) Function of physical layer:1. Define transmission rate i.e. the no. of bit transmitted per sec 2. It deals with physical topologies, transmission mode and multiplexing 3. It also deals with connection type multipoint or point to point connection.

Data link layer: It is responsible for node to node delivery of data. It accept
packet from the n/w layer and forms frame and give it to physical layer. Function includes : 1. Framing it divides the stream of bit received from n/w layer into manageable data unit called frame . 2. Flow control by buffering the extra bit 3. Error control is achieved by adding trailer at end of frame DLL divided into LLC and MAC sub layer LLC (logic link control) establish and maintain links between devices MAC (Medium access control) control the way multiple device share the channel.

Network layer: main function is to delivery packet from source to destination


across multiple links (if only one link no need of network layer) Its function includes: 1. Translate logical network address into physical address. 2. Quality of service by deciding priority of message and route a message will take if there are several ways 3. It is concern with circuit, message and packet switching

Prepared By : Sangita Oswal( Lecturer VESIT)

Brought to you by :Md. Azaz

14

Data and Communication network (MCA SEMIII) 4.

Transport layer It is responsible for source to destination delivery of the

entire message, it ensure that the wide message arrive intact and in order . Functions are: 1. divide each message into packet at source and reassemble them at destination 2. Header includes SAP (service access point) to deliver a specific process at source to a specific process at destination.

Session layer:
The layer establishes maintain and synchronize the interaction between the communicating system Its function includes: 1. allow two system to enter into a dialog 2. To add check point i.e. synchronization point into stream of data.

Presentation layer: unlike lower layer which are mostly concern with moving
bits around the presentation layer is concern with syntax and semantics of the information transmitted Function includes 1. it translate data between the format the network requires and computer excepts 2. Encryption at transmitter and decryption at receiver. 3. data compression to reduce B/W of data to be transmitted

Application layer contains variety of protocol that are commonly needed by


user like HTTP, SMTP, FTP, DNS etc

TCP/IP Reference model: TCP/IP reference model is used in internet.

Prepared By : Sangita Oswal( Lecturer VESIT)

Brought to you by :Md. Azaz

15

Data and Communication network (MCA SEMIII)

1. Transport Layer: layer above the internet layer in TCP/IP is called


transport layer . It is design to allow peer entities on the source and destination to carry conversation just like OSI Transport layer. Two protocol define here are

TCP(Transmission control protocol) and UDP (user datagram protocol)

TCP is reliable connection oriented protocol that allow byte stream


originating on one machine to delivered without error on another machine .it fragments the incoming byte stream into discrete message and pass to internet layer UDP is unreliable and connectionless protocol

2. Internet Layer :this layer is the base which hold whole architecture
together .its job is to permit host to inject packet into network and have them travel independently to the destination .they may even arrive in different order than they were sent ,in that case it is job of higher layer to rearrange in order . It defines a protocol IP its job is to delivery IP packets .TCP/IP Internet layer is same as network Layer in OSI

APPLICATION LAYER: TCP/IP Application Layer includes OSI


Presentation, session and application layer . this include all the processes that involve user interaction and also presentation of data. In TCP/IP the term socket and port is used to describe path over which application communicate. protocol used are SMTP,HTTP,FTP etc

HOST TO NETWORK LAYER: Data link layer and physical layer of OSI
are used rather than defining its own.

Prepared By : Sangita Oswal( Lecturer VESIT)

Brought to you by :Md. Azaz

16

Data and Communication network (MCA SEMIII)

PHYSICAL LAYER

Purpose of the physical layer is to transport raw bit of data from one machine to another.

Various media can be used for transmission Guided media / unguided media

Guided media Twisted pair

1. Two insulated copper wire ,typically about 1mm thick are used 2. Twisted pair can run several km without amplification ,but for longer distance amplification is needed it is generally used in telephone . 3. It can be used for transmitting either analog or digital data. 4. Bandwidth depend upon thickness of wire and distance traveled 5. Classified as category 3 and category5 6. category3 : two insulated copper wire gently twisted together ,4 such pair are grouped together in a plastic sheath to protect wire and keep them

Prepared By : Sangita Oswal( Lecturer VESIT)

Brought to you by :Md. Azaz

17

Data and Communication network (MCA SEMIII) together.

7. category5: more twist per centimeter, it have less crosstalk and better quality of signal over longer distance

Co-axial cable:

1. Better shielding than twisted pair ,so can span longer distance at higher speed 2. The co-axial cable consist of stiff copper wire as the core surrounded by insulating material .the insulator is enchased by a cylindrical conductor ,which in turn is covered by plastic sheath. 3. The construction and shielding of a co-axial cable give a good combination of high B/W and excellent noise immunity. 4. use in MAN and cable television

Fiber optics: the fiber optics cable is made of glass or plastic and transmit signal
in form of light. Prepared By : Sangita Oswal( Lecturer VESIT) Brought to you by :Md. Azaz 18

Data and Communication network (MCA SEMIII) Light travel in straight line as long as it is moving through a single uniform substance If ray of light traveling through one substance suddenly enter another (more or less dense) the ray changes direction. If angel of incidence is less than the critical angel the ray refracts and moves closer to the surface. If equal ray bends along surface If greater the ray reflects make turn and travel again in denser substance

Construction of fiber optics

Propagation modes

Prepared By : Sangita Oswal( Lecturer VESIT)

Brought to you by :Md. Azaz

19

Data and Communication network (MCA SEMIII)

UnGuided Media Data signal flow through air Not guided or bounded to a channel Classified as per wave propagation Electromagnetic Spectrum When electron move electromagnetic wave is created Wave travel through space No. of oscillation /sec=frequency (f hz) Distance between two consecutive maxima or minima is wave length Speed is usually speed of light C=3*108 m.sec

Prepared By : Sangita Oswal( Lecturer VESIT)

Brought to you by :Md. Azaz

20

Data and Communication network (MCA SEMIII)

Radio Microwave infrared and visible light Portion of spectrum is used for transmitting information by modulating (A,F,P) of wave . Ultra Violet Ray X-Ray Gamma Ray: Are better as they have frequency Hard to produce and modulate Not travel well through building Dangerous to living things Radio Transmission: Easy to Generate Travel long distance Penetrate building easily Omni directional: travel in all direction from source Properties of radio wave are frequency dependent: At low frequency it pass through obstacles but power falls sharply with distance At high frequency radio wave travel in straight line and bounce off obstacles. There are 3 types of RF frequency propagation Ground Wave : Fallows the curvature nature of the earth Carrier frequency up to 2 MHZ. Line of sight : Transmit exactly in line of sight Receiver station in view of transmitter Ionospheric propogation : Bounces off the earth Ionosphere layer in upper atmosphere

Prepared By : Sangita Oswal( Lecturer VESIT)

Brought to you by :Md. Azaz

21

Data and Communication network (MCA SEMIII) Frequency 30-85 MHz Because it depend on earth ionosphere it change with weather and time of day

(a) In the VLF, LF, and MF bands, radio waves follow the curvature of the earth. (b) In the HF band, they bounce off the ionosphere Microwave Transmission: Above 100 MHz the wave travel in straight line and narrowly focused Concentrating all energy in small beam give higher signal to noise ratio Transmitter and receiver aligned to each other Multiple Transmitters lined up to communicate with multiple receivers w/o interfacing and following minimum spacing rule But for longer distance repeater needed Even though the beam may be well focused there is still divergence in space Some wave are refracted and they take a longer to arrive at destination then direct wave Delayed wave is out o f- phase with direct wave called multi path fading Microwave is in expensive Putting up two towers and putting antennas on each one.

Prepared By : Sangita Oswal( Lecturer VESIT)

Brought to you by :Md. Azaz

22

Data and Communication network (MCA SEMIII)

DATA LINK LAYER


The data link layer functions include 1. providing a well-defined service interface to network layer 2. delaying with transmission error 3. regulating the flow of data so that slow receiver are not swapped by fast sender Data link layer encapsulate data into frames

Relationship between packets and frames.

Service provided to network layer: 1. Unacknowledged connectionless service. 2. Acknowledged connectionless service 3. Acknowledged connection-oriented service. 1. Unacknowledged connectionless service: consist of having the source machine send independent frame to destination machine without having destination to acknowledge them. No logical connection is established before or released afterward. If frame is lost no attempt is made to detect and recover it. This service is appropriate when error rate is low and recovery is left to higher-level. 2. Acknowledged connectionless service: still no logical connection is used but each frame sent is individually acknowledged Sender knows whether the frame has arrived correctly If not, it can sent again This service is used for unreliable channels like wireless. 3. Acknowledged connection-oriented service. it is most sophisticated service that data link layer can provided to network layer . With this service the source and destination machine establish a connection brfore any data is to be transferred Prepared By : Sangita Oswal( Lecturer VESIT) Brought to you by :Md. Azaz 23

Data and Communication network (MCA SEMIII) Each frame is numbered and guarantees that it is received exactly once and in right order at the receiver.

Framing To provide service to network layer the data link layer must use service
provided by physical layer .To break bit stream into frames can be achieved by inserting time gap between frame .but it is risky to count on timing to mark start and end of each frame so other methods are devised. They are: 1. Character count 2. Byte stuffing 3. Bit stuffing 4. Physical layer coding violations. 1. Character count: A field in the header is used to specify the number of character in the frame. When the data link layer at the destination sees the character count it knows how many character fallows and hence the end of frame.

The trouble with the algorithm is that count can be corrupted in transmission. for eg character count 5 of second frame get corrupted to 7,the destination will go out of synchronization and will be unable to locate start of next frame. i.e it is impossible for the receiver to tell the transmitter from where to restart..

Byte Stuffing
To get around the problem of resynchronization Byte Stuffing is used

Prepared By : Sangita Oswal( Lecturer VESIT)

Brought to you by :Md. Azaz

24

Data and Communication network (MCA SEMIII)

Bit Stuffing
Each frame start and end with a particular bit pattern 0111110 Sender encounter 5 consequtive one s it stuff a 0 bit into outgoing bit stream Receiver sees five consequative one s followed by a 0 it automatically destuff the 0 bit.

Bit stuffing (a) The original data. (b) The data as they appear on the line. (c) The data as they are stored in receivers memory after destuffing.

Elementary DLL Protocol


Unrestricted Simplex: This protocol is very simple Data transmission is one direction Both Transmitter and receiver are always ready Processing time is ignored Infinite buffer space is available at both ends

Prepared By : Sangita Oswal( Lecturer VESIT)

Brought to you by :Md. Azaz

25

Data and Communication network (MCA SEMIII) No damage or loss of frame Ultimately the channel is assumed to be totally error free It is called unrealistic protocol i.e no data loss ,no data retransmission no ack facility Simplex stop and wait The main unrealistic assumption that the transmitter and receiver are equally fast is removed and result is stop and waits protocol. After having passed a packet to network layer the receiver send a dummy frame back to sender which in effect give sender permission to transmit next frame . The senders do not need to inspect the frame (ACK) because it is positive only. Protocol in which the sender sends one frame and then wait for an ack before proceeding in called stop and wait.

Simplex protocol for noisy channel: This protocol removes one more restriction i.e a communication channel can never be ideal it can make errors frame may be damaged or lost The protocol should have some schema the receiver should ack about the received frame. If possible go for retransmission or may try to correct frame at receiver end. To his protocol sender will send a frame but receiver will ack only when the frame received is correct Damaged frame will be directly discarded by the receiver For the damage frame sender goes time out and retransmit the frame This schema will fail if Ack will get corrupted i.e transmitter will transmit same frame again At receiver end it may cause problem of duplication of same frame. To deal with problem of duplication a sender has to duplication a sender has to put sequence no. in header of each frame to be send. Then the receiver has to ack seq no of each incoming frame to see that whether it is new frame or duplicate frame and if duplicate discard it and send the ACK and if it is new accept now. This schema is called PAR (Positive acknowledgement with retransmission)

Piggy Backing Concept :


The limitation of data link protocol is they are all simplex type but in most of application we need full duplex system. One way to achieve this is you should use separate channel one in each direction. Forward direction Reverse direction But in most of cases capacity of reverse channel is wasted as user is paying for cost of two circuit but actually using one circuit. Piggy Backing: when a frame is accepted by a receiver instead of immediately sending ACK ,receiver wait for some time for some outgoing frame and then attach the ACK to the outgoing frame going from receiver to transmitted this technique is called piggy backing.

Prepared By : Sangita Oswal( Lecturer VESIT)

Brought to you by :Md. Azaz

26

Data and Communication network (MCA SEMIII)

Advantage : Better use of available bandwidth No separate frame has to be transmitted only for ACK Disadvantage : It produces time delay in ACK process . Due to max delay the sender may go time out and transmit the same frame.

Sliding Window concept :The essence of sliding window protocol is that at any
instant of time, the sender maintain a set of sequence numbers corresponding to frame it is permitted to send called sending window. The receiver maintains a receiving window corresponding to set of frame it is permitted to accept. Whenever a new packet arrive it is given the next highest sequence number and upper edge of window is advance by one. Any frame falling outside the window is discarded by receiver .when frame whose sequence number is equal to lower edge of window is received it is passed to network layer an acknowledgement is generate and window rotate by one.

A sliding window of size 1, with a 3-bit sequence number. (a) Initially. (b) After the first frame has been sent. (c) After the first frame has been received. (d) After the first acknowledgement has been received. One bit sliding window protocol:
Prepared By : Sangita Oswal( Lecturer VESIT) Brought to you by :Md. Azaz

27

Data and Communication network (MCA SEMIII)

Window size is 1 .It still uses stop and wait concept. It uses only 1 Bit i.e 0 or 1 as a sequence number (1 bit sliding window) It uses 2 procedures Next frame to send Frame accepted Under normal circumstances one of the two nodes may proceed and transmit the frame. When this is received by the receiver data link layer it is pass to network layer and receiver slid up. In an event when both start off simultaneously duplicate frame arrive more even though there is no transmission error.

Two scenarios for protocol 4. (a) Normal case. (b) Abnormal case. The notation is (seq, ack, packet number). An asterisk indicates where a network layer accepts a packet.

Pipelining concept: To make use of RTDT(Round Trip Delay Time) transmitter can
keep ready some no. of frame to transmit online before receiving acknowledgment of last frame send. This concept is called is called pipelining . i.e some no. of frame are ready to transmit always It does not fallow stop and wait.

Go back N : In Go back N receiver simpy discard all the subsequent frame followed by
the damage frame .center will go time out due to damage frame and it will transmit all frame i.e damage plus discarded .

Prepared By : Sangita Oswal( Lecturer VESIT)

Brought to you by :Md. Azaz

28

Data and Communication network (MCA SEMIII)

Selective Repeat: bad frame that is received is discarded but good frame received
after is buffered. When the sender goes time out only the oldest un acknowledged frame is retransmitted. Selective repeat s often combined with having the receiver send a negative acknowledgment when it detect error. NACK simulate retransmission before the corresponding timer expires and improve the performance

HDLC:
HDLC is a protocol designed to support both half duplex and full duplex communication over point to point or multipoint link Transmission Modes: Normal Response Mode:Is unbalanced we have on primary station and multiple secondary station. primary can send and secondary can only respond.

Prepared By : Sangita Oswal( Lecturer VESIT)

Brought to you by :Md. Azaz

29

Data and Communication network (MCA SEMIII)

Asynchronous balanced mode: Both primary and secondary can send and receive data.

Frame format :

Flag field: is an 8 bit sequence with a pattern 01111110 that define beginning and end of frame. Address field: contain the address of destination of the frame .An address field can be 1 byte or several byte long. Control Field: is used for flow control and error control. It can be 1 or 2 byte segment an its interpretation is different for different frame type. Information field: user data FCS checksum: HDLC error detection Frame types:HDLC have 3 types of frame I Frame,S-Frame and U-Frame

Prepared By : Sangita Oswal( Lecturer VESIT)

Brought to you by :Md. Azaz

30

Data and Communication network (MCA SEMIII)

I Frame: The bits in control frame are interpreted as The first bit is 0 this means the frame is I frame The next 3 bit defines sequence number N(S) of frame in travel The next bit is called P/F bit, a single bit with dual purpose. It has meaning only it is set (1) and means poll or final Poll primary to secondary Final secondary to primary The next 3bit called N(R) correspond to ACK when piggy backing is used

S Frame: S frame is used to transfer control information The first 2 bit of control field is 10 means S-Frame The second 2 bit for code which defines4 types of S-frame a. Receiver Ready b. Receiver Not Ready 10 Reject (Go back N Negative Ack) 11 Selective Reject (selective Repeat Nack) Prepared By : Sangita Oswal( Lecturer VESIT) Brought to you by :Md. Azaz 31

Data and Communication network (MCA SEMIII) The fifth bit is P/F The next 3 bit is N(R) correspond to Acknowledgement U-Frame U frame is used for system management not for user data It is used to exchange session management and control information between connected devices U frame code is divided into 2 section 2 bit prefix before P/F and 3 bit suffix after P/F. Together 5 bit create 32 different types of frame Code 00 11

001 011

SNRM SNRME

11 11

100 110

SABM SABME

Error Detection and Correction: Types of Error Single Bit error Burst Error
In a single-bit error, only 1 bit in the data unit has changed. It occur mainly in parallel transmission

A burst error means that 2 or more bits in the data unit have changed. It occurs mainly in serial transmission Length of burst is first corrupted bit to last corrupted bit.

Prepared By : Sangita Oswal( Lecturer VESIT)

Brought to you by :Md. Azaz

32

Data and Communication network (MCA SEMIII)

Error Detection To detect or correct errors, we need to send extra (redundant) bits with data.
Detecting Methods Parity check CRC Checksum

Parity Check
Simple parity check:
Redundant bit parity bit is added to every data unit so that total number of 1s in unit(including parity )become even(or odd). Example 1110111 1101111 11101110 11011110 1110010 11100100 1100100 11001001

Simple parity check can detect all single bit error .It can detect brust error only if total number of error in each data unit is odd Eg 11101110 single bit 11111110 Reject 11101110 Burst (odd) 10100010 Reject Burst(even) 10100110 Accept

Two dimension parity check


1100111 1011101 0111001 0101001

Prepared By : Sangita Oswal( Lecturer VESIT)

Brought to you by :Md. Azaz

33

Data and Communication network (MCA SEMIII) 11001111 10111011 01110010 01010011 01010101

DATA AND PARITY BIT

CRC Binary division:


Instead of adding bit to achieve desire parity a sequence of redundant bit called CRC is appended to end of data unit so that the resulting data unit is exactly divisible by a second predetermined binary number. At destination the incoming data unit is divided by the same number. if at this step there is no remainder the data unit is accepted The redundancy bit is obtained by dividing the data unit by a predetermined divisor the remainder in CRC. Receiver side Data+ CRC Divisor Remainder Remainder zero-accepted Non zero reject Sender side Data + n-1bit Divisor(Nbit) CRC

Prepared By : Sangita Oswal( Lecturer VESIT)

Brought to you by :Md. Azaz

34

Data and Communication network (MCA SEMIII) AT receiver

Checksum
Sender site: 1. The message is divided into 16-bit words. 2. The value of the checksum word is set to 0. 3. All words including the checksum are added using ones complement addition.4. The sum is complemented and becomes the checksum. 5. The checksum is sent with the data. Receiver site: 1. The message (including checksum) is divided into 16-bit words.2. All words are added using ones complement addition.3. The sum is complemented and becomes the new checksum.4. If the value of checksum is 0, the message is accepted; otherwise, it is rejected. Example : 10101001 00111001 At sender : 10101001 00111001 11100010 sum 00011101 checksum

Prepared By : Sangita Oswal( Lecturer VESIT)

Brought to you by :Md. Azaz

35

Data and Communication network (MCA SEMIII) 10101001 00111001 00011101 At receiver : 10101001 00111001 00011101 11111111 sum 00000000 complement of sum

Hamming code:
Hamming code can be applied to data unit of any length 7 bit ASCII code requires 4 redundant bit to be added to the data unit The bits are placed in the poition 1,2,4 and 8(poition in 11 bit sequence) bits are referred as r1,r2,r4 and r8 D D D R8 D D D R4 D R2 R1

Calculating R values R1: takes care of 1 3 5 7 9 11 R2 : takes care of 2 3 6 7 10 11 R4: takes care of 4 5 6 7 R8 : takes care of 8 9 10 11 We calculate even parity for various bit combination Example : 1001101 1 0 0 Calculate R1 1 3 5 7 9 11 R1 1 0 1 0 1 R1=1 R2: r2 3 6 7 10 11 R2 =0 R4 : r4 5 R4=0 R8: r8 9 10 11 R8=1 Hamming code: 10011100101 Suppose 7th bit is corrupted from 1 to 0 10010100101 Recalculate r1 r2 r4 and r8 1 0 0 1 0 6 7

R8

R4

R2

R1

Prepared By : Sangita Oswal( Lecturer VESIT)

Brought to you by :Md. Azaz

36

Data and Communication network (MCA SEMIII)

R1 :1 R2: 1 R4: 1 R8:0 Arrange r8r4r2r1 0111 So 7th bit is corrupted

7 in binary

Prepared By : Sangita Oswal( Lecturer VESIT)

Brought to you by :Md. Azaz

37

Data and Communication network (MCA SEMIII)

MEDIUM ACCESS SUB-LAYER


When only a single channel is available determining who should go next is an issue . The protocol used to determine who goes next on a multi-access channel belong to a sub layer of the data link layer called MAC (Medium Access sub layer)

The Channel Allocation Problem Static Channel Allocation in LANs and MANs When there is only a small and constant number of users, each of which has a heavy load of traffic FDM is a simple and efficient allocation mechanism. However when the number of sender is large and continuously varying or traffic is bursty, FDM as some problem. If spectrum is cut into N region and fewer than N region is using, the spectrum is wasted. The basic problem is that if some user who are assigned the BW are not using it no body else can use it either. Computer traffic may be bursts 1000:1. Dynamic Channel Allocation in LANs and MANs 1. Station Model.: the model consist of N independent station 2. Single Channel Assumption: A single channel is available for all communication .All station can transmit and receive for it. 3. Collision Assumption: if two frames are transmitted simultaneously they overlap in time and resulting signal is grabled.this event is called collision. 4. (a) Continuous Time. Frame transmission can begin at any instant of time. (b) Slotted Time: frame transmission can begin at start of slot/

Prepared By : Sangita Oswal( Lecturer VESIT)

Brought to you by :Md. Azaz

38

Data and Communication network (MCA SEMIII)

5. (a) Carrier Sense. Station senses the channel before using it, if busy no station attempt to use it. (b) No Carrier Sense: station cannot sense the channel before using it. only later it can come to know whether transmission was successful.

Multiple Access Protocols ALOHA Carrier Sense Multiple Access Protocols Collision-Free Protocols Pure ALOHA : the basic idea is simple let the user transmit whenever they have data to be sent. There will be collision and colliding frame will be damaged However due to the feedback property of broad casting a sender can find out whether the frame was destroyed or not.

If the frame was destroyed the sender waits for random period of time and sent again. The waiting time should be random or the same frame will collide over and over again.

Prepared By : Sangita Oswal( Lecturer VESIT)

Brought to you by :Md. Azaz

39

Data and Communication network (MCA SEMIII)

System in which user share a common channel in a way that can lead to conflict are called contention system.

Whenever two frames try to occupy the channel at the same time, there will be a collision and both will be garbled. If the first bit of a new frame overlap with last bit of frame almost finished, both frame will be totally destroyed.

Prepared By : Sangita Oswal( Lecturer VESIT)

Brought to you by :Md. Azaz

40

Data and Communication network (MCA SEMIII)

Slotted aloha : Time is divided into discrete interval each interval corresponds to a frame .This approach require user to agree on slotted boundaries Station is not permitted to send the data at any instant of time instead it has to wait for the beginning of the next slot. Continuous pure aloha is turned into discrete one.

CSMA Carrier Sense Multiple Access Protocol


Protocol in which stations listen for carrier and act accordingly are called carrier sense protocol 1-persistent CSMA : when a station has data to send it first listen to the channel to see if anyone else is transmitting at that moment .if channel is busy the station wait until it becomes idle. When the station detect and idle channel it transmit a frame . If collision occurs the station wait for random amount of time and start all over again. The station transmit with a probability of 1 when it find the channel ideal so called 1 persistence CSMA The propagation delay has an important effect on the performance of protocol. Non persistent CSMA: before sending a station senses the channel .if no one else is sending the station begin doing so itself. If the channel is already in use the station does not continuously sense it .instead, it wait for random period of time and then repeat the algorithm P-persistent CSMA: It applies to slotted channels . When a station becomes ready to send it sense the channel .if ideal it transmit with the probability p. With a probability q=1-p it defers until next slot . The process is repeated until either the frame has been transmitted or another station begins transmitting. If channel is busy it wait until next slot and applies the above steps.

CSMA with collision detection: another improvement is that station to


abort their transmission as soon as they detect a collision. If two stations sense the channel to be idle and begin transmission simultaneously they detect collision almost immediately. So rather than

Prepared By : Sangita Oswal( Lecturer VESIT)

Brought to you by :Md. Azaz

41

Data and Communication network (MCA SEMIII)

finishing transmission they should abort transmission immediately. Quickly terminating damage frame saves time and bandwidth .this protocol is called CSMA/CD. After a station detects a collision it aborts its transmission wait for random period of time and then tries again. The model consists of alternate contention and transmission period with idle period occurring when all station are quiet.

Collision-Free Protocols
Collision in the contention period adversely effect the system performance .protocol devised to solve the problem of collision is called collision free protocol they are A bit Map protocol Binary countdown

A bit map protocol:


Contention period consist of N slot .If station 1 has a frame to send it transmit 1 bit during 1 slot. similarly station 2 as a opportunity to transmit a 1 during t slot only if it has frame queued up. After all N slot have passes by each station has a complete knowledge of which station wish to transmit. transmission begins in numerical order. Since everyone agrees on who goes next there will never be collision. After the last ready station has transmitted its frame another N bit contention period begins. If a station becomes ready after its bit slot has passes by, it has to wait until the bit map comes around again.

Prepared By : Sangita Oswal( Lecturer VESIT)

Brought to you by :Md. Azaz

42

Data and Communication network (MCA SEMIII)

Protocols like this in which the desire to transmit is broadcast before actual transmission is called reservation protocol

Binary countdown: the basic problem of 1 bit map is the overhead of 1


bit per station so it does not scale in network of thousand of computers. In binary countdown station waiting to use the channel broadcast its address as a binary bit string. All address are assumed to be of same length. The bit in each address position from different station is Boolean ORed together.

It has the property that higher numbered station have a higher priority than lower numbered station which can either be good or bad depending on the context.

Prepared By : Sangita Oswal( Lecturer VESIT)

Brought to you by :Md. Azaz

43

Data and Communication network (MCA SEMIII)

Channelization : channelization is a multiple access method in


which the available bandwidth of a link is shared in time frequency or code between different station FDMA : Frequency division multiple access the bandwidth is shared by all station .each station uses its allocated band to send its data Each band is reserved for a specific station The band belongs to the sation all the time. In FDMA bandwidth is divided into channels TDMA : Time division multiple access the entire bandwidth is just one channel .The station share the capacity of channel in time . Each station is allocated a time slot durning which it can send data. In TDMA the bandwidth is just one channel that is timeshared. CDMA (Code division multiple access) : In CDMA one channel carries all transmission simultaneously CDMA is based on coding theory .Each station is assigned a code which is sequence of number called chips. To generate sequence we use Walsh Table a two dimensional table with a equal number of rows and columns. Each row is a sequence of chip. W1=[+1] W2= +1 +1 +1 -1 W4= +1 +1 +1 +1 +1 -1 +1 -1 +1 +1 -1 -1 +1 -1 -1 +1
Brought to you by :Md. Azaz 44

Prepared By : Sangita Oswal( Lecturer VESIT)

Data and Communication network (MCA SEMIII)

Satellite Networks: A Satellite network is a combination of nodes that provides communication from one point on earth to another. Orbits : An artifical satellite needs to have an orbit the path in which I travels around earth. The orbit can be equatorial ,inclined or polar The period of a satellite is the time required for a satellite to make a complete trip around earth . Footprint : The signal a satellite is normally aimed at a specific area called footprint . Categories of satellite: Based on location of orbit satellites can be divided into three categories GEO LEO MEO

Prepared By : Sangita Oswal( Lecturer VESIT)

Brought to you by :Md. Azaz

45

Data and Communication network (MCA SEMIII)

GEO (Geosynchronous earth orbit): Line of sight propagation requires that sending and receiving antennas to be locked onto each other all the time . Therefore satellite must move at same speed as the earth so that it remains fixed above at a certain spot such satellite are called geosynchronous. To provide global transmission minimum 3 satellites are required equidistant from each other. MEO (Medium earth orbit): satellite is positioned between the two van Allen belts. It takes 6 hours to circle earth. GPS(Global Positioning system ):is an example of MEO . GPS uses 24 satellites in six orbits. the orbits and the location of satellite in each orbit are designed in a way that at any time four satellite are visible from any point on earth. It is used in land and sea navigation to provided time and location for vehicles .It is not used for communication. It is based on the principle of triangulation. On a plane if we know our distance from 3 points we known exactly where we are. LEO(low earth orbit): satellites have polar orbits .An LEO is used for cellular type of access .the altitude is between 500 to 2000 K.M with rotation period of 90 or 120 min. the footprint normally has a diameter of 8000 K.M. A LEO system is made of a constellation of satellites that work together as a network each satellite acts as a switch..Satellite that is close to each other are connected through inter-satellite links (ISL).A mobile system communicating with satellite through a user mobile link (UML). A satellite can also communicate with earth station through a gateway link(GWL). Iridium System Global star and teledesic are example of LEO.

Prepared By : Sangita Oswal( Lecturer VESIT)

Brought to you by :Md. Azaz

46

Data and Communication network (MCA SEMIII)

Network Layer: Store-and-Forward Packet Switching:

Prepared By : Sangita Oswal( Lecturer VESIT)

Brought to you by :Md. Azaz

47

Data and Communication network (MCA SEMIII)

A host with a packet to send transmits it to the nearest router either on its LAN or over point-to-point link to the carrier. The packet is stored until it has fully arrived so that checksum can be verified. Then it is forwarded to next router along the path until it reaches the destination

Implementation of Connectionless Service: In connectionless service packets are injected into the subnet individually and routed independently of each other. NO advance setup is needed. Packets are called datagrams and subnet is called datagram subnet. Every router has an internal table telling it where to send packets for each possible destination. Each table entry is a pair consisting of a destination and outgoing line to use for that destination.

Prepared By : Sangita Oswal( Lecturer VESIT)

Brought to you by :Md. Azaz

48

Data and Communication network (MCA SEMIII)

. Packets 1,2, and 3 are forwarded to C according to As table. Something different happen with packet 4 . When it arrived at A it was send to B even though the destination is F as traffic jam could occur along ACE path and update its routing table The algorithm that manages the table and make routing decision are called routing algorithm.

Implementation of Connection-Oriented Service: Host 1 has established connection 1 with host2 it is remembered has first entry in each of the routing table. The first line of As table says that if a packet bearing connection identifier 1 comes in from H1 it is to sent to C and given same connection identifier.
Prepared By : Sangita Oswal( Lecturer VESIT) Brought to you by :Md. Azaz 49

Data and Communication network (MCA SEMIII)

If H3 also want to establish a connection to H2.it chooses identifier 1 this lead to second entry in table. We have a conflict here because A can easily identify H1 or H3 but C cannot. For this reason a different connection identifier is taken for outgoing traffic for second connection. Routing Algorithms The main function of the network layer is routing packets from source to destination machine The routing algorithm is that part of the network layer responsible for deciding which output line an incoming packet should be transmitted on. Routing algorithm are classified has no adaptive and adaptive. Non adaptive algorithm: do not base their routing decision on measurement or estimate of current traffic and topology.
Prepared By : Sangita Oswal( Lecturer VESIT) Brought to you by :Md. Azaz 50

Data and Communication network (MCA SEMIII)

Instead the route is computed in advance offline and downloaded to the routers when network is booted. Adaptive Algorithm: chance the routing decision to reflect changes in the topology and traffic Shortest Path Routing Flooding Distance Vector Routing Link State Routing Hierarchical Routing Broadcast Routing Multicast Routing

The Optimality Principle: It states that if router J is on the optimal path from router I to router K than optimal path from J to K also falls along same route. The set of optimal routes from all source to a given destination form a tree rooted at destination. Such a tree is call sink tree. Sink tree does not have loops so packet will be delivered within finite and bounded numbers of HOP.

(a) A subnet. (b) A sink tree for router B.

Prepared By : Sangita Oswal( Lecturer VESIT)

Brought to you by :Md. Azaz

51

Data and Communication network (MCA SEMIII)

Shortest Path Routing

Flooding Another static algorithm is flooding in which every incoming packet is sent out on every outgoing line except the one is arrived on. Flooding generally generate vast numbers of duplicate packets. Flooding always select shortest an best path bcos it choose every possible path. A variation of flooding that is slightly more practical is selective flooding , in this algorithm the router do not send every incoming packet out on every line only on those line that are going approximately in the right direction.

Prepared By : Sangita Oswal( Lecturer VESIT)

Brought to you by :Md. Azaz

52

Data and Communication network (MCA SEMIII)

Distance Vector Routing (a) A subnet. (b) Input from A, I, H, K, and the new routing table for J.

Fiq a shows a subnet table shows a delay vector for the IMP J in ms. This algorithm is use in Arpanet Each IMP periodically exchange a routing info to each of its neighbor IMPS Each IMP maintain a routing table containing one entry for each other IMP in the subnet This entry contain 2 part a. The preferred outgoing line to go that destination b. The time required to reach at that destination. J has measured its current delay to its neighour A,I,H and K as 8,10,12 and 6 ms respectively Now calculate the route from j to g . J to G VIA A =(18+8)=26 VIA I =(10+31)=41 VIA H =(12+6)=18 VIA k=(6+31)=37
Prepared By : Sangita Oswal( Lecturer VESIT) Brought to you by :Md. Azaz 53

Data and Communication network (MCA SEMIII)

Hierarchical Routing: If the size of network increases size of router also increases. For this more time is require to scan the tables and more B.W is required to send the status information. At certain limit the network may grow up to point where it is no longer possible for router to manage it, so routing will be done hierarchically as in telephone network. When hierarchical routing is use the router are divided into region with each knowing all the details of its own region but nothing about the internal structure of other region. For huge network where 2 level hierarchies is not sufficient we may bunch the region into cluster, cluster to zone and zone to groups so on.

Prepared By : Sangita Oswal( Lecturer VESIT)

Brought to you by :Md. Azaz

54

Data and Communication network (MCA SEMIII)

Link State Routing Each router must do the following: 1. Discover its neighbors, learn their network address. 2. Measure the delay or cost to each of its neighbors. 3. Construct a packet telling all it has just learned. 4. Send this packet to all other routers. 5. Compute the shortest path to every other router. Learning about the Neighbors: When a router is booted its first task is to learn who the neighbors are. it accomplishes this goal by sending a special hello packet on each point to point link and router at other end is expected to send back a reply telling who it is. The names must be globally unique.

(a) Nine routers and a LAN. (b) A graph model of (a).

Measure the delay or cost to each of its neighbors : The link state routing algorithm requires each router to known or at least have a reasonable estimate of the delay to each of its neighbors. The direct way is to send the echo packet that the other side is required to send back immediately. By measuring round trip delay time and dividing it by 2,the sending router can get a reasonable estimate of the delay. An issue is whether to take the load into account when measuring the delay. Round

Prepared By : Sangita Oswal( Lecturer VESIT)

Brought to you by :Md. Azaz

55

Data and Communication network (MCA SEMIII)

trip timer must start when the ECHO packet is queued or when it reaches front of queue. to avoid oscillation in path it may be wise to distribute the load over multiple lines with some
fraction going over each line.

Building Link State Packets:

Once information is collected the next step is for each router to build a packet containing all the data. The packet starts with identification of sender followed by sequence number, age and list of neighbor.
The packet could be build periodically or after significant event occur.

Distributing the Link State Packets

As the packet are distributed and installed the router getting the first one will change their routed. Different router may use different version of topology and can lead to inconsistencies.
Prepared By : Sangita Oswal( Lecturer VESIT) Brought to you by :Md. Azaz 56

Data and Communication network (MCA SEMIII)

The idea is to use flooding to distribute the link state packet. When a new packet comes in it is checked against the list of packet if new forwarded on all lines else discarded. The age field is decremented by each router to make sure no packet can get lost and live for indefinite period of time.

Broadcast Routing: sending packet to all destination simultaneously is called broadcasting . one solution is flooding but it consume too much bandwidth and generate too many duplicate packet. The next algorithm is multi destination routing. In this each packet contains either a list of destination or bit map indicating the desired destination. When packet arrives the router checks the entire destination to determine the set of output lines that will be needed The next algorithm makes use of sink tree. A spanning tree is a subset of subnet that included all the router but contain no loops. The method makes excellent use of bandwidth generating minimum number of packets to do job. The last is reverse path forwarding where router does not known about the spanning tree nor does it have overhead of destination list .

Prepared By : Sangita Oswal( Lecturer VESIT)

Brought to you by :Md. Azaz

57

Data and Communication network (MCA SEMIII)

Reverse path forwarding. (a) A subnet. (b) a Sink tree. (c) The tree built by reverse path forwarding.

Multicast Routing : sending message to group is called multicasting . it requires group management. To do multicast routing each router computes a spanning tree covering all the routers. when a process sends a multicast packet to a group the first router examines its spanning tree and prunes it removes all lines that do not lead to host that are member of the group.

Prepared By : Sangita Oswal( Lecturer VESIT)

Brought to you by :Md. Azaz

58

Data and Communication network (MCA SEMIII)

Congestion control : when too many packets are present in the subnet performance degrade .This situation is called congestion . When the packet are within the carrying capacity of subnet they are delivered however then traffic increases the router are no longer capable to cope up and then packet are lost.at high traffic almost no packet are delivered.

The Leaky Bucket Algorithm

Prepared By : Sangita Oswal( Lecturer VESIT)

Brought to you by :Md. Azaz

59

Data and Communication network (MCA SEMIII)

(a) A leaky bucket with water. (b) a leaky bucket with packets. Figure illustrate a bucket with a small hole at bottom .No matter the rate at which water enters the bucket the outflow is at a constant rate .Also when bucket is full any additional water entering it spills over the side and is lost. The same idea is applied to packet .Host is connected to the network by an interface containing a leaky bucket that is finite internal queue. if packet arrive an queue is full, packets are discarded. The Token Bucket Algorithm : The leaky bucket enforce a rigid output pattern at the average rate no matter how burst the traffic is.It is better to allow the output to speed up somewhat when large burst arrive so more flexible algorithm is needed preferably one that never loses data.One such algorithm is Token Bucket.

Prepared By : Sangita Oswal( Lecturer VESIT)

Brought to you by :Md. Azaz

60

Data and Communication network (MCA SEMIII)

Tunneling

The case when source and destination host are on the same type of network but there is a different network in between them. The solution to this problem is tunneling to send an IP packet to HOST 2 ,Host 1 construct an packet containing IP address of HOST 2. When the multiprotocol router gets the frame it removes the IP packet insert it in the payload field of WAN network layer packet. when the destinations multiprotocol router gets it removes the IP packet and sends it to HOST 2 inside Ethernet frame.

The Wan can be seen as a big tunnel extending from one router to another .the IP packet just travel from one end of tunnel to

Prepared By : Sangita Oswal( Lecturer VESIT)

Brought to you by :Md. Azaz

61

Data and Communication network (MCA SEMIII)

other end .Only router has to understand IP and WAN packets. The entire distance is a serial line. Internetwork Routing

(a)

An internetwork. (b) A graph of the internet work.

The internet work of 5 network connected connected by 6 router. Once the graph has been constructed known routing algorithm can be applied to a set of multiprotocol router .this gives 2 level routing algorithm Exterior gateway protocol : between networks. Interior gateway protocol : within each network. Fragmentation: Each network imposes some maximum size on packets ,when large packet wants to travel through a network problem arises. one solution is to allow gateway to break up packets into fragments sending each fragments as a separate internet packet. There is trouble in putting back the fragments together. Two opposing strategies are: 1. Transparent Fragmentation : in this approach when an oversize packet arrives at a gateway the gateway breaks it up into fragments .each fragment is address to exit gateway where it recombines .Te problem is all packets fallow same route and exit gateway must known when it
Prepared By : Sangita Oswal( Lecturer VESIT) Brought to you by :Md. Azaz 62

Data and Communication network (MCA SEMIII)

receives all the packets .also overhead require to repeatedly reassemble and then refragment. 2. Non transparent fragmentation : once a packet has been fragmented each fragment is treated as though it where an original packet all fragment are passed to exit gateway Recombination occur only at destination HOST, an advantage is that multiple exit gateway can be used and higher performance can be achieved.

(a) Transparent fragmentation. (b) Nontransparent fragmentation. Internet Control Protocols ARP The Address Resolution Protocol : every machine has one or more IP address these cannot be used for sending packets because the DDL hardware does not understand IP address it understand Ethernet address (48 bit).it sends and receive frame using Ethernet address . The question is mapping and IP address to an Ethernet address

Prepared By : Sangita Oswal( Lecturer VESIT)

Brought to you by :Md. Azaz

63

Data and Communication network (MCA SEMIII)

Host 1 sends a packet to user on host2 for e.g something like xyz@----.com .the first step is to find IP address for Host 2.This look up is performed by DNS lets say it returns the IP address of HOST 2 .Next is to known the Ethernet address the solution is HOST 1 to output a broadcast packet onto the Ethernet asking who owns IP address 192.31.65.5. The broadcast arrive to every machine HOST 2will respond with Ethernet address E2. The protocol used for asking this question and getting the reply is called ARP(address Resolution Protocol). RARP : Given the Ethernet address what is the corresponding IP address ? This problem occur in diskless workstation is booted .Such machine has a binary image of OS . The solution is RARP .this allows newly booted workstation to broadcast its Ethernet address and say My 48 bit Ethernet address is ----------- what is the IP address? the RARP server sees this request looks up Ethernet address and send back IP address. Embedding IP address in memory image requires each workstation to have a separate image. BOOTP: BOOTP uses UDP message which are forwarded to every router. It also provide additional information like IP

Prepared By : Sangita Oswal( Lecturer VESIT)

Brought to you by :Md. Azaz

64

Data and Communication network (MCA SEMIII)

address of server holding mirror image,IP address of router subet mask etc. BOOTP requires manual configuration of table mapping IP address to Ethernet address. When a new host is added it cannot use BOOTP until it is assign IP address and entered into configuration table by hand. Dynamic Host Configuration Protocol :There is a special server to assign IP address to the host asking for it. The server need not be on the same LAN.A DHCP relay is needed on each LAN . To find the IP address a newly booted machine broadcast a DHCP Discover packet .the DHCP relay finds it and send it as a unicast packet to DHCP server may be on different network. the only information relay needs is IP address of DHCP server.

Operation of DHCP. An issue is how long an IP address should be allocated. If HOST leaves and does not return the IP address the address is permanently lost. To prevent this IP address assignment may be for a fixed period of time by a technique called Leasing. Just before the lease expires Host has to renew it or else it would no longer be able to use the IP address.

Prepared By : Sangita Oswal( Lecturer VESIT)

Brought to you by :Md. Azaz

65

Data and Communication network (MCA SEMIII)

In classful addressing, the address space is divided into five classes: A, B, C, D, and E

Class A: class a is divided into 128 blocks with each block having a different netid.the first block covers 0.0.0.0 to 0.255.255.255(netid 0). The second is (netid1)1.0.0.0 to 1.255.255.255. The last block is 127.0.0.0 to 127.255.255.255(netid 127) Number of address in each block is 16,777,216 is probably larger than the need of almost all organization .Millions of class A address are wasted. Class B: class B is divided into 16,384 blocks with each block having a different netid. Sixteen are reserved for private use leaving 16,368 blocks for assignment. First block is 128.0.0.0 to 128.0.255.255 (netid 128.0) The last is 191.255.0.0 to 191.255.255.255 (netid 191.255) Each block in this class contain 65536 address. Class B is designed for midsize organization but many addresses are wasted.

Prepared By : Sangita Oswal( Lecturer VESIT)

Brought to you by :Md. Azaz

66

Data and Communication network (MCA SEMIII)

Class C: class C is divided into 2,097,152 blocks with each block having a different netid.. 256 are reserved for private use leaving 2,096,896 blocks for assignment. The first block covers 192.0.0.0 to 192.0.0.255 (netid 192.0.0) Last block covers (223.255.255.0 to 223.255.255.255) netid 223.255.255 Each blocks contain 256 address The number of address in class c is smaller than the needs of most organization. Class D is just one block use for multi cast Class E is just one block. it was designed for use as reserved address.

Prepared By : Sangita Oswal( Lecturer VESIT)

Brought to you by :Md. Azaz

67

Data and Communication network (MCA SEMIII)

Find the class of each address. a. 00000001 00001011 00001011 11101111 b. 11000001 10000011 00011011 11111111 c. 14.23.120.8 d. 252.5.15.111 Solution a. The first bit is 0. This is a class A address. b. The first 2 bits are 1; the third bit is 0. This is a class C address. c. The first byte is 14; the class is A. d. The first byte is 252; the class is E. Sub netting : IP address are designed with two levels of hierarchy (netid and hosted) however often an organization requires the HOST to assemble into groups .The network need to be divided into several sub network (subnet) For e.g. university may want to group its host according to department .in this case university has one network address but needs several sub network address. Outside world known only network address inside the organization we have sub network address. In sub netting a network is divided into several smaller groups with each subnet having its own sub network address. when we divided a network into several subnet we have three level of hierarchy. 141.14.192.2 Netid Hostid 141.14 192 132 Netid subnetid hostid

Prepared By : Sangita Oswal( Lecturer VESIT)

Brought to you by :Md. Azaz

68

Data and Communication network (MCA SEMIII)

MASK : when a router receive a packet with a destination address .it need to route the packet. the route outside the organization route the packet based on network address and inside the organization route the packet based on sub network address . The problem is how can a router find network address or subnetwork address .the solution is 32 bit key called mask .the router outside the organization use default mask and inside the organization use a subnet mask. Default mask : is a 32 bit binary number that gives the network address when ANDed with an address of block

The network address can be found by applying the default mask to any address in the block .it retains the netid of block and set the hostid to 0s.

Prepared By : Sangita Oswal( Lecturer VESIT)

Brought to you by :Md. Azaz

69

Data and Communication network (MCA SEMIII)

Address 190.240.7.91 find network address Soln : it is class B default mask is 255.255.0.0 So AND Address and default mask We get 190.240.0.0 Subnet Mask : the number of 1s in a subnet mask is more than number of 1s in the corresponding default mask .i.e we change the leftmost zeros in default mask to make subnet mask . 255.255.0.0 11111111 11111111 00000000 00000000 255.255.224.0 11111111 11111111 11100000 00000000 The number of subnet is determined by the extra 1s if extra one is n the number of subnet is 2n If number of subnet is N the no. of extra ones is log2N. Supernetting : Although class and B address are almost depleted class C address are still available .However maximum no. of address in each block is 256 if more address are needed solution is super netting . In super netting an organization can combine several class C to create a larger range of address. if organization needs 1000 class C address four class C blocks can be granted .the organization can use these address in one super network.

Prepared By : Sangita Oswal( Lecturer VESIT)

Brought to you by :Md. Azaz

70

Data and Communication network (MCA SEMIII)

Transport Layer
The transport layer is responsible for process-to-process delivery. DLL node to node delivery Network layer Host to Host delivery Transport layer process to process delivery

Port Number:
Transport layer address is called port number to chose among multiple process that are running on destination HOST . Port number is a 16 bit integer between 0 to 65,535 The client port number can random(ephemeral port) but server have well known port number e.g port number 13 for date and time cannot be random 13 client may use this service on random port number 52000

Prepared By : Sangita Oswal( Lecturer VESIT)

Brought to you by :Md. Azaz

71

Data and Communication network (MCA SEMIII)

IANA Range

Socket address :Process to process delivery need to identify IP address and port number at each end Combination of IP address and port number is socket address

UDP The User Datagram Protocol (UDP) is called a connectionless, unreliable transport protocol. It does not add anything to the services of IP except to provide process-toprocess communication instead of host-to-host communication.

The field are: Source port number: This is the port number used by the process running source host. It is 16 bit long Destination Port number: This is the port number used by the process running destination host .It is 16 bit long

Prepared By : Sangita Oswal( Lecturer VESIT)

Brought to you by :Md. Azaz

72

Data and Communication network (MCA SEMIII) Length : this is 16 bit field that defines the total length of the user datagram header plus data . Checksum : This field is use for error detection over entire user datagram (header plus data) Application: UDP is suitable for the process that requires simple request response communication UDP is suitable for process with internal flow and error control mechanism UDP is suitable for transport protocol for multicasting TCP Stream delivery

TCP allows sending process to delivery data as a stream of byte and receive it as a stream of byte Sending and receiving buffers: As sending and receiving process are not equally fast TCP needs buffer for storage .At transport layer TCP groups a number of byte together into a packet called segment .TCP adds header to each segment and deliver it to the destination IP layer

Prepared By : Sangita Oswal( Lecturer VESIT)

Brought to you by :Md. Azaz

73

Data and Communication network (MCA SEMIII)

TCP HEADER

Source port address and destination port address : This is a 16 bit field that defines the port number of host that is sending and receiving the segment. Sequence number : this is a 32 bit field defines the number assigned to first byte of data contained in the segment.

Prepared By : Sangita Oswal( Lecturer VESIT)

Brought to you by :Md. Azaz

74

Data and Communication network (MCA SEMIII) Acknowledgement number : this is 32 bit field that defines the byte number that the sender of the segment is expecting to receive from the other party. if byte number x has been successfully received x+1 is the acknowledgment number. Header length : the header can be 20 or 60 byte therefore value of this field can be 5 or 15. Control : this field defines 6 different control flags .one or more bits can be set at a time.

Window size: this field define size of window in byte max window size is 65535 bytes. Checksum : this is 16 bit fiels use for error detection and correction. Urgent pointer: it is valid only if urgent flag is set is use when segment contain urgent data

Prepared By : Sangita Oswal( Lecturer VESIT)

Brought to you by :Md. Azaz

75

Data and Communication network (MCA SEMIII)

Connection establishment using three-way handshaking

Steps: 1.The client sends the first segment a SYN segment .The segment include the source and destination port number . 2.The server produce the second segment a SYN and an ACk segment . this segment has a dual purpose . First it acknowledge the recipt of first segment using ACK flag . ACK number is client initializing sequence number plus 1 . Second it used as the initialization segment for server .It contain intial sequence number used to number the byte sent from the server to the client. 3. The client send a third segment .This is ACK segment, it acknowledges the receipt of second segment using the ACK flag .ACK number is the server initialization sequence number plus 1

Prepared By : Sangita Oswal( Lecturer VESIT)

Brought to you by :Md. Azaz

76

Data and Communication network (MCA SEMIII)

Connection termination using three-way handshaking

Steps : 1. The client TCP sends the first segment a FIN Segment 2. The server TCP sends the second segment an ACK segment to confirm the receipt of the FIN segment from client 3.The server TCP can continue sending data in the server client direction. When it does not have any more data to send ,it send a third segment .This segment is a FIN segment 4.The client TCP sends the fourth segment an ACK segment to confirm the receipt of the FIN segment from TCP server.

Prepared By : Sangita Oswal( Lecturer VESIT)

Brought to you by :Md. Azaz

77

Data and Communication network (MCA SEMIII)

Note : the second and third step can be combined into 1 step if the server also wants to close the connection. This segment will contain ACK plus FIN flag and the client acknowledges the FIN from server side in third segment. The connection closes in both direction

Prepared By : Sangita Oswal( Lecturer VESIT)

Brought to you by :Md. Azaz

78

Data and Communication network (MCA SEMIII)

Application Layer
Cryptography components The word cryptography means secret writing. The orginal message is called plain text and after it is transferred it is called as cipher text Encryption transfer plain to cipher text and decryption transfer cipher to plain text.

A key is a number that the cipher operates on . To encrypt a message we need an encryption algorithm ,encrypt key and plain text To decrypt we need decryptalgorithm decryption key and cipher text.

Symmetric-key cryptography

In symmetric-key cryptography, the same key is used by the sender (for encryption) and the receiver (for decryption).The key is shared The disadvantage is that each pair of user must have a unique symmetric key

Prepared By : Sangita Oswal( Lecturer VESIT)

Brought to you by :Md. Azaz

79

Data and Communication network (MCA SEMIII)

Asymmetric-key cryptography

Keys used in cryptography

Comparison between two categories of cryptography

Prepared By : Sangita Oswal( Lecturer VESIT)

Brought to you by :Md. Azaz

80

Data and Communication network (MCA SEMIII)

A substitution cipher replaces one symbol with another Monoaplabetic substitution : a character in the plain text is always changed to the same character in cipher text regardless of its poition in text.. also called caesar cipher

Use the shift cipher with key = 15 to encrypt the message HELLO. WTAAD.

Polyalphabetic substitution : each occurance of a character c an have a different substitution .the relationship between plain text and cipher text is one to many. We may define the key like take the position of character in text ,divided by 10 and let remainder be the shift value. An exaple of polyalpabetic is vigenere cipher

Prepared By : Sangita Oswal( Lecturer VESIT)

Brought to you by :Md. Azaz

81

Data and Communication network (MCA SEMIII)

Prepared By : Sangita Oswal( Lecturer VESIT)

Brought to you by :Md. Azaz

82

You might also like