application layer Flashcards

1
Q

process

A

a program running code within a host on the application layer

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

encapsulation

A

the message going through each layer with each one adding its header to it

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

decapsulation

A

the message going back up the layers with each one processing its header then removing it

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

what are the benefits of encapsulation and decapsulation

A

allows each layer to operate independently
each layer only has to be concerned with its corresponding header

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

client process

A

initiates communication

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

server process

A

waits to be contacted

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

why do we need interfaces

A

so that the layers can communicate with each other

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

what is the interface used between the application and transport layer

A

socket

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

which 2 pieces of information do we need when sending a message

A

ip address
port number

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

ip address

A

network identifier
ipv4; 32
ipv6; 128

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

port number

A

transport layer identifier that delivers the message to the right process

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

why do we need both the ip and port number when sending messages

A

many processes can be on the same host so we need to specify which one

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

5 tuple

A

uniquely identifies a communication between two processes

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

what do we need to create the 5 tuple

A

source and destination ip
source and destination port number
transport protocol

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

how does the client know which port to use

A

popular applications have well know ports
ephemeral ports are arbitrary numbers automatically assigned by the os and are used for temporary communication

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

what are some standard api system calls

A

read()
write()
close()

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

what are some socket specific calls

A

send()
recv()
bind()

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

application layer protocols

A

defined by a set of messages with their type and when and how processes send and respond to protocols given the value of the field

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

open protocols

A

have public documents explaining the messages and fields
e.g. http

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

propriety protocols

A

not public and are tied to specific products
e.g. skype

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

what might an application need form the transport layer

A

data integrity
timing
throughput
security

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

tcp service

A

reliable
provides congestion and flow control
connection oriented

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

tcp as reliable

A

guaranteed that messages are delivered in the order that they were sent

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

tcp and congestion control

A

can delay or reduce the number of packets sent if theres high congestion

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

tcp and flow control

A

stops the sender from overwhelming the receiver when its sending more messages than it can process

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

tcp as connection oriented

A

a handshake establishes the connection before real messages are sent

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

udp service

A

v minimal
the sender has total control over when the packets are sent therefore they’re transmitted faster
the sender has to explicitly attach the ip and port# and the receiver has to extract them

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

what are messages called in udp

A

datagrams

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

raw sockets

A

network sockets that allow direct access to lower level protocols

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

what are some benefits of raw sockets

A

additional power as you get direct access to network packets
provide access to the network and transport layer header

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

what is a negative of the client server model

A

not scalable; when the server gets a lot of client requests you will need to duplicate it as it cannot handle that many

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

client server model

A

communicate with the server for recourses
clients don’t have a permanent ip address only an ephemeral one
the server is always on

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

p2p

A

any node provides a service
single code executed by all hosts
self scalable

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

self scalable

A

the more participants the more scalable as they each provide recourses

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

in which two ways can layering sometimes be harmful

A

lower performance due to data and processing overhead
the same process may be duplicated my different layers e.g. error checking

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

what is the end-to-end principle

A

don’t implement anything in the network that cant be implemented by the host

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

how does content sharing not follow the end-to-end principle

A

content sharing must be on the core network to enable services making content a first class object

38
Q

what is a webpage made up of

A

a base html file and intependant referenced objects (can be addressed by url)

39
Q

why do we use the tcp protocol when requesting web pages

A

need reliable transfers due to web transfers

40
Q

how do we use tcp to request and receive web pages

A

the client initiates the tcp connection
the server accepts it
a http message can be exchanged
tcp connection closed

41
Q

what are the two types of http connections

A

non persistent and persistent

42
Q

non-persistent http connection

A

only one object can be sent per tcp connection

43
Q

what is the response time for a non-persistent connection

A

2 rtt + file transmission time
one rtt to initiate the connection and another for the request

44
Q

persistent http connection

A

multiple objects can be sent on a single tcp connection sequentially

45
Q

concurrent tcp connections

A

multi-threading that makes receiving resources faster (in parallel)

46
Q

what is the response time for persistent connections

A

2 rtt per object + the os overhead for the connection

47
Q

pipe-lining

A

requesting multiple objects without waiting for each one to be recieved

48
Q

what are some http method types

A

get
post
put
delete
head

49
Q

http get

A

requests data from a specific source

50
Q

http post

A

sends data to a server to create or update a recourse

51
Q

http put

A

http post + uploads the file in the entity body to the path in the url field

52
Q

http delete

A

deletes the file in the url field

53
Q

http head

A

asks the server to leave the object out of a response
usually for debugging

54
Q

what is the difference between using post and url to upload an input

A

post; input uploaded in the server in the body
url; uploaded in the url field which cant be encrypted

55
Q

what are cookies

A

a small file with data up to 4kb
maintains the state of your interaction with the browser

56
Q

what can cookies be used for

A

authorization
shopping carts
reccomendations

57
Q

what is web caching

A

satisfying the client requirements without involving the origin server

58
Q

how does web caching work

A

a proxy server receives all browser requests and the cache returns the objects if it has them stored
if not, then the proxy server acts as a client and requests the object from the origin server and returns it to the client

59
Q

why do we use before caching

A

can save frequently used large content

60
Q

what did we do before caching and what were the issues

A

one server duplicated in the same location and all identifying with the same ip, which server requests went to would be based on round robin, random or load-based
scalability; must support the traffic for many hosts
state; must keep track of previous decisions of all servers

61
Q

conditional get

A

used with a proxy server
if it has up to date content then it is sent to the client
if not you get the “304; modified” message then the content is retrieved from the origin server and is sent back to the client

62
Q

http 2

A

divides bigger projects into smaller pieces via head of line blocking

63
Q

head of line blocking

A

when a client requests a large object amongst smaller ones the large one will prevent the smaller one form being sent until its done so to avoid this the large one is divided into smaller pieces to minimise hol blocking

64
Q

http 3

A

adds security to http2 via encryption with https

65
Q

domain name

A

a broader identifier that puts together hostnames and organization names and follow an organizational structure

66
Q

gethostbyname()

A

library function that gets the ip address for a host name

67
Q

why do we need the dns

A

humans cant remember ip addresses but computers prefer them as theyre a fixed 32 bit value

68
Q

what are the 6 design objectives for the dns system

A

efficiency
scalability
resilience
security
ownership and control
governance and namespace

69
Q

namespace

A

a set of all names that can be used within the system

70
Q

dns as efficient

A

name resolution has to happen quicky as you cannot begin communication without it

71
Q

dns as scalable

A

needs to handle large volumes of traffic quickly

72
Q

dns as resilient

A

has to maintain high availability as if the dns fails then the internet isnt accessible

73
Q

dns as secure

A

should return the correct ip as malware practitioners may take advantage of it and direct you to a malicious site

74
Q

ownership and control in dns

A

domain name owners should be able to manage the ip-to-hostname mappings of their name; updates and choosing the order of ip

75
Q

how do we enable loadbearing in dns

A

the dns server can send a different order of the duplicated server ip and the client can pick the top one which randomises which server is having queries sent to it

76
Q

governance and namespace in dns

A

control over domain ownership and registration making sure that some domain names are reserved for specific organizations or companies

77
Q

subdomains

A

domain names that end with another domain e.g. lancs.ac.uk

78
Q

why dont we use a centralised server for the dns system

A

not resilient as there would be a single point of failure
not scalable as it wouldnt be able to handle large amounts of traffic
would be difficult to maintain a single server

79
Q

how many root servers are there

A

13

80
Q

root server

A

updated twice a day, has a backup and is replicated across the globe so hosts can access the closest one

81
Q

tld

A

top level domain; eg. .com and countries

82
Q

authoritative dns servers

A

organizations own servers that can be maintained by them or a service provider

83
Q

local server

A

is not strictly in the heirarchy
queries are sent to it and they can act as a proxy that forwards the query into the heirarchy

84
Q

recursive query

A

recursively going through the hierarchy until the right ip is found

85
Q

caching and dns

A

once any server learns a mapping it is cached and a ttl is attatched to it so that when the site updates the cache also can

86
Q

what are the 4 types of dns records

A

type A
type CNAME
type NS
type MX

87
Q

type A records

A

hostname to ip mapping

88
Q

type CNAME

A

alias to real name mapping
c = canonical

89
Q

type NS

A

domain to authoritative name mapping; tells you the server it uses

90
Q

type MX

A

name to mail server mapping
when requesting a mail server you are also given the domain so you don’t have to query twice