Application Layer Flashcards
What does the Application Layer Protocol provide?
A means to easily build protocol-compliant applications
Can applications implement multiple, different application layer protocols?
Yes, they can
What are the communicating entities in an application layer protocol? What are they not? Can these entities reside on the same device?
Application programs / processes, usually remotely located
Users / devices
Yes
Are application layers for the network core? How is this evidenced?
No, they aim to push complexity to the network edge
Routers generally do not run applications and application layer protocols. Instead, devices do
For this course, up to what layer do routers implement protocols, and for what layers do end devices?
Routers implement protocols of layer 1-3 (physical, link, and network), while end devices implement protocols of layers 4 and 5 (transport and application)
What are the three primary functions of the Application Layer?
Architecture Styles
Addressing
Service Models
What is meant by the “Architecture Styles” function?
The choice in between client-server, peer-to-peer and hybrid architecture styles
Client-server - one device (client) requests services or resources from another device (server)
Peer-to-peer - all devices act as both clients and servers (no central server)
Hybrid - combines elements of both client-server and peer-to-peer architecture styles
What is meant by the function of “addressing”? What are some examples of addresses?
The process of uniquely identifying and locating network entities (such as applications or services) to facilitate communication
student@tue.nl and tue.nl
What is a socket address used for? What do socket address consist of?
Used by web client processes to find web server processes
An IP address and a port number
What is an IP address?
A numerical label assigned to each device connected to a computer network that uses the Internet Protocol for Communication
What is a port number? What does the existence of multiple sockets allow for?
A numerical identifier used to distinguish different communication endpoints (sockets) within a device in a computer network
Multiple services to operate concurrently
What does the “Service Models” application protocol function refer to? For example?
The provision of services to the applications running on top of it, as well as the receiving of services from the transport layer
Simple Mail Transfer Protocol, a service for the mail client applications that allows the application to send e-mail messages to an email-server
What is the difference between a program and a process? Can multiple processes be created from a single program?
A process is a program under execution, and a program is just program code defining variables and actions on variables
Yes
What is a client process?
The process that initiates contact and requests services from a server
What are three characterists of servers in the Client-Server Model?
Permanent network addresses
Fixed entry points for incoming requests
Always-on server processes
Do clients always have to be online? Can they change their IP addresses?
No
Yes
What is meant by pure clients? What must it mean if two clients communicate directly with each other?
Clients that do not communicate directly with each other
One of them has both client and server parts
Are there always-on server processes in peer-to-peer applications? Can peers change their IP address?
No, peers that communicate with each other can go online and offline as they wish
Yes, they can
What is one way of dealing with the fact that there are no fixed, reference IP addresses in P2P? (Three Steps
Repeatedly trying a list of candidate peers until getting a (TCP) connection to a remote peer
The new peer then sends a (ping) message to this remote peer, which is forwarded (flooded) to a number of other peers
In return, these peers reply with a (pong) message, allowing the new peer to make connections to them
What three things are needed to address any resource on the internet? What is used as an alternative to this combination due to its inconvenience?
IP address, port number, directory structure
Identifier Formats
What is the technical name for identifier formats? What is a specific type of URI? What does this type of URI do?
Uniform Resource Identifiers (URI)
Uniform Resource Locator (URL)
Points to the location of the resource and the way to reach it
What is a Uniform Resource Identifier (URI)?
A compact string of characters used for identifiying an abstract or physical resource
What are the four primary fields of URLs? How are these four arranged in an URL?
The application layer protocol being used (e.g., FTP or HTTP)
The host (computer where the resource is located)
The port (port number of destination process)
The path (path name of the file, i.e., the resource)
Protocol://Host:Port/Path
What are the four primary transport layer services used by application layer protocols?
Reliability Supports - Ensures that no data is lost in transit
Delay/Timing Support - ensures that the constraints of maximum delay (jitter) set by certain applications are not exceeded
Throughput Support - Aids in the number of bits transferred per second
Security Support - Provides security services
What is meant by delay jitter?
The variation in delay times for packets traveling through a network, causing uneven packet arrival times at the destination
What is meant by TCP being connection-oriented?
That a connection setup is required between client and server processes
What type of protocols are UDP and TCP?
Transport Layer Protocols
What does TCP provide and what does it not?
Provides:
Connection setup
Reliable transport of application messages, with packets being delivered in order
Flow control
Congestion control
Does not provide:
Delay, minimum throughput, or security guarantees
What does User Datagram Protocol (UDP) provide and what does it not? What is its advantage?
Provides:
Process to process delivery of data
Does not provide:
Connection setup, Reliability, Flow Control, Congestion Control, Timing Guarantees, Throughput Guarantees, Security
Faster and simpler
What is an Application Programming Interface (API)?
A set of rules and protocols that allows one software application to interact with another, enabling data exchange and functionality integration
What is a network socket? What does it allow processes to do?
A data structure that represents one end of an end-to-end connection
Talk to the outside world
What do network applications use socket APIs for?
Creating and accessing network sockets
What is Hyptertext Transfer Protocol (HTTP)? Is it client-server based or peer-to-peer? What does it govern?
An application layer communication protocol
Client-server based
The world-wide web
What is HTML (Hyptertext Markup Language)?
The standard markup language used for creating and structuring content on the web, defining the layour and elements of web pages using tags and attributes
What are the four components of a web page?
HTML files - structure and content of a web page (text, links, images, etc.)
Images
Java applets - Java programs embedded for interactive features
Audio files
What is an example of a client process, and an example of a server process? What is an example of an interaction between two such entities?
Client process - web browser such as Google Chrome
Server process - Apache web server
HTTP client initates TCP connection to http server at www.win.tue.nl through default port 80 (for HTTP)
HTTP server accepts connection, notifying client
HTTP client sends http request message containing an URL into TCP connection socket
HTTP server receives request message, forms response message containing the requested object (index.html), and sends message into socket
HTTP server closes TCP connection
HTTP client receives response message containing HTML file, parses html file, finds embedded
steps are repeated for each of the embedded image
What are the two primary types of HTTP messages?
Request and Response Messages
What is the structure of a Request HTTP Message?
- Request Line - type of request, path of requested object URL, HTTP version
- Header Lines - host part of requested object’s URL, name of web browser, requested type of connection, requested language
- Carriage return, line feed - indicate end of HTTP request
- Body of message
What is the structure of a response message?
- Response line - HTTP version, response code (e.g., 200 OK, 404 Not Found)
- Header Lines - type of connection, date and time of response, server software identification, date and time of last modification for the object included in the response, object length, object type
- Carriage return, line feed - indicate end of HTTP request header
- Message Body
What is meant by HTTP being a stateless protocol? What does this benefit?
That it defines request and response transactions without knowledge of and regardless of the current states of the client and server
I.e., the server does not store contextual information of a client
Simplicity of protocol, privacy of clients
What is used for state keeping within the HTTP protocol, when needed?
Cookies
What is a cookie? How is it used? What is a downside of it?
A file created and stored by the client based on an HTTP request-response interaction and managed by the web browser
Communicated every time the client visits the same website inside the HTTP request message. Web server can then do some cookie-specific action with this information using the data accumulated about this specific client at a back-end database.’
Can allow third parties to potentially identify you, a privacy issue
What is a web cache / proxy server? How can it do this? How can users enable this option? What happens if an object is not in the proxy? What happens if an object is in the proxy?
A network host that can respond to HTTP requests on behalf of a web server, i.e., without involving the web server in the request-response exchange
By keeping copies of HTTP responses to recent requests
By configuring their web browsers to access the internet via the proxy
The proxy sends a request to the origin server, and forwards the object to the client after receiving it
The proxy sends it to the client immediately
What are the advantages of proxy servers / web caches (three) ?
Reduce average response times for HTTP requests
Reduce traffic on access link to the rest of the internet
Can scan objects received from origin server, adding further security
What is Domain Name Server (DNS)? What three things does it deal with?
A service provided by application layer protocols
Address Resolution, Host Aliasing, and Replica Web Servers
What is address resolution?
Translating a domain name into an IP address and vice versa
What is host aliasing? For example?
Multiple domain names that map to the same IP address
e.g., gmail.com vs mail.google.com
What are replica web servers? For example?
Sets of different IP addresses that map to a single canonical name
e.g., various server IP addresses for the domain name google
What is a domain label? What are the top level domain labels?
A component of a domain name that represents a specific level in the hierarchical naming structure of the Domain Name System (DNS)
com, edu, org, net, or per country such as nl, fr
What is a domain name?
A sequence of domain labels separated by dots (e.g., win.tue)
What happens when a DNS server does not know how to translate a queried domain name?
It asks another one, and so on, in a hierarchical manner, until the correct IP address is returned
What is a Top Level Domain (TLD) server?
A domain server responsible for all top-level country domains such as well as for com, org, net, edu, etc
What are authoritative DNS servers?
DNS servers of individual organisations
What is BitTorrent? Is BitTorrent a client-server, peer-to-peer, or hybrid model?
An application layer protocol for file sharing
Hybrid Model
Explain how BitTorrent is a hybrid model
It has peer-to-peer file sharing with a client-server architecture for peer tracking
Servers called trackers host a list of the files to be shared (but not the files itself) and they track which peers are in possession of file parts
Through the tracker, the client program can find peers and establish TCP connections with them
What is a torrent?
A group of peers sharing parts of a file, with each peer sharing the parts it has
How does trackerless BitTorren work?
Uses Distributed Hash Tables (DHT) instead of tracker servers
How are shared files divided in BitTorrent? What does a new peer do when using trackers in BitTorrent?
Into chunks of 256KB
Registers with the tracker to obtain a list of peers participating in the same torrent
What are neighbours in BitTorrent? How does a peer prioritse which chunks to download first?
Peers with whom a TCP connection is established
Most rare chunks downloaded first
How often does a peer rank its neighbours in BitTorrent? To which peers does a peer send chunks to? What does a peer do every 30 seconds in BitTorrent? What happens if the new peer reciprocates?
Every 10 seconds, a peer ranks its neighbours based on their respective download rates
Only the four with the highest download rates
Randomly selects another peer to send chunks to, allowing new peers to potentially increase their download speeds
It may become one of the top four senders of another peer, ramping up its own download speed
What does a peer do after receiving the entire file in BitTorrent?
After receiving the entire file, a peer continues to upload to other peers without downloading further.
In the client-server paradigm, what four things does the time it takes to distribute a file to N clients from one server depend on?
What is this delay necessarily larger than (two things)?
The file size, the number of clients, the upload bitrate of the server, the individual download bitrates of the clients
The time it takes for the server to upload N copies of the file AND the time it takes for the slowest client to download F bits
What is the distribution time of a file necessarily larger than in P2P file sharing?
Than the time it takes for the first copy to be uploaded by the source peer
AND
Than the time it takes for the slowest client to download F bits
AND
Than the time it takes for N copies of the file to be uploaded by all peers together
What is blockchain? Give an example
A protocol for building applications for distributed bookeeping purposes
A bank holds its transaction records on a decentralised ledger rather than a centralised database
What can a blockchain be likened to?
A distributed P2P network
Who maintains the decentralised ledger? What does it consist of?
The peer
A number of records that are called blocks
What does a block contain? Can all peers see and verify all transactions? Can peers add and remove information to the blockchain?
A record, including some transactions, a timestamp, and an encrypted hash of the previous block
Yes, peers can see and verify all transactions
Peers may only add information to the blockchain