4.9.4 TCP/IP Flashcards

1
Q

What is the difference between routable IP addresses and non routable IP addresses?

A

Routable IP addresses are globally unique, whereas millions of devices can have the same non routable IP address, provided they are not on the same network.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are global authorities responsible for?

A

Global authorities are responsible for assigning routable IP addresses which ensures that the same address is never issued twice.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Why is the number of private IP addresses within a private network limited?

A

Assigning each device on a network its own private IP address would not be sensible as that device may leave and never join again, resulting in a wasted IP address.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is the purpose of DHCP?

A

DHCP is used to assign IP addresses to devices as they join a network.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How does DHCP work?

A
  • DHCP uses a pool of available IP addresses to allocate IP addresses to new devices fro the duration of their session.
  • Once a device leaves the network, the IP address that the device was using is returned to the pool for allocation to a new device.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What occurs once a device leaves a network?

A

The IP address that the device was using is returned to the pool for allocation to a new device.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What occurs if the device on the network sends a packet to the server?

A

The server could not respond to the computer directly because the computer’s IP address is non-routable, not globally unique.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is NAT?

A

Network Address Translation.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

How does NAT work?

A
  • When a device on a private network needs to communicate with the internet, it sends packets through the router.
  • This makes a record of the packet before replacing the private IP address of the computer with its own routable IP address.
  • When the response is received, it is sent to the router’s public IP address which then forwards the response to the correct private IP address by using the record it made when sending the packet
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What happens when a response is received via NAT?

A

• When a response is received, it is sent to the router’s public IP address which then forwards the response to the correct private IP address by using the record it made when sending the packet.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

When is port forwarding used?

A

Port forwarding is used when a client needs to communicate with a server that is connected to a private network.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

How does port forwarding work?

A
  • Client sends packets to the public IP address of the router belonging to the server’s private network
  • Packets sent by the client contain the port number of the application running on the server that the client wishes to access
  • The private network’s router then forwards the packets to the server using NAT
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

How does a client server model function?

A
  • Clients send request messages to servers, which reply to the clients with response messages.
  • Messages may contain requested information, a confirmation that a requested action has been completed or a message explaining why the requested action hasn’t been completed.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What may messages contain?

A

Requested information, a confirmation that a requested action has been completed or a message explaining why the requested action hasn’t been completed.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Why are there different servers?

A

Each may specialise in a certain task.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is an API?

A
  • Name given to a set of protocols relating to how different applications communicate with each other.
  • They define how interaction between the applications should be carried out, allowing applications to make use of other applications.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

What does API stand for?

A

Application programming interface

18
Q

What does the API define?

A

How interaction between applications should be carried out, allowing applications to make use of other applications.

19
Q

What is the websocket protocol?

A

Example of an API which operates in the application layer of the TCP/IP stack.

20
Q

What is the purpose of the web socket protocol?

A

Used to provide a constant stream of information between two devices.

21
Q

Where does the websocket protocol usually operate?

A

Between a client’s web browser and a server.

22
Q

What is a full duplex connection?

A

Data can be transmitted in both directions at the same time.

23
Q

What kind of connection is created by the web socket protocol?

A

Full duplex

24
Q

What does web socket protocol allow for?

A

• Fast transmission of data by reducing the size of packet headers.

25
Q

Where is the web socket protocol used?

A
  • Video streaming
  • Online games
  • Instant messaging
26
Q

What is CRUD?

A
Acronym:
• Create
• Retrieve
• Update
• Delete
27
Q

What is the purpose of CRUD?

A

Used to query online databases.

28
Q

What is the purposes of SQL?

A

Used to query databases.

29
Q

What is the SQL equivalent of CRUD commands?

A

Create - Insert
Retrieve - Select
Update - Update
Delete - Delete

30
Q

What is rest?

A

Representational state transfer.

31
Q

What is rest used for?

A

Design methodology for online database applications that are queried with a web browser.

32
Q

What are the four HTTP request methods used with REST?

A
  • POST
  • GET
  • PUT
  • DELETE
33
Q

What happens when a client needs to connect to a database?

A
  1. Client-server request made by the client to the web browser
  2. Web browser responds with the requested web page (which is delivered as a text
    file)
  3. This text file contains JavaScript which loads an API. The API uses REST to enable
    the database server to be queried by the client with the use of HTTP request
    methods.
  4. The client sends HTTP requests to the database server.
  5. The database server responds to the client’s requests using either JSON or XML.
  6. The client’s browser processes the JSON or XML and displays the response to the
    user.
34
Q

How does a database respond to client requests?

A

Using XML or JSON

35
Q

What does a browser do with JSON/XML?

A

Process it and display the response to the user

36
Q

How does a web browser respond?

A

Responds with the requested web page ( delivered as text file )

37
Q

What does the responded text file contain?

A

Javascript which loads an API

38
Q

How does an API use REST?

A

API uses REST to enable the database server to be queried by the client with the use of HTTP request methods.

39
Q

How do database servers deliver responses?

A

They deliver responses to queries using either XML or JSON.

40
Q

What is XML?

A
  • Extensible markup language.

* Does the same job as javascript object notation/JSON

41
Q

What is an advantage of JSON?

A

It is more compact, easier to read, easier to create and faster for computers to process than XML.

42
Q

What is an advantage of XML?

A

More flexible than JSON.