Network Protocols Flashcards
TCP/IP Model
Physical layer Data Link layer Internet layer Transport layer Application layer
Frame
Packet of info labeled with the names of the sender and receiver
Physical Layer
How information physically gets from point a to point b - Wifi, ethernet, etc.
Data Link Layer
Plumbing. Packages info into frames
Internet Layer
Internet Protocol acts as a bridge between networks of computers, enables internet communication and ensures that packets go where they need to go. DNS (Domain Name Service) translates the name of a website in the IP address of a server
Transport Layer
Protocols for direct communication channels over the internet: TCP or UDP. TCP is the standard protocol of choice for the internet.
Application Layer
Builds products that transfer information over the internet. Used for most things on the web. This layer gives the packets meaning - makes them do something for the end user!
HTTP, SMTP, SSH
TCP
Transmission Control Protocol. Slow but reliable. Protocol basically ads a label to each packet as it goes out, so that when receiver gets packets, they can arrange them and check if any packets are missing, in which case it will ask the sender to send again
Lets you track state! TCP is the transport protocol of choice for the internet
UDP
User Datagram Protocol. Fast, but more error prone. Sends packets fast which is good for live video streaming/broadcasting, does not have the same data delivery/ordering checks that TCP does
HTTP
Hypertext Transport Protocol. Client makes request to server which sends back a response. HTTP requests and responses are divided into the header which contains metadata about the request and the body which contains data in some specified format (e.g. JSON).
HTTP uses uniform resource identifiers (urls) for users to specify what data they’re trying to access. For example, you’ll type in http://igotanoffer.com
to make a request from your computer to view our website, which is made of HTML, CSS, and JavaScript files, hosted on our servers.
SMTP
Lets you fetch and send email
SSH
Lets you log onto other computers
Packet Composition
Frame Header - 4 IP Header - 3 TCP Header - 2 Payload - 1 Frame Footer - 5
Link Internet Transport Application Link
- Application layer creates some kind of message (payload) “Get this webpage” in HTTP
- Transport layer adds header. Metadata is added to core information payload of the packet by TCP header in order to label the packet
- Internet layer adds headers
- Data link layer adds frame header and footers
- Physical layer doesn’t add anything: just sends information over the wire
- When receiver gets the packet, it removes headers and footers in reverse order until just the core payload is left
Proxy
A server that sits between a client and application server to provide some intermediary service to the communication. There are two kinds of proxies that provide different services: forward proxies and reverse proxies.
Forward Proxy
A forward proxy sits between a pool of clients and the public internet. The goal of a forward proxy is to protect the particular client pool by filtering outgoing requests and incoming responses.
The common use cases for forward proxies are:
Enforcing “terms of use” on a network
Blocking malicious websites
Anonymizing network traffic by using the IP address of the proxy instead of the client
For example, a school network might decide to block requests going out to certain social media websites. Alternatively a business network might try to mitigate phishing attacks by not allowing employee requests to known malicious domain names.