TCP/IP and DoD Model (TCP/IP Model)

21
IST 228\Ch3\IP Addressing 1 TCP/IP and DoD Model (TCP/IP Model)

description

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 - PowerPoint PPT Presentation

Transcript of TCP/IP and DoD Model (TCP/IP Model)

Page 1: TCP/IP and DoD Model (TCP/IP Model)

IST 228\Ch3\IP Addressing 1

TCP/IP and DoD Model (TCP/IP Model)

Page 2: TCP/IP and DoD Model (TCP/IP Model)

IST 228\Ch3\IP Addressing 2

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

Page 3: TCP/IP and DoD Model (TCP/IP Model)

IST 228\Ch3\IP Addressing 3

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

Page 4: TCP/IP and DoD Model (TCP/IP Model)

IST 228\Ch3\IP Addressing 4

• 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.

Domain Name Service (DNS)

edu nameserver

psu.edu

bk.psu.edu

yale.edu

cs.yale.edu

ist.bk.psu.edu is looking for the IP address for linda.cs.yale.edu

Page 5: TCP/IP and DoD Model (TCP/IP Model)

IST 228\Ch3\IP Addressing 5

Dynamic Host Configuration Protocol (DHCP)• Gives IP addresses to hosts, and

more– IP address– Subnet mask– Domain name– Default gateway (routers)– DNS

Page 6: TCP/IP and DoD Model (TCP/IP Model)

IST 228\Ch3\IP Addressing 6

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)

Page 7: TCP/IP and DoD Model (TCP/IP Model)

IST 228\Ch3\IP Addressing 7

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.

Page 8: TCP/IP and DoD Model (TCP/IP Model)

IST 228\Ch3\IP Addressing 8

• 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?

A B

1030 23 ...........

Destination port =23. I better

send the packet to my Telnet application.

SP DP

Telnet Z.

23 1030 ...........

SP DP

I got a packet. Destination port is 1030. Currently, my Telnet application is using this port, send it to the Telnet application.

Page 9: TCP/IP and DoD Model (TCP/IP Model)

IST 228\Ch3\IP Addressing 9

TCPFunction Definition

Ordered data transfer and segmentation

Continuous stream of bytes from upper-layer process that is segmented, numbered, and sequenced for transmission

Establish and terminate a connection

Process used to initialize port numbers and sequence and acknowledgement fields

Flow control using windowing

Process that uses window sizes to protect buffer space and routing devices

Error recovery (reliability)

Process of numbering and acknowledging data with sequence and acknowledgment header fields

Multiplexing Multiplexing Function that allows receiving hosts to decide the correct application for which the data is destined, based on the port number

Three-way hand shake

Page 10: TCP/IP and DoD Model (TCP/IP Model)

IST 228\Ch3\IP Addressing 10

TCP Segment Format

• TCP creates a lot of overhead.

• Discussion: Why do we need that much overhead?

Page 11: TCP/IP and DoD Model (TCP/IP Model)

IST 228\Ch3\IP Addressing 11

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

Page 12: TCP/IP and DoD Model (TCP/IP Model)

IST 228\Ch3\IP Addressing 12

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)

Page 13: TCP/IP and DoD Model (TCP/IP Model)

IST 228\Ch3\IP Addressing 13

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.

Page 14: TCP/IP and DoD Model (TCP/IP Model)

IST 228\Ch3\IP Addressing 14

IP Header

Page 15: TCP/IP and DoD Model (TCP/IP Model)

IST 228\Ch3\IP Addressing 15

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

Page 16: TCP/IP and DoD Model (TCP/IP Model)

IST 228\Ch3\IP Addressing 16

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?

Page 17: TCP/IP and DoD Model (TCP/IP Model)

IST 228\Ch3\IP Addressing 17

Reverse Address Resolution Protocol (RARP)• Discovers the

identity of the IP address for diskless machines.

Page 18: TCP/IP and DoD Model (TCP/IP Model)

IST 228\Ch3\IP Addressing 18

Routers on the network

Page 19: TCP/IP and DoD Model (TCP/IP Model)

IST 228\Ch3\IP Addressing 19

Putting Things Together IP Routing

1. ICMP creates an echo pay load2. ICMP hands the pay load to IP, which creates a packet.

What is the information loaded in the IP header?3. IP works with ARP to determine the destination is on the

local network or not4. 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.

Page 20: TCP/IP and DoD Model (TCP/IP Model)

IST 228\Ch3\IP Addressing 20

5. The default gateway address is 172.16.10.1 (the IP address of interface E0). MAC address must be known for this interface. Why?

6. Check the ARP cache for the MAC address corresponding 172.16.10.1.

7. MAC address is known now. Hand packet down to Data Link Layer. A frame is generated.

8. The frame is handed down to the Physical Layer to be put on the medium.

9. 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.

10. The packet is pulled out from the frame, and the frame is discarded.

11. IP receives the packet and checks the destination IP address.

12. The routing table must have an entity for 172.16.20.0, or the packet is discarded.

13. The router finds an entity for 172.16.20.014. The router forwards the packet to the E1 buffer15. The E1 buffer must know the hardware address of the

destination host. Why?

Page 21: TCP/IP and DoD Model (TCP/IP Model)

IST 228\Ch3\IP Addressing 21

16. The router sends an ARP request for 172.16.20.2.17. Host B responds with its MAC address.18. 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.

19. Host B receives the frame and runs a CRC. It is a match.

20. At the network layer, IP receives the packet. The protocol field is checked to find the owner of the payload.

21. It is for ICMP. The payload is handed to ICMP.22. Happy Ending. 23. ..24. ..25. ..26. ..