Routing & switching Vol2
Routing & switching Vol2
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
Packet-switched Service
Provider
Router(config-if)#encapsulation hdlc
Dialup or
Circuit-Switched
Network
“santacruz,
“santacruz, boardwalk”
boardwalk”
Accept/Reject
Accept/Reject
Response
Response
Router(config-if)#encapsulation ppp
• Enable PPP encapsulation
Configuring PPP
Authentication
Router(config)#hostname name
Router(config-if)#ppp authentication
{chap | chap pap | pap chap | pap}
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
172.16.1.0
SO
Network A B
B
172.16.2.2 172.16.2.1
Stub Network
172.16.1.0
SO
Network
10.0.0.0 A B
B
172.16.2.2 172.16.2.1
172.16.1.0
SO
Network
10.0.0.0 A BB
172.16.2.2 172.16.2.1
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
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
Neighbors
Interfaces
Area 1 Cost = 10
Area 0
Token
Ring
Cost = 6
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
Init State
Router B
Neighbors List
172.16.5.1/24, int E1
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
DR
E0 E0
172.16.5.1 172.16.5.3
afadjfjorqpoeru
39547439070713
afadjfjorqpoeru
39547439070713
afadjfjorqpoeru
39547439070713
Loading State
afadjfjorqpoeru
39547439070713
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:
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
PATHS
Iteration 3
H G
3
5 UNKNOWN
5 FH
3 F
12 12
4 2 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
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
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
Area2 Stub
Router(config)#router ospf
Router(config-router)#area 2 stub 5
Area 0
Backbone
Area 0 Area2
Backbone
Default Route
Virtual Link
Area 1 Area 2
Transit
Area
Area
Area33
Virtual Link
A Area3
B
Area 0 Area2
192.168.66.0
172.16.10.0 172.16.60.0
172.16.20.0
RIP OSPF