Computer Networks Manual
MAC address (physical address)
Link layer (only) networking equipments
Internet layer networking equipment
HTTP (Hypertext Transfer Protocol)
The Internet is a network of networks.
Communication in Internet is performed using network sockets.
Communication in Internet is performed using network sockets.
The socket API allows 2 or more processes (on the same machine or on different machines) to communicate with each other using Unix file descriptors. The two most common sockets are UDP and TCP.
UDP | TCP |
socket() | socket() |
bind() | bind() |
sendto()/recvfrom() | listen() |
accept()/connect() | |
send()/recv() |
Application | DHCP, HTTP, DNS, SSH |
Transport | UDP, TCP |
Internet | ICMP, IPv4, IPv6 |
Link | ARP |
The physical (MAC - media access control) address of a network interface is a 48 bits unique identifier usually represented by 6 groups of 2 hexadecimal numbers. MAC address can be changed by software, in most network interfaces.
The broadcast MAC address is FF:FF:FF:FF:FF:FF.
ARP (Address Resolution Protocol) maps IP addresses to MAC addresses sending a query to the MAC broadcast address.
Link layer devices can transport any type of IP packets.
An IPv4 addres is 32 bits long, represented in as 4 bytes in decimal separated by “.”(dot).
A network interface can have one or more IP addresses.
Special IP addreses:
localhost | 127.0.0.1 |
private ip classes | 10.0.0.0/8 from 10.0.0.0 to 10.255.255.255 |
172.16.0.0/12 from 172.16.0.0 to 172.31.255.255 | |
192.168.0.0/16 from 192.168.0.0 to 192.168.255.255 |
Localhost address cannot be used as network address or broadcast address.
A netmask is 32 bits long and it is formed by zero or more binary 1 followed by zero or more bynary 0.
11.........100.........0
32 bits; x 1s; 32-x 0s; 0<=x<=32.
A netmask is represented either as an IP address (4 bytes in decimal separated by “.”) or in short /x where x is the number of 1s in the netmask.
Example: 11111111000000000000000000000000=255.0.0.0=/8
The netmask associated to an IP specifies the boundaries of the network that IP belongs to.
In a network with a netmask /x there are 2^(32-x) IP addresses. The first IP address is the address of that network, and the last one is the broadcast address. These to IPs can not be configured for network interfaces.
Adresa de retea.
Adresa de broadcast.
HTTP is the most popular Internet protocol. It is used for distributing web pages. The HTTP server runs (usually) on port 80, and the secure version HTTPS runs (usually) on port 443.