TCP IP Quick Guide
TCP IP Quick Guide
TCP Services UDP Services IRC Internet Relay Chat DCAP Data Link Switching Client Access Protocol DHCP Dynamic Host Configuration Protocol BOOTP Bootstrap Protocol NTP Network Time Protocol TFTP Trivial File Transfer Protocol ICP Internet Cache Protocol
OSI MODEL
Layer 7: Application Layer
SMTP Simple Mail Transfer Protocol IMAP Internet Message Access Protocol
UDP Encapsulated SNMP SimpleNetwork Mgmt. Protocol v1, v2, v3 RMON I & II Remote Monitoring MIBS
CORBA
IIOP
GIOP
Security
IPX
IPSEC
ONC RPC Pemote Procedure Call
Specifies architecture-independent data transfer format Encodes and decodes data; Encrypts and decrypts data; Compresses and decompresses data
UDP
TCP
UDP SLIP
UDP
TCP PPTP Point-to-Point Tunneling Protocol L2TP Layer 2 Tunneling Protocol L2F Layer 2 Forwarding Protocol
Frame Relay
Manages user sessions and dialogues Controls establishment and termination of logical links between users
SMB
L2TP
TCP
X.25
NetBIOS
TCP
TLS IP in IP SSL IP Encapsulated DIFFSERV Transport Secure Layer in IP Socket Layer Security
Provides reliable and sequential end-to-end packet delivery Provides connectionless oriented packet delivery
From UDP
Routing Protocol UDP Based RUDP Reliable UDP Cisco HSRP Hot Standby Router RIP Routing Information Protocol
Cisco RSRB BGP Border Gateway Remote Source Route Bridging Protocol Protocol Cisco STUN Serial Tunneling of SDLC Header Cisco XOT X.25 Over TCP
Multicast Routing Protocol-TCP Based MSDP Multicast Source Discovery Protocol MBGP Multi-Protocol BGP From TCP Multicast Routing Protocols-IP Based MOSPF Mulitcast OSPF DVMRP Distance Vector Mulitcast Routing Protocol PGM Pragamatic General Mulitcast Protocol PIM-SM Protocol Independant Mulitcast-Sparse Mode PIM-DM Protocol Independant Mulitcast-Dense Mode IGMP Internet Group Management Protocol IP / IPv6 Internet Protocol
IRDP
ICMP Router Discovery Protocol
ICMP/ICMPv6
Internet Control Message Protocol
Routing Protocol-IP Based EGP NHRP GGP Exterior Gateway Next Hop Gateway-to-Gateway Protocol Resolution Protocol Protocol OSPF RSVP VRRP Open Shortest Resource Reservation Virtual Router Path First Protocol Redundancy Protocol Cisco Protocols IGRP Interior Gateway Routing Protocol E-IGRP Enhanced IGRP
IPSEC Internet IP Security AH Authentication Header ESP Encapsulation Security Payload IP Comp IP Payload Compression IKE Internet Key Exchange
IPCP/IPv6CP
ARP SLARP Address Resolution Serial Link ARP Protocol IARP Inverse ARP RARP Reverse ARP
CR-LDP LDP TDP Constraint Label Tag Based Distribution Distribution LDP Protocol Protocol
Defines procedures for operating the communication link Provides framing and sequencing
PPP
Ethernet
Internetwork
Ethernet
IEEE 802.3 CSMA/CD Media Access Control
LAN
Wireless LAN
IEEE 802.11 WLAN Direct Sequence
ISO HDLC IBM SDLC High-level Synchronous Data Link Protocol Data Link Protocol PPP Point-to-Point Protocol NCP LCP Link Control Network Control Protocols Protocols ATM Asynchronous Transfer Mode Layer
Frame Relay Link Access Procedure for Frame Mode Bearer Services (LAPF)
PPP
FDDI
IEEE 802.3 10 Mbps Ethernet IEEE 802.3u 100 Mbps Fast Ethernet IEEE 802.3z Gigabit Ethernet IEEE 802.11a 54 Mbps IEEE 802.11b 1, 2, 5.5, 11 Mbps IEEE 802.11g 54 Mbps IEEE 802.11n 100 Mbps - 200 Mbps
MAN
XAUI DWDM
Token Ring
Fiber Optic Shielded Twisted Pair Unshielded Twisted Pair
SONET/SDH
WAN
OC-3/STM-1 OC-12/STM-3 OC-48/STM-16 OC-192/STM-64 9.953 Gbps 155.52 Mbps 622.08 Mbps 2.488 Gbps
www.javvin.com
Header checksum
Source address Destination address Option + Padding Data Version the version of IP (4 for IPv4). IP Header Length (IHL) number of 32-bit words that points to the beginning of the data. It is between 5 (20bytes) to 15 (60 bytes). Type-of-Service indicates the quality of service desired. Type of service Differentiated Services Precedence (000 111) 000 D (1 = minimize delay) 0 T (1 = maximize throughout) 0 R (1 = maximize reliability) 0 C (1 = minimize cost) 1 = ENC capabl x (reserved and set to 0) 1 = congestion experienced Total Length the length of the entire IP packet in bytes. Maximum length is 65,535. Identication an integer that identies the current datagram. Flags a 3-bit eld of which the two low-order bits control fragmentation. X (reserved and set to 0) D (1 = dont fragment) M (1 = more fragment) Fragment Offset indicates the position of the fragments data relative to the beginning of the data in the original datagram. Time-to-Live a counter that gradually decrements down to zero, at which point the datagram is discarded. Protocol - indicates which upper-layer protocol receives incoming packets after IP processing is complete. Some sample protocols: 1 ICMP 2 IGMP 6 TCP 9 IGRP 17 UDP 47 GRE 50 ESP 51 AH 57 SKIP 88 EIGRP 89 OSPF 115 L2TP Header Checksum ensures IP header integrity. Source Address 32 bits eld species the sending node. Bits Class A Class B Class C 31 0 10 110
CIDR
CIDR: Classless and Subnet Address Extensions and Supernetting 31 Network /nn CIDR prex length /1 /2 /3 /4 /5 /6 /7 /8 /9 /10 Dotted Decimal Netmask 128.0.0.0 192.0.0.0 224.0.0.0 240.0.0.0 248.0.0.0 252.0.0.0 254.0.0.0 255.0.0.0 255.128.0.0 255.192.0.0 255.224.0.0 255.240.0.0 255.248.0.0 255.252.0.0 255.254.0.0 255.255.0.0 255.255.128.0 255.255.192.0 255.255.224.0 255.255.240.0 255.255.248.0 255.255.252.0 255.255.254.0 255.255.255.0 255.255.255.128 255.255.255.192 255.255.255.224 255.255.255.240 255.255.255.248 255.255.255.252 255.255.255.254 255.255.255.255 Number of Classfull Networks 128 As 64 As 32 As 16 As 8 As 4 As 2 As 1 A or 256 Bs 128 Bs 64 Bs 32 Bs 16 Bs 8 Bs 4 Bs 2 Bs 1 B or 256 Cs 128 Cs 64 Cs 32 Cs 16 Cs 8 Cs 4 Cs 2 Cs 1C 1/2 C 1/4 C 1/8 C 1/16 C 1/32 C 1/64 C 1/128 C 1/256 C Number of Usable IPs 2,147,483,646 1,073,741,822 536,870,910 268,435,454 134,217,726 67,108,862 33,554,430 16,777,214 8,388,606 4,194,302 2,097,150 1,048,574 524,286 262,142 131,070 65,534 32,766 16,382 8,190 4,094 2,046 1,022 510 254 126 62 30 14 6 2 0 Host 0
Decimal Address Range 1-126 128-191 192-223 224 - 239 240 - 255
Multicast Experimental
Destination Address 32 bits eld species the receiving node. Options allows IP to support various options. 0 End of option list 1 No operation (PAD) 7 Record route 68 timestamp 131 Loose source route 137 Strict source route Data contains upper-layer information.
/16 /17 /18 16bits : aaaa : 16bits aaaa /19 /20 /21 /22 /23 /24 /25 Interface ID (64 bits) /26 /27 /28 Interface ID (64 bits) /29 /30 Interface ID (64 bits) /31 /32
aaaa : aaaa
Source address (128 bits) Destination address (128 bits) Next header Extension Header Information (optional and variable length) Data (Variable Length) Version Internet Protocol Version number (IPv6 is 6). Trafc class enables a source to identify the desired delivery priority of the packets. Flow label used by a source to label packets for special handling by the IPv6 router. Payload length the length of the data portion of the packet. Next header identies the type of header immediately following the IPv6 header. It is similar to the protocol led in IPv4. Hop limit species the maximum number of routers (hops) through which a packet can traverse before discarded. Source address 128-bit address of the originator of the packet. Destination address 128-bit address of the intended recipient of the packet. Extension Header Information an optional eld (not included in the basic header) with variable length. Routing Fragmentation Authentication Encapsulation Hop-by-Hop Option Destination Options Javvin Technologies Inc. All rights reserved.
Site-local unicast address divisions: 1111111011 (10 bits) 0x00 Site Level Aggregation
(Interface ID is based on hardware MAC address.) Multicast Address: applied for multiple network interfaces, and communication is conducted with all hosts with the same address. 0xFF (8 bits) Flag (4 bits) Scope (4 bits) Group ID (112 bits)
IPv4-mapped IPv6 address: 0x000 (80 bits) 0xFFFF (16 bits) IPv4 Address (32 bits)
Anycast Address: applied for multiple network interfaces, but actual communication is conducted with one of them. It has the same format as the Unicast address.
IPv4-competible IPv6 address: 0x000 (80 bits) 0x0000 (16 bits) IPv4 Address (32 bits)
www.javvin.com
TCP/IP Utilities
ICMP
ICMP: Internet Message Control Protocol. ICMP for IPv4 is dened in IETF RFC 792 and ICMP for IPv6 is dened in IETF RFC 2463.
TCPDUMP
tcpdump dump trafc on a network tcpdump [-aenStvx] [-c count] [-F le] [-i int] [-r le] [-s snaplen] [-w le] [lter_expression]
ICMP Header Format. 8 Type Indentier Address mask Type 0 Echo Reply 3 Destination Unreachable Code 0 0 Net Unreachable 1 Host Unreachable 2 Protocol Unreachable 3 Port Unreachable 4 Fragmentation Needed & DF Set 5 Source Route Failed 6 Destination Network Unknown 7 Destination Host Unknown 8 Source Host Isolated 9 Network Administratively Prohibited 10 Host Administratively Prohibited 11 Network Unreachable for TOS 12 Host Unreachable for TOS 13 Communication Administratively Prohibited 4 Source Quench 5 Redirect 0 0 Redirect Datagram for the Network 1 Redirect Datagram for the Host 2 Redirect Datagram for the TOS & Network 3 Redirect Datagram for the TOS & Host 8 Echo 9 Router Advertisement 10 Router Selection 0 0 0 0 Time to Live exceeded in Transit 1 Fragment Reassembly Time Exceeded 0 0 Pointer indicates the error 1 Missing a Required Option 2 Bad Length 13 Timestamp 14 Timestamp Reply 15 Information Request 16 Information Reply 17 Address Mask Request 18 Address Mask Reply 30 Traceroute 0 0 0 0 0 0 0 Code 16 Checksum Sequence number 32 bit
Source port Identies points at which upper-layer source process receives TCP services. Destination port Identies points at which upper-layer Destination process receives TCP services. Sequence number Species the number assigned to the rst byte of data in the current message. Acknowledgment number Contains the sequence number of the next byte of data the sender to receive. Offset Indicates where the data begins. Reserved Reserved for future use. Must be zero. Control bits (Flags) Carry a variety of control information. The control bits may be: U (URG) Urgent pointer eld signicant. A (ACK) Acknowledgment eld signicant. P (PSH) Push function. R (RST) Reset the connection. S (SYN) Synchronize sequence numbers. F (FIN) No more data from sender. Window Species the size of the senders receive window. Checksum Indicates whether the header was damaged in transit. Urgent Pointer Points to the rst urgent data byte in the packet. Option + Padding Species various TCP options. 0 End of Option List 1 No operation (pad) 2 Maximum segment size 3 window scale 4 Selective ACK ok 8 Timestamp Data contains upper-layer information.
-a Convert network and broadcast addresses to names -c Exit after receiving count packets -F Filter expression in le -i Listen on interface -n Dont convert IP addresses to names -r Read packets from le -s Get snaplen bytes from each packet -t Dont print timestamp -v Verbose mode -w Write packets to le -x Display in hex -X Display in hex and ASCII lter_expression Selects which packets will be dumped.
PING
ping - send ICMP ECHO_REQUEST to network hosts ping [ -LRUbdfnqrvVaAB] [ -c count] [ -i interval] [ -l preload] [ -p pattern] [ -s packetsize] [ -t ttl] [ -w deadline] [ -F owlabel] [ -I interface] [ -M hint] [ -Q tos] [ -S sndbuf] [ -T timestamp option] [ -W timeout] [ hop ...] destination -a Audible ping. -A Adaptive ping. -b Allow pinging a broadcast address. -B Do not allow ping to change source address. -c count Stop after sending count ECHO_REQUEST packets. -d Set the SO_DEBUG option on the socket being used. -F ow label Allocate 20 bits ow label on echo request packets (Only ping6) -f Flood ping. -i interval Wait interval seconds between sending each packet. -I interface address Set source address to specied interface address. -l preload Sends [preload] packets not waiting for reply. -L Suppress loopback of multicast packets. -n Numeric output only. -p pattern Specify (up to 16) ``pad bytes to ll out the out packet. -Q tos Set Quality of Service -related bits in ICMP datagrams. -q Quiet output. -R Record route. -r Bypass routing tables and send to a host on an attached interface. -s packetsize Specify the number of data bytes to be sent. -S sndbuf Set socket sndbuf. -t ttl Set the IP Time to Live. -T timestamp option Set special IP timestamp options -M hint Select Path MTU Discovery strategy. -U Print full user-to-user latency. -v Verbose output. -V Show version and exit. -w deadline Specify a timeout (seconds) before ping exits. -W timeout Time to wait for a response (seconds).
11 Time Exceeded
12 Parameter Problem
www.javvin.com
TCP/UDP Ports
Process X ... Process Y Processes Sockets IP Addresses
Port N ... UDP datagrams ... Port M ... TCP/UDP TCP/UDP TCP connection IP IP unreliable IP datagrams
Host A
Host B
Well Known Ports: from 0 through 1023 Registered Ports: from 1024 through 49151 Dynamic and/or Private Ports: from 49152 through 65535
ISBN 0-9740945-4-4
Related Products: Network Communication Protocol Map Network Protocols Handbook Packet Analyzer
To order Javvin products: Javvin Technologies, Inc. 13485 Old Oak Way Saratoga CA 95070 USA www.javvin.com [email protected] 1-408-872-3881
www.javvin.com