Presentation is loading. Please wait.

Presentation is loading. Please wait.

Network Layer.

Similar presentations


Presentation on theme: "Network Layer."— Presentation transcript:

1 Network Layer

2 Network layer Physical layer: move bits between physically connected stations Data link layer: move frames between physically connected stations Network layer: move packets from source A to destination B

3 Network Layer Design Issues
Service interface: what kind of services to be supported at the network layer? Routing: Where to send the packets received? Congestion control: to avoid overloading some links Internetworking: How to interconnect different networks?

4 Service Interface Should be independent of router technology
The upper layer shouldn’t worry about the topology Network address should be uniform

5 Two choices to send packets
Connectionless – End nodes simply send packets to the routers. Packets carry full address information. Routers makes decision, based on the address information, to forward the packets. Connection-orientated – Before sending, end nodes set up a virtual circuit, then all packets are sent through this virtual circuit. Virtual circuit means that (1) each packet carried a VC identifier and (2) routers will always forward packets with the same identifier to the same next hop router determined when path was set up.

6 Connectionless or connection-orientated
the subnet is inherently unreliable network layer provides connectionless service, just moves packets around, and let the higher layer worry about the error control and flow control Connection-orientated The subnet should provide a reliable connection oriented service. Makes it possible to provide quality of service. The company can charge based on the quality of service provided.

7 Datagram Virtual Circuit
Circuit setup no required Addressing global addr.(large) local VC number (small) memory in no state table for VCs routers in each router Routing each packet once for all packets in a VC Router Failure no effect All VCs terminated. Cong. control hard easy Memory in packets versus memory in routers. path setup time versus address parsing time

8 Routing Routing – Determining the path from the source to the destination. At a router, it means which output port should a packet to be sent to Desirable properties of the routing algorithms: correctness: of course simplicity: for efficiency robustness: must be able to sustain the changes in the networks (cannot just rely on reboot) stability: when run long enough, should converge to equilibrium fairness: every one gets to send optimality: as efficient as possible, of course sometimes, these properties may conflict

9 Flooding Flooding send all the incoming packet to all outgoing links except the one the packet arrived on Reliable, fast, large overhead, not scalable user: military, distributed database(update everything), highly reliable packets.

10 Flooding Problems? A packet will be sent for infinite number of times
Hop count. Don’t forward the same packet for more than H times. How to set H? Ask why when H=MAX DISTANCE, the packet must be delivered. – Consider the path between the sender and receiver.

11 Shortest Path find the shortest path from the source to all other nodes. Dijkstra algorithm: finding the shortest paths from the source s to all other nodes in the network. 1) Initial set = empty, 2) maintain the distance from s to all other nodes (distance(s, s) = 0, distance(s, t) = infinite) 3) repeat until all nodes are included in the set 4) find a node d currently no in the set with shortest distance 5) include d in the set 6) update the distance from s to all other nodes using 7) if distance(s, m) > distance(s, d) + dist(d, m) then 8) distance(s, m) = distance(s, d) + dist (d, m)

12 Shortest Path Why this gives the shortest path?
Node added to the set has found its minimum distance to the source. Suppose this is not true. At a step, we add node W to the set. If there is another path s---Z---W with distance shorter than d(W), where Z is the first node in the path currently not in the set. d(Z) must be less than d(W) (why?) and we would have added Z to the set at this step rather than W.


Download ppt "Network Layer."

Similar presentations


Ads by Google