Communication and Networking 2 Session 1
Communication and Networking 2 Session 1
Networking 2
1
Why Communication and Networking Course is Relevant to a
Computer Science Engineer?
• Roles such as Network Engineer, System Administrator, and Cloud Architect are
directly related to networking.
OSI Model
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)
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
1) Physical Layer
3) Network Layer
1) Physical Layer
3) Network Layer
1) Physical Layer
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)
1) Physical Layer
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%
14
Everything Needed to Connect Devices Together
Components of router
Router Ethernet
Gigabit Ethernet
RAM LAN
10 Gigabit Ethernet
ROM Serial
WAN
Flash ISDN
NVRAM Console
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
application
transport
network
enterprise link
network physical
Forwarding table
Range of IP
v w
0 1 Addresses to be Forwarding Port
u reached
3 2
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) }
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
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
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
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
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
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
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
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
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
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
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
v 3 w
2 5
u 2 1 z
3
1 2
x y
1
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)
5 uwxvyz v