Concepts and Techniques
by William Orr
What is networking?
High level overview:
•Making two or more computers talk to each other
•Enhancing real life interactions through networked
•Other bullshit like that
•Transfer of packets within a local area network (LAN)
•Routing of packets between different LANs
Data encapsulation is the process of taking data or a packet
and then wrapping it in the header and footer of a lower level
Data Encapsulation - Why?
Well, most devices that handle traffic don't need to know about
the data within a packet to deliver to the next step in the chain.
Only the device configured to receive that data will de-
encapsulate it (unwrap it) fully.
Data Encapsulation - The OSI Model
Data Encapsulation - TCP Model
Data Encapsulation - Summary
•OS generates data
•Data gets recursively wrapped with headers down the stack
•Sends the data out over the network in a frame
•Destination receives the frame
•Destination de-encapsulates the frame recursively up the
•Destination OS processes data
•Layer 2 Frame
•Uses MAC addresses for sending and receiving data
•Holds at most 1500 bytes of data per frame
•Layer 3 agnostic
Ethernet II Frame
•Specialized protocol that requires IP and Ethernet
•Glue between IP and Ethernet
•Allows hosts to get MACs from IPs
•Computer knows IP but doesn't know MAC
oSends out broadcast message to that IP asking for MAC
oWaits for a response from the computer with the IP
oAdds the hosts's IP and MAC address to an ARP table
•Layer 3 packet
•Uses 32 bit IP addresses for addressing
•Responsible for internetwork packet routing
•Holds at most 65535 bytes per packet
•IPs are 32 bit binary numbers!
•Usually written out in dotted quad form: "184.108.40.206"
•Also come with subnet mask, also 32 bit binary number!
•Usually looks something like this: "255.255.254.0"
•Or in binary: 11111111 11111111 11111110 00000000
IP Addressing II
To determine if a machine is on your local network:
1.AND the address and the subnet mask
2.AND your address and the subnet mask
3.If both are equal, it's on the local network
4.Else, set the MAC address to your default gateway, and
have it send the packet
3 Way Handshake
•Client sends packet with SYN flag set
•Server responds with SYN and ACK flags set
•Client responds with final ACK
•Client sends FIN
•Server sends FIN-ACK
•Client sends ACK