0% found this document useful (0 votes)
14 views80 pages

Networks Basics

The document provides an overview of computer networks, including definitions, topologies, terminology, and essential devices such as routers, switches, and hubs. It explains the OSI and TCP/IP models, detailing protocols for data transmission, including HTTP, TCP, and IP, along with their functions and operations. Additionally, it covers IPv4 and IPv6 addressing, including autoconfiguration methods and the significance of MAC addresses.

Uploaded by

anesboukhecha18
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views80 pages

Networks Basics

The document provides an overview of computer networks, including definitions, topologies, terminology, and essential devices such as routers, switches, and hubs. It explains the OSI and TCP/IP models, detailing protocols for data transmission, including HTTP, TCP, and IP, along with their functions and operations. Additionally, it covers IPv4 and IPv6 addressing, including autoconfiguration methods and the significance of MAC addresses.

Uploaded by

anesboukhecha18
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 80

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

5. OSI model (TCP/IP)

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)

6. OSI model (TCP/IP)

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

- IANA (Internet Assigned Numbers Authority) assigns well-known ports,

registered ports, not dynamic ports

12

12
2. Protocol
- A protocol is a set of rules ( ‫ ) ﻣﺠﻤﻮﻋﺔ ﻣﻦ اﻟﻘﻮاﻋﺪ‬that define how two entities

can communicate on the network.

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.

- The length of the IP address is 32 bits ( 2^32 possible IP addresses)

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

addresses available. (128-bit ipv6)

- IPv6 includes: automatic address allocation and better security mechanisms.

18

18
IPv6
- Read more about IPv6 :

https://www.geeksforgeeks.org/internet-protocol-version-6-ipv6-header/

19

19
20

20
⇒ IPv6 : autoconfiguration

Autoconfiguration in IPv6 can be done in two ways:

1. Stateful Address Autoconfiguration

2. Stateless Address Autoconfiguration

21

21
⇒ IPv6 : Stateless Address Autoconfiguration (SLAAC)

- SLAAC is simple and more straightforward for IPv6 addressing.

- each host on the network can auto-configure a unique IPv6 address

without a device tracking which address is assigned to which node.

- SLAAC means that no server tracks addresses that have been assigned

and addresses that are still available for assignment.

22

22
⇒ IPv6 : Stateless Address Autoconfiguration (SLAAC)

- Address conflicts are resolved by Duplicate Address Detection

(DAD).

- When a node auto-configures an IPv6 address, it sends an address

solicitation (Neighbor Solicitation) message to check if the address is

already in use on the network

23

23
⇒ IPv6 : Stateful Address Autoconfiguration

- Based on the use of a DHCPv6 server

- Distributes configuration settings to client workstations, such as IPv6

addresses, network prefixes, gateway addresses, DNS server

addresses, etc.

24

24
⇒ IPv6 : Stateful Address Autoconfiguration
- DHCPv6 servers can also be used to assign more parameters to workstations

than those involved in a self-contained configuration

‫ ﻟﺘﻌﯿﯿﻦ ﺑﺎراﻣﺘﺮات ﻟﻤﺤﻄﺎت اﻟﻌﻤﻞ أﻛﺜﺮ ﻣﻦ ﺗﻠﻚ اﻟﻤﺸﺎرﻛﺔ‬DHCPv6 ‫ﯾﻤﻜﻦ أﯾﻀًﺎ اﺳﺘﺨﺪام اﻟﺨﻮادم‬

‫ﻓﻲ ﺗﻜﻮﯾﻦ ﻗﺎﺋﻢ ﺑﺬاﺗﮫ‬

25

25
⇒ MAC address

- Also known as the physical 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)

- The MAC address is assigned to the NIC at the time of manufacture.

- The MAC address length is: 6 bytes/ 48 bits.

- Type "ifconfig" in the command prompt and press 'Enter', this gives us

the MAC address.

27

27
Network devices
⇒ Network devices facilitate data transmission and manage digital connections

over a computer network.

28

28
1. Router
- A router is a network device that connects different computer networks and

directs data traffic between them

- Operates at the network layer and makes decisions based on IP addresses

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

manage network traffic

31

31
4. Bridge
⇒ Its main function is to connect and filter traffic between two or more network

segments, making decisions based on MAC addresses. (Layer 2 of the OSI

model)

32

32
4. Pont (Bridge)
- Bridges were more commonly used in the past, and

their functionality has been widely integrated into

modern switches

33

33
OSI model ?
⇒ OSI model breaks down network communication into seven layers,

especially useful for identifying network problems.

34

34
Encapsulation
- Progressive data packaging( ‫ ) ﺗﻐﻠﯿﻒ اﻟﺒﯿﺎﻧﺎت اﻟﺘﺪرﯾﺠﻲ‬with specific layer

information ( ‫) ﻣﻊ ﻣﻌﻠﻮﻣﺎت طﺒﻘﺔ ﻣﺤﺪدة‬

35

35
36

36
De-Encapsulation

- Reverse operation of the “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

2. Transport Layer : TCP Connection Establishment

3. Internet Layer : IP Datagram Creation

4. Network Access Layer : Frame 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

The IP datagram is encapsulated within a frame

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

communicate securely and independently from lower layers.

61

61
Protocole TCP
- This means that routers (which work in the Internet layer) have the

sole role of data routing in the form of datagrams, without worrying

about data control, because this is done by the transport layer (more

particularly by the TCP protocol)

- TCP is a connection-oriented protocol


62

62
TCP Protocol
- A TCP session operates in three phases:

1. Establishing the connection ( SYN , SYN/ACK, ACK)

2. Data transfers

3. The end of the connection

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

other words to series information arriving in parallel.

65

65
TCP Protocol

66

66
UDP Protocol
- A communication protocol used across the Internet for especially

time-sensitive transmissions such as video streaming.

- 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

- IP is part of the Internet layer of the TCP/IP model

- It is one of the most important protocols of the Internet because it

allows the development and the transport of IP datagrams (data

packets), without ensuring the «delivery»

70

70
IP Protocol
⇒ In reality, the IP protocol processes IP datagrams independently of each

other by defining their representation, routing and shipping.

‫ اﻟﺒﯿﺎﻧﺎت ﺑﺸﻜﻞ ﻣﺴﺘﻘﻞ ﻋﻦ ﺑﻌﻀﮭﺎ اﻟﺒﻌﺾ ﻣﻦ ﺧﻼل ﺗﺤﺪﯾﺪ ﺗﻤﺜﯿﻠﮭﺎ‬IP ‫ ﯾﻌﺎﻟﺞ ﺑﺮوﺗﻮﻛﻮل‬،‫ﻓﻲ اﻟﻮاﻗﻊ‬

.‫وﺗﻮﺟﯿﮭﮭﺎ وﺷﺤﻨﮭﺎ‬

71

71
IP Protocol
⇒ The IP protocol determines the recipient of the message through 3

fields:

● The IP address field

● The subnet mask field

● The default gateway field

72

72
● The IP address field

- Machine address

● The subnet mask field

- a subnet mask allows the IP protocol to determine which part

of the IP address concerns the network

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

of the OSI model, data link )

75

75
ARP Protocol
- Ethernet frames, need to know the MAC address of the sender and the

recipient to form

- The MAC address is the unique identifier of a network card formed on

48 bits (6 bytes), here is an example of MAC address 8d:4a:65:05:78:45

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

to know their physical address.

‫ﺗﺴﺘﺨﺪم ﺑﺸﻜﻞ أﺳﺎﺳﻲ ﻟﻤﺤﻄﺎت اﻟﻌﻤﻞ اﻟﺘﻲ ﻻ ﺗﺤﺘﻮي ﻋﻠﻰ ﻗﺮص ﺻﻠﺐ وﺗﺮﯾﺪ ﻣﻌﺮﻓﺔ ﻋﻨﻮاﻧﮭﺎ اﻟﻤﺎدي‬

78

78
RARP Protocol

79

79

You might also like