You are on page 1of 50

Introduction aux réseaux

PRÉPARÉ PAR:

Année universitaire: 2021-2022


1
Routing Basics

The term routing refers to taking a packet from one device and sending it through the network to another
device on a different network.

Routing is irrelevant if your network has no routers because their job is to route traffic to all the networks in
your internetwork, but this is rarely the case! So here’s an important list of the minimum factors a router
must know to be able to affectively route packets:

• Destination address
• Neighbor routers from which it can learn about remote networks
• Possible routes to all remote networks
• The best route to each remote network
• How to maintain and verify routing information

2
Routing Basics

3
Routing Basics
Configuring IP Routing

Figure shows three routers: Corp, SF, and LA. Remember that, by default, these routers only
know about networks that are directly connected to them.

4
Routing Basics
Configuring IP Routing

Adressage

Corp
• Serial 0/0: 172.16.10.1/30
• Serial 0/1: 172.16.10.5/30
• Fa0/0: 10.10.10.1/24
SF
• S0/0/0: 172.16.10.2/30
• Fa0/0: 192.168.10.1/24
LA
• S0/0/0: 172.16.10.6/30
• Fa0/0: 192.168.20.1/24

5
Routing Basics
Configuring IP Routing
Corp Configuration
Router>en
Router#config t
Router(config)#hostname Corp
Corp(config)#enable secret GlobalNet
Corp(config)#no ip domain-lookup
Corp(config)#int f0/0
Corp(config-if)#desc Connection to LAN BackBone
Corp(config-if)#ip address 10.10.10.1 255.255.255.0
Corp(config-if)#no shut
Corp(config-if)#int s0/0
Corp(config-if)#desc WAN connection to SF
Corp(config-if)#ip address 172.16.10.1 255.255.255.252
Corp(config-if)#no shut
Corp(config-if)#int s0/1
Corp(config-if)#desc WAN connection to LA
Corp(config-if)#ip address 172.16.10.5 255.255.255.252
Corp(config-if)#no shut
6
Routing Basics
Configuring IP Routing
Corp Configuration
Corp(config-if)#line con 0
Corp(config-line)#password console
Corp(config-line)#login
Corp(config-line)#loggin sync
Corp(config-line)#exit
Corp(config)#line vty 0 ?
<1-181> Last Line number<cr>
Corp(config)#line vty 0 181
Corp(config-line)#password telnet
Corp(config-line)#login
Corp(config-line)#exit
Corp(config)#banner motd # This is my Corp Router #
Corp(config)#^Z
Corp#copy run start
Destination filename [startup-config]?
Building configuration...
[OK]
Corp# [OK] 7
Routing Basics
Configuring IP Routing

To view the IP routing tables created on a Cisco router, use the command show ip route. Here’s the command’s
output:
Corp#sh ip route

Let’s take a look at our configuration of the interfaces with the following two commands:
Corp#sh run

Corp#sh ip int brief

8
Routing Basics
Configuring IP Routing

SF Configuration

Router#config t
Router(config)#hostname SF
SF(config)#enable secret GlobalNet
SF(config)#no ip domain-lookup
SF(config)#int s0/0/0
SF(config-if)#desc WAN Connection to Corp
SF(config-if)#ip address 172.16.10.2 255.255.255.252
SF(config-if)#no shut
SF(config-if)#clock rate 1000
SF(config-if)#int f0/0
SF(config-if)#desc SF LAN
SF(config-if)#ip address 192.168.10.1 255.255.255.0
SF(config-if)#no shut

9
Routing Basics
Configuring IP Routing

SF Configuration

SF(config-if)#line con 0
SF(config-line)#password console
SF(config-line)#login
SF(config-line)#logging sync
SF(config-line)#exit
SF(config)#line vty 0 ?
<1-1180> Last Line number<cr>
SF(config)#line vty 0 1180
SF(config-line)#password telnet
SF(config-line)#login
SF(config-line)#banner motd #This is the SF Branch router#
SF(config)#exit
SF#copy run start

10
Routing Basics
Configuring IP Routing

SF Configuration

SF(config-if)#line con 0
SF(config-line)#password console
SF(config-line)#login
SF(config-line)#logging sync
SF(config-line)#exit
SF(config)#line vty 0 ?
<1-1180> Last Line number<cr>
SF(config)#line vty 0 1180
SF(config-line)#password telnet
SF(config-line)#login
SF(config-line)#banner motd #This is the SF Branch router#
SF(config)#exit
SF#copy run start

11
Routing Basics
Configuring IP Routing

To view the IP routing tables created on a Cisco router, use the command show ip route. Here’s the command’s
output:
SF#sh ip route
Corp#sh ip route

Let’s take a look at our configuration of the interfaces with the following two commands:
SF#sh run

SF#sh ip int brief

12
Routing Basics
Configuring IP Routing

LA Configuration

Router(config)#hostname LA
LA(config)#enable secret GlobalNet
LA(config)#no ip domain-lookup
LA(config)#int s0/0/1
LA(config-if)#ip address 172.16.10.6 255.255.255.252
LA(config-if)#no shut
LA(config-if)#clock rate 1000
LA(config-if)#description WAN To Corporate
LA(config-if)#int f0/0
LA(config-if)#ip address 192.168.20.1 255.255.255.0
LA(config-if)#no shut

13
Routing Basics
Configuring IP Routing

LA Configuration

LA(config-if)#description LA LAN
LA(config-if)#line con 0
LA(config-line)#password console
LA(config-line)#login
LA(config-line)#loggin sync
LA(config-line)#exit
LA(config)#line vty 0 ?
<1-1180> Last Line number <cr>
LA(config)#line vty 0 1180
LA(config-line)#password telnet
LA(config-line)#login
LA(config-line)#exit
LA(config)#banner motd #This is my LA Router#
LA(config)#exit
LA#copy run start
14
Routing Basics
Configuring IP Routing

Configuring DHCP on Our Corp Router

Corp#config t
Corp(config)#ip dhcp excluded-address 192.168.10.1
Corp(config)#ip dhcp excluded-address 192.168.20.1
Corp(config)#ip dhcp pool SF_LAN
Corp(dhcp-config)#network 192.168.10.0 255.255.255.0
Corp(dhcp-config)#default-router 192.168.10.1
Corp(dhcp-config)#dns-server 4.4.4.4
Corp(dhcp-config)#exit
Corp(config)#ip dhcp pool LA_LAN
Corp(dhcp-config)#network 192.168.20.0 255.255.255.0
Corp(dhcp-config)#default-router 192.168.20.1
Corp(dhcp-config)#dns-server 4.4.4.4
Corp(dhcp-config)#exit
Corp(config)#exit
Corp#copy run start
15
Routing Basics
Configuring IP Routing

Configuring DHCP on Our Corp Router

Well, the hosts are remote across a router, so what would I need to do that would allow them to get an address
from a DHCP server? If you concluded that I’ve got to configure the SF and LA F0/0 interfaces to forward the
DHCP client requests to the server.

Here’s how we’d go about doing that:


LA#config t
LA(config)#int f0/0
LA(config-if)#ip helper-address 172.16.10.5
SF#config t
SF(config)#int f0/0
SF(config-if)#ip helper-address 172.16.10.1

16
Routing Basics
Configuring IP Routing

Configuring Static Routing in Corp

Corp#config t
Corp(config)#ip route 192.168.10.0 255.255.255.0 172.16.10.2 150
Corp(config)#ip route 192.168.20.0 255.255.255.0 s0/1 150
Corp(config)#do show run

Corp(config)#do show ip route

17
Routing Basics
Configuring IP Routing

Configuring Static Routing in SF

SF(config)#ip route 10.10.10.0 255.255.255.0 172.16.10.1 150


SF(config)#ip route 172.16.10.4 255.255.255.252 172.16.10.1 150
SF(config)#ip route 192.168.20.0 255.255.255.0 172.16.10.1 150
SF(config)#do show run

SF(config)#do show ip route

18
Routing Basics
Configuring IP Routing

Configuring Static Routing in LA

LA#config t
LA(config)#ip route 10.10.10.0 255.255.255.0 172.16.10.5 150
LA(config)#ip route 172.16.10.0 255.255.255.252 172.16.10.5 150
LA(config)#ip route 192.168.10.0 255.255.255.0 172.16.10.5 150
LA(config)#do show run

LA(config)#do sho ip route

19
Routing Basics
Configuring IP Routing

Verifying Your Configuration

Corp#ping 192.168.10.1
Corp#ping 192.168.20.1

SF_PC(config)#int e0
SF_PC(config-if)#ip address dhcp
SF_PC(config-if)#no shut

LA_PC(config)#int e0
LA_PC(config-if)#ip addr dhcp
LA_PC(config-if)#no shut

Corp#sh ip dhcp binding


Corp#sh ip dhcp pool SF_LAN
Corp#sh ip dhcp conflict

20
Routing Basics
Configuring IP Routing

Avantages et inconvenients du routage statique

21
Routing Basics
Configuring IP Routing
Routage Dynamique

Routes dynamiques automatiquement:


• Découvrir les réseaux distants

• Assurer l'actualisation des informations

• Sélectionner le chemin le plus approprié


vers un réseau de destination
• Trouver de nouveaux meilleurs chemins
lorsqu'il y a une modification de
topologie
Le routage dynamique peut également
partager des routes statiques par défaut
avec les autres routeurs.

22
Routing Basics
Configuring IP Routing

Avantages et inconvenients du routage dynamique

23
Routing Basics
Configuring IP Routing

Comparaison entre routage statique et dynamique

24
Routing Basics
Configuring IP Routing

Administrative Distances
The administrative distance (AD) is used to rate the trustworthiness of routing information received on a
router from a neighbor router. An administrative distance is an integer from 0 to 255, where 0 is the
most trusted and 255 means no traffic will be passed via this route.
Route Source Administrative Distance
Directly connected 0
Static route 1
EIGRP summary route 5
External BGP 20
Internal EIGRP 90
OSPF 110
IS-IS 115
RIP 120
External EIGRP 170
Internal BGP 200 25
Routing Basics
Configuring IP Routing

Routing Information Protocol (RIP)

Routing Information Protocol (RIP) is a true distance-vector routing protocol. RIP sends the
complete routing table out of all active interfaces every 30 seconds.
It relies on hop count to determine the best way to a remote network, but it has a maximum
allowable hop count of 15 by default, so a destination of 16 would be considered unreachable.
RIP works okay in very small networks, but it’s super inefficient on large networks with slow WAN
links or on networks with a large number of routers installed and completely useless on networks
that have links with variable bandwidths!

26
Routing Basics
Configuring IP Routing

Configuring Dynamic Routing RIP in Corp

Corp#config t
Corp(config)#router rip
Corp(config-router)#network 10.0.0.0
Corp(config-router)#network 172.16.0.0
Corp(config-router)#version 2
Corp(config-router)#no auto-summary

27
Routing Basics
Configuring IP Routing

Configuring Dynamic Routing RIP in LA

SF#config t
SF(config)#router rip
SF(config-router)#network 192.168.10.0
SF(config-router)#network 172.16.0.0
SF(config-router)#version 2
SF(config-router)#no auto-summary
SF(config-router)#do show ip route

28
Routing Basics
Configuring IP Routing

Configuring Dynamic Routing RIP in SF

LA#config t
LA(config)#no ip route 0.0.0.0 0.0.0.0
LA(config)#router rip
LA(config-router)#network 192.168.20.0
LA(config-router)#network 172.16.0.0
LA(config-router)#no auto
LA(config-router)#vers 2
LA(config-router)#do show ip route

29
Routing Basics
Configuring IP Routing

Open Shortest Path First (OSPF) Basics

Open Shortest Path First is an open standard routing protocol that’s been implemented by a wide variety of
network vendors, including Cisco. And it’s that open standard characteristic that’s the key to OSPF’s
flexibility and popularity.

Here’s a list that summarizes some of OSPF’s best features:


• Allows for the creation of areas and autonomous systems
• Minimizes routing update traffic
• Is highly flexible, versatile, and scalable
• Supports VLSM/CIDR
• Offers an unlimited hop count

30
Routing Basics
Configuring IP Routing
Open Shortest Path First (OSPF) Basics

31
Routing Basics - Open Shortest Path First (OSPF) Basics
Configuring IP Routing

OSPF Terminology
Link A link is a network or router interface assigned to any given network. When an interface is added to the
OSPF process, it’s considered to be a link. This link, or interface, will have up or down state information
associated with it as well as one or more IP addresses.
Router ID The router ID (RID) is an IP address used to identify the router. Cisco chooses the router ID by
using the highest IP address of all configured loopback interfaces. If no loopback interfaces are configured
with addresses, OSPF will choose the highest IP address out of all active physical interfaces.
Neighbor Neighbors are two or more routers that have an interface on a common network, such as two
routers connected on a point-to-point serial link. OSPF neighbors must have a number of common
configuration options to be able to successfully establish a neighbor relationship, and all of these options
must be configured exactly the same way:
• Area ID
• Stub area flag
• Authentication password (if using one)

32
Routing Basics - Open Shortest Path First (OSPF) Basics
Configuring IP Routing

OSPF Terminology
Adjacency An adjacency is a relationship between two OSPF routers that permits the direct exchange of route
updates. Unlike EIGRP, which directly shares routes with all of its neighbors, OSPF is really picky about sharing
routing information and will directly share routes only with neighbors that have also established adjacencies.
And not all neighbors will become adjacent—this depends upon both the type of network and the
configuration of the routers. In multi-access networks, routers form adjacencies with designated and backup
designated routers. In point-to-point and point-to-multipoint networks, routers form adjacencies with the
router on the opposite side of the connection.

Designated router A designated router (DR) is elected whenever OSPF routers are connected to the same
broadcast network to minimize the number of adjacencies formed and to publicize received routing
information to and from the remaining routers on the broadcast network or link. Elections are won based
upon a router’s priority level, with the one having the highest priority becoming the winner. If there’s a tie,
the router ID will be used to break it. All routers on the shared network will establish adjacencies with the DR
and the BDR, which ensures that all routers’ topology tables are synchronized.

Backup designated router A backup designated router (BDR) is a hot standby for the DR on broadcast, or
multi-access, links. The BDR receives all routing updates from OSPF adjacent routers but does not disperse LSA
updates. 33
Routing Basics - Open Shortest Path First (OSPF) Basics
Configuring IP Routing
OSPF Terminology

34
Routing Basics - Open Shortest Path First (OSPF) Basics
Configuring IP Routing
OSPF Terminology

• Paquet Hello : Permet d'établir et de maintenir la contiguïté avec d'autres routeurs OSPF.
• Paquet DBD (Database Description) : description de base de données. Contient une liste abrégée de la LSDB du
routeur expéditeur et est utilisé par les routeurs destinataires à des fins de comparaison avec la LSDB locale. La
LSDB doit être identique sur tous les routeurs à état de liens au sein d’un secteur pour créer une arborescence SPF
précise.
• Paquet LSR (Link-State Request) : pour demander l'état de liens.
• Paquet LSU (Link-State Update) : Utilisé pour répondre aux paquets LSRs et pour annoncer de
nouvelles informations ( mise à jour d'état de liens).
• Paquet LSAck (Link-State Acknowledgment) : Lorsqu'un paquet LSU est reçu, le routeur envoie un
paquet LSAck pour confirmer la réception du paquet LSU (d'accusé de réception d'état de liens).

Ces paquets servent à détecter les routeurs voisins et à échanger des informations de routage pour garantir l'exactitude
des informations relatives au réseau.

35
Routing Basics - Open Shortest Path First (OSPF) Basics
Configuring IP Routing
OSPF Terminology

OSPF areas An OSPF area is a grouping of contiguous networks and routers. All routers in the same
area share a common area ID. Because a router can be a member of more than one area at a time, the
area ID is associated with specific interfaces on the router. This would allow some interfaces to belong
to area 1 while the remaining interfaces can belong to area 0. All of the routers within the same area
have the same topology table. When configuring OSPF with multiple areas, you’ve got to remember
that there must be an area 0 and that this is typically considered the backbone area. Areas also play a
role in establishing a hierarchical network organization—something that really enhances the scalability
of OSPF

36
Routing Basics - Open Shortest Path First (OSPF) Basics
Configuring IP Routing
OSPF Terminology
Broadcast (multi-access) Broadcast (multi-access) networks such as Ethernet allow multiple devices to
connect to or access the same network, enabling a broadcast ability in which a single packet is delivered to
all nodes on the network. In OSPF, a DR and BDR must be elected for each broadcast multi-access network.

Nonbroadcast multi-access Nonbroadcast multi-access (NBMA) networks are networks such as Frame Relay,
X.25, and Asynchronous Transfer Mode (ATM). These types of networks allow for multi-access without
broadcast ability like Ethernet. NBMA networks require special OSPF configuration to function properly.

Point-to-point Point-to-point refers to a type of network topology made up of a direct connection between
two routers that provides a single communication path. The point-to point connection can be physical logical,
where two routers thousands of miles apart are connected by a circuit in a Frame Relay network. Either way,
point-to-point configurations eliminate the need for DRs or BDRs.

37
Routing Basics - Open Shortest Path First (OSPF) Basics
Configuring IP Routing

Algorithme : Le processeur traite les tables de


voisinage et de topologie à l'aide de l'algorithme SPF de
Dijkstra. L'algorithme SPF est basé sur le coût cumulé
permettant d'atteindre une destination.

Fonctionnement des états de liens

Les routeurs échangent ensuite des paquets LSA. Les LSA


contiennent l'état et le coût de chaque lien connecté
directement. Les routeurs transmettent leurs LSA aux
voisins contigus. Les voisins contigus recevant des LSA les
diffusent immédiatement aux autres voisins connectés
directement, jusqu'à ce que tous les routeurs de la zone
aient tous les LSA.

38
Routing Basics - Open Shortest Path First (OSPF) Basics
Configuring IP Routing

39
Routing Basics - Open Shortest Path First (OSPF) Basics
Configuring IP Routing
Configuring OSPF

Enabling OSPF

The easiest and also least scalable way to configure OSPF is to just use a single area. Doing this
requires a minimum of two commands.
The first command used to activate the OSPF routing process is as follows:
Router(config)#router ospf ?
<1-65535> Process ID
A value in the range from 1 to 65,535 identifies the OSPF process ID. It’s a unique number on
this router that groups a series of OSPF configuration commands under a specific running
process.

40
Routing Basics - Open Shortest Path First (OSPF) Basics
Configuring IP Routing
Configuring OSPF
Configuring OSPF Areas

Here’s an example of a basic OSPF configuration for you, showing our second minimum
command needed, the network command:
Router#config t
Router(config)#router ospf 1
Router(config-router)#network 10.0.0.0 0.255.255.255 area ?
<0-4294967295> OSPF area ID as a decimal value
A.B.C.D OSPF area ID in IP address format
Router(config-router)#network 10.0.0.0 0.255.255.255 area 0

Router(config-router)# sh ip ospf
Router(config-router)# sh ip ospf int f0/0
Router(config-router)# sh ip ospf neighbor

41
Routing Basics - Open Shortest Path First (OSPF) Basics
Configuring IP Routing
Configuring OSPF

Configuring OSPF Areas


Let’s use Figure as an example and configure that network with OSPF using wildcards to
make sure you have a solid grip on this. The figure shows a three-router network

42
Routing Basics - Open Shortest Path First (OSPF) Basics
Configuring IP Routing
Configuring OSPF

Lab_A#config t
Lab_A(config)#router ospf 1
Lab_A(config-router)#network 192.168.10.64 0.0.0.7 area 0
Lab_A(config-router)#network 10.255.255.80 0.0.0.3 area 0
Lab_A# sh ip ospf

Lab_B#config t
Lab_B(config)#router ospf 1
Lab_B(config-router)#network 192.168.10.48 0.0.0.7 area 0
Lab_B(config-router)#network 10.255.255.80 0.0.0.3 area 0
Lab_B(config-router)#network 10.255.255.8 0.0.0.3 area 0

Lab_C#config t
Lab_C(config)#router ospf 1
Lab_C(config-router)#network 192.168.10.16 0.0.0.7 area 0
Lab_C(config-router)#network 10.255.255.8 0.0.0.3 area 0

43
Routing Basics
Configuring IP Routing
EIGRP

Le protocole EIGRP est parfois appelé protocole de routage hybride ou protocole de vecteur de distance
avancé, car il présente à la fois des caractéristiques de protocoles de vecteur de distance et de certains
protocoles d'état de liaison. Par exemple, EIGRP n'envoie pas de paquets d'état de liaison comme le fait
OSPF. Au lieu de cela, il envoie des mises à jour traditionnelles de vecteur de distance qui incluent des
informations sur les réseaux plus le coût de les atteindre du point de vue du routeur publicitaire.

L'EIGRP possède également des caractéristiques d'état de liaison: il synchronise les informations de
topologie réseau entre voisins au démarrage, puis envoie des mises à jour spécifiques uniquement lorsque
des modifications de topologie se produisent (mises à jour limitées). Cette caractéristique particulière est
un énorme progrès sur RIP et est une grande raison pour laquelle EIGRP fonctionne si bien dans les très
grands réseaux.

44
Routing Basics
Configuring IP Routing
EIGRP

Le protocole EIGRP (Enhanced Interior Gateway


Routing Protocol) est un protocole de routage à
vecteur de distance avancé développé par Cisco. Il
prend en charge VLSM et CIDR. Le protocole EIGRP
est une version améliorée d'un autre protocole de
routage Cisco, IGRP (Interior Gateway Routing
Protocol). IGRP est un ancien protocole de routage à
vecteur de distance, par classe, il est le premier protocole
de routage IPv4 propriétaire développé par Cisco en 1984. Il
diffuse les mises à jour de routage toutes les 90 secondes.
Devenu obsolète depuis IOS 12.3. En 1992, le protocole
IGRP a été remplacé par le protocole EIGRP.

45
Routing Basics
Configuring IP Routing

Types de paquets EIGRP

Les paquets Hello EIGRP sont envoyés en Multicast IPv4 ou IPv6 via le mode d'acheminement RTP
(Realibal Transport protocol) non fiable. Autrement dit, le destinataire n'a pas besoin de renvoyer un
paquet de reçu.
46
Routing Basics
Configuring IP Routing

EIGRP
Propriétés:

• Administrative distance = 90
• Utilise un dual algorithme
• Simple
• Convergence rapide
• Utilise le load balancing

47
Routing Basics
Configuring IP Routing

EIGRP

48
Routing Basics
Configuring IP Routing

EIGRP

Corp#config t
Corp(config)#router eigrp 20
Corp(config-router)#network 172.16.0.0
Corp(config-router)#network 10.0.0.0

Or

Corp#config t
Corp(config)#router eigrp 20
Corp(config-router)#network 10.10.11.0 0.0.0.255
Corp(config-router)#network 172.16.10.0 0.0.0.3
Corp(config-router)#network 172.16.10.4 0.0.0.3

49
Routing Basics
Configuring IP Routing

EIGRP

SF(config)#router eigrp 20
SF(config-router)#network 172.16.0.0
SF(config-router)#network 10.0.0.0

NY(config)#router eigrp 20
NY(config-router)#network 172.16.0.0
NY(config-router)#network 10.0.0.0

50

You might also like