TCP/IP protocol Flashcards
What are the layers of the TCP/IP stack from top to bottom
- application layer
- transport layer
- internet layer
- link layer
Purpose of the application layer
Uses protocols designed to work with specific types of applications
E.g. web browser uses HTTP, email client uses SMTP, IMAP and POP3
What is the purpose of the transport layer
Breaks the application data down into segments(TCP) and datagrams(UDP)
Sequence numbers allocated, source and destination port numbers are added to header.
For TCP, delivery acknowledged and lost segments retransmitted
Purpose of the internet/network layer
Encapsulates segments from the transport layer to create IP Packets.
Source and destination IP addresses are added at this stage
Purpose of link layer
- Responsible for transporting IP packets across each individual link that make up path between client and server
- Further encapsulates IP packets in Ethernet frames
- At this level, networking protocols are used
Names of data block produced by each layer
Application- application data (HTTP, SMTP)
transport - segments or datagrams
Internet - Packets
Link - Frames
What protocols does the transport layer use
Transmission control protocol and user datagram protocol
What does the TCP do
- keeps track of each generated segment, assigning a sequence number
- at receiving end, TCP keeps record of incoming sequence numbers & acknowledges each segment
- if sender doesn’t receive an acknowledgement, segment is resent
What does the UDP do
Transfers data at a fast rate
Uses of TCP compared to uses UDP
TCP - when complete data is required (reliable)
UDP - when speed of data transfer is the most important criteria (unreliable)
What is a socket
A combination of an IP address and a port number.
Persists throughout duration of the connection
What is the max amount of connections a server can keep track of
65, 534 per host
What does the socket facilitate
Asynchronous communication, meaning only one device can communicate at a time
What are the well-known port numbers
Port - protocol - use
20 - FTP(Data) - file transfer
21 - FTP(Control) - file transfer
22 - SSH - Secure remote access
25 - SMTP - Mail transfer
80 - HTTP - Website access
110 - POP - Mailbox access
143 - IMAP - Mailbox access
443 - HTTPS - Secure website access
What is a MAC address
Unique to a specific NIC
Physically tied to hardware of computer often referred to as physical address
What does HTTP do
Requests web pages and linked resources from the web server
How does HTTP operate
Through requests and responses:
- server waits and listens for requests
- client sends HTTP request for web page to server
- server receives the request
- server sends HTTP response which encapsulates requested page
- client receives response and displays web page in web browser
What are the extra steps for the HTTP operation for dynamic pages
- database may be accessed for up-to-date images and prices for online shopping
- profile may be accessed for more personalised content
- processing may happen on client-side
What are the HTTP request methods
GET - request data from resource
POST - submit data, create new resource
PUT - update/replace an existing resource
DELETE - removes a resource from server
HEAD - requests just header of data from server
What does HTTPS do
Encrypts data exchanged between client and server
How does HTTPS work
- Provides digital certificate containing public encryption key.
- authenticity is checked automatically in browser through number of root certificates
- your browser uses key to encrypt data
- only the authorised server has corresponding private key to decrypt it
What does the FTP do
Used to move files between 2 devices
How does the FTP work
Client-server application:
- client device runs FTP client software, responsible for initiation of all connections
- another device runs the FTP server & has access to disk space to store the files
What can a user do once logged into the FTP client software
- access directories on FTP server & request list of files in directory
- user can choose to download or upload file
Examples where FTP can be used
- create web pages on own computer and then upload files to web server
- download software
- download music file
- upload video clips to be embedded in web-page
What types of FTP are publicly available FTP sites
Anonymous FTP
Role of a traditional email system
user connects to their email server and downloads any messages they may have received
Role of a modern email system
Most modern systems use ‘push’ technology.
New emails are pushed to client as soon as they arrive on mail server
Is optional
What protocols does an email system use for sending and retrieving
uses POP3 and IMAP for retrieval and SMTP for sending
What does POP3 do
Downloads emails onto client and deletes them from server
What does IMAP do
Creates a copy on the local client device and syncs any deletion on both client and server
What is preferred between POP3 and IMAP
IMAP as it offers the ability to manage your emails on multiple devices
What does SSH do
Provides an encrypted connection for remote access to another computer
How does SSH work
Encrypts messages sent between SSH client and SSH server, providing a secure link through which users can communicate with a remote computer
How can encrypting data via SSH be described
- creates a secure tunnel over the internet
- means that SSH can be used to securely tunnel other protocols over the internet.
- SSH hides actual protocol its encrypted
- network doesnt see destination address or nature of data, just SSH data destined for SSH server
Common uses of SSH
Network admins who need to access remote devices to start & stop devices, perform software upgrades, etc.
Allows person to securely manage multiple computers from one place
What must you have to connect to another computer using SSH
- an account in the computer you’re trying to connect to
- sufficient administrative tight to carry out some operations
What are the 2 ways to sign into a remote computer via SSH
- Use command line of your OS, type commands you SSH in remote device
- Use a GUI based SSH client