0% found this document useful (0 votes)
6 views68 pages

Routing & switching Vol2

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)
6 views68 pages

Routing & switching Vol2

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/ 68

ADVANCED

Switching & Routing


CONNEXIONS WAN
Types de connexion WAN
Layer 1
Synchronous serial
Leased Line

Asynchronous serial,
ISDN Layer 1

Telephone
Circuit-switched Company

Synchronous serial

Packet-switched Service
Provider
Serial Point-to-Point
Connections
Router connections
End user
device

DTE

CSU/
DSU
DCE
Service
Provider
EIA/TIA-232 EIA/TIA-449 V.35 X.21 EIA-530
Network connections at the CSU/DSU
Type d’Encapsulation
Protocols: Layer 2
HDLC, PPP, SLIP
Leased Line

X.25, Frame Relay, ATM

Packet-switched Service
Provider

PPP, SLIP, HDLC


Circuit-switched Telephone
Company
HDLC Command

Router(config-if)#encapsulation hdlc

• Enable hdlc encapsulation


• HDLC is the default encapsulation on
synchronous serial interfaces
An Overview of PPP
Multiple protocol
encapsulations using
NCPs in PPP

TCP/IP PPP Encapsulation


Novell IPX
AppleTalk

Link setup and control


using LCP in PPP

• PPP can carry packets from several protocol suites using


Network Control Programs
• PPP controls the setup of several link options using LCP
PPP LCP Configuration Options
Feature How It Operates Protocol

Require a password PAP


Authentication
Perform Challenge Handshake CHAP
Compress data at source; Stacker or
Compression reproduce data at Predictor
destination
Error Monitor data dropped on link Quality
Detection
Avoid frame looping Magic Number

Multilink Load balancing across Multilink


multiple links Protocol (MP)
PPP Authentication Overview

Dialup or
Circuit-Switched
Network

PPP Session Establishment


1 Link Establishment Phase
2 Optional Authentication Phase
3 Network-Layer Protocol Phase

•Two PPP authentication protocols:


PAP and CHAP
Selecting a PPP Authentication
Protocol
Remote Router PAP Central-Site Router
(SantaCruz) 2-Way Handshake (HQ)

“santacruz,
“santacruz, boardwalk”
boardwalk”

Accept/Reject
Accept/Reject

Hostname: santacruz username santacruz


Password: boardwalk password boardwalk

• Passwords sent in clear text


• Peer in control of attempts
Selecting a PPP Authentication
Protocol (cont.)
CHAP
Remote Router Central-Site Router
(SantaCruz) 3-Way Handshake (HQ)
Challenge
Challenge

Response
Response

Hostname: santacruz Accept/Reject


Accept/Reject username santacruz
Password: boardwalk password boardwalk

•Use “secret” known only to authenticator and


peer
Configuring PPP and
Authentication Overview
Verify who
you are.
Service
Provider

Authenticating Router Router to Be Authenticated


(The router that received the call.) (The router that initiated the call.)

Enabling PPP Enabling PPP

9 ppp encapsulation 9 ppp encapsulation


Enabling PPP Authentication Enabling PPP Authentication
9 hostname 9 hostname
9 username / password 9 username / password
9 ppp authentication 9 ppp authentication
Configuring PPP

Router(config-if)#encapsulation ppp
• Enable PPP encapsulation
Configuring PPP
Authentication

Router(config)#hostname name

• Assigns a host name to your router

Router(config)#username name password password

• Identifies the username and password of


authenticating router
Configuring PPP
Authentication
(cont.)

Router(config-if)#ppp authentication
{chap | chap pap | pap chap | pap}

• Enables PAP and/or CHAP authentication


Configuring CHAP Example

Left Right
PSTN/ISDN
router router

•• hostname
hostname left
left hostname
hostname right
right
•• username
username right
right password
password sameone
sameone username
username left
left password
password sameone
sameone
•• !! !!
•• int
int serial
serial 00 int
int serial
serial 00
•• ip
ip address
address 10.0.1.1
10.0.1.1 255.255.255.0
255.255.255.0 ip
ip address
address 10.0.1.2
10.0.1.2 255.255.255.0
255.255.255.0
•• encapsulation
encapsulation ppp
ppp encapsulation
encapsulation ppp
ppp
•• ppp
ppp authentication
authentication CHAP
CHAP ppp
ppp authentication
authentication CHAP
CHAP
Verifying HDLC and PPP
Encapsulation Configuration
Router#show interface s0
Serial0 is up, line protocol is up
Hardware is HD64570
Internet address is 10.140.1.2/24
MTU 1500 bytes, BW 1544 Kbit, DLY 20000 usec, rely 255/255, load 1/255
Encapsulation PPP, loopback not set, keepalive set (10 sec)
LCP Open
Open: IPCP, CDPCP
Last input 00:00:05, output 00:00:05, output hang never
Last clearing of "show interface" counters never
Queueing strategy: fifo
Output queue 0/40, 0 drops; input queue 0/75, 0 drops
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
38021 packets input, 5656110 bytes, 0 no buffer
Received 23488 broadcasts, 0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
38097 packets output, 2135697 bytes, 0 underruns
0 output errors, 0 collisions, 6045 interface resets
0 output buffer failures, 0 output buffers swapped out
482 carrier transitions
DCD=up DSR=up DTR=up RTS=up CTS=up
PROTOCOLES DE
ROUTAGE
• Technologie
• Implémentation
• RIP et Routes statiques
• OSPF
Le Routage
10.120.2.0 172.16.1.0

Pour router, un routeur a besoin de :


„ Adresses Destination
„ Adresses Sources
„ Les routes possibles
„ La meilleure route
„ Maintenir et vérifier l’information du routage
Identification des routes
statiques et dynamiques

Static Route Dynamic Route


Uses a route that a Uses a route that a
network administrator network routing protocol
enters into the router adjusts automatically for
manually topology or traffic
changes
Routes Statiques
Stub Network

172.16.1.0
SO
Network A B
B
172.16.2.2 172.16.2.1

Configure unidirectional static routes to and from a stub


network to allow communications to occur.
Configuration de Route statique

Router(config)#ip route network [mask]


{address | interface}[distance] [permanent]
Exemple de Route statique

Stub Network

172.16.1.0
SO
Network
10.0.0.0 A B
B
172.16.2.2 172.16.2.1

ip route 172.16.1.0 255.255.255.0 172.16.2.1

– C’est une route unidirectionnelle. Vous devez avoir une route


similaire en face
Routes par défaut
Stub Network

172.16.1.0
SO
Network
10.0.0.0 A BB
172.16.2.2 172.16.2.1

ip route 0.0.0.0 0.0.0.0 172.16.2.2


Protocoles Distance Vecteur

C A

Distance—How
Distance—How farfar
Vector—In
Vector—In which
which direction
direction D

D C B A

Routing
Routing Routing
Routing Routing
Routing Routing
Routing
Table
Table Table
Table Table
Table Table
Table

Pass periodic copies of routing table to neighbor


routers and accumulate distance vectors
A’s RIP Routing Table

RIP Network Gateway Type


10.31.4.0 0.0.0.0 Direct
207.95.8.0 0.0.0.0 Direct
10.31.4.0
207.95.10.0 0.0.0.0 Direct
e3
10.31.3.0 207.95.10.1 RIP
.1 A .2 10.31.2.0 207.95.8.2 RIP
e1 e2 207.95.9.0 207.95.10.2 RIP
.0
.8

20
5
.9

7.
7

95
20

•Distance Vector

.1
0.
0
.2 .1 •30 second updates
•Metric is hop count
B C
•Loop avoidance
207.95.9.0
10.31.2.0 10.31.3.0
•Hold down
•Split Horizon
•Poison Reverse
Exemple de Configuration
RIP
E0 S2 S2 S3 S3 E0
172.16.1.0 A 192.168.1.0
B C
172.16.1.1 10.1.1.1 10.1.1.2 10.2.2.2 10.2.2.3 192.168.1.1

router rip router rip


2.3.0.0
Version 2 Version 2.3.0.0
2
No auto-summary No auto-summary
network 172.16.0.0 network 192.168.1.0
network 10.0.0.0 network 10.0.0.0
router rip
Version 2
No auto-summary
network 10.0.0.0
Redistribution Statique/RIP
• Redistribution des routes statiques pour
qu’elles soient diffusées dans les routes
RIP
• Utilisation de la commande:
router(config-router)#redistribute static
OSPF
• Technologie
• Implémentation
– Single et Multi area
• Redistribution RIP/OSPF
OSPF Open Shortest Path
First
– Link State Protocol
– Has fast convergence
– Supports VLSM
– Processes updates efficiently
– Selects paths based on bandwidth
– Supports equal-cost multipath
OSPF - Terminologie
Autonomous System

Neighbors
Interfaces
Area 1 Cost = 10
Area 0
Token
Ring
Cost = 6

Neighborship Topology Routing


Database Database Table
Lists Neighbors Lists All Routes Lists Best Routes
OSPF - Topologies

Broadcast
Multiaccess

Point-to-Point

NBMA X.25
Frame Relay
Neighborship – Topologie
LAN
D
D E
E

Hello

B
B A
A C
C
Router ID
afadjfjorqpoeru
39547439070713
Hello/dead intervals
Neighbors
*
Area-ID*
Router priority
Hello DR IP address
BDR IP address
Authentication password
Stub area flag *
*
* Entry must match on neighboring routers
DR et BDR – Topologie LAN

DR BDR

– Hellos elect DR and BDR to represent segment


– Each router then forms adjacency with DR and
BDR
Processus d’Echange
172.16.5.1/24 172.16.5.2/24
A E0 E1 B
Down State

I am router ID 172.16.5.1 and I see no one.

Init State

Router B
Neighbors List
172.16.5.1/24, int E1

I am router ID 172.16.5.2, and I see 172.16.5.1.

Router A
Neighbors List
172.16.5.2/24, int E0
Two-Way State
Processus de Découverte (1)
DR
E0 E0
172.16.5.1 172.16.5.3
afadjfjorqpoeru
Exstart State
39547439070713

Hello I will start exchange because I have router ID 172.16.5.1.


afadjfjorqpoeru
39547439070713

No, I will start exchange because I have a


higher router ID. Hello

Exchange State afadjfjorqpoeru


39547439070713

Here is a summary of my link-state database.


DBD
afadjfjorqpoeru
39547439070713

DBD Here is a summary of my link-state database.


Processus de Découverte (2)

DR
E0 E0
172.16.5.1 172.16.5.3
afadjfjorqpoeru
39547439070713
afadjfjorqpoeru
39547439070713

LSAck Thanks for the information!


LSAck

afadjfjorqpoeru
39547439070713
Loading State

LSR I need the complete entry for network 172.16.6.0/24.

afadjfjorqpoeru
39547439070713

Here is the entry for network 172.16.6.0/24. LSU


afadjfjorqpoeru
39547439070713

LSAck Thanks for the information!


Full State
Shortest Path First algorithm

Also called Dijkstra’s algorithm


The goal is to find the topology in the
form of a shortest path tree (SPT)
From the SPT we build routing tables
„ also called Routing Information Base
Algorithme SPF
We maintain three lists
„ UNKNOWN list: all nodes start on this
list
„ TENTative
TENT list: all nodes we are currently
examining. Also called Candidate List
„ PATHS list: all nodes to which we have
calculated final paths. Also called known
list
Algorithme SPF (suite)

We execute N steps
Š typically N is the number of nodes in the
network. During each step we find the
path(s) to one node.
We initialise the computation by
moving ourselves to the TENT list
Algorithme SPF (suite)

At each step:

¾ Find the node amongst all nodes on TENT


that has the lowest cost, and move it from
TENT into PATHS

¾ Find all prefixes advertised by this node and


install them in the RIB

¾ Find all neighbours reachable from that node


and move them into TENT
SPF - Exemple de réseau

H
3 G
5
5
3 F
12 12
4 2
C D
E 3
3 7 3
8 S2
B 4 S3
S1
A
3
S0
SPF - Exemple

Initial situation
„ TENT: A
„ PATHS: empty
„ Unknown: BCDEFGH
Iteration 1
H
3 G
5 UNKNOWN
5 EFGH
3 F
12 12
4 2 TENT

C D D cost 3 via S3
E 3 C cost 7 via S2
B cost 3 via S0
3
8 7 3
S2 PATH
B 4 S3
S1 A
Unknown A
3 S0
TENT

PATHS
Iteration 2

H G
3
5 UNKNOWN
5 EFH
3 F
12 12
4 2 TENT

C D C cost 6 via S3,


E 3 B cost 3 via S0,
G cost 15 via S3
3
8 7 3
S2
B 4 S3 PATH
S1
Unknown A A
3 S0 D cost 3 via S3
TENT

PATHS
Iteration 3

H G
3
5 UNKNOWN
5 FH
3 F
12 12
4 2 TENT

C D C cost 6 via S3 & S0,


E
3 G cost 15 via S3,
E cost 11 via S0
3
8 7 3
S2 PATH
B 4 S3
S1
A A,
Unknown D cost 3 via S3,
3 S0 B cost 3 via S0
TENT

PATHS
Iteration 4

H G UNKNOWN
3
5 H
5
3 F

12 12 TENT
4 2 G cost 15 via S3,
E cost 11 via S0,
C D F cost 8 via S3 & S0
E
3
3
8 7 3
S2 PATH
B 4 S3
S1 A,
Unknown A D cost 3 via S3,
3 S0 B cost 3 via S0,
TENT C cost 6 via S3 & S0

PATHS
Iteration 5
H G UNKNOWN
3
5
H
5
3 F

12 12 TENT
4 2 G cost 13 via S3 & S0,
C D
E E cost 11 via S0
3
3
7 3 PATH
8 S2
S3 A,
B 4
S1 D cost 3 via S3,
Unknown A B cost 3 via S0,
3 S0
C cost 6 via S3 & S0,
F cost 8 via S3 & S0
TENT

PATHS
Iteration 6
UNKNOWN
H G
3 H
5
5
3 F
12 TENT
12
4 2 G cost 13 via S3 & S0

C D
E
3
3
8 7 3 PATH
S2
B 4 S3 A,
S1 D cost 3 via S3,
Unknown A B cost 3 via S0,
3 S0 C cost 6 via S3 & S0,
TENT F cost 8 via S3 & S0,
E cost 11 via S0
PATHS
Iteration 7
UNKNOWN
H G
3 H
5
5
3 F
12 TENT
12
4 2 EMPTY !!!

C D
E
3
3
8 7 3 PATH
S2
B 4 S3 A,
S1 D cost 3 via S3,
Unknown A B cost 3 via S0,
3 S0 C cost 6 via S3 & S0,
TENT F cost 8 via S3 & S0,
E cost 11 via S0
G cost 13 via S3 & S0
PATHS
Shortest Path First - Exemple
TENT is empty => iteration stops
¾ Result:A,
D cost 3 via S3,
B cost 3 via S0,
C cost 6 via S3 & S0,
F cost 8 via S3 & S0,
E cost 11 via S0,
G cost 13 via S3
¾We obviously didn’t find a path to H.
Shortest Path First - Exemple
The Shortest Path Tree
¾Not all links are used
¾Still if a change occurs in one of these
unused links, the full SPF algorithm
need G Cost: 13, NH: D
to be re-run
F Cost: 8, NH: D, B

C Cost: 6, NH: D, B D Cost: 3, NH:


E Cost: 11, NH: B D

S2
B Cost: 3, NH: S3
B S1

A Cost: 0, NH: -
S0 -
Choix des Routes
10.1.1.0/24 10.2.2.0/24 10.3.3.0/24
Token
A Ring B C
FDDI
Cost=6
Cost=1

Cost=10
10.4.4.0/24

Topology Table
Net Cost Out Interface
10.2.2.0 6 To0
10.3.3.0 7 To0
This is the best route to 10.3.3.0.
10.3.3.0 10 E0
Point-to-Point Neighborship

– Router dynamically detects its neighboring router


using the Hello protocol
– No election: Adjacency is automatic as soon as
the two routers can communicate
– OSPF packets are always sent as multicast
224.0.0.5
OSPF – Configuration
1. Enable OSPF globally
2. Assign a network an
Area 0 OSPF Area

E2

Router(config)#router ospf 1
Router(config-router)#network 10.0.0.0 0.0.0.255 area 0
OSPF en Multi-Area -
Terminologie
Routers LSAs Areas
afadjfjorqpoeru
39547439070713

Area 0
Internal Type 1
I am a backbone.
afadjfjorqpoeru
39547439070713

Type 2
ABR Area 1
I am standard.
afadjfjorqpoeru
39547439070713

Type 3/4

ASBR
afadjfjorqpoeru
39547439070713 Area 2
I am a stub.
Type 5

Backbone
Types de Link-State
Advertisements (LSA)
– Type 1: Router link entry
– Type 2: Network link entry
– Type 3 and 4: Summary link
entry
– Type 5: AS external link entry
– Type 7: NSSA external link
entry
Types d’ Area OSPF
Internet
Area 2
BGP
Stub

Area 1
Normal Area 3
Area 0 VL Normal
Backbone
Normal - accepts all LSAs
Stub - doesn’t accept
External LSAs
NSSA – like stubby except can
pass external routes one way &
be end point of virtual-link RIP Area 4
Domain NSSA
Types de routeurs OSPF
Area 1 Backbone Area 0 Area 2

Internal
Routers

Internal
Routers

External
AS
Types de routeurs OSPF
(suite)
Area 1 Backbone Area 0 Area 2

Backbone/
Internal
Internal Routers
Routers

Internal
Routers

External
AS
Type de routeurs OSPF
(suite)
Area 1 Backbone Area 0 Area 2
ABR and
Backbone
Router Backbone/
Internal
Internal Routers
Routers

Internal
Routers

ABR and
Backbone
Router
External
AS
Type de routeurs OSPF
(suite)
Area 1 Backbone Area 0 Area 2
ABR and
Backbone
Router Backbone/
Internal
Internal Routers
Routers

Internal
Routers

ASBR and ABR and


Backbone Backbone
Router Router
External
AS
Area Stub - Configuration
Default Route

Area2 Stub

Router(config)#router ospf
Router(config-router)#area 2 stub 5

Area 0
Backbone

Stub Area cannot send or receive External LSAs and must


use a default route to ABR to send traffic out of the area.
Area Totally Stubby -
Configuration
Router(config)#router ospf
Router(config-ospf-router)#area 2 stub no-summary

Area 0 Area2
Backbone
Default Route

The no-summary command makes the area Totally Stubby.


Neither Summary nor external LSAs are sent by ABR.
Only a default route is injected by ABR into the Stub Area.
Virtual Link
Area 0
(Backbone)

Virtual Link
Area 1 Area 2
Transit
Area
Area
Area33

„ Backbone center of communication


„ Virtual links provide path to backbone
„ Avoid configuring virtual links if possible
Exemple de Virtual Link
RouterA(config-router)#area 2 virtual-link 161.69.6.1

Virtual Link

A Area3
B
Area 0 Area2

RouterID 161.69.6.1 RouterID 209.157.22.1

RouterB(config-router)#area 2 virtual-link 209.157.22.1

Configure Routers on both ends of the Virtual Link


Redistribution RIP/OSPF
192.168.22.0
192.168.44.0

192.168.66.0

172.16.10.0 172.16.60.0
172.16.20.0
RIP OSPF

Router(config-ospf-router)#redistribution rip subnet

Allows routing protocols to exchange routes


Commandes Show
• show ip route - displays all learned routes
• show ip ospf route - only routes learned by
OSPF
• show ip ospf database - link state database
• show ip ospf area - OSPF area information
• show ip ospf neighbor - displays neighbor info
• show ip ospf interface - displays area ID and
adjacency information
• show ip ospf virtual-link - shows virtual link info
• show ip ospf trap - displays the state of OSPF
traps
• show ip ospf border - shows ABR/ASBR

You might also like