Networking Basics
- takes both software and hardware to move packets: MAC (hardware) and IP (software)
Packets: header + payload
- payload = data being transferred
- as packet traverses the network, each layer adds info to header
- different layers use different terms for our “packet”
- transport layer: used to encapsulate data in a “segment”
- link layer: we refer to this as a “frame”
Sending an email example
APPLICATION LAYER (in OSI application, presentation, session) will encapsulate the data from our email client
application layer talks to transport layer through specific port (25 for SMTP)
Data goes to Transport layer to be encapsulated into segments
Transport Layer
- breaks data into chunks (known as “segments”) in a way networks can read and transport
**TCP handshake:
– client sends a SYN segment to server requesting connection
– server sends the client a SYN-ACK segment to acknowledge the client's connection request
– client sense an ACK to server to acknowledge the server's connection request
092119-0753-TCP3-Way-Hand1.webp
Network layer
- routing of packets from source host to destination host
- “subnets” = smaller networks making up the Internet
- IP addresses define the rules to ravel to different subnets
**Coming from Transport layer:
– receives “segment” and encapsulates this segment in an IP packet
– attaches source host IP + destination host IP to the packet header
– sends to physical hardware layer
Link Layer: hardware specific layer
- receives “segment”, encapsulates into “frame”
- attaches source and destination MAC addresses of hosts, checksums, packet separators so that receiver can tell when packet ends
ARP: Address Resolution Protocol to find MAC address of IP
- used within same network
DHCP: Dynamic Host Configuration Protocol
- assigns IP addresses, subnet masks, gateways