7
play

7 Network Layer Network Layer Network Layer Network Layer - PDF document

Network Layer Network Layer Network Layer Network Layer IP Fragmentation & Reassembly IP Fragmentation and Reassembly network links have MTU length ID fragflag offset (max.transfer size) - largest possible link-level frame.


  1. Network Layer Network Layer Network Layer Network Layer IP Fragmentation & Reassembly IP Fragmentation and Reassembly  network links have MTU length ID fragflag offset (max.transfer size) - largest possible link-level frame. Example =4000 =x =0 =0  different link types,  4000 byte datagram fragmentation: One large datagram becomes different MTUs in: one large datagram  MTU = 1500 bytes several smaller datagrams out: 3 smaller datagrams  large IP datagram divided length ID fragflag offset (“fragmented”) within net =1500 =x =1 =0  one datagram becomes 1480 bytes in reassembly several datagrams length ID fragflag offset data field  “reassembled” only at =1500 =x =1 =185 final destination offset =  Should a small datagram length ID fragflag offset 1480/8 have an IP header? =1040 =x =0 =370  IP header bits used to animation identify, order related http://media.pearsoncmg.com/aw/aw_kur fragments ose_network_2/applets/ip/ipfragmentati on.html Network Layer Network Layer 37 38 Network Layer Network Layer Network Layer Network Layer Network Layer IP Addressing: introduction  IP address: 32-bit 223.1.1.1  Introduction  Routing algorithms identifier for host, 223.1.2.1 223.1.1.2  Virtual circuit and  Link state router interface 223.1.2.9 223.1.1.4  Distance Vector datagram networks  interface: connection  Hierarchical routing 223.1.2.2  What’s inside a router between host/router 223.1.3.27 223.1.1.3  Routing in the and physical link  IP: Internet Protocol Internet  router’s typically have  Datagram format  RIP multiple interfaces 223.1.3.1 223.1.3.2  IPv4 addressing  OSPF  host typically has one  ICMP interface  BGP  IPv6  IP addresses associated with each 223.1.1.1 = 11011111 00000001 00000001 00000001 interface 223 1 1 1 Network Layer Network Layer 39 40 Network Layer Network Layer Network Layer Network Layer Subnets Subnets 223.1.1.2 223.1.1.1 = 11011111 00000001 00000001 00000001 Subnet address Host address  IP address: How many? 223.1.1.1 223.1.1.4 223.1.1.1  subnet part (high 223.1.1.3 order bits) 223.1.2.1 223.1.1.2  host part (low order 223.1.1.4 223.1.2.9 223.1.7.0 bits) 223.1.9.2 223.1.2.2 223.1.1.3 223.1.3.27  What’s a subnet ? subnet 223.1.9.1  can physically reach 223.1.7.1 223.1.8.1 223.1.8.0 each other without 223.1.3.2 223.1.3.1 intervening router 223.1.2.6 223.1.3.27  device interfaces with same subnet part of IP 223.1.2.1 223.1.2.2 223.1.3.1 223.1.3.2 network consisting of 3 subnets address Network Layer Network Layer 41 42 7

  2. Network Layer Network Layer Network Layer Network Layer Subnets Classful Address 223.1.1.0/24 223.1.2.0/24 Recipe  Three classes: Class A, Class B, Class C  To determine the subnets, detach each Size Number Address interface from its Lead Size of Network of es Start End lass ing of Rest host or router, Number Bit Network per address address Bits Bit field field s Network  This creates islands of isolated networks . 16,777,2 127.255. Class A 0 8 24 128 (2 7 ) 0.0.0.0  Each isolated network 16 (2 24 ) 255.255 223.1.3.0/24 is called a subnet. 16,384 65,536 128.0.0.0 191.255. Class B 10 16 16 Subnet mask: /24 (2 14 ) (2 16 ) 255.255 2,097,15 256 (2 8 ) 192.0.0.0 223.255. Class C 110 24 8 2 (2 21 ) 255.255 Network Layer Network Layer 43 44 Network Layer Network Layer Network Layer Network Layer Classless Address: CIDR IP addresses: how to get one? CIDR: Classless InterDomain Routing Q: How does a host get IP address?  Network portion of address of arbitrary length  address format: a.b.c.d/x, where x is # bits in network portion of address  1) hard-coded by system admin in a file  Windows: control-panel->network->configuration- >tcp/ip->properties netsh>  UNIX: /etc/rc.config netsh interface> netsh interface ip> set address local static 10.0.0.9 255.0.0.0 10.0.0.1 1 host network  2) DHCP: Dynamic Host Configuration Protocol: part part dynamically get address from as server 11001000 00010111 00010000 00000000  “plug -and- play” 200.23.16.0/23 Network Layer Network Layer 45 46 Network Layer Network Layer Network Layer Network Layer DHCP: Dynamic Host Configuration DHCP client-server scenario Protocol arriving DHCP server: 223.1.2.5 DHCP discover Goal: allow host to client DHCP DHCP overview: A 223.1.2.1 src : 0.0.0.0, 68 dynamically obtain its 223.1.1.1 server dest.: 255.255.255.255,67  host broadcasts IP address from yiaddr: 0.0.0.0 transaction ID: 654 “ DHCP discover ” network server when 223.1.1.2 it joins network msg DHCP offer 223.1.1.4 223.1.2.9  Can renew its lease B src: 223.1.2.5, 67  DHCP server dest: 255.255.255.255, 68 223.1.2.2 on address in use yiaddrr: 223.1.2.4 E responds with 223.1.1.3 223.1.3.27 transaction ID: 654  Allows reuse of “ DHCP offer ” msg Lifetime: 3600 secs addresses (only 223.1.3.2 DHCP request 223.1.3.1  host requests IP hold address while src: 0.0.0.0, 68 address: “ DHCP dest:: 255.255.255.255, 67 connected an “on”) arriving DHCP yiaddrr: 223.1.2.4 request ” msg transaction ID: 655  Support for mobile client needs Lifetime: 3600 secs time address in this  DHCP server users who want to network join network (more sends address: DHCP ACK shortly) src: 223.1.2.5, 67 “ DHCP ack ” msg dest: 255.255.255.255, 68 yiaddrr: 223.1.2.4 transaction ID: 655 Lifetime: 3600 secs Network Layer Network Layer 47 48 8

  3. Network Layer Network Layer Network Layer Network Layer IP addresses: how to get one? Hierarchical addressing: route aggregation Q: How does network get subnet part of IP Hierarchical addressing allows efficient advertisement of addr? routing information: A: gets allocated portion of its provider ISP’s Organization 0 address space 200.23.16.0/23 Organization 1 “Send me anything 200.23.18.0/23 with addresses beginning ISP's block 11001000 00010111 00010000 00000000 200.23.16.0/20 Organization 2 . 200.23.16.0/20” 200.23.20.0/23 Fly-By-Night-ISP . . . Organization 0 11001000 00010111 00010000 00000000 200.23.16.0/23 . Internet . Organization 7 Organization 1 11001000 00010111 00010010 00000000 200.23.18.0/23 200.23.30.0/23 Organization 2 11001000 00010111 00010100 00000000 200.23.20.0/23 ... ….. …. …. “Send me anything ISPs-R-Us with addresses Organization 7 11001000 00010111 00011110 00000000 200.23.30.0/23 beginning 199.31.0.0/16” Network Layer Network Layer 49 50 Network Layer Network Layer Network Layer Network Layer Hierarchical addressing: more specific IP addressing: the last word... routes Q: How does an ISP get block of addresses? ISPs-R-Us has a more specific route to Organization 1 A: ICANN: Internet Corporation for Assigned Organization 0 200.23.16.0/23 Names and Numbers  allocates addresses “Send me anything with addresses Organization 2 beginning  manages DNS . 200.23.16.0/20” 200.23.20.0/23 Fly-By-Night-ISP .  assigns domain names, resolves disputes . . Internet . . Organization 7 200.23.30.0/23 “Send me anything ISPs-R-Us with addresses beginning 199.31.0.0/16 Organization 1 or 200.23.18.0/23” 200.23.18.0/23 Network Layer Network Layer 51 52 Network Layer Network Layer Network Layer Network Layer NAT: Network Address NAT: Network Address Translation Translation • Running out of IP address rest of local private network • Global IP address • Contiguous IP allocation Internet (e.g., home network) • Private IP address 10.0.0.1 10.0.0/24 10.0.0.4 10.0.0.2 number of classful description largest CIDR block host id RFC1918 name IP address range addresses (subnet mask) size 138.76.29.7 10.0.0.3 10.0.0.0 – 10.0.0.0/8 24-bit block 16,777,216 single class A 24 bits 10.255.255.255 (255.0.0.0) Datagrams with source or All datagrams leaving local network have same single source destination in this network 172.16.0.0 – 16 contiguous class 172.16.0.0/12 20-bit block 1,048,576 20 bits 172.31.255.255 B's (255.240.0.0) NAT IP address: 138.76.29.7, have 10.0.0/24 address for different source port numbers source, destination (as usual) 192.168.0.0 – 256 contiguous 192.168.0.0/16 16-bit block 65,536 16 bits 192.168.255.255 class C's (255.255.0.0) Network Layer Network Layer 53 54 9

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