Presentation is loading. Please wait.

Presentation is loading. Please wait.

IP Internet Protocol. IP TCP UDP ICMPIGMP ARP PPP Ethernet.

Similar presentations


Presentation on theme: "IP Internet Protocol. IP TCP UDP ICMPIGMP ARP PPP Ethernet."— Presentation transcript:

1 IP Internet Protocol

2 IP TCP UDP ICMPIGMP ARP PPP Ethernet

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

4 IP Internet Protocol RFC-791 Unreliable Connectionless Dispatch packet to upper protocol Fragmentation & Assembly Routing

5 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? 20 bytes of TCP 20 bytes of IP = 40 bytes + app layer overhead

6 Flags & Fragment Bit 0: reserved, must be zero Bit 1: (DF) 0 = May Fragment, 1 = Don't Fragment. Bit 2: (MF) 0 = Last Fragment, 1 = More Fragments. Flags : 3 bits 0 12 0 DFMF Fragment Offset: 13 bits  Unit : 8 octets (64 bits)

7 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 4000 byte datagram MTU = 1500 bytes 1480 bytes in data field offset = 1480/8

8

9 Protocol number IPPROTO_ICMP 1 IPPROTO_IGMP 2 IPPROTO_GGP 3 IPPROTO_TCP 6 IPPROTO_PUP 12 IPPROTO_UDP 17 IPPROTO_IDP 22 IPPROTO_RSVP 46

10 Header Checksum How to calculate ?  checksum field = 0  sum of 16-bit words  checksum = 1’s complement of sum How to verify ?  receiver calculate the checksum should be 0xffff (?, 0x0000)

11 Fragmentation MTU:Maximum Transmission Unit  Ethernet : 1500  FDDI : 4352  IEEE 802.3/802.2 : 1492 Path MTU  smallest MTU of any data link that packets traverse between the two hosts

12 IP Addressing: introduction IP address: 32-bit identifier for host, router interface interface: connection between host/router and physical link  router’s typically have multiple interfaces  host may have multiple interfaces  IP addresses associated with each interface 223.1.1.1 223.1.1.2 223.1.1.3 223.1.1.4 223.1.2.9 223.1.2.2 223.1.2.1 223.1.3.2 223.1.3.1 223.1.3.27 223.1.1.1 = 11011111 00000001 00000001 00000001 223 111

13 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 11001000 00010111 00010000 00000000 subnet part host part 200.23.16.0/23

14 IP addresses: how to get one? Q: How does host get IP address? hard-coded by system admin in a file  Wintel: control-panel->network->configuration- >tcp/ip->properties  UNIX: /etc/rc.config DHCP: Dynamic Host Configuration Protocol: dynamically get address from a server  “plug-and-play”

15 IP routing routing daemon route command netstat command routing table IP output input queue Destination? no UDPTCP yes

16 Routing Principles RouteDatagram(Datagram, RoutingTable) extract destination IP address, D, from the datagram and compute the network prefix, N; If N matches any directly connected network address deliver datagram to destination D over that network else if the table contains a host-specific route for D send data gram to next-hop specified in table else if the table contains a route for network N send datagrram to next-hop specified in table else if the table contains a default route send datagram to the default router specified in table else declare a routing error;

17 Simple Routing Table netstat -rn Destination Gateway Flags Refcnt Use Interface 140.252.13.65 140.252.13.35 UGH 0 0 emd0 127.0.0.1 127.0.0.1 UH 1 0 lo0 default 140.252.13.33 UG 0 0 emd0 140.252.13.32 140.252.13.34 U 4 25043 emd0


Download ppt "IP Internet Protocol. IP TCP UDP ICMPIGMP ARP PPP Ethernet."

Similar presentations


Ads by Google