TCP/IP Networking basics
A number of hosts connected to a central switch, and connected to other networks through a gateway (router).
Layers (TCP/IP stack)
Link (OSI 2/1)
The link layer handles the actual transmission of data, relying on dedicated hardware (a networking interface) identified by a unique 48 digits MAC address.
Internet (OSI 3)
Identifies hosts and defines routing paths.
- IPv4 address
An IPv4 address is a 32 bits number.
In an IP addresses, the first
Nbits represent the the network the address belongs to, while the remaining
nbits identify the host.
- Network classes
Network addresses are grouped in classes. Each class a network address designed for private use.
- Class A
N = 8: [1-127].x.x.x/8 (255.0.0.0)
- Class B
N = 16: [129-191].x.x.x/16 (255.255.0.0)
- Class C
N = 24: [192-223].x.x.x/24 (255.255.255.0)
- Class D
Class D is reserved for multicast.
- Link local addresses
It is assigned when dynamic addresses can't be obtained (via DHCP). It is not routable.
- Class A
Transport (OSI 4)
At this layer information get segmented for transmission.
Application (OSI 7/6/5)
This layer features application protocols like http, ftp, smtp.