csci x760 computer networks spring 2016
play

CSCI x760 - Computer Networks Spring 2016 Instructor: Prof. Roberto - PowerPoint PPT Presentation

source: computer-networks-webdesign.com CSCI x760 - Computer Networks Spring 2016 Instructor: Prof. Roberto Perdisci perdisci@cs.uga.edu These slides are adapted from the textbook slides by J.F. Kurose and K.W. Ross Chapter 4: Network Layer


  1. source: computer-networks-webdesign.com CSCI x760 - Computer Networks Spring 2016 Instructor: Prof. Roberto Perdisci perdisci@cs.uga.edu These slides are adapted from the textbook slides by J.F. Kurose and K.W. Ross

  2. Chapter 4: Network Layer Chapter goals: } understand principles behind network layer services: } network layer service models } forwarding versus routing } how a router works } routing (path selection) } dealing with scale } advanced topics: IPv6, mobility } instantiation, implementation in the Internet 4-2 Network Layer

  3. Chapter 4: Network Layer } 4. 1 Introduction } 4.5 Routing algorithms } Link state } 4.2 Virtual circuit and } Distance Vector datagram networks } Hierarchical routing } 4.4 IP: Internet Protocol } 4.6 Routing in the Internet } Datagram format } RIP } IPv4 addressing } OSPF } ICMP } BGP } IPv6 } 4.7 Broadcast and multicast routing 4-3 Network Layer

  4. Network layer application transport network data link } transport segment from sending to receiving physical host network network data link } on sending side encapsulates segments into data link network physical physical datagrams data link physical network network } on rcving side, delivers segments to transport data link data link physical layer physical } network layer protocols in every host, router network network } router examines header fields in all IP data link data link physical physical datagrams passing through it network data link physical application transport network network data link network data link physical network data link physical data link physical physical 4-4 Network Layer

  5. Two Key Network-Layer Functions analogy: } forwarding: move packets from router’s input to ❒ routing: process of appropriate router output planning trip from } routing: determine route source to dest taken by packets from ❒ forwarding: process source to dest. of getting through } routing algorithms single interchange 4-5 Network Layer

  6. Interplay between routing and forwarding routing algorithm local forwarding table header value output link 0100 3 0101 2 0111 2 1001 1 value in arriving packet’s header 1 0111 2 3 4-6 Network Layer

  7. Datagram networks } no call setup at network layer } routers: no state about end-to-end connections } no network-level concept of “connection” } packets forwarded using destination host address } packets between same source-dest pair may take different paths application application transport transport network network 1. Send data 2. Receive data data link data link physical physical 4-7 Network Layer

  8. 2^32 = 4 billion IPv4 forwarding table possible entries Destination Address Range Link Interface 11001000 00010111 00010000 00000000 through 0 11001000 00010111 00010111 11111111 11001000 00010111 00011000 00000000 through 1 11001000 00010111 00011000 11111111 11001000 00010111 00011001 00000000 through 2 11001000 00010111 00011111 11111111 otherwise 3 4-8 Network Layer

  9. Longest prefix matching Prefix Match Link Interface 11001000 00010111 00010 0 11001000 00010111 00011000 1 11001000 00010111 00011 2 otherwise 3 Examples Which interface? DA: 11001000 00010111 00010110 10100001 Which interface? DA: 11001000 00010111 00011000 10101010 4-9 Network Layer

  10. Chapter 4: Network Layer } 4. 1 Introduction } 4.5 Routing algorithms } Link state } 4.2 Virtual circuit and } Distance Vector datagram networks } Hierarchical routing } 4.4 IP: Internet Protocol } 4.6 Routing in the Internet } Datagram format } RIP } IPv4 addressing } OSPF } ICMP } BGP } IPv6 } 4.7 Broadcast and multicast routing 4-10 Network Layer

  11. The Internet Network layer Host, router network layer functions: Transport layer: TCP, UDP IP protocol Routing protocols • addressing conventions • path selection • datagram format • RIP, OSPF, BGP Network • packet handling conventions layer forwarding ICMP protocol table • error reporting • router “signaling” Link layer physical layer 4-11 Network Layer

  12. Chapter 4: Network Layer } 4. 1 Introduction } 4.5 Routing algorithms } Link state } 4.2 Virtual circuit and } Distance Vector datagram networks } Hierarchical routing } 4.3 What’s inside a router } 4.6 Routing in the Internet } 4.4 IP: Internet Protocol } RIP } Datagram format } OSPF } IPv4 addressing } BGP } ICMP } 4.7 Broadcast and multicast } IPv6 routing 4-12 Network Layer

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

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

  15. IP Fragmentation and Reassembly length ID fragflag offset =4000 =x =0 =0 Example ❒ 4000 byte One large datagram becomes datagram (3980 several smaller datagrams Bytes for payload) ❒ MTU = 1500 bytes length ID fragflag offset =1500 =x =1 =0 1480 bytes in data field length ID fragflag offset =1500 =x =1 =185 offset = 1480/8 = 185 length ID fragflag offset =1040 =x =0 =370 4-15 Network Layer

  16. IP Fragmentation - Another Example } Initial MTU = 3100 bytes (=3080 payload bytes) } As packet is routed, it encounters a link with MTU = 820 bytes (=800 payload bytes) } How will the fragments look like? } ID = 4325, Flag = 1, offset = 0, length = 820 } ID = 4325, Flag = 1, offset = 100, length = 820 } ID = 4325, Flag = 1, offset = 200, length = 820 } ID = 4325, Flag = 0, offset = 300, length = 700 4-16 Network Layer

  17. IP Fragmentation - Another Example } Initial MTU = 3100 bytes (=3080 payload bytes) } As packet is routed, it encounters a link with MTU = 930 bytes (=910 payload bytes) } How will the fragments look like? } ID = 4325, Flag = 1, offset = 0, length = 924 } ID = 4325, Flag = 1, offset = 113, length = 924 } ID = 4325, Flag = 1, offset = 226, length = 924 } ID = 4325, Flag = 0, offset = 339, length = 388 4-17 Network Layer

  18. Chapter 4: Network Layer } 4. 1 Introduction } 4.5 Routing algorithms } Link state } 4.2 Virtual circuit and } Distance Vector datagram networks } Hierarchical routing } 4.3 What’s inside a router } 4.6 Routing in the Internet } 4.4 IP: Internet Protocol } RIP } Datagram format } OSPF } IPv4 addressing } BGP } ICMP } 4.7 Broadcast and multicast } IPv6 routing 4-18 Network Layer

  19. IPv4 Addressing: introduction 223.1.1.1 } IPv4 address: 32-bit identifier for host, router 223.1.2.1 223.1.1.2 interface 223.1.1.4 223.1.2.9 } interface: connection 223.1.2.2 223.1.3.27 223.1.1.3 between host/router and physical link } router’s typically have 223.1.3.2 223.1.3.1 multiple interfaces } host typically has one interface } IP addresses associated with 223.1.1.1 = 11011111 00000001 00000001 00000001 each interface 223 1 1 1 4-19 Network Layer

  20. Subnets 223.1.1.1 } IP address: 223.1.2.1 } subnet part (high order bits) 223.1.1.2 } host part (low order bits) 223.1.1.4 223.1.2.9 } What’s a subnet ? 223.1.2.2 223.1.1.3 223.1.3.27 } devides interfaces with same subnet part of IP address subnet } can physically reach each 223.1.3.2 other without intervening 223.1.3.1 router network consisting of 3 subnets 4-20 Network Layer

  21. 223.1.1.0/24 223.1.2.0/24 Subnets Recipe } To determine the subnets, detach each interface from its host or router, creating islands of isolated networks. Each isolated network is called a subnet. 223.1.3.0/24 Subnet mask: /24 4-21 Network Layer

  22. 223.1.1.2 Subnets 223.1.1.1 223.1.1.4 How many? 223.1.1.3 223.1.7.0 223.1.9.2 223.1.9.1 223.1.7.1 223.1.8.1 223.1.8.0 223.1.2.6 223.1.3.27 223.1.2.1 223.1.2.2 223.1.3.1 223.1.3.2 4-22 Network Layer

  23. IP addressing: CIDR *** CIDR: Classless InterDomain Routing } subnet portion of address of arbitrary length } address format: a.b.c.d/x, where x is # bits in subnet portion of address host subnet part part 11001000 00010111 00010000 00000000 200.23.16.0/23 4-23 Network Layer

Recommend


More recommend