application layer Flashcards
As a service, what is the internet’s main roles
provides service to applications
provides programming interface to applications - hooks that allow sending and receiving app programs to connect to internet - think post service
What are network applications?
programs that :
- run on different end systems - exchange msgs
- communicate over a network
- e.g. web server communications with browser
do we need to write software for network core devices?
no - net core devices dont run on user applciations
what are 2 application architectures?
client-server
peer-to-peer (P2P)
Describe client-server architecture
server - always on host, permanent ip address, data centers for scaling
clients
- communicate with server
- doesnt need to be on all the time
- dynamic IP
- no direct communication with other clients
Describe P2P architecture
no always on server end systems communicate directly peers request service from other peers peers intermittently connected dynamic IP
what is p2p self-scalability?
new peers bring new service capacity and resources as well as new service demands
what is a service
capabilities provided by system to users
what is a service access point
instantiation of the port set with an IP that identifies the device/host
what is the transport service
allows networked applications to exchange messages
what are 3 things that identify applications
host IP address
port number
protocol - type of trans protocol
some transport primitives
request
indication - request for connection
response
confirm
connectionless service
src just sends information without first establishing a connections
problems with connectionless service
message lost, message transformed, duplication, order of message changed
connection-oriented service
connection request sent and confirmed before trying to send data packets
message mode transfer
messages sent is received in the same unit format that it was sent in
stream mode transfer
not concerned about units just concerned that messahes are received in the same order that they were sent
TCP properties
reliable
flow control - sender doesnt overwhelm receiver
congestion control - throttle sender when network is overloaded
connection-oriented
what does TCP not provide?
timing, minimum throughput guarantee, security
UDP properties
unreliable
what does udp not provide
reliability, flow/congestion control, timing, throughput guarantee, security, connection setup
why bother with udp
quick messaging
message units
what is a process
program running within a host - two processes communicate using inter-process communication
how do processes within the same vs different hose communicate?
same - interprocess comm
diff - exchange messages
difference between server and client process
server - waits to be connected to
client - initiates communication
what is a socket
networks send/receive messages to/from its socket - door between application process and end-end transport protocol
what is used to identify processes
port and IP address
describe the process of socket programming with TCP
specfiy ip and port
client creates socket and client TCP establishes connection to server TCP
when contacted by client, server creates new socket for server process to connect to that particular client
- server can talk with multiple clients
- source port numbers used to distinguish clients
how to distinguish between different clientes
- source port numbers used to distinguish clients
what does http stand for
hyper text transfer protocol
what does http do
web application layer software
what connection model does http follow and how does it work in this case
client server
client - browser requests and receives using http and displays web objects
server - web server sends objects in response
how does http use tcp
client initiates tcp connection to server port 80
server accepts request
http messages are exchanged
connection closed
is http stateless? what does that mean?
Yes
stateless: server maintains no information about past client requests
explain persistent http
multiple objects can be sent over single tcp connection
explain non-persistent http
one object sent over a tcp connection, connection then closed - download multiple objects = multiple connections
what is RTT
round trip time - time takes for small packet to travel from client to server and back
what is http response time? Non persistent
2 RTT + file transmission time
issues with non-persistent http
OS overhead for each TCP connection
browsers often open parallel TCP connections to fetch referenced objects
what is http response time? persistent
min on 1 RTT
two types of http messages
request, response
how are cookies used - describe the whole process of how the server and client interact and how cookies play a role in this interaction
client: tcp connection
server: response - sends cookie
client: accepts cookies, sends request
server: sees cookie, check DB and responds with customized response based on client’s previous uses
what is the goal of a web cache
satisfy client request without involving origin server
how does the web cache work?
browser sends all http requests to cache
obj in cache: cache returns object
else: cache requests from origin server
What is DNS
Domain name server
define dns
distributed database implemented in hierarchy of many name servers
what layer protocol is dns?
app layer - name servers communicate to resolve names - address/name translation
where is core internet function implemented (layer name)
application
what are some dns services
map host name to ip address
host aliasing - diff names map to same address
mail server aliasing
load distribution - not all activity will go to same server e.g. facebook has lots of users and will take users to different servers but all users use facebook
why not centralize (have one system doing all the dns functionality) dns?
single point of failure traffic volume distant database maintenance doesnt scale
hierarchical view of dns - root name servers
contacted by local name server - cannot resolve name
- contact authoritative name server is name mapping is not known
- gets mapping
- returns mapping to local name server
what are authoritative DNS servers
organizations own dns server(s) - for providing ip mapping to orgs own named hosts
maintained by org or service provider
what are top-level domain servers
responsible for org net edu ero jobs and all country domains
what are local DNS name servers
not strictly part of hierarchy
each isp has one - also default name server
host makes dns query - sent to local dns server
- has local cache of recent name to address conversions
- acts as a proxy into heirarchy
explain the process of iterated query dns resolution
host - local dns - root dns - local - topleveldomain - local - authoratative - local - host
explain the path of a recursive dns resolution
host local root tld auth tld root local host
what does RR stand for with regards to dns?
resource record
name and explain different types of resource records
A - name= host name, value = ip
NS - name - domain, value - hostname of auth server
CName - name - alias for some real name, val - real name
MX - val name of mail server associated with the name
How can one insert into DNS
register name with DNS registrar - names, ip address of auth server
registrar inserts two RRs into TLD server (NS and A)