The TCP/IP Flashcards
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: 114.26.20.199: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?
255.255.255.0
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
Example: 2071:0eb8:85a3:8a2f:0000:0000:0370:7264
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
What does each letter in CRUD stand for and what are their equivalent SQL commands?
What are the CRUD commands used for?
Create INSERT
Retrieve SELECT
Update UPDATE
Delete DELETE
- They are used for querying online databases
What does rest stand for and what is it?
- Representational state transfer is a style of systems design for online database applications that are queried with a web browser
- Allows any client or server to be updated independently of each other without any loss of function
What are the HTTP request methods and their equivalent SQL commands?
What are the REST commands used for?
POST INSERT GET SELECT PUT UPDATE DELETE DELETE - They are used for querying databases
What do database servers deliver responses to queries in?
Either XML or JSON
What do XML and JSON stand for?
- XML : Extensible markup language, JSON : JavaScript object notation
- They are two standard methods for transferring data between the server and the web application
What is an advantage of using JSON or using XML
- JSON is more compact, easier to read, easier to create and faster for computers to process than XML
- XML is more flexible than JSON in terms of structure and the data types that can be used
What are the features of thin-client networks?
- The majority of the network’s processing power belongs to servers
- Servers provide services and resources including storage and processing
What are the features of thick-client networks?
- Clients are powerful machines
- They don’t require a server as they provide their own processing power and storage
What are unusable IP addresses?
Give the four examples of unusable IP addresses.
- Some IP addresses cannot be used as they are reserved for other purposes:
- Address ranges 10.x.y.z, 172.16.0.1 to 172.31.255.255 and 192.168.y.z are private, non‐routable addresses
- x.y.z.0 represents an entire network
- x.y.z.255 is reserved as the broadcast address for sending data to all hosts on that network
- 127.x.y.z is reserved for loopback
What is the suffix? In classless addressing
It determines how many bits are part of the network identifier and network host
210.24.101.0/24 means the network identifier uses 24 bits
What is used in classful addressing
Different classes are used, class A,B,C,D or E Each class uses 8 bits more than the last for the network address
what are the benefits of splitting a network into subnetworks?
-Reduces size of the broadcast domain which improves security, speed and reliability
How is a subnet created?
-It uses the most significant bits of the host ID.
If the host ID uses 16 bits and subnet ID uses 8 bits,this means the network has 256 sub networks which can each have (256-2 =) 254 hosts on each sub network
Give examples of when the websocket protocol is used?
- Video streaming
- Online games
- Instant messaging
How many IP addresses do router have?
- Routers have two NICs so they have two IP addresses, a private and a public one
What are the advantages and disadvantages of thin client computing?
- Easy to add new clients and the clients are inexpensive machines
- More secure as data is kept centrally in one place
- Requires expertise to install and maintain the powerful server
- Reliant on the server, if the server goes down, clients lose functionality
What are the advantages and disadvantages of thick client computing?
- Require more powerful clients making the network expensive to install
- They are harder to maintain because there is no facility to issue updates/manage security from
- Can operate without a constant connection to the server
- Robust and reliable, providing greater up-time