210 likes | 304 Views
TCP/IP and DoD Model (TCP/IP Model). Process/Application Layer. Defines protocols node-to-node application communication such as DCHP, LPD, SNMP, DNS, NFS, Telnet, FTP, SMTP, TFTP Controls user-interface specifications. Process/Application Layer Protocols. Telnet- terminal emulation
E N D
Process/Application Layer • Defines protocols node-to-node application communication such as • DCHP, LPD, SNMP, DNS, NFS, Telnet, FTP, SMTP, TFTP • Controls user-interface specifications
Process/Application Layer Protocols • Telnet- terminal emulation • File Transfer Protocol (FTP) • Network File System: allows to different types of file systems operate. • Simple Mail Transfer Protocol (SMTP) • Line Printer Daemon (LDP): facilitates printer sharing • HTTP • Simple Network Management Protocol (SNMP) • X Windows
Domain Name Service (DNS) • Resolves host names into IP addresses. • Discussion: Why do we need this? • Use nslookup, dig, and host to find the IP addresses for psu.edu and mit.edu • The DNS system is divided into nonoverlapping zones. • Each zones have one or more DNS servers. edu name server psu.edu yale.edu bk.psu.edu cs.yale.edu ist.bk.psu.edu is looking for the IP address for linda.cs.yale.edu
Dynamic Host Configuration Protocol (DHCP) • Gives IP addresses to hosts, and more • IP address • Subnet mask • Domain name • Default gateway (routers) • DNS
The Host-to-Host Layer • Functions • Reliable end-to-end communication • Ensuring error free delivery of data • Prepares the data for delivery • Protocols • Transmission Control Protocol (TCP) • User Datagram Protocol (UDP)
Ports • TCP and UDP use port numbers to communicate with the upper layers. • Ports help to keep track of different conversations over the network simultaneously • The Well Known Ports are those from 0 through 1023. • The Registered Ports are those from 1024 through 49151 • The Dynamic and/or Private Ports are those from 49152 through 65535 • Visit http://www.iana.org/assignments/port-numbers for well-known port numbers • You can see LINUX ports /etc/services (type cat /etc/services |more) • Use nmap to scan open ports of a machine.
Be familiar with these ports • TCP port 20 – FTP data transfer • TCP port 21 – FTP control port • TCP port 23 – Telnet • TCP port 25 – SMTP • TCP & UDP port 53 – DNS • TCP (port 80) – HTTP Web services • TCP & UDP port 123 – Network Time Protocol (NTP) • TCP port 110 – Post Office Protocol version 3 (POP3) • TCP port 119 – Network News Transport Protocol (NNTP) • UDP port 69 – TFTP • UDP port 161 – SNMP • How does it work? Destination port =23. I better send the packet to my Telnet application. I got a packet. Destination port is 1030. Currently, my Telnet application is using this port, send it to the Telnet application. Telnet Z. A B SP DP 1030 23 ........... SP DP 23 1030 ...........
TCP Three-way hand shake
TCP Segment Format • TCP creates a lot of overhead. • Discussion: Why do we need that much overhead?
User Datagram Protocol • Used transporting information that does not require reliable delivery • Does not sequence the segments • Sends the segments off and forgets about them • Does not create a virtual circuit • Connectionless protocol
The Internet Layer Protocols • Functions • Routing • Provide single network interface to upper layers • Protocols • Internet Protocol (IP) • Internet Control Message Protocol (ICMP) • Address Resolution Protocol (ARP) • Reverse Address Resolution Protocol (RARP)
Internet Protocol • IP sees the picture • Functions: • Receives segment from Host-to-Host Layer, fragment them into packets, using routing tables, routes them over the network, and then reassembles them into segments on the receiving end.
Internet Control Message Protocol (ICMP) • Provides message control and error-reporting services between two TCP/IP host and between a host server and gateway to the Internet • Routes periodically sends following messages • Destination unreachable • Buffer full • Hops • Pings • Traceroute
Address Resolution Protocol (ARP) • finds the hardware address of a host from a known IP address • How does it work? • First look at the ARP cache (ARP table). • If IP to MAC mapping is not in the cache, broadcast a ARP request to hosts on the local segment • If the device in the local network, it returns a ARP reply. • .. • Discussions: • How does the source know the IP of the destination? • What would happen if no ARP reply is received? • What happens when an ARP reply is received? • Why is it not a good idea to use static ARP cache in the local network?
Reverse Address Resolution Protocol (RARP) • Discovers the identity of the IP address for diskless machines.
Putting Things Together IP Routing • ICMP creates an echo pay load • ICMP hands the pay load to IP, which creates a packet. What is the information loaded in the IP header? • IP works with ARP to determine the destination is on the local network or not • No the destination is not on the local network, the packet needs to be sent to the default gateway. Look for the address of the local gateway.
The default gateway address is 172.16.10.1 (the IP address of interface E0). MAC address must be known for this interface. Why? • Check the ARP cache for the MAC address corresponding 172.16.10.1. • MAC address is known now. Hand packet down to Data Link Layer. A frame is generated. • The frame is handed down to the Physical Layer to be put on the medium. • Every device on the collision domain receives the bits. They run CRC and check FCS field. The interface E0 matches the FCS field. Look what type of Network layer protocol is used. • The packet is pulled out from the frame, and the frame is discarded. • IP receives the packet and checks the destination IP address. • The routing table must have an entity for 172.16.20.0, or the packet is discarded. • The router finds an entity for 172.16.20.0 • The router forwards the packet to the E1 buffer • The E1 buffer must know the hardware address of the destination host. Why?
The router sends an ARP request for 172.16.20.2. • Host B responds with its MAC address. • The Data Link Layer (in router) creates a frame. The frame is handed down to the Physical Layer to be sent out on the physical medium. • Host B receives the frame and runs a CRC. It is a match. • At the network layer, IP receives the packet. The protocol field is checked to find the owner of the payload. • It is for ICMP. The payload is handed to ICMP. • Happy Ending. • .. • .. • .. • ..