X) TCP / IP / Client-server Model Flashcards
What is a Protocol and Protocol stack?
A protocol is a set of rules that specify how two or more devices communicate with one another.
In a protocol stack, protocols are used in a series of functional layers and ensuring the data is sent from one layer to another layer, before being sent out onto the media for transmission.
Encapsulation & Decapsulation
A method of modular communication, where data is taken from the layer above, the data is then given some additional information, then passed to the layer below.
The process of a layer taking data from the data packet recived, then passes the rest of the data to the layer above.
Layer 4 - Application Layer
This layer uses appropriate protocols relating to whatever application is being used to transmit data. Protocol Examples: HTTP, HTTPS, POP3, FTP, SMTP.
Layer 3 - Transport Layer
This layer is responsible for establish an “end to end” connection. Once a connection has been made, the data is split and is transmitted as packets.
At the receiving end, the layer confirms that all packets have been received and requests data if any are missing.
Layer 2 - Network Layer
For each packet a source IP address and destination IP address is added. E.g. 127.56.87.2 : 80
Socket = IP Address : Port Number
Layer 1 - Link Layer
This layer represents the physical connection between the various network nodes. The Media Access Control Address (MAC Address) is added to each packet. The packets are then sent based on their destination IP Address.
MAC Address
The MAC Address is a unique identifier, 12 digit hexadecimal code. This identifier is used to identify a specific physical device. E.g. 4B:24:A2:73:0E:F1
281 Trillion possibilities.
Receiving data
Once the data packets have been received, it is passed back up through the layers.
- The link layer removed the MAC address
Port Numbers
A port is used to alert a specific application to deal with data sent to a computer. They are used by protocols to specify what data is being sent. HTTP - 80 HTTPS - 443 POP3 - 110 SMTP - 25 FTP - 20
Secure Shell
An encrypted protocol that allows secure communication between nodes across a network. Secure Shell tunnelling is used to pass data through where otherwise it might have been blocked.
Email Protocols
Mail servers are dedicated computers which are responsible for storing and provide access to emails.
SMTP- Used to send emails between the mail server and their destination.
POP3- Downloads emails stored on a server to a local client.
IMAP- Manages emails on a server so multiple clients can access the same email account.
Web Servers
Some computers are dedicated to host websites and provide resources. Data stored are either in the format of HTML or JavaScript and are then separated down into their constituents parts.
These text elements are broken down further and rendered on the client browser. Images, Videos or scripts are also downloaded as the webpage is rendered.
Web servers make use of protocols such as HTTP to ensure that all data is handled correctly.
What is an IP Address?
A unique identifier for a host computer or network node trying to connect over IP on a network.
IPv4 Addresses
Used 4 (octets) groups of 8 bits written in decimal-dotted notation:
10101011.00001111.10101010.11100010
Example:
5D26:93AC:0007:492F
Range of:
0.0.0.0 - 255.255.255.255
2 ^ 32 = 4.3 Billion Addresses
Reserved IP Addresses
X.Y.Z.0 - represents the entire network
X.Y.Z.255 - represents the broadcast address, used for sending data simultaneously to all hosts on a network.
127.X.Y.Z - represents loopback, in which a host’s IP software, treats an outgoing packet as incoming.
Why is IPv6 is better than IPv4?
IPv4 = 256^4 = 4.3 Billion combinations
Not enough for the level of devices being manufactured.
IPv6- 128 bits (8 octets)
Example:
5D26:93AC:0007:492F:5D26:93AC:0007:492F
IPv6 = 256 ^ 16= 3.4x10^38 possible addresses
Every atom covering the Earth’s surface +100 times over.
Network and Host Identifiers
IP Address broken down into a Network ID and Host ID.
For this example, 16 bits represent each sub ID.
IP Address: 142.67.57.253
Network ID: 142.67.0.0
Host ID: 0.0.57.253
Classless IP Addressing
The more hosts in each network, the fewer networks that can be created.
210.54.101.0 /24
Network ID = 24 bits –> 3 octets
Network ID = 210.54.101 = 16.8 million
Host ID = 0.0.0.0 = 256