Welcome to CS 3516: Advanced Computer Networks Prof. Yanhua Li Time: 9:00am 9:50am M, T, R, and F Location: Fuller 320 Fall 2017 A-term 1 Some slides are originally from the course materials of the textbook Computer Networking: A Top Down Approach, 7th edition, by Jim Kurose, Keith Ross, Addison-Wesley March 2016. Copyright 1996-2017 J.F Kurose and K.W. Ross, All Rights Reserved.
Chapter 4-5: layer chapter goals: v understand principles behind layer services: layer service models forwarding versus routing IP addressing routing (path selection) Network Layer 4-2
Chapter 4-5: outline 4.1 introduction 4.3 IP: Internet Protocol datagram format IPv4 addressing Network Layer 4-3
Network layer v transport segment from sending to receiving host v on sending side encapsulates segments into datagrams v on receiving side, delivers segments to transport layer v layer protocols in every host, router v router examines header fields in all IP datagrams passing through it application transport application transport Network Layer 4-4
Two key -layer functions v forwarding: move packets from router s input to appropriate router output v routing: determine route taken by packets from source to dest. routing algorithms analogy: v routing: process of planning trip from source to dest v forwarding: process of getting through single interchange Network Layer 4-5
Interplay between routing and forwarding routing algorithm local forwarding table header value output link 0100 0101 0111 1001 3 2 2 1 routing algorithm determines end-end-path through forwarding table determines local forwarding at this router value in arriving packet s header 0111 1 3 2 best effort Network Layer 4-6
Datagram forwarding table Destination Address Range 11001000 00010111 00010000 00000000 through 11001000 00010111 00010111 11111111 11001000 00010111 00011000 00000000 through 11001000 00010111 00011000 11111111 11001000 00010111 00011001 00000000 through 11001000 00010111 00011111 11111111 otherwise Link Interface 0 1 2 3 Q: but what happens if ranges don t divide up so nicely? Network Layer 4-7
Longest prefix matching longest prefix matching when looking for forwarding table entry for given destination address, use longest address prefix that matches destination address. Destination Address Range 11001000 00010111 00010*** ********* 11001000 00010111 00011000 ********* 11001000 00010111 00011*** ********* otherwise examples: DA: 11001000 00010111 00010110 10100001 DA: 11001000 00010111 00011000 10101010 Link interface 0 1 2 3 which interface? which interface? Network Layer 4-8
Chapter 4-5: outline 4.1 introduction 4.3 IP: Internet Protocol datagram format IPv4 addressing Network Layer 4-9
The Internet layer host, router layer functions: transport layer: TCP, UDP layer routing protocols path selection RIP, OSPF, BGP forwarding table IP protocol addressing conventions datagram format packet handling conventions ICMP protocol error reporting router signaling link layer layer Network Layer 4-10
IP datagram format IP protocol version number header length (bytes) type of data max number remaining hops (decremented at each router) upper layer protocol to deliver payload to how much overhead? v 20 bytes of TCP v 20 bytes of IP v = 40 bytes + app layer overhead ver head. len 16-bit identifier time to live type of service upper layer 32 bits flgs length fragment offset header checksum 32 bit source IP address 32 bit destination IP address options (if any) data (variable length, typically a TCP or UDP segment) total datagram length (bytes) for fragmentation/ reassembly e.g. timestamp, record route taken, specify list of routers to visit. Network Layer 4-11
IP fragmentation, reassembly v v links have MTU (max.transfer size) - largest possible link-level frame different link types, different MTUs large IP datagram divided ( fragmented ) within net one datagram becomes several datagrams reassembled only at final destination IP header bits used to identify, order related fragments reassembly fragmentation: in: one large datagram out: 3 smaller datagrams Network Layer 4-12
IP fragmentation, reassembly example: v v 3980 bytes in data field 4000 byte datagram MTU = 1500 bytes length =4000 ID =x fragflag =0 offset =0 one large datagram becomes several smaller datagrams 1480 bytes in data field length =1500 ID =x fragflag =1 offset =0 offset = 1480/8 length =1500 ID =x fragflag =1 offset =185 1020 bytes in data field length =1040 ID =x fragflag =0 offset =370 Offsets are counted by 8 bytes in the data Network Layer 4-13
Questions Network Layer 4-14