modeling networks as graphs

Post on 07-Jan-2016

44 Views

Category:

Documents

6 Downloads

Preview:

Click to see full reader

DESCRIPTION

Modeling networks as graphs. By Sudheer kovi. Topics Covered are:. 1)Network Protocols. Stop-and-Wait Alternating Bit Protocol Sliding Window Protocol Transmission Control Protocol 2)Modeling Networks as Graphs. - PowerPoint PPT Presentation

TRANSCRIPT

MODELING NETWORKS AS GRAPHS

By

Sudheer kovi

TOPICS COVERED ARE:

1)Network Protocols.a) Stop-and-Waitb) Alternating Bit Protocolc) Sliding Window Protocold) Transmission Control Protocol

2)Modeling Networks as Graphs.

Network?It is a process of inter connection, it can be both connection oriented or wireless.

The Need for Networks?Transferring data from one end to the other, either in the form of signals or packets of data.

NETWORK PROTOCOLS

The job of a network is to enable efficient and reliable communication between hosts, and these protocols are mainly designed for solving the problems like Error control, Flow control, Bandwidth limitation.

1. Error control : while transmitting the data the messages can be lost, corrupted or reordered.

2. Flow control : Incompatibility between the sending and receiving hosts, the receiving host may not be able to process messages as fast as the sending host can send them.

3. Bandwidth limitation : Limitation on the speed in which data is being transferred, if its more or less than the required bandwidth data could be lost.

To solve these problems acknowledgement is one of the finest solution, protocol stack is the best way to explain this.

HTTP,SMPT

TCP,UDP

IP

ETHERNET

WIRES,CABLESRADIO FREQUENCY

Application layer:(World Wide Web and Email)

Transport layer:(Transmits messages between client and server)

Network layer:(Relays messages through a series of switches from source to destination)

Link layer:Transmits messages from one node to the next node

Physical layer:Transmits bits across a physical network

STOP-AND-WAIT

Automatic Repeat request (ARQ), is an error control method, and it is a part of stop and wait flow control protocol.

If error is detected by receiver, it discards the frame and send a negative ACK (NAK), causing sender to re-send the frame.

In case a frame never got to receiver, sender has a timer, where each time a frame is sent, timer is set.

If no ACK or NAK is received during timeout period, it re-sends the frame.

STOP-AND-WAIT

Suppose timeout and sender retransmits a frame but receiver actually received the previous transmission receiver has duplicated copies.

A B

Frame 0

ACK

Frame 1

ACK

Frame 2

Timeout

Frame 2

ACK

Frame 3

Timeout ACK

Frame 3

ACK B receive the Duplicate

Frame

ALTERNATING BIT PROTOCOL

The Alternating Bit Protocol doesn’t add arbitrary subscripts.

It add a single control bit to each data message and to each ACK.

In this if the sender sends the data D0 to receiver it sends the ACK1 indicating that the sender next data message should be D1.

To avoid receiving and accepting two copies of same frame, frames and ACKs are alternatively labeled 0 or 1: ACK1 for D0, ACK0 for D1

The Alternating Bit Protocol does not solve all error control problems.

ALTERNATING BIT PROTOCOL

D0 D0 ACK 1 D1 ACK1

D0 ACK 1 D0 ACK1

SENDER

RECEIVER

SLIDING WINDOW PROTOCOL

The sliding window protocol can solve wasted bandwidth problems by using more sophisticated ARQ technique.

In sliding window protocol sequence number is assigned to the messages that sender sends to receiver.

The sliding window protocol begins by choosing a window size W.

Data messages are initially entered into a FIFO queue, and the sequence number is assigned, that is maintained by the sender.

Sliding window protocol is used sending messages on the internet.

The message that have been send are shown in the sender’s queue with dark shade.

SLIDING WINDOW PROTOCOL

Same in the receiver side the received messages are seen with the dark shade.

In this it will not wait for the ACK of message ‘n’ before sending the message n+1

The Sliding window protocol cannot be modeled as a finite state machine because of the need to store the message sequence number.

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14

0

1

2

3

4

5

6

A3

A4

SENDER RECEIVER

TRANSMISSION CONTROL PROTOCOL

In the internet protocol stack, the transport layer sits immediately below the application layer.

Transmission Control Protocol is the most widely used Internet protocol Web, HTTP, SMPT, FTP, and Telnet.

TCP is a two way, reliable, byte stream oriented end-to-end protocol.

TCP connection is established by a three step handshake procedure: one host initiates the connection, and the other acknowledges it, and the originator then confirms the acknowledgement.

In TCP ones connection is open then data can be transmitted between the two hosts until the connection is closed.

TRANSMISSION CONTROL PROTOCOL

In this a connection progress through a series of states during its lifetime.

The states are : LISTEN, SYN-SEND, SYN-RECEIVED, ESTABLISHED, FIN-WAIT-1, FIN-WAIT-2, CLOSED-WAIT, CLOSING, LAST-ACK,TIME-WAIT, and CLOSED.

CLOSED represents the state when there is no Transmission Control Block.

The transition in the below diagram has a label of the form <event> / <action>.

CLOSED

LISTEN

ESTEB

CLOSING

TIME WAIT

SYN RCVD

SYN SENT

FIN WAIT-

1

FIN WAIT-

2

CLOSED WAIT

LAST ACK

CLOSED

CLOSEDelete TCB

CLOSEDelete TCB

SENDSND SYN

Passive OPENcreate TCB

rcv SYNsen SYN, ACK

rcv ACK of SYN xCLOSE

snd FIN CLOSEsnd FIN

Rcv SYN, ACK sen ACK

rcv FINsnd ACK

rcv FINsnd ACK

rcv ACK of FIN x

rcv FIN snd ACK

rcv ACK of FIN x

Timeout = 2MSL Delete TCB

rcv ACK of FIN x

CLOSEsen FIN

Active OPEN Create TCB snd SYN

MODELING NETWORKS AS GRAPHS

In this we generally model a network to a graph, in which processors correspond to vertices and links to edges by doing so we can solve many problems associated to it.

Let g be a undirected graph with vertices V an edges U .

Edges corresponds to laying cables between two vertices.

One of the efficient technique to find the minimum spanning tree, we use kruskal’s algorithm.

Consider spanning tree T where T(G)-subset of edges of G. Where T has no cycles, G is connected to every other vertex using just the edges in T.

MODELING NETWORKS AS GRAPHS

In this we have 2ways to determine efficient path.

1. Shortest Path

2. Eulerian Circuit

MODELING NETWORKS AS GRAPHS

Shortest-Path : Given a weighted graph and two vertices u and v, we want to find a

path of minimum total weight between u and v. Length of a path is the sum of the weights of its edges.

G is an unweighted, undirected graph.

Where u and v are Vertices in G.

k ≥ 0, there exists a path from u to v whose length is at most k.

MODELING NETWORKS AS GRAPHS

Example: Shortest path between ‘S’ and ‘T’

s

3

t

2

6

7

45

23

18

2

9

14

15 5

30

20

44

16

11

6

19

6

MODELING NETWORKS AS GRAPHS

EULERIAN CIRCUIT:

The shortest way to traverse all the links in a network is via an Eulerian Circuit.

We check the network to verify that all links are working properly.

It describe the network as a graph G.

Where vertices corresponds to network nodes.

Edges corresponds to network links.

Where vertex cover C of a graph G with vertices v, and edges E is a subset of v.

In this every edge E touches at least one vertices in C.

REFERENCES

1. Automata, Computability and Complexity : theory and application by Rich, Elaine.

2. http://en.wikipedia.org/wiki/Sliding_window_protocol

3. users.ecs.soton.ac.uk/sqc/EL336/CNL-5.pdf

THANK YOU

top related