Download
cs 453 computer networks n.
Skip this Video
Loading SlideShow in 5 Seconds..
CS 453 Computer Networks PowerPoint Presentation
Download Presentation
CS 453 Computer Networks

CS 453 Computer Networks

118 Vues Download Presentation
Télécharger la présentation

CS 453 Computer Networks

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

  1. CS 453Computer Networks Lecture 18 Introduction to Layer 3 Network Layer

  2. Network Layer • So far, our communications has assumed that everything is point to point… • We have a message at A and we send it to B • We had, in layers 1 and 2, channels that gave us a “connection” between A and B

  3. Network Layer Granted, we discussed a lot of media and protocols to make these connections… …and we had hubs and switches in the middle… But the intervening media (and hubs and switches) to took care of path… And made it seem like a “wire”

  4. Network Layer Well, as you probably have guessed, its usually not that simple Once we push our networking out past a LAN we have a new realm of complications Internetworking LANs or even stations is the domain of the network layer

  5. Network Layer Stations connect to networks, networks connect to other network, which connect to other networks,…. Networks take on complex topologies Fundamentally, the job of the network layer is to take messages from the transport layer and create packets for the data link layer It must do this in the context of the topology of the network

  6. Network Layer Application Layer Transport Layer Network Layer Data Link Layer From: http://en.wikipedia.org/wiki/Tcp/ip

  7. Network Layer From: http://en.wikipedia.org/wiki/Tcp/ip

  8. Network Layer • Network layer services • Independent of router technology • Network topology, technology should be transparent to the Transport layer • Addressing scheme should be uniform • Two classes • Connectionless Service • Connection-oriented Service

  9. Network Layer • Connectionless Service • Strongly advocated by the Internet community • Underlying principle of the Internet • That the Network layer should • Send Packets • Receive Packets • And that’s about it

  10. Network Layer • Connectionless Service • Packets are fed into the network • Network must route packets to destination • Packets are routed to destination independently • Packets transmitted in connectionless context are often referred to as datagrams • A connectionless network or portion thereof, might be called a datagram subnet

  11. Network Layer • Connectionless Service • Think of a datagram like a postal letter • You drop it in the mailbox and it arrives at its destination • It could have taken any of several destinations to get there,… • But figuring that out is not your problem • Imagine sending several letters to the same destination • They all arrive, but… • They may have taken different routes to get there

  12. Network Layer • Connectionless Service • Imagine that the transport layer (a process) in host H1 has a message to send to host H2, and,… • … it is a big message – 4 times the max packet size • The network layer takes the message and breaks into 4 packets, and sends it…

  13. Network Layer Connectionless Service From: Tanenbaum, 2003, pg. 346

  14. Network Layer • Connectionless Service • Note: each packet can take a different route • Route decisions are made by the routers… • On packet by packet basis • Route decisions are made based on route tables located in each route • Route table does not tell exact how to get to the destination, but which direction (which router port, or connection link)

  15. Network Layer Each router has its own table Each table entry says for a given destination address – send the packet out on this port So, in router A, a packet with a destination of F is sent to port C (like to router C) .. At least initially Router C gets the packet, see that it is destined for F sends it out on port E Notice that router A’s route table changes so that packets headed for F get sent to B (rather than C) Connectionless Service From: Tanenbaum, 2003, pg. 346

  16. Network Layer • Connectionless Service • Routers can change their route tables • Routers’s job to maximize the flow of packets • May change route tables because • Link down • Congested link • … • Router decisions and route table updates are Routing Algorithms • Routing Algorithms - complex topic • We will look at Routing Algorithms in more detail

  17. Network Layer • Connectionless Service • By the way, this is the way IP routing works

  18. Network Layer • Connection-Oriented Service • Route through network established before packets flow • Fixed route • Once defined all packets flow through the same route • Referred to as a Virtual Circuit • When a sending host wants to send a packet… • The network first sends a setup packet • The setup packet finds a path and … • Make forwarding table entries along the path

  19. Network Layer • Connection-Oriented Service • Virtual Circuit has a connection ID • Once a packet is assigned a connection ID (a label) it no longer needs a destination address • Packet follows the virtual circuit, … • …not routed by destination address • Sort of like a phone call – once you are talking the other person, you don’t need their phone number to continue the conversation • When the packet stream is finished, the connection is released, and …. • The virtual circuit is torn-down

  20. Network Layer Connection-Oriented Service From: Tanenbaum (2003), pg 348

  21. Network Layer • Connection-Oriented Service • Once the circuit is know the virtual circuit label is added to the packet • Virtual circuit labels are per hop • …that is, the label in a packet can be changed by the routers along the route

  22. Network Layer • Connection-Oriented Service • In the previous diagram, H1, then H3 initiate the flow of packets. • H1 establishes VC 1, so it VC label is 1 • H3 starts a flow of packets, • …and since it is coorinating with H1, it assigns the VC with label 1… • But Router A recognizes that VC 1 belongs to another packet flow,…so • It renames the VC as 2, • From A to the destination then that VC is VC 2…

  23. Network Layer • Connection-Oriented Service • So, at A the router removes the VC label from the connection Id field of the packet header, and… • …replaces it the new VC number (2, in this example) • Replacing a label in route is called “label switch” • We will talk about this more later

  24. Network Layer

  25. Network Layer • So, how do they compare • Connectless vs. Connection-Oriented Service • Datagrams vs. Virtual Circuits • Datagrams must carry full source and destination addresses • VC packets only carry the VC Label • Datagram addresses must be parse and translated at each hop • VC packet label simply used as a lookup

  26. Network Layer • So, how do they compare • Connectionless service requires no setup • Send a datagram and the routers will help it find its way • No pretransmission overhead • Overhead per packet • Connection-Oriented Services requires the VC to be setup before packet flow • Setup packet sent first to establish VC • For short transactions – a packet or two – connection-oriented service very expensive

  27. Network Layer • So, how do they compare • Resilency to failure - router failure, line failure • Connectionless – good, basically doesn’t care • Not a problem – routers find a different route • Connection Oriented – big problem • VC torn down, packet flow lost • New VC must be established be transmission restarted

  28. Network Layer • So, how do they compare • Quality of Service • Connectionless Service • None, difficult, maybe • Connectionless – best available • Connection-Oriented Service • Good, easy to establish • Resources can be reserved when VC is setup

  29. Network Layer • So, how do they compare • Traffic load, congestion handling • Connectionless Service • Not much, sort of • Connection-Oriented • Easy, reliable • Reserve resources (bandwidth) at VC setup