Está en la página 1de 24

Computer Networks Lecture 10 & 11

Network Layer
Main Functions: responsible for transmission of data packets from source to destination. through cloud of nodes by switched communication networks.

3 ways to achieve this goal: 1. Switching technique. 2. Routing. 3. Flow | Error Control.

Issues for Network Layer: 1. Switching technique

Circuit Switching

Packet Switching

Virtual Circuit

Datagram

2. Routing technique: how to forward packets? (packet forwarding techniques) how to calculate from source to destination? (Routing techniques) 3. Traffic Control: Congestion control. Rate control.

4. Naming & Addressing:


how to find the name & address of network node?

5. Internetworking:
how to interconnect heterogeneous networks?

Communication Service Classes


1. Connectionless Services: Tx & Rx treats each transmitted message (packet) as an independent unit. 2. Connection _ Oriented Services: Tx & Rx see data as traveling in logical connection(pipe).

these two services can be reliable(ensure that there is no error & data is received correctly) or unreliable. but the reliability of the connection oriented is higher than the connection less.

Switching technique
describe how data are processed & forwarded in a network a. Circuit Switching:
there is a dedicated path between sender & receiver. this path is established from network nodes & is called traditionally circuit. the whole bandwidth is dedicated to the circuit for the lifetime of the connection. the capacity (bandwidth) unused by the circuit cant be used by other circuits. Disadvantage: lost resources(bandwidth)due to dedicated line. Advantages: no delay in transmission of data. reliable transmission of data. no overheads.

Stages: 1. Circuit Establishment. 2. Data Transfer. 3. Circuit Termination. Applications: telephone networks. ISDN. C B 1 2 3 D

5
A 4 6 7 E

channel cant be used except by the two communicating nodes. link can have more than one channel.

data entering the network from a station are routed to the destination by being switched from node to node.

Timing Diagram A 0 t1 t t2 Propagation delay 4 5 3 D

t3
Transmission time

Circuit termination

b. Packet Switching: 1. Datagram: Idea: concerned with data that are not time sensitive. data is treated as packets, each packet can take different path. receiver is responsible for packet rearranging. each packet has a complete transmission information. the path of the packet is chosen by the routing technique. each packet is treated independently with no reference to packets that have gone before.

Timing Diagram

Advantage: no dedicated path (saving bandwidth).

Disadvantage: Transmission Delay. Unreliable transmission. Large Overheads.

2. Virtual Circuits: hybrid technique between datagram & circuit switching. all data is transmitted as packets. all packets from one packet stream are sent along pre-established path (virtual-circuit). there is a guarantee in sequence delivery of packets. packets from different virtual circuits may be interleaved. Stages: a. Virtual circuit establishment. b. Data transfer. c. Virtual circuit termination. Applications: 1. X25 packet switching. 2. ATM(Asynchronous Transfer Mode)

Timing Diagram

Tx

Rx

Packet Forwarding
1. Packet Forwarding for Datagram:

No packet forwarding for circuit switching

Recall in datagram network, each packet carries the full destination address. each router(node) maintains a routing table which has one row for each possible destination address. the routing algorithm fills the routing table.

Example: Y M

Routing Table at node V: To M Via Next Hop Y Routing Algorithm

D
L How does it work?

N
X

When a packet with the destination node arrives at an increasing link: 1. The router looks up the routing table. 2. The routing table look up yields the address of the next node( next hop). 3. The packet is transmitted onto the outgoing link that goes to the next node. Advantage: Router doesnt need to know about end-to-end flow(route). Disadvantage: Size of the routing table can grow very large.

2. Packet Forwarding for Virtual Circuit: Recall that in virtual circuit network, the rout is setup in the virtual circuit establishment phase. During the setup, each router assign a virtual circuit number to the virtual circuit. The virtual circuit number can be different for each hop. virtual circuit number is written in the packet header. Example: W 2 V 3 N 1 D

4
X Routing Table at node V: From W W Vc# 2 2 To N X Vc# 3 4 Routing table is established with the establishment of the Virtual Circuit.

How does it work? when a packet with virtual circuit (Vcin) arrives from router (Nin): 1. The router looks up the routing table for an entry with the entry (Vcin , Nin). 2. The routing table look up yields (Vcout, Nout). 3. The router updates the virtual circuit number of the header to the number(Vcout) & (Vcout) transmits the packet to Nout.

Advantage:
small routing table ( number of entries= number of Vcircuits).

Disadvantage:
changing the route is a complicated process. the routing table changes for each virtual circuit.

Routing Algorithm
Objective:
to calculate good routes ( in datagram & virtual circuits) in order to make a good routing algorithm, it must satisfy the following criteria -Correctness - Simplicity: (time simplicity) - Stability: are techniques that have a reasonable reaction with changing conditions. -Optimality: it is impossible to satisfy everything at the same time, so we use trade off between the available parameters.

-Robustness: the ability of the network to deliver packets via some route in facing localized failure & overloads. -Efficiency - Fairness

Elements of Routing Algorithm:


1. Optimization Criteria:
-Number of hops: must be small. - Delay: must be small. - Cost: must be small. - Throughput: must increase. ( throughput: number of successful transmitted packet)

2. Decision Time:
1. One per session: In case of virtual circuits at setup time of virtual circuits. 2. One per packet: In case of datagram

3. Decision place:
which node/nodes in the network are responsible for the routing decision? 1. Centralized routing (Central node is responsible for making decision) 2. Source routing (Transmitting node is responsible for making decision) 3. Distributed routing( Each node is responsible for making decision)

4. Network Information Source:


1. None Flooding & Random. 2. Local/adjacent node distributed 3. All nodes Centralized.

5. Network Information Update Time:


1. 2. 3. 4. Continuous. Periodic. Topology change. Major node change.

Routing Strategies:
1. Fixed Routing Strategy:
A single permanent route is configured for each source destination pair of nodes in the network ex: least cost routing algorithm. How does it work? From node 1 1 To node 2 3 4 2 4 4 _ 2 1 _ 3 4 3 5 5 _ 5 4 2 2 2 _ 5 4 4 3 4 6 5 5 5 5

5
6

4
4

4
4

5
5

5
5

_
6

5
_

routing table for each node can be developed & stored at each node

Destination

Next hop

Destination

Next hop

Destination

Next hop

1
2 4 5 6

5
5 5 5 5 Node: 3

2
3 4 5 6

2
4 4 4 4 Node: 1

1
3 4 5 6

1
3 4 4 4 Node: 2

2. Flooding Routing Strategy


Advantages: -Simple Strategy. - doesnt require network information Disadvantage - Overheads How does it work? - a packet is sent by a source node to each of its neighbors. - at each node, an incoming packet is retransmitted on all outgoing links except for the link on which it is received. - to prevent packet growth is to remember the identity of each packet( include hop count feed with each packet)

También podría gustarte