Application Layer Flashcards

1
Q

What are the attributes of the client server model?

A

Server: Always on host, handles requests and has a permanent address.

Clients: Communicate with the server and intermittently connect. Have dynamic IPs and don’t with one another directly

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

What are the attributes of Peer-to-peer networks?

A

No always-on server.
End systems directly communicate and request/give services from/to peers
Peers intermittently connect and change IP

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

What are the advantages of peer-to-peer networks?

A

Self scalability as each node must give resources to get resources

Can circumvent barriers such as laws on distribution of data, disaster scenarios.

Resilient.

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

How do sockets work?

A

Client creates and binds a socket in a process

Client initiates communication and server identifies process sending to by responding to socket.

Messages received are passed to the correct process by via the binding of port/process by OS.

IP + Port = addressable socket.

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

What are the main attributes of HTTP

A

Allows for the request of objects via urls.

Client sends requests and server responds with objects

Uses TCP, client creates socket to server. TCP connection goes until objects transmitted and then is closed.

Stateless

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

What is the difference between persistent and non-persistent HTTP?

A

Persistent: Multiple objects are sent over TCP connection before it is closed, removing RTT of TCP packets

Non-persistent: At most one object sent over TCP connection, need to create new TCP connection for every object.

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

What are the HTTP methods?

A

Post: Send form data to URL

GET: request objects from url

Conditional GET: Send the data iff the data in cache isn’t up to date.

Head: Get header but no payload.

Put: Upload file in entity body to path specified in URL

Delete: Delete file @ url

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

Response codes appear in the first server to client transmission, list them.

A

200: Ok
301: Moved permanently
400: Bad request
404: Not found
505: HTTP version not supported.

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

What are the five main components of a cookie?

A

Header line of HTTP response message

Cookie header line in next HTTP request message

Cookie file kept on user’s host and is managed by the browser

Back end database at web site to correlate cookie’s with user details

State maintained at user side over mutliple sessions

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

What can cookies be used for?

A

Authorisation
Shopping carts
Recommendations
User session state (email over multiple pages etc..)

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

What is a Proxy?

A

A proxy is a web cache that deals with client requests without contacting origin server of content.

Browser set to web accesses via cache, browser then sends all requests to the proxy.

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

How do proxies benefit networks?

A

If data in proxy, sent to satisfy request. Else it’s requested from origin server and returned

Reduces traffic on access link as only cache requests from origin servers and cached data is sent.

Reduced response time, content closer to user.

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

What are the three major components of email?

A

User agents
Mail servers
SMTP

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

What is a user agent?

A

Mail reader, such as outlook, that can be used by the user to send and retrieve emails via the mail server.

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

What is a mail server?

A

Mailbox containing incoming messages for the user, and has a queue of outgoing messages

Can have mail-server to mail-server communication via SMTP

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

What is SMTP?

A

Simple Mail Transfer Protocol,
uses TCP for reliability.

Three phases of transfer:
Handshaking
Transfer of message
Closure

Command/Response interactions
Users persistent connections.
Must be in 7-bit ASCII

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

What are the differences between SMTP and HTTP

A

SMTP: Push, HTTP: Pull
HTTP: Each object encapsulated in its own response message, SMTP: send multiple objects in multipart message

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

Why create a network app?

A

Programs running on different end systems should be able to
Communicate over a network

Can propagate data if we can connect multiple hosts, allowing for rapid development.

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

What does the app layer protocol define?

A

Type of message exchanged
Request/Response

Message syntax, what fields are in messages and their lengths

Message semantics

Rules for when and how processes send and respond to messages

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

How do we decide on what Transport protocol to use when designing an application protocol?

A

Integrity
- Does loss affect the app?

Timing
- How much delay is tolerated?

Throughput
- Minimum amount of throughput required to be effective

Security
- Encryption, data integrity

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

What’s the structure of a http packet?

A
method,
URL,
version,
header lines in the form: header field name | | value | cr | lf
entity body
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

What other mail access protocols are used?

A

POP
IMAP
HTTP

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

What are the features of POP?

A

Post office protocol
Used for authorisation and download.

download and keep, download and delete

stateless across sessions

24
Q

What are the features of IMAP?

A

Internet Mail Access Protocol

Keeps all messages in one place, at server

Allows users to organise messages into folders

Keeps user state across sessions - Folders, mapping between folders and emails

25
Q

What is DNS?

A

Domain Name System

Distributed database implemented in hierarchy of many name servers which hosts communicate with to resolve names to IP addresses

26
Q

What are the services of DNS?

A

Hostname to IP address translation

Host aliasing, point an IP to another IP

Mail server Aliasing

Load distribution, many IP addresses correspond to one name.

27
Q

Why is DNS distributed?

A

Single point of failure

Traffic volume

Distant centralised database

Maintenance.

TL;DR: Doesn’t scale

28
Q

When do the root DNS servers come into play?

A

Contacted when a local name server can’t resolve a name.

The root name server contacts authoritative name servers if mapping not known.

29
Q

What is a TLD?

A

Top-level domain server, responsible for com, org, net etc…

Nominet maintains .uk

30
Q

What is an authoritative DNS server?

A

Organisation’s own DNS servers, providing authoritative hostname to ip mappings for organisation’s named hosts.

Can be maintained by organisation or service provider

31
Q

What does a local DNS name server do?

A

Default name server, when host makes DNS query it is sent to the local DNS server.

Caches recent translations, but also acts as a proxy, forwarding queries up the hierarchy.

32
Q

Name the different levels of DNS servers

A

Local DNS server
Authoritative
Top-level domain
Root name server

33
Q

What types of queries occur when resolving a domain name?

A

Iterated query, server replies with name of server to contact.

recursive query: Puts burden of resolution on the contacted name server.

34
Q

When do DNS server cache?

A

Once any name server learns a mapping, it caches it.

Has a TTL

TLD servers cached in local name servers to keep load off of root.

Cached entries may be out of date, update/notify mechanisms have been developed

35
Q

What is a resource record?

A

Record passed by DNS in the format

name, value, type, ttl

36
Q

What are the types of DNS records?

A

A
NS
CNAME
MX

37
Q

What is the structure of the DNS protocol?

A

Query and reply messages, with same format.

ID | Flags |
 # questions | # Answer RRs | 
# Authority RRs | # Additional RRs |
questions
answers
authority
additional info.

Flags may be: query or reply, recursion desired, recursion enabled, reply is authorititave

ID: 16 bit # for query, reply uses same #

38
Q

How are new domains registered?

A

Register name at DNS registrar, providing names, IP addresses of authoritative ns

Registrar inserts two RRs into TLD:
A and MX

39
Q

What are some attacks that can be made on DNS?

A

DDoS on root servers
Bombard TLD servers, ie .uk

Redirect attacks, MiTM by intercepting queries, DNS poisoning by sending bogus replies to DNS servers.

Amplification by spoofing sender Ip

40
Q

What is the advantage of using P2P for file distribution?

A

No single link bottleneck at server, only the receiver’s bandwidth

41
Q

How does BitTorrent work?

A

Files divided into 256kb chunks and peers in torrent send/receive chinks

Tracker: Tracks peers participating in torrents (Groups exchanging chunks)

Over time, each host accumulates chunks that they can then send

42
Q

What happens when a peer joins a torrent?

A

Has no chunks, but will accumulate them over.

Registers with tracker to get list of peers and connects to neighbouring nodes.

While downloading chunks, upload them to peers.

43
Q

How does BitTorrent request and send file chunks?

A

Request: Periodically ask peers for chunk list, and they request chunks from their peers - downloading the rarest first.

Sending: Tit for tat
Send chunks to peers sending you chunks, re-evaluate top sender every 10 seconds.
Randomly select another peer every 30 seconds to send to - called optimistic unchoking

44
Q

What are the challenges faced when doing video streaming?

A

Heterogeneity: Different users have different capabilities (bandwidth, wired versus mobile etc..)

Sending large amount of data to have stable video.

45
Q

How is space saved when streaming video?

A

Use coding, which uses redundancy within and between images to decrease # bits used to encode image.

IE: Spatial - send N values of same colours, instead send colour val and how many repeats.

Only send changing pixels

46
Q

What are the bit rates of video?

A

Constant bit rate: Video encoding rate fixed

Variable bit rate: Video encoding rate changes as amount of spatial, temporal coding changes.

47
Q

What is DASH?

A

Dynamic Adaptive Streaming over HTTP
Server

Uses client/server infrastructure

48
Q

How does a DASH server work?

A

Divides video file into multiple chunks, each chunk is stored and encoded at different rates.

Manifest file provides URL’s for different chunks

49
Q

How does a DASH client work?

A

Periodically measured bandwidth to server.

Consults manifest and request one chunk at a time.

Chooses maximum coding rate for their andwidth, can change at different points in time.

Can request from server with best connection.

50
Q

What is a CDN?

A

Stores and serves multiple copies of videos at multiple geographically distributed sites.

CDN stores copies of content at CDN nodes. Responds to requests with manifest files of when to request resources from.

What copy is retrieved depends on congestion etc.

51
Q

What are the two ways of constructing CDNs?

A

Enter deep: Push CDN servers deep into many access networks, closer to users

Bring home: Smaller number (10’s) of larger clusters in POPs (Point of Presence) near access networks but not within.

52
Q

What is an over the top network?

A

Host-host communication as a service, breaks/blurs the layered model.

Challenges:
From which CDN to retrieve content?

What content to place in which CDN node?

53
Q

What does an A record contain?

A

name = hostname, value = IP address

Name is set to hostname, value is set to IP address. Record is an answer record.

54
Q

What does an NS record contain?

A

name = domain, value = hostname of authoritative name server for domain

Nameserver record.

55
Q

What does a CNAME record contain?

A
name = alias name for real name of ip
value = canonical name

Canonical Name record (aliase)

56
Q

What does an MX record contain?

A

MX: value = mail server associated with name.

Mail exchange record.