Network Layer5-1 2016 session 1 TELE3118: Network Technologies Week 5: Network Layer Forwarding, Features Some slides have been taken from: r Computer.

Slides:



Advertisements
Similar presentations
Discussion Monday ( ). ver length 32 bits data (variable length, typically a TCP or UDP segment) 16-bit identifier header checksum time to live.
Advertisements

CPSC Network Layer4-1 IP addresses: how to get one? Q: How does a host get IP address? r hard-coded by system admin in a file m Windows: control-panel->network->configuration-
CS 457 – Lecture 16 Global Internet - BGP Spring 2012.
4: Network Layer4a-1 IP Addressing: introduction r IP address: 32-bit identifier for host, router interface r interface: connection between host, router.
8-1 Last time □ Network layer ♦ Introduction forwarding vs. routing ♦ Virtual circuit vs. datagram details connection setup, teardown VC# switching forwarding.
Lecture 18 Network Layer (Internet Protocol)
Announcement r Recitation tomorrow on Project 2 r Midterm Survey at the end of this class.
Week 5: Internet Protocol Continue to discuss Ethernet and ARP –MTU –Ethernet and ARP packet format IP: Internet Protocol –Datagram format –IPv4 addressing.
The Network Layer Chapter 5. The IP Protocol The IPv4 (Internet Protocol) header.
Network Layer4-1 Chapter 4 Network Layer Computer Networking: A Top Down Approach Featuring the Internet, 3 rd edition. Jim Kurose, Keith Ross Addison-Wesley,
Chapter 5 The Network Layer.
N/W Layer Addressing1 Instructor: Anirban Mahanti Office: ICT Class Location: ICT 121 Lectures: MWF 12:00 – 12:50 Notes.
Network Layer Overview and IP
11- IP Network Layer4-1. Network Layer4-2 The Internet Network layer forwarding table Host, router network layer functions: Routing protocols path selection.
Announcement r Project 3 out, due 3/10 r Homework 3 out last week m Due next Mon. 3/1.
Network Layer4-1 IP: Internet Protocol r Datagram format r IPv4 addressing r DHCP: Dynamic Host Configuration Protocol r NAT: Network Address Translation.
Network Layer4-1 Chapter 4 Network Layer Computer Networking: A Top Down Approach Featuring the Internet, 3 rd edition. Jim Kurose, Keith Ross Addison-Wesley,
The Internet Network layer
Network Layer4-1 Chapter 4 Network Layer A note on the use of these ppt slides: We’re making these slides freely available to all (faculty, students, readers).
IP Address 0 network host 10 network host 110 networkhost 1110 multicast address A B C D class to to
12 – NAT, ICMP, IPv6 Network Layer4-1. Network Layer4-2 Chapter 4 Network Layer Computer Networking: A Top Down Approach Featuring the Internet, 3 rd.
Chapter 4 Queuing, Datagrams, and Addressing
Computer Networks The Network Layer
4: Network Layer4a-1 IP datagram format ver length 32 bits data (variable length, typically a TCP or UDP segment) 16-bit identifier Internet checksum time.
Network Layer4-1 NAT: Network Address Translation local network (e.g., home network) /24 rest of.
Network LayerII-1 RSC Part II: Network Layer 4. IP in operation Redes y Servicios de Comunicaciones Universidad Carlos III de Madrid These slides are,
Datagram Networks: Internet Protocol (IPv4)
1 ECE453 – Introduction to Computer Networks Lecture 12 – Network Layer (IV)
CS 1652 The slides are adapted from the publisher’s material All material copyright J.F Kurose and K.W. Ross, All Rights Reserved Jack Lange.
Csci 183/183W/232: Computer Networks Forwarding and Routing Network Layer Part I 1 Switching and Forwarding Network Layer Part I Switching and Forwarding.
12 – IP, NAT, ICMP, IPv6 Network Layer.
Chapter 4 Network Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 A note on the use of these.
1 Network Layer Lecture 15 Imran Ahmed University of Management & Technology.
1 Network Layer Lecture 16 Imran Ahmed University of Management & Technology.
Network Layer4-1 IP: Internet Protocol r Datagram format r IPv4 addressing r DHCP: Dynamic Host Configuration Protocol r NAT: Network Address Translation.
4: Network Layer4a-1 13: Intro to IP and ICMP Last Modified: 11/9/2015 7:16:06 PM.
Network Layer4-1 The Internet Network layer forwarding table Host, router network layer functions: Routing protocols path selection RIP, OSPF, BGP IP protocol.
Sharif University of Technology, Kish Island Campus Internet Protocol (IP) by Behzad Akbari.
Transport Layer3-1 Chapter 4: Network Layer r 4. 1 Introduction r 4.2 Virtual circuit and datagram networks r 4.3 What’s inside a router r 4.4 IP: Internet.
EEC-484/584 Computer Networks Lecture 10 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
Network Layer4-1 Datagram networks r no call setup at network layer r routers: no state about end-to-end connections m no network-level concept of “connection”
1 Network Layer Lecture 11 Imran Ahmed University of Management & Technology.
4: Network Layer4b-1 IPv6 r Initial motivation: 32-bit address space completely allocated by r Additional motivation: m header format helps speed.
Wide Area Networks and Internet CT1403 Lecture-7: Internet Network Layer (Part-2) 1.
Chapter 4 Network Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 A note on the use of these.
The Internet Network layer
Data Communications and Computer Networks Chapter 4 CS 3830 Lecture 19 Omar Meqdadi Department of Computer Science and Software Engineering University.
Network Layer4-1 Chapter 4: Network Layer Chapter goals: r understand principles behind network layer services: m routing (path selection) m dealing with.
Network Layer4-1 Chapter 4 Network Layer All material copyright J.F Kurose and K.W. Ross, All Rights Reserved Computer Networking: A Top Down.
Network Layer4-1 NAT: Network Address Translation local network (e.g., home network) /24 rest of.
Wide Area Networks and Internet CT1403 Lecture-5: Internet Network Layer (Part 3) 1.
IP Fragmentation. Network layer transport segment from sending to receiving host on sending side encapsulates segments into datagrams on rcving side,
CSE 421 Computer Networks. Network Layer 4-2 Chapter 4: Network Layer r 4. 1 Introduction r 4.2 Virtual circuit and datagram networks r 4.3 What’s inside.
4: DataLink Layer1 LAN technologies Data link layer so far: m services, error detection/correction, multiple access Next: LAN technologies m addressing.
4: Network Layer4-1 Chapter 4: Network Layer r 4. 1 Introduction r 4.2 Virtual circuit and datagram networks r 4.3 What’s inside a router r 4.4 IP: Internet.
Network Layer 4-1 Chapter 4 Network Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 A note.
12 – IP, NAT, ICMP, IPv6 Network Layer.
Homework 4 Out: Fri 2/24/2017 In: Fri 3/10/2017.
Chapter 4: Network Layer
Chapter 4 Network Layer Computer Networking: A Top Down Approach 6th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 CPSC 335 Data Communication.
Some slides have been adapted from:
CS 1652 Jack Lange University of Pittsburgh
CS 457 – Lecture 10 Internetworking and IP
Some slides have been taken from:
Overview The Internet (IP) Protocol Datagram format IP fragmentation
Chapter 4 Network Layer Computer Networking: A Top Down Approach 5th edition. Jim Kurose, Keith Ross Addison-Wesley, April Network Layer.
DHCP: Dynamic Host Configuration Protocol
32 bit destination IP address
Chapter 4: outline 4.1 Overview of Network layer data plane
Presentation transcript:

Network Layer session 1 TELE3118: Network Technologies Week 5: Network Layer Forwarding, Features Some slides have been taken from: r Computer Networking: A Top Down Approach Featuring the Internet, 4 th edition. Jim Kurose, Keith Ross. Addison-Wesley, July All material copyright J.F Kurose and K.W. Ross, All Rights Reserved. r Computer Networks, 4 th edition. Andrew S. Tanenbaum. Prentice-Hall, 2003.

Network Layer5-2 IP Forwarding r Case I: hosts in same LAN (A  B) r Case II: hosts in different LANs (A  E) A note on terminology: Switch (bridge) vs. Router m Hardware vs. software? m layer-2 vs. layer-3? A B E IP datagram: misc fields source IP addr dest IP addr data

Network Layer5-3 Case I: hosts in same LAN Starting at A, dest. B: r look up dest-IP in routing table r dest is in LAN on interface r send datagram directly to B in Ethernet frame r how to determine B’s Ethernet MAC address? routing table at A DestMaskNext-hop L: B’s MAC addr A’s MAC addr A’s IP addr B’s IP addr IP payload datagram frame frame source, dest address datagram source, dest address misc fields data A B E

Network Layer5-4 ARP: Address Resolution Protocol r Each IP node (Host, Router) on LAN has ARP table r ARP Table: IP/MAC address mappings for same LAN nodes m TTL (Time To Live): time after which address mapping will be forgotten (typically 20 min)

Network Layer5-5 ARP protocol r A wants to send datagram to B, and A knows B’s IP address. r Suppose B’s MAC address is not in A’s ARP table. r A broadcasts ARP query packet, containing B's IP address m all machines on LAN receive ARP query r B receives ARP packet, replies to A with its (B's) MAC address m frame sent to A’s MAC address (unicast) r A caches (saves) IP-to- MAC address pair in its ARP table until information becomes old (times out) m soft state: information that times out (goes away) unless refreshed r ARP is “plug-and-play”: m nodes create their ARP tables without intervention from net administrator

Network Layer5-6 Case II: hosts in different LANs Starting at A, dest. E: r look up network address of E in routing table r E on different network m A, E not directly attached r routing table: next hop router to E is r link layer sends datagram to router in Ethernet frame (ARP) r datagram arrives at r continued….. misc fields data routing table at A DestMaskNext-hop L: A B E

Network Layer5-7 Case II (contd.) Arriving at , destined for r look up network address of E in router’s routing table r E on same network as router’s interface m router, E directly attached r link layer sends datagram to in Ethernet frame via interface (ARP) r datagram arrives at !!! (hooray!) misc fields data routing table in router A B E DestMaskNext-hop L: L: L:

Network Layer5-8 Packet walk-through A ( )  B ( ) A R B Each node (host/router) has r Route table: dest/mask  next-hop r ARP table: LAN IP addr  MAC address

Network Layer5-9 r A creates datagram with source A, destination B r A uses ARP to get R’s MAC address for r A creates link-layer frame with R's MAC address as dest, frame contains A-to-B IP datagram r A’s data link layer sends frame r R’s data link layer receives frame r R removes IP datagram from Ethernet frame, sees its destined to B r R uses ARP to get B’s physical layer address r R creates frame containing A-to-B IP datagram sends to B r B receives the frame and extracts IP datagram A R B

Network Layer5-10 To switch or route? vlan 100 vlan sMAC dMAC sIP dIP ----Data---- ?? Assume unicast traffic r Lookup dMAC in MAC-table r If (dMAC ≠ interface MAC)  switch m switch (bridge) the frame as is onto learnt port r Else frame is for upper layer (IP)  route m Lookup dest-IP in routing table (discard if no match) m Determine next hop MAC addr (ARP table) m Send datagram with new Ethernet header

Network Layer5-11 Switch-Router MAC table VLANMAC addressport E-3A-02-08Self A B E-3A-02-10Self router IP interfaces on VLANs 3 and 2018 No router IP interface on VLAN 76

Network Layer5-12 Switch-Router routing table L L L destination mask local next-hop LAN interfaces / / /24 default route

Network Layer5-13 Unicast forwarding algorithm Determine most specific match in routing table found one? drop packet dest on same LAN. nh-IP = dest-IP local intf? next-hop is router. nh-IP = gway-IP nh-IP in ARP table? send ARP request and wait for response get ARP response and fill in ARP table construct Ethernet header and send frame no yes no yes dest-MAC address mine? discard extract IP datagram dest-IP address mine? pass datagram data to upper layer yes no yes Send: Host receive: switch Ethernet frame dest-MAC address mine? Route IP datagram extract IP datagram dest-IP address mine? pass datagram data to upper layer yes no yes Switch/router receive:

Network Layer5-14 IP/Ethernet configuration / / / / / /24 what’s going on ?? /16 A B C DestMaskGateway L: IP interface: /24 Interface route

Network Layer5-15 IP/Ethernet configuration /24 default route: /24 default route: / /24 DestMaskGateway L: Internet

Network Layer5-16 IP/Ethernet configuration /16 default route: /24 default route: / / /24 default route: A C D IP reachability: switch --- from ABCDABCD A B C D to /24 default route: B router

Network Layer5-17 IP datagram format ver length 32 bits data (variable length, typically a TCP or UDP segment) 16-bit identifier Internet checksum time to live 32 bit source IP address IP protocol version number header length (bytes) max number remaining hops (decremented at each router) for fragmentation/ reassembly total datagram length (bytes) upper layer protocol to deliver payload to head. len type of service “type” of data flgs fragment offset upper layer 32 bit destination IP address Options (if any) E.g. timestamp, record route taken, specify list of routers to visit. how much overhead with TCP? r 20 bytes of TCP r 20 bytes of IP r = 40 bytes + app layer overhead

Network Layer5-18 IP Fragmentation & Reassembly r network links have MTU (max.transfer size) - largest possible link-level frame. m different link types, different MTUs r large IP datagram divided (“fragmented”) within net m one datagram becomes several datagrams m “reassembled” only at final destination m IP header bits used to identify, order related fragments fragmentation: in: one large datagram out: 3 smaller datagrams reassembly

Network Layer5-19 IP Fragmentation and Reassembly ID =x offset =0 fragflag =0 length =4000 ID =x offset =0 fragflag =1 length =1500 ID =x offset =185 fragflag =1 length =1500 ID =x offset =370 fragflag =0 length =1040 One large datagram becomes several smaller datagrams Example r 4000 byte datagram r MTU = 1500 bytes 1480 bytes in data field offset = 1480/8

Network Layer5-20 ICMP: Internet Control Message Protocol r used by hosts & routers to communicate network-level information m error reporting: unreachable host, network, port, protocol m echo request/reply (used by ping) r network-layer “above” IP: m ICMP msgs carried in IP datagrams r ICMP message: type, code plus first 8 bytes of IP datagram causing error Type Code description 0 0 echo reply (ping) 3 0 dest. network unreachable 3 1 dest host unreachable 3 2 dest protocol unreachable 3 3 dest port unreachable 3 6 dest network unknown 3 7 dest host unknown 4 0 source quench (congestion control - not used) 8 0 echo request (ping) 9 0 route advertisement 10 0 router discovery 11 0 TTL expired 12 0 bad IP header

Network Layer5-21 Traceroute and ICMP r Source sends series of UDP segments to dest m First has TTL =1 m Second has TTL=2, etc. m Unlikely port number r When nth datagram arrives to nth router: m Router discards datagram m And sends to source an ICMP message (type 11, code 0) m Message includes name of router& IP address r When ICMP message arrives, source calculates RTT r Traceroute does this 3 times Stopping criterion r UDP segment eventually arrives at destination host r Destination returns ICMP “host unreachable” packet (type 3, code 3) r When source gets this ICMP, stops.

Network Layer5-22 IPv6 r Initial motivation: 32-bit address space soon to be completely allocated. r Additional motivation: m header format helps speed processing/forwarding m header changes to facilitate QoS IPv6 datagram format: m fixed-length 40 byte header m no fragmentation allowed

Network Layer5-23 IPv6 Header (Cont) Priority: identify priority among datagrams in flow Flow Label: identify datagrams in same “flow.” (concept of“flow” not well defined). Next header: identify upper layer protocol for data

Network Layer5-24 Other Changes from IPv4 r Checksum: removed entirely to reduce processing time at each hop r Options: allowed, but outside of header, indicated by “Next Header” field r ICMPv6: new version of ICMP m additional message types, e.g. “Packet Too Big” m multicast group management functions

Network Layer5-25 Transition From IPv4 To IPv6 r Not all routers can be upgraded simultaneous m no “flag days” m How will the network operate with mixed IPv4 and IPv6 routers? r Tunneling: IPv6 carried as payload in IPv4 datagram among IPv4 routers

Network Layer5-26 Tunneling A B E F IPv6 tunnel Logical view: Physical view: A B E F IPv6 C D IPv4 Flow: X Src: A Dest: F data Flow: X Src: A Dest: F data Flow: X Src: A Dest: F data Src:B Dest: E Flow: X Src: A Dest: F data Src:B Dest: E A-to-B: IPv6 E-to-F: IPv6 B-to-C: IPv6 inside IPv4 B-to-C: IPv6 inside IPv4

Network Layer5-27 Future of IPv6? hourglass  wineglass?