Lesson 07
Lesson 07
• Address mapping
• Routing algorithms
• Routing protocols
2
Network Address Mapping
local network
(e.g., home network)
192.0.0.0/24 192.0.0.1
Internet
192.0.0.4
192.0.0.2
138.76.29.7
192.0.0.3
Public IP
All packets leaving local Private IP’s
network have same single source Packets with source or
NAT IP address: 138.76.29.7, destination in this network
different source port numbers have 192.0.0/24 address for
source, destination (as usual)
3
Network Address Translation/ Mapping
4
Network Addressing
Two type of addresses: IPv4 addresses
IPv6 addresses
IPv4 addresses:
An IPv4 address has the format x.x.x.x, where x is called an octet and
must be a decimal value between 0 and 255.
Ex:
• 92.21.33.4
• 81.102.103.104
5
Network Addressing
IPv6 addresses:
IPv6 address consists of 8 groups , there are 4 digits and each digit can
be created with 4 bits.
with these numbers:
The address become 8 x 4 x 4 bit = 128 bits.
6
IPv6 addresses structure:
7
formats of IPv6 addresses:
8
1. Pure - IPv6 format
Ex of IPv6 addresses:
2001:db8:3333:4444:5555:6666:7777:8888
2001:db8:3333:4444:CCCC:DDDD:EEEE:FFFF
9
2. Dual - IPv6 plus IPv4 formats
An IPv6 (dual) address combines an IPv6 and IPv4 address and has the
following format: y:y:y:y:y:y:x.x.x.x
The IPv6 portion of the address (indicated with y's) is always at the
beginning, followed by the IPv4 portion (indicated with x's).
EX addresses:
2001:db8:3333:4444:5555:6666:10.21.62.4
10
What is Routing?
● Forwarding: move packets from router’s input port to the suitable
router output port.
● Routing: determine the optimum path taken by packets as they flow
from a sender to a receiver
● Routing algorithms run inside routers
● Routers have a destination address-based forwarding table
11
Routing and Forwarding
12
Routing vs Switching
13
Router vs L3 switch
• Routers connect
multiple LANs into
wide area networks Inter-VLAN
(WANs). Routing
(Same data link layer)
14
Router vs L3 switch
16
Distance Vector Algorithm
• With the Distance Vector Routing algorithm, the nodes contains the
routing information in distance table.
• Each router is distributed the distance to each node, router receives
that information from one or more.
• Each router maintains a distance table known as Vector
17
Link State Algorithm
• Each node independently calculates the next best logical path from it to
every possible destination in the network.
18
Path Vector Algorithm
19
Routing protocols
20
RIP
21
Open Shortest Path First (OSPF) Protocol
• OSPF is an Open protocol, i.e. publicly available and uses Shortest Path First
(SPF) algorithm to compute the optimal path to destination.
22
BGP - Border Gateway Protocol
23
ICMP: Internet Control Message Protocol
24
Typical ICMP messages
Code Description
0 0 Echo reply [Tool: Ping]
3 0 Destination network unreachable
3 1 Destination host unreachable
3 2 Destination protocol unreachable
3 3 Destination port unreachable
3 4 Fragmentation needed [Tool: PMTU]
3 6 Destination network unknown
3 7 Destination host unknown
26
Other Routing protocols:
• ARP
• RARP
27
Other Routing protocols:
• BOOTP
• DHCP
28
Thanks!