Download presentation
Presentation is loading. Please wait.
1
Net7: IP 協定 Internet Protocol 授課教師:雲林科技大學 張慶龍 老師
2
Internet Protocol IP TCP UDP ICMP IGMP ARP PPP Ethernet
3
IP Internet Protocol RFC-791 Unreliable Connectionless Dispatch packet to upper protocol Fragmentation & Assembly Routing
4
IP Packet Format VERS = 4 : IPv4 Protocol HLEN: times of 32-bit, if no options, the HLEN = 5 total length : the total length of the IP datagram, so the data-length of this packet is total length - HLEN *4 TOS: type of service 0 1 2 3 4 5 6 7 precedence D T R unsed precedence: ranging from 0 through 7, indicate the importance of each datagram. allow the router to implement congestion control algorithm D: low delay requests T: high throughput R: high reliability 015 1631 total length TOS HLEN VERS flag fragment offsetidentification TTLprotocolheader checksum source IP address destination IP address options(if any) 20 bytes
5
Packet format Version : 4 Header length : number of 32-bit words TOS : 3-bit precedence, 4 TOS bits, 1 unused Identification : uniquely identifies each datagram sent by host flags : more fragments fragment offset : offset from original datagram TTL : time to live
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) offset of the data in multiples of eight octets, the fragment size must be chosen to be a multiple of eight.
8
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
9
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)
10
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
11
IP routing routing daemon route command netstat command routing table IP output input queue Destination? no UDPTCP yes
12
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;
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.