Flashcards in The TCP/IP Deck (46)
What does TCP/IP stand for and what is it used for?
-TCP / IP stands for transmission control protocol / internet protocol.
-Used to enable different devices to communicate.
What are the four distinct layers of the tcp/ip stack that the tcp/ip protocol is formed of?
Application, transport, network, link
What is the application layer responsible for?
- It interacts with the user through software such as a web browser
- It selects and uses the correct protocol to transmit data.
What is the transport layer responsible for?
- Establishes an end to end connection between the sender/receiver.
- It splits the data into packets and labels them with a sequence number
- The packets are labeled with the port number to be used (this identifies the protocol in use)
What is the network layer responsible for?
- Adds the source/destination IP addresses to each packet
- Routers work within the network layer, using the IP addresses to send packets to their destination.
- The IP address and port number form the socket address which specify the device the packet must be sent to and the application being used
What is the link layer responsible for?
- Controls physical connections between network nodes
- Adds MAC addresses to packets of source/destination so that packets can locate the correct device
What do receiver's MAC addresses identify?
-The hardware to which a packet should be sent to.
-MAC addresses change with every hop through a network.
What happens at the receiving end of the tcp/ip stack?
- Once a packet is received, it is stripped of its extra information by reversing the TCP / IP stack.
- The link layer removes MAC addresses
- The network layer removes IP addresses
- The transport layer uses the packet’s port number to determine the correct application to send the packet to. It also uses the packet’s sequence number to put the packets in the correct order.
- The application layer receives the packets and displays the information to the user.
What is a socket address and what are they used for?
- A socket address is an IP address combined with a port number. For example: 220.127.116.11:443.
- They identify which of the applications on the recipient device a packet should be sent to.
What are Ip addresses formed of?
- They're split into two parts: a network identifier and a host identifier.
-Devices in a network share the same network identifier but have individual host identifiers.
What are subnets and what are subnet masks used for.
- Networks can be divided into smaller networks, called subnets. Each subnet has a different network identifier.
-The network identifier is determined by a subnet mask.
Name a commonly used subnet mask?
Give an example of how a subnet mask is used to determine the network identifier?
Find the network identifier, using the ip address 192.168.3.24 and the subnet mask 255.255.255.0
- 192.168.3.24 - IP Address
- 11000000.10101000.00000011.00011000 - IP Address in binary
- 255.255.255.0 - The subnet mask
11111111.11111111.11111111.00000000 - The subnet mask in binary
11000000.10101000.00000011.00000000 - uses a Bitwise AND operation
192.168.3.0 - The network identifier in decimal
The more bits that are assigned to the network identifier of an IP address ...
The more different subnets a network can have and the less bits assigned to the host identifier (the less devices can be connected to each subnet)
The more bits that are assigned to
the host identifier...
the more different devices can be connected to each subnet simultaneously.
What are the two types of IP address standards?
IPv4 and IPv6
How are IPv4 addresses formed?
Give an example.
- IPv4 addresses consist of 4 parts, separated by dots.
- Each part is assigned 8 bits allowing for numbers from 0-255 to be represented. Example: 192.168.34.7
How are IPv6 addresses formed?
Give an example.
IPv6 addresses are formed of eight blocks separated by colons. Each block contains four hexadecimal characters
How many IP addresses does IPv4 allow for?
This allows for a total of slightly over 4 billion (256^4
) unique IPv4 addresses.
How many IP addresses does IPv6 allow for?
IPv6 addresses use 128 bits (IPv4’s use of 32 bits) which allows for far more (in the order of 10^37) unique addresses.
What is the difference between routable and non-routable IP address?
- Routable IP addresses are public, non-routable are private.
- Routable IP addresses are globally unique whereas millions of devices can have the same non-routable IP address
What are Global authorities are responsible for?
For assigning routable IP addresses, ensuring the same address is never issued twice.
What is DHCP and why do we use it?
Dynamic host configuration protocol is used to assign IP addresses to devices as they join a network because private IP addresses in private networks are limited
How does DHCP avoid wasting IP addresses?
- DHCP uses a pool of available IP addresses and allocates them to new devices for the duration of their session.
- When a device leaves the network, the IP address used is returned to the pool for reallocation
When is port forwarding used?
Port forwarding is used when a client needs to communicate with a server that is connected to a private network.
How does port forwarding work?
- The packets sent to the router contain the port number of the application running on the server.
- Then the private networks router forwards the packets to the server using NAT.
What is an API?
- application programming interfaces are a set of protocols that govern how two applications communicate with each other.
-They enable one application to make use of another
Why do we use NAT and how does it work?
- Network address translation is when a device on the private network communicates with a device on the Internet.
-It sends packets through the router, which makes a record of the packet before replacing the devices private IP address with its routable IP address.
- When a response is received it's sent to the router’s public IP address, which then forwards the response to the private IP address by using the record it made when sending the packet.
What is the websocket protocol?
- Example of an API that allows for fast transmission of data by reducing the size of packet headers and using less security checks
- An application layer protocol that provides a constant stream of information between two devices using full-duplex communication