application layer Flashcards
process
a program running code within a host on the application layer
encapsulation
the message going through each layer with each one adding its header to it
decapsulation
the message going back up the layers with each one processing its header then removing it
what are the benefits of encapsulation and decapsulation
allows each layer to operate independently
each layer only has to be concerned with its corresponding header
client process
initiates communication
server process
waits to be contacted
why do we need interfaces
so that the layers can communicate with each other
what is the interface used between the application and transport layer
socket
which 2 pieces of information do we need when sending a message
ip address
port number
ip address
network identifier
ipv4; 32
ipv6; 128
port number
transport layer identifier that delivers the message to the right process
why do we need both the ip and port number when sending messages
many processes can be on the same host so we need to specify which one
5 tuple
uniquely identifies a communication between two processes
what do we need to create the 5 tuple
source and destination ip
source and destination port number
transport protocol
how does the client know which port to use
popular applications have well know ports
ephemeral ports are arbitrary numbers automatically assigned by the os and are used for temporary communication
what are some standard api system calls
read()
write()
close()
what are some socket specific calls
send()
recv()
bind()
application layer protocols
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
open protocols
have public documents explaining the messages and fields
e.g. http
propriety protocols
not public and are tied to specific products
e.g. skype
what might an application need form the transport layer
data integrity
timing
throughput
security
tcp service
reliable
provides congestion and flow control
connection oriented
tcp as reliable
guaranteed that messages are delivered in the order that they were sent
tcp and congestion control
can delay or reduce the number of packets sent if theres high congestion
tcp and flow control
stops the sender from overwhelming the receiver when its sending more messages than it can process
tcp as connection oriented
a handshake establishes the connection before real messages are sent
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
what are messages called in udp
datagrams
raw sockets
network sockets that allow direct access to lower level protocols
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
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
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
p2p
any node provides a service
single code executed by all hosts
self scalable
self scalable
the more participants the more scalable as they each provide recourses
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
what is the end-to-end principle
don’t implement anything in the network that cant be implemented by the host