1. Concepts and Terms (i) & 2. TCP Sockets Flashcards

1
Q

Where in the 5 layer model do sockets interface?/Where in the model is the sockets API?

A

Application - Transport

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

What does a socket address consist of?

A

IP Address or DNS name (32bit IPv4 128bit IPv6) & a port number (16bit).

e. g. minervamedia.cs.st-andrews.ac.uk 13
138. 251.214.10 13

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

Outline a Java TCP Daytime client

A
  • open a socket connection to address and port
  • input stream reader wrapped in a buffered reader on the socket
  • read a line and print it
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is encapsulation?

A

The process of adding/removing headers to a message as it is sent down/up the network layers.

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

What is a protocol? How can a protocol be broken?

A

A set of rules for meaningful interaction between two or more parties. Consists or one or more rounds of messages and sets of possible states at each entity. Can be broken by:

  • missing message
  • unrecognisable message
  • wrong timing
  • wrong ordering
  • wrong response
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What kind of information can be in a message header?

A
  • destination address
  • type of message
  • protocol version
  • message indentifier
  • type of contents
  • size of contents
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What aspects are orthogonal to layering abstractions?

A
  • security
  • the impact of Moore’s law
  • mobility
  • energy efficiency
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is the loopback address? What is it useful for?

A

127.0.0.1 / localhost

Useful for testing a network program.

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

What duplex is a TCP connection? Describe this duplex.

A

Full-duplex, meaning both parties can communicate simulationously, like a Skype call.

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

TCP is connection-oriented or connectionless? Describe this.

A

Connection-oriented, meaning a connection session is established before any meaningful data transfer happens.

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

How does TCP ensure a reliable transmission?

A
  • retransmits missing packets
  • flow control (stops sender overrunning the receiver)
  • packets are numbered so they can be ordered correctly
  • each packet’s reception is acknowledged, if the packet is not acknowledged within a time, it is resent
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Describe the TCP 3-way handshake.

A

Connection:

  • server listens on port n
  • client connects to port n on server address
  • server accepts connection and sends a confirmation
  • client receives confirmation and sends acknowledgement
  • server receives acknowledgement

~exhange of data~

Closing:

  • server sends close notification
  • client receives and acknowledges
  • server receives acknowledge
  • both close their local connection
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is the purpose of a buffer?

A

A location to store data while it is being moved from one place to another. It is more effecient to read from a buffer than process every byte as it arrives, and more efficient to write to a buffer, then send a full segment, than it is to send every byte as it arrives from the application.

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

Describe the application layer.

A

Where network applications and their application-layer protocols reside, such as HTTP. User interacts with the application which sends requests to the application layer on the other end.

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

Describe the transport layer.

A

The transport layer transports application layer messages between endpoints. TCP and UDP reside here. Transport layer passes a transport layer segment and a destination address to the network layer.

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

Describe the network layer.

A

Responsible for moving datagrams from one host to another. Transport layer passes a transport layer segment and a destination address to the network layer. Network layer then provides the service of delivering the segment to the transport layer in the destination. Includes the IP protocol.

17
Q

Describe the link layer.

A

Routes a datagram through a series of nodes between the source and the destination. The network layer relies on the link layer to move packets from node to node. At each node, the network layer passes the datagram down to the link layer which delivers it to the next node at which the link layer passes it back up. Includes ethernet and wifi.

18
Q

Describe the physical layer.

A

Moves individual bits from one node to the next.