260 likes | 284 Views
Learn about IP addresses, subnetting, routing mechanisms, ICMP protocols, and useful ICMP messages such as Echo, Destination Unreachable, and more. Understand basic IP routing and Internet Control Protocols in simple terms.
E N D
Basic IP Protocol Natawut Nupairoj, Ph.D. Department of Computer Engineering Chulalongkorn University
Outline • Overview. • IP Address. • Subnetting. • IP Routing. • ICMP.
Network Layer • IP:Internet Protocol • Unreliable (best-effort) • Connectionless • IP datagram • ICMP: Internet Control Message Protocol • Request/response/error messages • Ping, traceroute • Encapsulated in IP datagrams. • IGMP: Internet Group Management Protocol • Join/leave IP multicast groups. • Encapsulated in IP datagrams.
Transport Layer • TCP • Reliable (timeout/retransmission mechanism) • Connection-oriented. • TCP segment • Telnet, rlogin, SMTP, HTTP, FTP • UDP (datagram) • Unreliable but low-overhead • DNS, TFTP, BOOTP, SNMP • Connecting thru “port” (SAP). • 16-bit numbers • well-known port number: HTTP(80), FTP(20), etc.
Basic IP Routing • Hop-by-hop using routing table. • Routing table entry: • Destination IP address: • host address - non-zero host ID • network address - host ID = 0 • Gateway IP address: • next-hop router. • directly connected.
Basic IP Routing • Flags • destination IP: host or network address • gateway IP: router or direct connect • Network interface should be used for transmission.
IP Routing Mechanism • Search routing table for an entry: • Matches the complete IP address (both network and host IDs). • Matches the destination network ID. • Default route. • If found, send to the gateway IP address (either next-hop or directly connected interface). • Otherwise, the datagram is undeliverable (router issues an ICMP error message).
Internet Control Protocols • To provide support for IP. • ARP • RARP • ICMP • All data for these protocols are encapsulated in IP datagrams.
ICP: ARP • ARP: Address Resolution Protocol • To send a packet to the destination, a host must know the destination physical network address. • The sender/router must convert from IP address to physical network address (ie. Ethernet address). • When a host wants to find a physical address: • It broadcasts an ARP request containning an IP address. • The owner (or designated responder) replies with its own network address. • ARP response can be cached.
ICP: RARP • Reverse Address Resolution Protocol. • The reverse of ARP. • For diskless workstation. • X Terminal • Other related protocols: • bootp • tftp
ICP: ICMP • Internet Control Message Protocol • Communicate error messages and other conditions for IP and higher layers. • Message Types: • Status checking: ping. • Error messages: destination unreachable, network unreachable, etc. • Flow control: source quench. • Routing control: redirect, etc. • Information retrieval: timestamp request, etc.
Important ICMP Messages • Echo: • for ping program. • Destination, network, port unreachable messages: • Used by the traceroute program. • Time Exceeded: • TTL = 0 during transit or reassembly. • Also used by the traceroute program. • Source quench: • flow control. • the receiver informs the sender that it is running out of buffer and starts dropping datagrams.