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

what defines application layer protocols

A

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
tcp and flow control
stops the sender from overwhelming the receiver when its sending more messages than it can process
26
tcp as connection oriented
a handshake establishes the connection before real messages are sent
27
udp service
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
28
what are messages called in udp
datagrams
29
raw sockets
network sockets that allow direct access to lower level protocols
30
what are some benefits of raw sockets
additional power as you get direct access to network packets provide access to the network and transport layer header
31
what is a negative of the client server model
not scalable; when the server gets a lot of client requests you will need to duplicate it as it cannot handle that many
32
client server model
communicate with the server for recourses clients don't have a permanent ip address only an ephemeral one the server is always on
33
p2p
any node provides a service single code executed by all hosts self scalable
34
self scalable
the more participants the more scalable as they each provide recourses
35
in which two ways can layering sometimes be harmful
lower performance due to data and processing overhead the same process may be duplicated my different layers e.g. error checking
36
what is the end-to-end principle
don't implement anything in the network that cant be implemented by the host
37
how does content sharing not follow the end-to-end principle
content sharing must be on the core network to enable services making content a first class object
38
what is a webpage made up of
a base html file and intependant referenced objects (can be addressed by url)
39
why do we use the tcp protocol when requesting web pages
need reliable transfers due to web transfers
40
how do we use tcp to request and receive web pages
the client initiates the tcp connection the server accepts it a http message can be exchanged tcp connection closed
41
what are the two types of http connections
non persistent and persistent
42
non-persistent http connection
only one object can be sent per tcp connection
43
what is the response time for a non-persistent connection
2 rtt + file transmission time one rtt to initiate the connection and another for the request
44
persistent http connection
multiple objects can be sent on a single tcp connection sequentially
45
concurrent tcp connections
multi-threading that makes receiving resources faster (in parallel)
46
what is the response time for persistent connections
2 rtt per object + the os overhead for the connection
47
pipe-lining
requesting multiple objects without waiting for each one to be recieved
48
what are some http method types
get post put delete head
49
http head
asks the server to leave the object out of a response usually for debugging
50
what is the difference between using post and url to upload an input
post; input uploaded in the server in the body url; uploaded in the url field which cant be encrypted
51
what are cookies
a small file with data up to 4kb maintains the state of your interaction with the browser
52
what can cookies be used for
authorization shopping carts reccomendations
53
what is web caching
satisfying the client requirements without involving the origin server
54
how does web caching work
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
55
why do we use caching
can save frequently used large content
56
what did we do before caching and what were the issues
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
57
conditional get
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
58
http 2
divides bigger projects into smaller pieces due to head of line blocking
59
what causes head of line blocking and how do we solve it
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
60
http 3
adds security to http2 via encryption with https
61
domain name
a broader identifier that puts together hostnames and organization names and follow an organizational structure
62
gethostbyname()
library function that gets the ip address for a host name
63
why do we need the dns
humans cant remember ip addresses but computers prefer them as theyre a fixed 32 bit value
64
what are the 6 design objectives for the dns system
efficiency scalability resilience security ownership and control governance and namespace
65
namespace
a set of all names that can be used within the system
66
dns as efficient
name resolution has to happen quicky as you cannot begin communication without it
67
dns as scalable
needs to handle large volumes of traffic quickly
68
dns as resilient
has to maintain high availability as if the dns fails then the internet isnt accessible
69
dns as secure
should return the correct ip as malware practitioners may take advantage of it and direct you to a malicious site
70
ownership and control in dns
domain name owners should be able to manage the ip-to-hostname mappings of their name; updates and choosing the order of ip
71
how do we enable loadbearing in dns
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
72
governance and namespace in dns
control over domain ownership and registration making sure that some domain names are reserved for specific organizations or companies
73
subdomains
domain names that end with another domain e.g. lancs.ac.uk
74
why dont we use a centralised server for the dns system
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
75
how many root servers are there
13
76
root server
updated twice a day, has a backup and is replicated across the globe so hosts can access the closest one
77
tld
top level domain; eg. .com and countries
78
authoritative dns servers
organizations own servers that can be maintained by them or a service provider
79
local server
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
80
recursive query
recursively going through the hierarchy until the right ip is found
81
caching and dns
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
82
what are the 4 types of dns records
type A type CNAME type NS type MX
83
type A records
hostname to ip mapping
84
type CNAME
alias to real name mapping c = canonical
85
type NS
domain to authoritative name mapping; tells you the server it uses
86
type MX
name to mail server mapping when requesting a mail server you are also given the domain so you don't have to query twice