6 Introduction to TCP/IP Flashcards
What is TCP/IP ?
The Transmission Control Protocol/Internet Protocol (TCP/IP). It specifies how data is exchanged over the internet by providing end-to-end communications that identify how it should be broken into packets, addressed, transmitted, routed and received at the destination.
Department of Defense (DoD) model:
Process/Application
Host-to-Host
Internet
Network Access
Internet Layer Protocols:
The main workhorse of TCP/IP is the Internet Protocol (IP). IP is responsible for managing logical network addresses and getting data from point A to point B, even if there are dozens of points in between.
Three support protocols at this layer:
Internet Control Message Protocol (ICMP) - is responsible for delivering error messages.
Address Resolution Protocol (ARP) - resolves logical IP addresses to physical MAC addresses built into network cards.
Reverse ARP (RARP) - resolves MAC addresses to IP addresses.
Host-to-Host Layer Protocols:
At this layer there are two alternatives within the TCP/IP suite: TCP and UDP. TCP guarantees packet delivery through the use of a virtual circuit and data acknowledgments, UDP does not. Because of this, TCP is referred to as connection-oriented, whereas UDP is connectionless. Because UDP is connectionless, it is
faster, but only by milliseconds. When a client makes a request of a server, it does so on a specific port to make sure that the right application on the server hears the request.
There are 65,536 ports, numbered from 0 to 65535. Ports 0 through 1023 are called the
well-known ports and are assigned to commonly used services, and 1024 through 49151 are called the registered ports. All the ports from 49152 to 65535 are free to be used by application vendors.
Common Port Numbers:
Service Protocol Port
FTP TCP 20, 21
SSH TCP 22
Telnet TCP 23
SMTP TCP 25
DNS TCP/UDP 53
DHCP UDP 67, 68
TFTP UDP 69
HTTP TCP 80
POP3 TCP 110
NetBIOS/NetBT TCP 137, 139
IMAP4 TCP 143
SNMP UDP 161, 162
LDAP TCP 389
HTTPS TCP 443
SMB/CIFS TCP 445
RDP TCP 3389
Process/Application Layer Protocols:
Most of the protocols within the TCP/IP suite are at the Process/Application layer.
Port 20/21—File Transfer Protocol (FTP):
The File Transfer Protocol (FTP) — transfer files, upload/download files from one host to another, copy files, list and manipulate directories, and view file contents. FTP is unsecure. It transmits usernames and passwords in plain text. For secure file transfers, other options include Secure FTP (SFTP) and FTP Secure (FTPS). FTP uses two TCP connections for communication. Port 20 is used to send the data files between the client and the server and Port 21 is used for pass control information.
Port 22—Secure Shell (SSH):
Secure Shell (SSH) uses port 22 and provides a secure way to access a remote systems terminal and set up a secure Telnet session for remote logins or for remotely executing programs and transferring files.
Port 23—Telnet:
Terminal emulation protocol. Someone using Telnet can log into another machine and “see” the remote computer in a window on their screen. User can manage files on that remote machine just as if they were logged in locally. Telnet is unsecure, data transmitted, including passwords, is sent in plain text. SSH overcomes this by encrypting the traffic, including usernames and passwords.
Port 25—Simple Mail Transfer Protocol (SMTP):
Simple Mail Transfer Protocol (SMTP) is the protocol used to send email from mail server to mail server as well as from a mail server to an email client. It’s designed to send only (push protocol). An email client locates its email server by querying the DNS server for a mail exchange (MX) record. After the server is located, SMTP is used to push the message to the email server, which will then process the message for delivery.
Port 53—Domain Name System (DNS)
Domain Name System (DNS) uses port 53 and translates domain names (URLs) into IP addresses.
Port 67/68—Dynamic Host Configuration Protocol (DHCP)
Dynamic Host Configuration Protocol (DHCP) dynamically assigns IP addresses and other IP configuration information to network clients.
Port 69—Trivial File Transfer Protocol (TFTP)
Trivial File Transfer Protocol (TFTP) is lighter-weight FTP protocol. It can transfer files much like FTP, but it’s much simpler and faster.
Differences:
Authentication:
(TFTP) - None required
(FTP) - Username / password (although you
may be able to use anonymous)
Protocol used:
(TFTP) UDP (connectionless)
(FTP) TCP (connection-oriented)
Number of commands: (TFTP) 5
(FTP) About 70
Primary use:
(TFTP) Transmitting configurations to and from network devices
(FTP) Uploading and downloading files
Port 80—Hypertext Transfer Protocol (HTTP)
HTTP manages the communication between a web server and client, and it lets you connect to and view content on the Internet. Information transmitted by HTTP is in plain text (not secure).
Port 110—POP3
Post Office Protocol 3 (POP3) - downloading email. It’s been replaced in most installations by IMAP4 because IMAP4 includes security and more features than POP3.
Port 137/139—Network Basic Input/Output System (NetBIOS)/NetBIOS over TCP/IP (NetBT)
Network Basic Input/Output System (NetBIOS) is an application programming interface (API) that allows computers to communicate with each other over the network. It works at Layer 5 of the OSI model. Consequently, it needs to work with another network protocol to handle the functions of Layer 4 and below. NetBIOS running over TCP/IP is called NetBT,
or NBT.
Specifically, NetBIOS provides three services:
Naming service, for name registration and resolution
Datagram distribution service, for connectionless communication
Session management service, for connection-oriented communication