networking network layer summer 2016 cornell university 1
play

Networking: Network Layer Summer 2016 Cornell University 1 Today - PowerPoint PPT Presentation

CS 4410 Operating Systems Networking: Network Layer Summer 2016 Cornell University 1 Today How can two computers communicate in a WAN? 2 Protocol Stack Computer B Computer A Message Application M Application Transport Transport


  1. CS 4410 Operating Systems Networking: Network Layer Summer 2016 Cornell University 1

  2. Today ● How can two computers communicate in a WAN? 2

  3. Protocol Stack Computer B Computer A Message Application M Application Transport Transport Ht M Segment Network Network Hn Ht M Datagram Link Link Hl Hn Ht M Frame Physical Physical 3

  4. WAN ● Usually, thousands of computers need to be interconnected. ● The capabilities that LANs offer cannot support larger networks. ● We need more services than the Link Layer offers. ● Why? ● Clever Naming ● Efficient forwarding/routing of messages. 4

  5. Network Layer Mission: Transfer messages from the source-computer to the destination-computer . ● Attention: this is different from the mission of the Link Layer. ● Services: ● Forwarding / Routing ● Guaranteed delivery, bandwidth, etc ● Security ● Not all the protocols support these services. ● The Network Layer protocol depends on the kind of network we want to built: ● Virtual-circuit networks ● Datagram networks ● Necessary network device: ● Router: It knows where to forward the message. ● 5

  6. Network Layer Virtual-circuit networks ● 3 phases ● Establish a virtual circuit. ● The Network Layer finds the path from – the source to the destination. Reserve resources for the virtual – circuit. Transfer data ● Packets pass through the virtual – circuit. Destroy virtual circuit. ● Release resources. – Disadvantages? ● Datagram networks ● Every packet has the destination address ● and it is routed independently in the network. The router uses the destination address to ● forward the packet towards the destination- computer . 6

  7. IP Network Layer Protocol for the Internet: ● Internet Protocol ● For Datagram networks. ● IPv4, IPv6 ● Datagram structure: ● 7

  8. Naming All the computers in the Internet have one or more IP addresses. ● For IPv4: ● 32 bits ● Dotted-decimal notation (Ex: 147.76.89.4) ● Contain information about the subnetwork in which a host belongs. ● Example: For the address 140.251.27.18 we know that: – ● It belongs to a host in Cornell, as Cornell gives addresses of the form 140.251.xxx.xxx. → subnetwork address 140.251.0.0/16, mask 255.255.0.0 ● It belongs in host in Linguistics Department, as the addresses of this department is 140.251.27.xxx. → subnetwork address 140.251.27.0/24, mask 255.255.255.0 ● The number 18 distinguish this host from other hosts in the same subnetwork of Linguistics. Assigned by a DHCP server in the subnetwork. ● Dynamic Host Configuration Protocol ● Every computer that is inserted in the subnetwork, communicated with the DHCP ● server to obtain an IP address. 8

  9. 223.1.1.1 223.1.2.1 223.1.1.4 223.1.2.9 223.1.3.27 223.1.1.2 223.1.2.2 223.1.1.3 223.1.3.1 223.1.3.2 What happens when 223.1.1.1 wants to send a packet to 223.1.3.2 ? 9

  10. Forwarding Each router has a routing table . • The routing table is an array of triples (at least). • Each tuple has: • Subnetwork id, subnetwork mask, gateway • So, the routing table of the previous example is: • 223.1.1.0, 255.255.255.0, 0 • 223.1.3.0, 255.255.255.0, 1 • 223.1.2.0, 255.255.255.0, 2 • When a datagram is received, all the subnetwork masks are applied to its • IP address (binary AND operation) to find the subnetwork in which the destination belongs. So, a datagram with destination to 223.1.3.2 is forwarded to gateway 1. • 10

  11. Forwarding Even though we know the destination IP, we do not know the MAC • address of 223.1.3.2, in order the packet to go from the gateway 1 to the destination. With the ARP protocol the router asks which node of one subnetwork has • the needed IP. The destination replies with its MAC address. • Finally, the packet can be sent to the destination. • 11

  12. Routing Algorithms How does the router construct its routing ● table? The routing path should be the shortest ● path from the source to the destination. General problem: ● Graph (V, E) ● V is the set of routers. ● E is the set of links between the ● routers. Each edge has a cost related to the ● distance. If the source is attached to the router ● V1 and the destination to the router V2, what is the shortest path between V1 and V2? 12

  13. Network Layer Computer A Computer B Application Application Router Transport Transport Network Network Network Switch Switch Link Link Link Link Link Physical Physical Physical Physical Physical 13

  14. Network Layer Router Switch 14

  15. Today • How can two computers communicate in a WAN? 15

  16. Coming up… • Next lecture: Routing algorithms

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend