Presentation is loading. Please wait.

Presentation is loading. Please wait.

Packet Switch Network Server client IP Ether IPTCPData.

Similar presentations


Presentation on theme: "Packet Switch Network Server client IP Ether IPTCPData."— Presentation transcript:

1 Packet Switch Network Server client IP Ether IPTCPData

2

3

4 TCP/IP Layering Socket Library TCPUDP IP EthernetPPP ARP DHCP, Mail, WWW, TELNET, FTP... Network cardCom Layer 4 / Transport Layer 3 / Network Layer 2 / Data Link Layer 1 / Physical Application RARPICMP

5

6 Demultiplexing Ethernet ARPIPRARP ICMPIGMPTCPUDP application incoming frame

7 62664-15004 dstsrc type dataCRC

8

9 IP Address/Physical Address Static Mapping –IP broadcast address maps to Ethernet broadcast address) –IP Multicast Address maps to Ethernet Multicast Address lower 23bits of class D IP map into the lower 23bits of Ethernet address 01:00:5e:00:00:00 Dynamic Mapping –ARP –RARP

10 ARP Address Resolution Protocol RFC-826 Mapping between IP address and the physical address(such as MAC)

11 ARP/RARP Packet Format sender ethernet address target ethernet address target IP address hard type proto type 01631 HLEN PLEN op sender ether addr sender IP addr target ether addr Hardware type = 1 : Ethernet Protocol type = 0800 16 : IP address HLEN: hardware address length = 6 : Ethernet MAC address length PLEN: protocol address length = 4 : IP address length OP(operation): 1: ARP request, 2: ARP response, 3: RARP request, 4: RARP response

12

13

14 RARP

15 IP Internet Protocol

16 IP TCP UDP ICMPIGMP ARP PPP Ethernet

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

18 Packet Format 015 1631 total length TOS HLEN VERS flag fragment offsetidentification TTLprotocolheader checksum source IP address destination IP address options(if any) 20 bytes 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

19 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

20 TOS Bit 0-2: Precedence. Bit 3: 0 = Normal Delay, 1 = Low Delay. Bit 4: 0 = Normal Throughput, 1 = High Throughput. Bit 5: 0 = Normal Relibility, 1 = High Relibility. Bit 6-7: Reserved for Future Use. Precedence 111 - Network Control 011 - Flash 110 - Internetwork Control010 - Immediate 101 - CRITIC/ECP001 - Priority 100 - Flash Override000 - Routine 0 1234567 0 0DTR Precedence

21 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)

22

23 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

24 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)

25 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

26 ICMP Internet Control Message Protocol

27 ICMP IP ICMP ping program UDPTCP

28 ICMP Internet Control Message Protocol RFC-792 Query Message –Echo request and Echo reply message Error Message –Destination Unreachable message –Redirect message

29

30 ICMP Type

31 Ping Echo request msg Echo reply msg ping internet 015 1631 option data checksum8 or 00 identifiersequence number OPTIONAL Data: is a variable length field that contains data to be returned to the sender. An echo reply always returns exactly the same data as was received in the request. IDENTIFIER and SEQUENCE NUMBER are used by the sender to match replies to requests.

32 Destination Unreachable R pkt Destination Unreachable msg internet 015 1631 IP header + 64 bits of original IP datagram checksum 3 0-12 unused (0) When a router cannot forward or deliver an IP datagram, it sends a destination unreachable message back to the original source.

33 Destination Unreachable Code 0 Net Unreachable 1 Host Unreachable 2 Protocol Unreachable 3 Port Unreachable 4 Fragmentation Needed and Don't Fragment was Set 5 Source Route Failed 6 Destination Network Unknown 7 Destination Host Unknown 8 Source Host Isolated 9 Communication with Destination Network is Administratively Prohibited 10 Communication with Destination Host is Administratively Prohibited 11 Destination Network Unreachable for Type of Service 12 Destination Host Unreachable for Type of Service

34 Redirect R2R1 pkt#1  ‚  pkt#2 „ Redirect msg 015 1631 IP header + 64 bits of original IP datagram checksum 5 0-3 router ip address

35

36

37 Time Exceeded 015 1631 IP header + 64 bits of original IP datagram checksum 11 0 or 1 unused (0) Time exceeded msg internet Source Destination TTL = 1

38 Source Quench 015 1631 IP header + 64 bits of original IP datagram checksum 4 0 unused (0) Source quench msg internet Source, send fast Buffer full


Download ppt "Packet Switch Network Server client IP Ether IPTCPData."

Similar presentations


Ads by Google