0% found this document useful (0 votes)
5 views40 pages

Communication and Networking 2 Session 1

The Communications and Networking 2 course is essential for computer science engineers as it covers critical areas like cloud computing, cybersecurity, IoT, and AI. The course aims to teach how devices communicate over networks, the foundations of the Internet, and troubleshooting communication systems. Key topics include the OSI model, routing protocols, network security, and the structure of networks.

Uploaded by

Mohi Gpt4
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)
5 views40 pages

Communication and Networking 2 Session 1

The Communications and Networking 2 course is essential for computer science engineers as it covers critical areas like cloud computing, cybersecurity, IoT, and AI. The course aims to teach how devices communicate over networks, the foundations of the Internet, and troubleshooting communication systems. Key topics include the OSI model, routing protocols, network security, and the structure of networks.

Uploaded by

Mohi Gpt4
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/ 40

Communication and

Networking 2

Pr. Hajar El Hammouti

1
Why Communication and Networking Course is Relevant to a
Computer Science Engineer?

Pr. Hajar El Hammouti Communications & Networking 2 2


Motivation

- Knowledge of networks is critical for domains like:

• Cloud Computing: Managing interconnected cloud resources.

• Cybersecurity: Protecting data transmitted across networks.

• IoT (Internet of Things): Connecting and managing smart devices.

• AI and Big Data: Handling massive data transfers efficiently.

• Companies across industries rely on networked systems to design, secure, and


maintain their solutions over the network.

• Roles such as Network Engineer, System Administrator, and Cloud Architect are
directly related to networking.

Pr. Hajar El Hammouti Communications & Networking 2 3


Motivation

- The main idea behind the course is:

- To understand how devices communicate over the network.

- To set the foundations of Internet.

- To troubleshoot communication systems.

Pr. Hajar El Hammouti Communications & Networking 2 4


Brief Reminder from Communications and Networking 1

A set of devices (such as computers,


What is a network? servers,a smartphones,
framework set
used ofto rules etc)
and and
understand that
communicate
procedures
standardize with different
how each
that other to share
define
networking
What does the OSI model stand for? resources,
howexchange
Open
protocols Systems A: information...
0.0.0.0
data together
work These
– to enable
isInterconnection
transmitted,
devices 32 bits
are 127.255.255.255
connected
received,
communication and
between devices in via
processed a
communication B: 128.0.0.0 –
What is the OSI model used for? network.between links,deviceswhich in cana be
191.255.255.255
wired (e.g., Ethernet
network. cables) or wireless
C: 192.0.0.0 –
(e.g., Wi-Fi, Bluetooth).
What is a protocol? 223.255.255.255
D: 224.0.0.0 –
239.255.255.255
How long is the IPv4 address? E: 240.0.0.0 –
255.255.255.255

What are the classes of IPv4 addresses?

Pr. Hajar El Hammouti Communications & Networking 2 5


Brief Reminder from Communication and Networking 1

OSI Model

Pr. Hajar El Hammouti Communications & Networking 2 6


Brief Reminder from Communication and Networking 1

OSI Model
Provides a user interface to access the network (e.g., URL in the browser),
7) Application Layer example of protocol: HTTP, HTTPs, DNS translation (name into IP)
Presentation of the data: Translates from one format of the data to another, encrypts (using
6) Presentation Layer TLS protocol or SSL), or compresses data for the application layer in preparation for the data
to be sent).
Starts the network functionality, manages sessions/sockets or connections between
5) Session Layer
devices, defines which protocol to be used in the transport layer, session number is
defined.
4) Transport Layer Ensures reliable data transfer, flow control, and error recovery (e.g. TCP and UDP).
(Structures the data into Segments)
3) Network Layer Manages routing, forwarding, and logical addressing to determine the best path
for data. (Packets)

2) Data Link Layer Adds the Ethernet header, Handles error detection, error correction, and framing for
data packets. (Frames)
Concerned with the physical transmission of raw data bits over a medium (e.g.,
1) Physical Layer
cables, wireless signals). (Bits)

Pr. Hajar El Hammouti Communications & Networking 2 7


Objectives of this Course

Routing, within the same Autonomous System (AS) and between


7) Application Layer different AS (Dynamic Routing, different routing protocols with
advantages and disadvantages).
6) Presentation Layer What is SDN ? And How does it help in routing?

5) Session Layer ICMP (Internet Control Message Protocol): protocol that detects
errors in routing and help troubleshooting the network
4) Transport Layer

3) Network Layer

2) Data Link Layer

1) Physical Layer

Pr. Hajar El Hammouti Communications & Networking 2 8


Communications and Networking 2

What are the Objectives of this Course?

Pr. Hajar El Hammouti Communications & Networking 2 9


Objectives of this Course

7) Application Layer Review multiple access schemes (channel


partitionning, random access, taking turns)
6) Presentation Layer LANs, VLANs (MPLS)

5) Session Layer Putting it all together: how this actually work


when we request a web page on the
4) Transport Layer Internet?

3) Network Layer

2) Data Link Layer

1) Physical Layer

Pr. Hajar El Hammouti Communications & Networking 2 10


Objectives of this Course

7) Application Layer Wireless: Infrastructure, wave


propagation, WLAN

6) Presentation Layer Cellular Networks 4G, 5G

5) Session Layer Mobility is handled in cellular


networks
4) Transport Layer

3) Network Layer

2) Data Link Layer

1) Physical Layer

Pr. Hajar El Hammouti Communications & Networking 2 11


Objectives of this Course

Network Security
7) Application Layer

6) Presentation Layer
• Message integrity, authentication
• Securing e-mail
5) Session Layer
• Securing TCP connections: TLS
• Network layer security: IPsec
4) Transport Layer • Security in wireless and mobile networks
• Operational security: firewalls and IDS (intrusion
3) Network Layer detection system)

2) Data Link Layer

1) Physical Layer

Pr. Hajar El Hammouti Communications & Networking 2 12


Structure of the Course

Typical Week
- 1h30 Lecture Lecturer and TAs:

- Hajar El Hammouti
- 1h30 Lab/Project
- Abdoulkarim Saliah
- Assane Sankara
Weights of Exams
Office Hours:
- Mid-term: 30%
- Wednesdays 5pm-6pm
- Final Exam: 40%

- Lab: 10%

- Project: 20%

Pr. Hajar El Hammouti Communications & Networking 2 13


Chapter1: Network Layer-
Dynamic Routing

14
Everything Needed to Connect Devices Together

Modem Router Switch Hub Repeater Home Network


router Internet
Card

Pr. Hajar El Hammouti Communications & Networking 2 15


Everything Needed to Connect Devices Together

Components of router

Router Ethernet

Network Fast Ethernet


CPU Memory
Interfaces

Gigabit Ethernet
RAM LAN
10 Gigabit Ethernet
ROM Serial
WAN
Flash ISDN
NVRAM Console

Pr. Hajar El Hammouti Communications & Networking 2 16


Context

Assume this computer


would like to communicate
with a far away computer,
how the packets will find
their way to the destination?

Pr. Hajar El Hammouti Communications & Networking 2 17


Routing Protocols

mobile network
Routing protocol goal: determine “good” national or global ISP
paths (equivalently, routes), from sending
hosts to receiving host, through network of
routers application
transport
network
link
path: sequence of routers packets traverse physical
network network

from given initial source host to final link


physical
link
physical

destination host network


link network

“good”: least “cost”, “fastest”, “least physical link


physical network
link datacenter
congested” physical network

application
transport
network
enterprise link
network physical

Pr. Hajar El Hammouti Communications & Networking 2 18


Routing Protocols

Output of a Routing Protocol: Forwarding table


- It stores the next hop to which the packet should be sent.

Forwarding table

Range of IP
v w
0 1 Addresses to be Forwarding Port
u reached
3 2

x 198.0.0.0 à 194.0.0.0 - Port 1


- ….. -…
- …. -…

Pr. Hajar El Hammouti Communications & Networking 2 19


Routing- Graph Abstraction

5 - ca,b: cost of direct link connecting a and b


v 3 w e.g., cw,z = 5, cu,z = ∞
2 5
- Cost defined by network operator: could
u 2 1 z
3 be related to throughput, congestion,
1
x y 2 delay…
1

graph: G = (N,E)
N: set of routers = { u, v, w, x, y, z }
E: set of links ={ (u,v), (u,x), (v,x), (v,w), (x,w), (x,y), (w,y), (w,z), (y,z) }

Pr. Hajar El Hammouti Communications & Networking 2 20


Classification of Routing Algorithms

Global Vs Decentralized Static Vs Dynamic Intra vs Inter domain/AS

Global: all routers have complete Static: routes do not Intra: Interior routing
topology, link cost info change over time withing the same
• “link state” algorithms autonomous system

Decentralized: iterative process of Dynamic: routes change more Inter: Exterior routes between
computation, exchange of info with quickly AS
neighbors • periodic updates or in
• routers initially only know link response to link cost
costs to attached neighbors changes
• “distance vector” algorithms

Pr. Hajar El Hammouti Communications & Networking 2 21


Network Layer: Control Plane Vs Data Plane

Control Plane Data Plane


- Decides how data is managed, routed, and - Is responsible for the actual moving of data.
processed
- Forwarding the packets following the
- Decides how packets should be routed. instructions of the control plane

- Uses protocols to communicate between


different systems, mostly common routing
protocols like BGP, OSPF…

Pr. Hajar El Hammouti Communications & Networking 2 22


Link State: Dijkstra Routing Algorithm

Pr. Hajar El Hammouti Communications & Networking 2 23


Link State: Dijkstra Routing Algorithm

notation
§ Centralized: network topology, link
costs known to all nodes § cx,y: direct link cost from
node x to y; = ∞ if not direct
• accomplished via “link state neighbors
broadcast”
• all nodes have same info
§ D(v): current estimate of
cost of least-cost-path from
§ Computes least cost paths from one source to destination v
node (“source”) to all other nodes § p(v): predecessor node
• gives forwarding table for that node along path from source to v
§ Iterative: iterative process § N': set of nodes whose
least-cost-path definitively
known

Pr. Hajar El Hammouti Communications & Networking 2 24


Link State: Dijkstra Routing Algorithm
1 Initialization:
2 N' = {u} /* compute least cost path from u to all other nodes */
3 for all nodes v
4 if v adjacent to u /* u initially knows direct-path-cost only to direct neighbors */
5 then D(v) = cu,v /* but may not be minimum cost! */
6 else D(v) = ∞
7
8 Loop
9 find w not in N' such that D(w) is a minimum
10 add w to N'
11 update D(v) for all v adjacent to w and not in N' :
12 D(v) = min ( D(v), D(w) + cw,v )
13 /* new least-path-cost to v is either old least-cost-path to v or known
14 least-cost-path to w plus direct-cost from w to v */
15 until all nodes in N'

Pr. Hajar El Hammouti Communications & Networking 2 25


Link State: Dijkstra Routing Algorithm

v w x y z
Step N' D(v),p(v) D(w),p(w) D(x),p(x) D(y),p(y) D(z),p(z)
0 u 2,u 5,u 1,u ∞ ∞
1
2
3
4
5

5 Initialization (step 0):


For all a: if a adjacent to u then D(a) = cu,a
v 3 w
2 5
u 2 1 z
3
1 2
x y
1

Pr. Hajar El Hammouti Communications & Networking 2 26


Link State: Dijkstra Routing Algorithm

v w x y z
Step N' D(v),p(v) D(w),p(w) D(x),p(x) D(y),p(y) D(z),p(z)
0 u 2,u 5,u 1,u ∞ ∞
1 ux
2
3
4
5
8 Loop
5 9 find a not in N' such that D(a) is a minimum
v 3 w
10 add a to N'
2 5
u 2 1 z
3
1 2
x y
1

Pr. Hajar El Hammouti Communications & Networking 2 27


Link State: Dijkstra Routing Algorithm

v w x y z
Step N' D(v),p(v) D(w),p(w) D(x),p(x) D(y),p(y) D(z),p(z)
0 u 2,u 5,u 1,u ∞ ∞
1 ux 2,u 4,x 2,x ∞
2
3
4
5
8 Loop
5 9 find a not in N' such that D(a) is a minimum
v 3 w
10 add a to N'
2 5 11 update D(b) for all b adjacent to a and not in N' :
u 2 1 z D(b) = min ( D(b), D(a) + ca,b )
3
1 2 D(v) = min ( D(v), D(x) + cx,v ) = min(2, 1+2) = 2
x y
1 D(w) = min ( D(w), D(x) + cx,w ) = min (5, 1+3) = 4
D(y) = min ( D(y), D(x) + cx,y ) = min(inf,1+1) = 2
Pr. Hajar El Hammouti Communications & Networking 2 28
Link State: Dijkstra Routing Algorithm

v w x y z
Step N' D(v),p(v) D(w),p(w) D(x),p(x) D(y),p(y) D(z),p(z)
0 u 2,u 5,u 1,u ∞ ∞
1 ux 2,u 4,x 2,x ∞
2 uxy
3
4
5
8 Loop
5 9 find a not in N' such that D(a) is a minimum
v 3 w
10 add a to N'
2 5
u 2 1 z
3
1 2
x y
1

Pr. Hajar El Hammouti Communications & Networking 2 29


Link State: Dijkstra Routing Algorithm

Step N' D(v),p(v) D(w),p(w) D(x),p(x) D(y),p(y) D(z),p(z)


0 u 2,u 5,u 1,u ∞ ∞
1 ux 2,u 4,x 2,x ∞
2 uxy 2,u 3,y 4,y
3
4
5
8 Loop
5 9 find a not in N' such that D(a) is a minimum
v 3 w
10 add a to N'
2 5 11 update D(b) for all b adjacent to a and not in N' :
u 2 1 z D(b) = min ( D(b), D(a) + ca,b )
3
1
x y 2 D(w) = min ( D(w), D(y) + cy,w ) = min (4, 2+1) = 3
1 D(z) = min ( D(z), D(y) + cy,z ) = min(inf,2+2) = 4
Pr. Hajar El Hammouti Communications & Networking 2 30
Link State: Dijkstra Routing Algorithm

v w x y z
Step N' D(v),p(v) D(w),p(w) D(x),p(x) D(y),p(y) D(z),p(z)
0 u 2,u 5,u 1,u ∞ ∞
1 ux 2,u 4,x 2,x ∞
2 uxy 2,u 3,y 4,y
3 uxyv
4
5
8 Loop
5 9 find a not in N' such that D(a) is a minimum
v 3 w
10 add a to N'
2 5
u 2 1 z
3
1 2
x y
1

Pr. Hajar El Hammouti Communications & Networking 2 31


Link State: Dijkstra Routing Algorithm

v w x y z
Step N' D(v),p(v) D(w),p(w) D(x),p(x) D(y),p(y) D(z),p(z)
0 u 2,u 5,u 1,u ∞ ∞
1 ux 2,u 4,x 2,x ∞
2 uxy 2,u 3,y 4,y
3 uxyv 3,y 4,y
4
5
8 Loop
5 9 find a not in N' such that D(a) is a minimum
v 3 w
10 add a to N'
2 5 11 update D(b) for all b adjacent to a and not in N' :
u 2 1 z D(b) = min ( D(b), D(a) + ca,b )
3
1
x y 2 D(w) = min ( D(w), D(v) + cv,w ) = min (3, 2+3) = 3
1

Pr. Hajar El Hammouti Communications & Networking 2 32


Link State: Dijkstra Routing Algorithm

v w x y z
Step N' D(v),p(v) D(w),p(w) D(x),p(x) D(y),p(y) D(z),p(z)
0 u 2,u 5,u 1,u ∞ ∞
1 ux 2,u 4,x 2,x ∞
2 uxy 2,u 3,y 4,y
3 uxyv 3,y 4,y
4 uxyvw
5
8 Loop
5 9 find a not in N' such that D(a) is a minimum
v 3 w
10 add a to N'
2 5
u 2 1 z
3
1 2
x y
1

Pr. Hajar El Hammouti Communications & Networking 2 33


Link State: Dijkstra Routing Algorithm

v w x y z
Step N' D(v),p(v) D(w),p(w) D(x),p(x) D(y),p(y) D(z),p(z)
0 u 2,u 5,u 1,u ∞ ∞
1 ux 2,u 4,x 2,x ∞
2 uxy 2,u 3,y 4,y
3 uxyv 3,y 4,y
4 uxyvw 4,y
5
8 Loop
5 9 find a not in N' such that D(a) is a minimum
v 3 w
10 add a to N'
2 5 11 update D(b) for all b adjacent to a and not in N' :
u 2 1 z D(b) = min ( D(b), D(a) + ca,b )
3
1
x y 2 D(z) = min ( D(z), D(w) + cw,z ) = min (4, 3+5) = 4
1

Pr. Hajar El Hammouti Communications & Networking 2 34


Link State: Dijkstra Routing Algorithm

v w x y z
Step N' D(v),p(v) D(w),p(w) D(x),p(x) D(y),p(y) D(z),p(z)
0 u 2,u 5,u 1,u ∞ ∞
1 ux 2,u 4,x 2,x ∞
2 uxy 2,u 3,y 4,y
3 uxyv 3,y 4,y
4 uxyvw 4,y
5 uxyvwz
8 Loop
5 9 find a not in N' such that D(a) is a minimum
v 3 w
10 add a to N'
2 5
u 2 1 z
3
1 2
x y
1

Pr. Hajar El Hammouti Communications & Networking 2 35


Link State: Dijkstra Routing Algorithm

v w x y z
Step N' D(v),p(v) D(w),p(w) D(x),p(x) D(y),p(y) D(z),p(z)
0 u 2,u 5,u 1,u ∞ ∞
1 ux 2,u 4,x 2,x ∞
2 uxy 2,u 3,y 4,y
3 uxyv 3,y 4,y
4 uxyvw 4,y
5 uxyvwz
8 Loop
5 9 find a not in N' such that D(a) is a minimum
v 3 w
10 add a to N'
2 5 11 update D(b) for all b adjacent to a and not in N' :
u 2 1 z D(b) = min ( D(b), D(a) + ca,b )
3
1 2
x y
1

Pr. Hajar El Hammouti Communications & Networking 2 36


Link State: Dijkstra Routing Algorithm

v 3 w
2 5
u 2 1 z
3
1 2
x y
1

resulting least-cost-path tree from u: resulting forwarding table in u:


destination outgoing link
v w
v (u,v) route from u to v directly
u z x (u,x)
y (u,x) route from u to all
x y w (u,x) other destinations
x (u,x) via x

Pr. Hajar El Hammouti Communications & Networking 2 37


Link State: Dijkstra Routing Algorithm

v w x y z
D(v), D(w), D(x), D(y), D(z), x
9
Step N' p(v) p(w) p(x) p(y) p(z)

0 u 7,u 3,u 5,u ∞ ∞ 5 7


4
1 uw 6,w 5,u 11,w ∞ 8
2 uwx 6,w 11,w 14,x 3 w y z
u
2
3 uwxv 10,v 14,x
3
4 uwxvy 12,y 7 4

5 uwxvyz v

Pr. Hajar El Hammouti Communications & Networking 2 38


Link State: Dijkstra Routing Algorithm-Discussion

What is the complexity of Djikstra algorithm ?

Pr. Hajar El Hammouti Communications & Networking 2 39


Link State: Dijkstra Routing Algorithm-Discussion

algorithm complexity: n nodes


§ each of n iteration: need to check all nodes, w, not in N
§ O(n2) complexity
§ more efficient implementations possible: O(nlogn)
message complexity:
§ each router must broadcast its link state information to other n-1 routers
§ efficient (and interesting!) broadcast algorithms: O(n) link crossings to
disseminate a broadcast message from one source
§ each router’s message crosses O(n) links: overall message complexity: O(n2)

Pr. Hajar El Hammouti Communications & Networking 2 40

You might also like