Application Layer I Flashcards

(14 cards)

1
Q

Communicating processes

A

Processes in different
hosts communicate by
exchanging messages

Messages go through
the protocol stack

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

Header encapsulation/decapsulation

A

This is used to achieve
separation of concerns between each layer

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

Identifying processes remotely

A

A process is addressed over the network using two
identifiers:
– IP address
* Network Layer identifier
* 32 bits (IPv4) or 64 bits (IPv6)– Port number
* Transport Layer identifier (16 bits)

– IP address is used by routers to forward messages to the correct host

– Then, the host’s OS uses the port number to forward messages to the
correct target process/ socket

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

Sockets: The interface between Processes and Transport Protocols

A

The OS provides a so-called “socket” interface

Processes send/receive
messages to/from sockets

Client process: Initiates
communication

Server process: Waits to be contacted

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

Port numbers

A

well known ports(common ones): range from 0- 1023
and
uncommon ones range from 1024-65535

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

UNIX’s Socket API

A

In UNiX, almost every resource and device is made to look like a file

▪ A socket is like a file

  • E.g., ‘standard’ API calls (“system calls”) are used - like read(), write(), close()
  • Plus some other socket-specific calls: send(), recv(), bind(), etc
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Application layer protocols

A

Define types of messages: e.g., request, response, add-user.

Specify message structure:

Syntax: what fields are in a message.

Semantics: meaning of each field.

Control communication rules:

When and how messages are sent and responded to.

Types:

Open protocols: Publicly defined (e.g., HTTP, SMTP), ensure compatibility between systems.

Proprietary protocols: Private, product-specific (e.g., Skype, AppleTalk).

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

What might an application need from
a transport service?

A

Data integrity
– Some apps require 100%
reliable data transfer (e.g.
file transfer, web
transactions)
– Other apps (e.g., audio) can tolerate some loss

Throughput(data per second)
- Some apps require a
minimum level of throughput
(e.g. multimedia)
- Other apps can make use of whatever throughput they get (“elastic apps”)

Timing– Some apps (e.g., Internet
telephony, interactive
games) require low delay

Security- Encryption, data
integrity

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

Internet transport protocols

A

TCP service:

  • Reliable transport between sending and
    receiving process
  • All messages are delivered in the
    order they were sent
  • Flow control: sender can’t overwhelm
    receiver

Connection-oriented: initial setup is required
between client and server processes

  • Does not provide: timeliness, minimum
    throughput guarantee, security

UDP service:

Unreliable data transfer between
sending and receiving process

  • Does not provide: reliability, in-order
    delivery, flow control, congestion
    control, timeliness, throughput
    guarantee, security, or connection
    setup

BUT timeliness may be better than
TCP; and less overhead may be
incurred for both hosts and the
network

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

Socket programming with TCP

A

TCP service is connection-oriented:
– When a client application creates a socket, the client’s
TCP instance establishes a connection to the server’s TCP instance

When contacted by a client, a server TCP creates a new
socket for server process to communicate with that specific
client

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

Raw Sockets

A

Commonly used for implementing custom network protocols and
capturing incoming ICMP packets

  • ICMP packets do not contain a transport layer
  • Therefore, they do not include port numbers
  • This means ICMP packets are not sent to a process

By setting the value of the protocol as socket.IPPROTO_ICMP, you can capture all the ICMP traffic on your host

  • Typically requires elevated privileges (administrator/root) to create
    raw sockets due to security concerns
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Client-Server architecture

A

Server:
–An always-on host
–Has permanent IP address
–(Can use data centres for scaling)

  • Clients:
    – system is not always connected to the network
    –Private/ephemeral IP addresses
    –Do not communicate directly
    with each other
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

P2P architecture(s)

A

No always-on central server.

Devices (peers) talk to each other directly.

Each peer can request and provide services (like sharing files).

Scales well: new peers bring more demand and capacity.

Peers may be online only sometimes and their IP addresses change, making it harder to manage.

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