Networks Basics
Networks Basics
Dr Benabderrezak
Researcher in Cyber Security
Full-stack Web developer 1
Work Plan
1. Computer network?
2. Network topology
3. Network terminology
4. Network devices
6. Network protocols
2
2
Computer Network ?
Interconnection of multiple devices, usually called hosts, connected by
multiple paths for the purpose of sending/receiving data or media.
3
4
4
Types of network
5
Network Topology
A network topology is the way nodes and connections are arranged physically and
logically in a network.
6
Network terminology
1. Bandwidth / Speed
2. Ports
3. Protocol
4. Host name
5. IP address (IPv4)
7. …
7
7
Bandwidth
- Bandwidth is the amount of data a network can transfer per second during
browsing. ( maximum amount)
- It can be expressed in bits or bytes (Byte, 8 bits)
8
Speed
- it is the volume of data that passes through a network during a given period
9
Speed vs Bandwidth
10
10
1. Ports
- The port can be considered a logical channel through which data can
be sent/received by an application.
11
11
- The port number is a 16-bit integer
12
12
2. Protocol
- A protocol is a set of rules ( ) ﻣﺠﻤﻮﻋﺔ ﻣﻦ اﻟﻘﻮاﻋﺪthat define how two entities
13
13
3. Hostname
- Each device in the network is associated with a unique device name called the
host name.
14
14
⇒ IP address (@ logical)
- This is the host address or a system on the network.
15
15
⇒ IPv4 (IP version 4)
16
16
⇒ The classes of the IPv4
17
17
⇒ IPv6
- Developed to meet IPv4 limitations, such as the limited number of IP
18
18
IPv6
- Read more about IPv6 :
https://www.geeksforgeeks.org/internet-protocol-version-6-ipv6-header/
19
19
20
20
⇒ IPv6 : autoconfiguration
21
21
⇒ IPv6 : Stateless Address Autoconfiguration (SLAAC)
- SLAAC means that no server tracks addresses that have been assigned
22
22
⇒ IPv6 : Stateless Address Autoconfiguration (SLAAC)
(DAD).
23
23
⇒ IPv6 : Stateful Address Autoconfiguration
addresses, etc.
24
24
⇒ IPv6 : Stateful Address Autoconfiguration
- DHCPv6 servers can also be used to assign more parameters to workstations
ﻟﺘﻌﯿﯿﻦ ﺑﺎراﻣﺘﺮات ﻟﻤﺤﻄﺎت اﻟﻌﻤﻞ أﻛﺜﺮ ﻣﻦ ﺗﻠﻚ اﻟﻤﺸﺎرﻛﺔDHCPv6 ﯾﻤﻜﻦ أﯾﻀًﺎ اﺳﺘﺨﺪام اﻟﺨﻮادم
25
25
⇒ MAC address
- it is the unique identifier of each host and is associated with the Network Interface
Card (NIC).
26
26
⇒ Adresse MAC (Adresse de contrôle d’accès aux médias)
- Type "ifconfig" in the command prompt and press 'Enter', this gives us
27
27
Network devices
⇒ Network devices facilitate data transmission and manage digital connections
28
28
1. Router
- A router is a network device that connects different computer networks and
29
29
2. switch
⇒ A switch works with Media Access Control (MAC) addresses to transfer data
to a local network
30
30
3. Hub
⇒ Unlike switches, hubs don’t have the intelligence to make decisions
based on MAC addresses, and they don’t have the ability to filter or
31
31
4. Bridge
⇒ Its main function is to connect and filter traffic between two or more network
model)
32
32
4. Pont (Bridge)
- Bridges were more commonly used in the past, and
modern switches
33
33
OSI model ?
⇒ OSI model breaks down network communication into seven layers,
34
34
Encapsulation
- Progressive data packaging( ) ﺗﻐﻠﯿﻒ اﻟﺒﯿﺎﻧﺎت اﻟﺘﺪرﯾﺠﻲwith specific layer
35
35
36
36
De-Encapsulation
37
37
38
38
39
39
OSI vs. TCP/IP Model
40
40
41
41
The protocols of the application layer
1. HTTP: Transfer hypertext documents to the web. (http port 80 , https 443)
42
42
The protocols of the application layer
43
43
HTTP operates within the TCP/IP model, which consists of four layers:
1. Application Layer : HTTP Message Creation
44
1. Application Layer:
HTTP Message Creation :
- The web browser creates an HTTP request message.
- The message includes:
1. Method : The action to be performed (e.g., GET, POST, PUT, DELETE)
2. Request URI : The resource being requested
3. HTTP Version : The version of HTTP being used
4. Headers : Additional information (e.g., User-Agent, Host, Content-Type)
5. Body : Optional data to be sent with the request
45
HTTP query message
46
46
2. Transport Layer
- TCP is responsible for establishing a reliable connection between the browser
and the web server.
- A three-way handshake is used to synchronize the sequence numbers and
acknowledgements.
Segment Creation :
- The HTTP message is divided into segments, each containing a portion of the
data and a TCP header.
47
2. Transport Layer
⇒ The TCP header includes :
- Source and destination ports : Identify the communicating processes
- Sequence number : Unique identifier for the segment
- Acknowledgement number : Acknowledges receipt of previous segments
- Flags : Indicate the state of the connection (e.g., SYN, ACK, FIN)
- Checksum : Verifies data integrity
⇒ Segment Transmission
- The TCP segments are transmitted over the network.
48
3.Internet Layer
Each TCP segment is encapsulated within an IP datagram.
49
3.Internet Layer
The IP header includes :
- Version : Identifies the IP version
- Header length : Specifies the length of the IP header
- Type of service : Indicates the desired quality of service
- Total length : The total length of the datagram
- Identification : Unique identifier for the datagram
- Flags : Control fragmentation and reassembly
- Fragment offset : Indicates the offset of a fragment within the original
datagram
50
3.Internet Layer
The IP header includes :
- Time to live (TTL) : Limits the datagram's lifetime
- Protocol : Identifies the upper-layer protocol (e.g., TCP)
- Header checksum : Verifies data integrity
- Source and destination IP addresses : Identify the sending and receiving hosts
⇒ Datagram Routing:
- The IP datagram is routed through the network based on its destination IP
address.
- Routers use routing protocols to determine the optimal path.
51
4. Network Access Layer : Frame creation
52
4. Network Access Layer
⇒ The frame header includes :
- Source and destination MAC addresses : Identify the sending and receiving
devices
- Frame check sequence (FCS) : Verifies data integrity
⇒ Physical Transmission :
- The frame is transmitted over the physical medium (e.g., Ethernet cable,
wireless).
- The receiving device extracts the IP datagram from the frame.
53
2. SMTP: Sending emails (port 25)
54
54
3. FTP: Transfer files over a network (port 21)
55
55
4. DNS : Resolve domain names to IP addresses (port 53)
56
56
5. RIP: Dynamic routing in IP networks. (port 520)
57
57
6. SSH: Secure remote access to the command line (port 22)
58
58
59
59
The protocols of the transport layer
60
60
TCP Protocol
TCP protocol acknowledgement system allows applications to
61
61
Protocole TCP
- This means that routers (which work in the Internet layer) have the
about data control, because this is done by the transport layer (more
62
TCP Protocol
- A TCP session operates in three phases:
2. Data transfers
63
63
TCP Protocol
64
64
TCP Protocol
- TCP allows to perform an important task: multiplexing/
demultiplexing
- that is, to pass data from various applications on the same line or in
65
65
TCP Protocol
66
66
UDP Protocol
- A communication protocol used across the Internet for especially
- This protocol is very simple since it does not provide error checking (it is not
connection oriented...).
67
67
UDP Protocol
68
68
The protocols of the network layer
69
69
IP Protocol
70
70
IP Protocol
⇒ In reality, the IP protocol processes IP datagrams independently of each
اﻟﺒﯿﺎﻧﺎت ﺑﺸﻜﻞ ﻣﺴﺘﻘﻞ ﻋﻦ ﺑﻌﻀﮭﺎ اﻟﺒﻌﺾ ﻣﻦ ﺧﻼل ﺗﺤﺪﯾﺪ ﺗﻤﺜﯿﻠﮭﺎIP ﯾﻌﺎﻟﺞ ﺑﺮوﺗﻮﻛﻮل،ﻓﻲ اﻟﻮاﻗﻊ
.وﺗﻮﺟﯿﮭﮭﺎ وﺷﺤﻨﮭﺎ
71
71
IP Protocol
⇒ The IP protocol determines the recipient of the message through 3
fields:
72
72
● The IP address field
- Machine address
73
73
● The default gateway field
Allows the Internet protocol to know which machine to return the datagram
to if the destination machine is not on the local network
74
74
ARP Protocol
- To understand the role of the ARP protocol in networks, it is important
to remember how the heads of the Ethernet frames are made (layer 2
75
75
ARP Protocol
- Ethernet frames, need to know the MAC address of the sender and the
recipient to form
76
76
ARP Protocol
- Allows to find a MAC address from an IP address
77
77
RARP Protocol
- RARP allows a station to know its IP address from a MAC address
- Mainly used for workstations that do not have a hard drive and want
ﺗﺴﺘﺨﺪم ﺑﺸﻜﻞ أﺳﺎﺳﻲ ﻟﻤﺤﻄﺎت اﻟﻌﻤﻞ اﻟﺘﻲ ﻻ ﺗﺤﺘﻮي ﻋﻠﻰ ﻗﺮص ﺻﻠﺐ وﺗﺮﯾﺪ ﻣﻌﺮﻓﺔ ﻋﻨﻮاﻧﮭﺎ اﻟﻤﺎدي
78
78
RARP Protocol
79
79