0% found this document useful (0 votes)
14 views

Routing & switching vol1

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)
14 views

Routing & switching vol1

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

Switching &

Routing vol1
PRESENTATION
Début du cours 9h30
Pause café ….
Pause déjeuner 12h30
Reprise 13h30
Pause café ….
Fin …..
SOMMAIRE

• 1- Introduction (concepts d’Interconnexions)


• 2- Le protocole TCP/IP
• 3- Connexion aux équipements Cisco
• 4- Technologies de niveau 2
• 5- Technologies de niveau 3
• 6- Sécurité (filtrage)
CHAPITRE 1

INTRODUCTION –CONCEPTS
D’INTERCONNEXIONS
Defining Components of
the Network
Home Mobile
Office Users

Internet

Branch Office Main Office


Defining the Components of a
Network (cont.)
Branch
Office

Floor 2

Server Farm
ISDN
Telecommuter Floor 1

Remote Campus
Network Structure Defined by
Hierarchy
Core Layer

Distribution
Layer

Access
Layer
Access Layer Characteristics

Access Layer

End station entry point to the network


OSI Model Overview

Application
Application
(Upper) Presentation
Layers
Session
OSI Model Overview

Application
Application
(Upper) Presentation
Layers
Session

Transport Layer

Network Layer
Data Flow
Layers
Data Link

Physical
Role of Application Layers
EXAMPLES

User Interface
Telnet
Application
FTP

• How data is presented ASCII


Presentation • Special processing EBCDIC
such as encryption JPEG
Keeping different Operating System/
Session applications’
Application Access
data separate
Scheduling
Transport Layer

Network Layer

Data Link

Physical
Role of Data Flow Layers
Application
Presentation
EXAMPLES
Session
• Reliable or unreliable delivery TCP
Transport • Error correction before retransmit UDP
SPX
Provide logical addressing which IP
Network
routers use for path determination IPX
• Combines bits into bytes and
bytes into frames 802.3 / 802.2
Data Link • Access to media using MAC address HDLC
• Error detection not correction
• Move bits between devices
Physical • Specifies voltage, wire speed and EIA/TIA-232
pin-out cables V.35
Encapsulating Data

Application
Presentation
PDU
Upper Layer Data Session
Segment
Transport
TCP Header Upper Layer Data

Network Packet
IP Header Data

LLC Header Data FCS


Data Link Frame

MAC Header Data FCS

Physical Bits
0101110101001000010
De-encapsulating Data

Application
Presentation
Session
Upper Layer Data
Transport
Upper Layer Data
a d er
P He
Network TC
TCP+ Upper Layer Data
eader
IP H
IP + TCP + Upper Layer Data
Data Link eader
C H
L L
LLC Hdr + IP + TCP + Upper Layer Data
eader
C H
MA
Physical
0101110101001000010
Physical Layer Functions

Defines

EIA/TIA-232
• Media type

Ethernet

802.3
Physical

V.35
• Connector type
• Signaling type
Physical Layer:
Ethernet/802.3

10Base2—Thin Ethernet
10Base5—Thick Ethernet

Host
Hub
10BaseT—Twisted Pair

Hosts
Hubs Operate at Physical layer

Physical

A B C D

• All devices in the same collision domain


• All devices in the same broadcast domain
• Devices share the same bandwidth
Hubs: One Collision Domain

• More end stations means


more collisions
• CSMA/CD is used
Data Link layer Functions

Defines
• Physical source and
destination addresses

Frame Relay
Data Link
802.2
• Higher layer protocol

HDLC
(Service Access Point)

Ethernet
associated with frame
• Network topology

Physical
802.3
EIA/TIA-232
• Frame sequencing v.35
• Flow control
• Connection-oriented
or connectionless
Data Link Layer Functions
(cont.)
MAC Layer - 802.3
# Bytes 8 6 6 2 Variable 4
Preamble Dest add Source add Length Data FCS

Ethernet II
uses “Type”
0000.0C xx.xxxx here and
does not use
IEEE assigned Vendor 802.2.
assigned

MAC Address
Data Link Layer Functions
(cont.)
802.2 (SNAP)
# Bytes 1 1 1 or 2 3 2 Variable

Dest SAP Source SAP Ctrl OUI


Type Data
AA AA 03 ID

OR 802.2 (SAP)
# Bytes 1 1 1 or 2 Variable
Dest Source
Ctrl Data
SAP SAP

Preamble Dest add Source add Length Data FCS

MAC Layer - 802.3


Switches and Bridges Operate
at Data Link Layer
Data Link

1 2 3 4 OR 1 2

• Each segment has its own collision domain


• All segments are in the same broadcast domain
Switches

Switch
Memory
• Each segment has its
own collision domain
• Broadcasts are
forwarded to all
segments
Network Layer Functions

• Defines logical

Network
source and IP, IPX
destination
addresses

Frame Relay
Data Link
associated with a 802.2

HDLC
specific protocol

Ethernet
• Defines paths
through network Physical 802.3
EIA/TIA-232
• Interconnects v.35
multiple data links
Network Layer Functions (cont)

Network Layer End Station Packet


Source Destination
IP Header Data
address address

Logical
Address
172.15.1.1
Network Node
Network Layer Functions
(cont.)
Address Mask
172.16.122.204 255.255.0.0
172 16 122 204
Binary
Address 10101100 00010000 01111010 11001100
255 255 0 0
Binary
Mask 11111111 11111111 00000000 00000000

Network Host
Network Layer Functions
1.1 1.0
(cont.) 4.0 4.1

2.1 2.2
1.3 4.3
1.2 4.2
E0 S0 S0 E0

Routing Table Routing Table


NET INT Metric NET INT Metric
1 E0 0 1 S0 1
2 S0 0 2 S0 0
4 S0 1 4 E0 0

• Logical addressing allows for hierarchical network


• Configuration required
• Uses configured information to identify paths to networks
Routers: Operate at the
Network Layer
• Broadcast control
• Multicast control
• Optimal path
determination
• Traffic management
• Logical addressing
• Connects to WAN
services
Transport Layer Functions

• Distinguishes between
upper layer applications

Transport
• Establishes end-to-end
connectivity between TCP UDP SPX
applications
• Defines flow control

Network
IP IPX
• Provides reliable or
unreliable services for
data transfer
Reliable Transport Layer
Functions

Sender Receiver
Synchronize

Acknowledge, Synchronize

Acknowledge

Connection Established

Data Transfer
(Send Segments)
CHAPITRE 2

Le protocoleTCP/IP
Introduction to TCP/IP
Host Host

Internet

TCP/IP

• Early protocol suite


• Universal
TCP/IP Protocol Stack

7 Application

6 Presentation 5
Application
5 Session
4
4 Transport Transport
3
3 Network Internet
2
2 Data Link Data Link
1
1 Physical Physical
Transport Layer Overview

Transmission
Transmission Control
Control Connection-
Application Protocol
Protocol (TCP)
(TCP) Oriented

Transport User
User Datagram
Datagram Connectionless
Protocol
Protocol (UDP)
(UDP)
Internet

Data Link

Physical
Port Numbers

F T S D T S R
Application T E M N F N I
Layer P L T S T M P
N P P P
E
T

21 23 25 53 69 161 520 Port


Transport Numbers
Layer TCP UDP
TCP Port Numbers

Source
Source Dest.
Dest. …

Port
Port Port
Port

Telnet Z
Host A Host Z

SP DP Dest. port = 23.


1028 23 … Send packet to my
1028 23 …
Telnet
application.
TCP Three Way
Handshake/Open Connection
Host A Host B

Send SYN
1 (seq=100 ctl=SYN)
SYN received

Send SYN, ACK 2


SYN received (seq=300 ack=101 ctl=syn,ack)
Established
3 (seq=101 ack=301 ctl=ack)
TCP Simple Acknowledgment
Sender Receiver
Send 1
Receive 1
Send ACK 2
Receive ACK 2

Send 2
Receive 2
Send ACK 3
Receive ACK 3
Send 3
Receive 3

Receive ACK 4 Send ACK 4

•Window size = 1
TCP Sequence and
Acknowledgment Numbers
Source
Source Dest.
Dest. Sequence
Sequence Acknowledgement
Acknowledgement …

Port
Port Port
Port ## ##

I just
sent #11. I just got #11,
now I need #12.

Source Dest. Seq. Ack.


1028
1028 2323 10
10 100
100
Source Dest. Seq. Ack.
23
23 1028 100 11
1028 100 11
Source Dest. Seq. Ack.
1028
1028 23
23 11
11 101
101
Source Dest. Seq. Ack.
23
23 1028
1028 101
101 12
12
Internet Layer Overview

Internet
Internet Protocol
Protocol (IP)
(IP)
Application
Internet
Internet Control
Control Message
Message
Transport Protocol
Protocol (ICMP)
(ICMP)

Internet Address
Address Resolution
Resolution
Protocol
Protocol (ARP)
(ARP)
Data Link
Reverse
Reverse Address
Address
Physical Resolution
Resolution Protocol
Protocol (RARP)
(RARP)

• OSI network layer corresponds to the


TCP/IP internet layer
Internet Control Message
Protocol
Application

Transport Destination
1 Unreachable
ICMP
Echo (Ping)
Internet
Other
Data Link

Physical
Address Resolution Protocol

I need the
I heard that broadcast.
Ethernet
The message is for me.
address of
Here is my Ethernet
176.16.3.2.
address.

172.16.3.1 172.16.3.2

IP:
IP: 172.16.3.2
172.16.3.2 == ???
???

IP:
IP: 172.16.3.2
172.16.3.2
Ethernet:
Ethernet: 0800.0020.1111
0800.0020.1111

• Map IP MAC
• Local ARP
Introduction to TCP/IP
Addresses
172.18.0.1 172.16.0.1

172.18.0.2 172.16.0.2
HDR SADA DATA
10.13.0.0 192.168.1.0
10.13.0.1 172.17.0.1 172.17.0.2 192.168.1.1

– Unique addressing allows communication


between end stations
– Path choice is based on destination address
•Location is represented by an address
IP Addressing
32 bits
Dotted
Decimal Network Host

Maximum 255 255 255 255


IP Addressing
32 bits
Dotted
Decimal Network Host

Maximum 255 255 255 255


1 8 9 16 17 24 25 32

Binary 11111111 11111111 11111111 11111111

128
64
32
16
8
4
2
1
128
64
32
16
8
4
2
1
128
64
32
16
8
4
2
1
128
64
32
16
8
4
2
1
Example
Decimal
172 16 122 204
Example 10101100 00010000 01111010 11001100
Binary
IP Address Classes

8 bits 8 bits 8 bits 8 bits

• Class A: Network Host Host Host

• Class B: Network Network Host Host

Network Network Network Host


• Class C:
• Class D: Multicast
• Class E: Research
IP Address Classes
Bits: 1 8 9 16 17 24 25 32
0NNNNNNN Host Host Host
Class A:
Range (1-126)

Bits: 1 8 9 16 17 24 25 32
10NNNNNN Network Host Host
Class B:
Range (128-191)
1 8 9 16 17 24 25 32
Bits:
110NNNNN Network Network Host
Class C:
Range (192-223)
1 8 9 16 17 24 25 32
Bits:
1110MMMM Multicast
Multicast Group
Group Multicast
Multicast Group
Group Multicast
Multicast Group
Group
Class D:
Range (224-239)
Host Addresses

172.16.2.2 10.1.1.1
10.6.24.2
E1
172.16.3.10 E0 10.250.8.11
172.16.2.1

172.16.12.12 10.180.30.118

Routing Table
172.16 . 12 . 12 Network Interface
Network Host 172.16.0.0 E0
10.0.0.0 E1
Determining Available Host
Network
Addresses
Host
172 16 0 0
N

16
15
14
13
12
11
10

8
7
6
5
4
3
2
1
9
10101100 00010000 00000000 00000000 1
00000000 00000001 2
00000000 00000011 3

...

...

...
11111111 11111101 65534
11111111 11111110 65535
11111111 11111111 65536
- 2
2N-2 = 216-2 = 65534 65534
IP Address Classes Exercise

Address Class Network Host

10.2.1.1

128.63.2.100

201.222.5.64

192.6.141.2

130.113.64.16

256.241.201.10
Addressing without Subnets

172.16.0.1 172.16.0.2 172.16.0.3 172.16.255.253 172.16.255.254

…...

172.16.0.0

• Network 172.16.0.0
Addressing with Subnets

172.16.3.0

172.16.4.0

172.16.1.0 172.16.2.0

• Network 172.16.0.0
Subnet Addressing
172.16.2.200 172.16.3.5
172.16.3.1
E1
172.16.2.2 E0 172.16.3.100
172.16.2.1

172.16.2.160 172.16.3.150

New Routing Table


172.16 . 2 . 160 Network Interface
Network Host 172.16.0.0 E0
172.16.0.0 E1
Subnet Mask
Network Host

IP
Address
172 16 0 0
Network Host
Default
Subnet
Mask
255 255 0 0
11111111 11111111 00000000 00000000
Also written as “/16” where 16 represents the number of 1s
in the mask.
Network Subnet Host
8-bit
Subnet 255 255 255 0
Mask
Also written as “/24” where 24 represents the number of 1s
in the mask.
Subnet Mask Exercise

Address Subnet Mask Class Subnet

172.16.2.10 255.255.255.0

10.6.24.20 255.255.240.0

10.30.36.12 255.255.255.0
Connexion aux équipements
Console
Telnet
Accès externe aux équipements

Telnet

Interfaces
Virtual terminal
Console port
TFTP

Auxiliary port
PC or Unix server

• L’accès aux
équipements Cisco Web or Network
Management
peut se faire à partir server
de plusieurs sources
Connexion en Console
Equipement avec
port console

„ PCs se connectent aux équipements en utilisant un


adaptateur RJ-45 / DB-9 ou un RJ-45 / DB-25
„ Configuration Hyperterminal : 9600 bps, 8 data bits, no
parity, 1 stop bit, no flow control
„ Ceci permet un accès console out-of-band
„ Le port AUX du switch peut etre utilisé pour une connexion
Modem
Configuration Minimum d’un
switch ou routeur
176.16.1.21
176.16.1.3

176.16.1.1
176.16.1.22
176.16.1.23

176.16.1.33
176.16.1.32
176.16.1.31

Management VLAN = 176.16.1.0

Une adresse IP est nécessaire pour manager


le switch ou le routeur
Connexion Telnet
SwitchA RouterA RouterB SwitchB
S1
S0
10.1.1.2
10.3.3.2 10.3.3.1 10.1.1.1 10.2.2.1 10.2.2.2

RouterA#telnet 10.2.2.2
Trying 10.2.2.2 ... Open
-------------------------------------------------
Catalyst 1900 Management Console
Copyright (c) Cisco Systems, Inc. 1993-1998
All rights reserved.
Enterprise Edition Software
Ethernet Address: 00-90-86-73-33-40
PCA Number: 73-2239-06
PCA Serial Number: FAA02359H8K
Remote device
Model Number: WS-C1924-EN
System Serial Number: FAA0237X0FQ
.
.
SwitchB>
Connexion SSH
• SSH permit une connexion sécurisée sur les
équipements
• La connexion est de type telnet mais crypté
• Nécessite un client supportant cette
fonctionnalité (ex: teraterm)
• Versions:
» 2950 à partir de 12.1(12c)EA1
» 3550 à partir de 12.1(11)EA1
» 4500 à partir de 12.1(13)EW
» Catos à partir de 6.1
Gestion des configurations

OS
Configuration
Composants Internes

NVRAM
RAM Config register

ROM
Interfaces

Flash
LA ROM
ROM

Bootstrap POST

show version

ROM Console
Mini IOS monitor

Contient un microcode pour des functions basic


Sequence de Boot d’un
routeur
• Power on self test (POST)
• Load and run bootstrap code
• Find the IOS software
• Load the IOS software
• Find the configuration
• Load the configuration
• Run
Determination de l’ IOS
show
startup-config NVRAM
Config register
show
Flash version
Console

IOS Ordre de la recherche :


1. Vérification de la valeur du configuration
register
2. Récupération de la configuration en NVRAM
3. Par défault booter sur le premier fichier dans
la Flash
4. Tentative de net boot
5. RXBOOT
6. ROMMON
Les Valeurs du “Configuration
Register”
Router#configure terminal
Router(config)#config-register 0x2102
[Ctrl-Z]
Router#reload

– Les bits du Configuration register 3, 2, 1, et 0 indiquent


l’option du boot comme suit:
Configuration Register
Boot Field Value Meaning
Use ROM monitor mode
0x0 (Manually boot using the b
command)
Automatically boot from ROM
0x1
(Provides IOS subset)
Examine NVRAM for boot
0x2 to 0xF system commands (0x2
default if router has Flash)

– Vérifier la valeur du “configuration register” avec show version


Préparation d’une
sauvegarde de l’image IOS
sur le serveur
c2500-js-l_120-3.bin

Network
Router server

• Vérifier l’accès au serveur


• Vérifier l’espace disque disponible sur le serveur
• Vérifier la convention de nommage
• Créer un fichier sur le serveur si nécessaire
Sauvegarde de l’image IOS
sur le serveur
FLASH Network
server
copy flash tftp

wg_ro_a#copy flash tftp


Source filename []? c2500-js-l_120-3.bin
Address or name of remote host []? 10.1.1.1
Destination filename [c2500-js-l_120-3.bin]?
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
<output omitted>
10084696 bytes copied in 709.228 secs (14223 bytes/sec)
wg_ro_a#

Sauvegarder l’image IOS actuelle avant de la mettre à jour


Vérification de la mémoire et
des fichiers IOS
wg_ro_a#show flash

System flash directory:


File Length Name/status
1 10084696 c2500-js-l_120-3.bin

[10084760 bytes used, 6692456 available, 16777216 total]


16384K bytes of processor board System flash (Read ONLY)

Vérifier que la Flash a assez de place pour accueillir la


nouvelle version
Upgrade de l’image IOS

FLASH Network
server

wg_ro_a#copy tftp flash


Address or name of remote host [10.1.1.1]?
Source filename []? c2500-js-l_120-3.bin
Destination filename [c2500-js-l_120-3.bin]?
Accessing tftp://10.1.1.1/c2500-js-l_120-3.bin...
Erase flash: before copying? [confirm]
Erasing the flash filesystem will remove all files! Continue? [confirm]
Erasing device... eeeee (output omitted) ...erased
Erase of flash: complete
Loading c2500-js-l_120-3.bin from 10.1.1.1 (via Ethernet0): !!!!!!!!!!!!!!!!!!!!
(output omitted)
[OK - 10084696/20168704 bytes]
Verifying checksum... OK (0x9AA0)
10084696 bytes copied in 309.108 secs (32636 bytes/sec)
wg_ro_a#

„ La flash est écrasée avant de télécharger le nouveau code


Sources of Configurations
RAM NVRAM
copy running startup
Config Config
copy startup running (merge)

config term
(merge)

erase
copy tftp run Console start
(merge) copy tftp start

– NVRAM Blank
copy run tftp copy start tftp 000000
– Terminal 000000
TFTP
– TFTP server server
– Erase Start
L’interface utilisateur Cisco

„ Cisco utilise le système CLI


(Command Line Interface)
„ Les commandes varient selon le
Cisco
type d’équipement Cisco IOS
„ Taper ou coller des commandes en
utilisant les modes console
„ Deux modes : Mode user et mode
privilégié
„ Chaque mode a un prompt
différent
Cisco IOS Software EXEC

Deux modes pour rentrer les commandes CLI

Premier mode:
Mode User
• Un examen rapide du switch ou routeur
• Le prompt User est hostname>
Cisco IOS Software EXEC (suite)

Deuxième mode (le mode le plus utilisé ):

Mode Privilégié (ou enable)


• Un examen plus détaillé du switch ou du
routeur
• Permet la configuration et le debugging
• Prérequis pour tous les autres modes de
configuration
• Le prompt de l’équipement est le suivant
hostname#
Modes du routeur (IOS)

• User EXEC mode Router>enable


Ctrl-Z (end)
• Privileged EXEC mode Router#config term

• Global configuration mode Exit


Router(config)#

Configuration
Mode Prompt
Interface Router(config-if)#
Subinterface Router(config-subif)#
Controller Router(config-controller)#
Line Router(config-line)#
Router Router(config-router)#
IPX router Router(config-ipx-router)#
Modes du Switch en CatOS
• Mode user switch>enable

• Mode privilégié switch#(enable) set port speed 2/4 100

Switch#(enable) set vlan 41 name engineering

Switch#(enable) set ?
Interface Utilisateur CatOS
Exemple de configuration en CatOS

Hello,
Hello, My
My Name
Name Is:
Is:
Catalyst 5000
DSW145

Switch(enable)prompt DSW145
DSW145(enable)

Hello,
Hello, My
My Name
Name Is:
Is:

Catalyst 6500 CORE1

Switch(enable)#prompt CORE1
CORE1(enable)

Assignation d’un nom à l’équipement en CatOS


Configuration des mots de passe
Mot de passe Console
Router(config)#line console 0
Router(config-line)#login
Router(config-line)#password cisco

Mot de passe Telnet


Router(config)#line vty 0 4
Router(config-line)#login
Router(config-line)#password sanjose

Mot de passe enable


Router(config)#enable password cisco

Mot de passe Secret


Router(config)#enable secret sanfran
Configuration du Switch (IOS)

• Mode de Configuration :
– Mode de Configuration Global
– wg_sw_a# conf term
– wg_sw_a(config)#
– Mode de configuration Interface
– wg_sw_a(config)# interface e0/1
– wg_sw_a(config-if)#
Configuration d’une interface
(IOS)
Router(config)#interface type number
Router(config-if)#

• type inclut serial, ethernet, token ring, fddi, hssi,


loopback, dialer, null, async, atm, bri, et tunnel
• number est utilisé pour identifier chaque interface

Router(config)#interface type slot/port


Router(config-if)#

• Pour les routeurs et les switches modulaires

Router(config-if)#exit

• Pour quitter le mode de configuration actuel


Commandes utiles

Ctrl-P or Up arrow Last (previous) command recall

Ctrl-N or Down arrow More recent command recall

Router> show history Show command buffer contents

Router> terminal history size lines Set session command buffer size
Visualisation de l’état initial
du switch ou du routeur
Switch#show version

Switch#show running-config

Switch#show interfaces

Visualisation de l’état opérationnel de l’équipement


Commande Show Version
wg_sw_c#show version

Cisco Catalyst 1900/2820 Enterprise Edition Software


Version V8.01.01 written from 171.068.229.225
Copyright (c) Cisco Systems, Inc. 1993-1998
wg_sw_c uptime is 15day(s) 21hour(s) 53minute(s) 11second(s)
cisco Catalyst 1900 (486sxl) processor with 2048K/1024K bytes of memory
Hardware board revision is 5
Upgrade Status: No upgrade currently in progress.
Config File Status: No configuration upload/download is in progress
27 Fixed Ethernet/IEEE 802.3 interface(s)
Base Ethernet Address: 00-50-BD-73-E2-C0
Visualisation de la configuration
RAM NVRAM

Config Config

IOS
show show
running-config startup-config

Console

Setup utility

Setup sauvegarde la configuration dans la


NVRAM
Commandes Show running et
show startup
Dans la RAM Dans la NVRAM
wg_ro_c#show running-config wg_ro_c#show startup-config
Building configuration... Using 1359 out of 32762 bytes
Current configuration: !
! version 12.0
version 12.0 !
! -- More --
-- More --

Visualisation de la configuration en cours et de


la configuration sauvegardée en NVRAM
Visualisation de l’état des
ports (CatOs Versus IOS)
DSW145 (enable) show port
Port Name Status Vlan Level Duplex Speed Type
----- ------------------ ---------- ---------- ------ ------ ----- ------------
2/1 Prim link to ASW41 connected trunk normal full 100 10/100BaseTX

Interface eth 0/4


PC To ASW41 Port
ASW41

Switch#show run
Building configuration...
Current configuration:
! Port 2/1
(text deleted)
interface Ethernet 0/4 Primary Link to ASW41
duplex half
description “PC TO ASW44 PORT”

Les commandes Show port (CatOS) et Show run


(IOS) pour visualiser l’état des ports
Sauvegarde des
Configurations

wg_ro_c#
wg_ro_c#copy running-config startup-config
Destination filename [startup-config]?
Building configuration…

wg_ro_c#

Copie la configuration en cours dans la NVRAM


Découverte des Neighbors
par CDP
•Runs on routers with Cisco IOS
10.3 or later and Cisco switches
and hubs
•Summary information
CDP
includes:
– Device identifiers
– Address list CDP
CDP
– Port identifier
– Capabilities list
– Platform show cdp
Utilisation de CDP
SwitchA RouterA RouterB SwitchB
S1
S0
10.1.1.2
10.3.3.2 10.3.3.1 10.1.1.1 10.2.2.1 10.2.2.2

RouterA#sh cdp ?
entry Information for specific neighbor entry
interface CDP interface status and configuration
neighbors CDP neighbor entries
traffic CDP statistics
<cr>
RouterA(config)#no cdp run
RouterA(config)#interface serial0
RouterA(config-if)#no cdp enable
Utilisation de show cdp
neighbor
SwitchA RouterA RouterB SwitchB
S1
S0
10.1.1.2
10.3.3.2 10.3.3.1 10.1.1.1 10.2.2.1 10.2.2.2

RouterA#sh cdp neighbors


Capability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge
S - Switch, H - Host, I - IGMP, r - Repeater

Device ID Local Intrfce Holdtme Capability Platform Port ID


RouterB Ser 0 148 R 2522 Ser 1
SwitchA0050BD855780 Eth 0 167 T S 1900 2

SwitchA also provides its Mac address


Utilisation de show cdp entry
SwitchA RouterA RouterB SwitchB
S1
S0
10.1.1.2
10.3.3.2 10.3.3.1 10.1.1.1 10.2.2.1 10.2.2.2

RouterA#sh cdp entry *


-------------------------
Device ID: RouterB
Entry address(es):
IP address: 10.1.1.2
Platform: cisco 2522, Capabilities: Router
Interface: Serial0, Port ID (outgoing port): Serial1
Holdtime : 168 sec

Version :
Cisco Internetwork Operating System Software
IOS (tm) 2500 Software (C2500-JS-L), Version 12.0(3), RELEASE SOFTWARE (fci)
Copyright (c) 1986-1999 by cisco Systems, Inc.
Compiled Mon 08-Feb-99 18:18 by phanguye
Technologie et
Implémentation des
fonctionnalités Niveau 2
Vlans
802.1q
FEC/GEC
Vlans
• Technologie
• Implémentation
• Visualisation
Vlans

• Segmentation
3ème étage

• Flexibilité
2ème étage

• Securité
1er étage
Commercial DRH Tech

Un VLAN =Un domaine de Broadcast =Un sous réseau(subnet)


Les opérations d’un Vlan

Switch A

VLAN VLAN VLAN


Gris Noir Vert

• Chaque VLAN est équivalent à un domaine de


broadcast
Les opérations d’un Vlan

Switch A Switch B

VLAN VLAN VLAN VLAN VLAN VLAN


Gris Noir Vert Gris Noir Vert

• Chaque VLAN est équivalent à un domaine de broadcast


• Les memes VLANs peuvent etre déployés sur plusieurs
switches
Les opérations d’un Vlan

Switch A Switch B

Trunk

Fast Ethernet

VLAN VLAN VLAN VLAN VLAN VLAN


gris Noir vert gris Noir Vert

• Chaque VLAN est équivalent à un domaine de broadcast


• Les VLANs peuvent etre déployés sur plusieurs switches
• Les liens Trunk transportent le trafic de plusieurs VLANs
• Les liensTrunk utilisent une encapsulation spécifique
pour différentier les VLANs
Les opérations d’un Vlan
(Configuration)
• Switch# vlan database
• Switch(vlan)# vlan vlan-id [are are-number] [backupcrf {enable | disable}] [bridge bridge-
number |
type {srb | srt}] [media {ethernet | fddi | fdi-net | tokenring | tr-net}] [mtu mtu-size]
[name vlan-name] [parent parent-vlan-id] [ring ring-number] [said said-value]
[state {suspend | active}] [ste ste-number] [stp type {ieee | ibm | auto}]
[tb-vlan1 tb-vlan1-id] [tb-vlan2 tb-vlan2-id]

• Switch(vlan)#apply
802.1q
• Technologie
• Implémentation
• Visualisation
• VTP (Vlan Trunk Protocol)
IEEE 802.1Q (Trame)
• Format du Tag 802.1Q
Dest Len / Data FCS
Src
Etype

Insert

Dest Src TPID TCI Len Data FCS’

x8100
Pri CFI VLAN ID
Trame IEEE 802.1Q
•Son rôle transporter l'information de VLAN
•Pourquoi
– Le transport de l'information de VLAN étant propriétaire
à chaque constructeur, une norme était nécessaire pour
les milieu hétérogène.
•TPID ( Tag Protocol Identifier)
– 2 octets d'une valeur fixe 0x8100 identique au 802.1p
•TCI (Tag Control Information)
– Champ de 2 octets
•3 bits pour la priorite (0-7)
•1 bit CFI (Canonical Format Information)
•12 bits pour identifier le VLAN
Configuration 802.1q
CATOS

Switch (enable) set trunk 1/1 on type dot1q


Port(s) 1/1 trunk mode set to on.
Console>(enable) 04/05/1999, 10:45:39:DTP-5:Port 1/1 has become isl
trunk
04/05/1999, 10:45:40:PAGP-5:Port 1/1 left bridge port 1/1.
04/05/1999, 10:45:40:PAGP-5:Port 1/1 joined bridge port 1/1.

IOS
Switch (config-if)#switchport mode {access | dot1q-tunnel |
dynamic {auto | desirable} | trunk}

Switch (config-if)# switchport trunk


{allowed vlan vlan-list} | {encapsulation {dot1q | isl | negotiate}} |
{native vlan vlan-id} | {pruning vlan vlan-list}
FEC/GEC (Agrégation de
liens)
• Technologie
• Implémentation
• Visualisation
Agrégation de liens Fast
Ethernet
Fast Ethernet 1
A D
Fast Ethernet 2

B Fast Fast Ethernet 3 Fast E


EtherChannel EtherChannel
Fast Ethernet 4

C F
• Fast et Gigabit EtherChannel permettent la redondance
d’un ensemble de liens dans un environnement Spanning
Tree en les considérant comme un seul lien logique
Algorithme(s) de partage de
charge
D
D Fast Ethernet 1 D D
D D D D D
A Fast Ethernet 2 D

B Fast Ethernet 3 E
Fast Fast
EtherChannel EtherChannel
Fast Ethernet 4

Flow Output Path Flow Output Path


C F
A->D FE 1 D->A FE 4
B->D FE 2 D->B FE 3
C->D FE 3 D->C FE 1
etc. FE … etc. FE …
• Fast EtherChannel utilise la distribution de charge pour
partager des links
Aggregation Control
Protocols
D
D
D Fast Ethernet 1 D D D D
A D D D
Fast Ethernet
Fast Ethernet 2
2

PAgP PAgP
B Fast Ethernet 3 E
Fast Fast
n
it o
EtherChannel EtherChannel
ega Fast Ethernet 4
gr ol s
g tr ol
n
A o oc
C C rot F
P

• Le Port Aggregation Protocol (PAgP) controle le lien


Fast EtherChannel
EtherChannel Guidelines

Fast Ethernet 1
A D
Fast Ethernet
Fast Ethernet 2
2

B Fast Ethernet 3 E
Fast Fast
EtherChannel EtherChannel
Fast Ethernet 4

C F
• Maximum de 8 liens par tunnel de FEC
• Un tunnel est un ensemble de 2 , 4 , 6 ou 8 liens
• Sans ces conditions, le FEC échoue
Configuration EtherChannel
CATOS
Switch (enable) set port channel 1/1-2 on

IOS

Swhitch (config-if)#channel-group channel-group-number mode


{auto [non-silent] | desirable [non-silent] | on | active |
passive}
Technologie et
Implémentation des
fonctionnalités Niveau 2
Spanning Tree
802.1d, 802.1s, 802.1w, MST
Spanning Tree
Technologie
Implémentation
Fonctionnement normal
Fonctionnement en mode dégradé
Protocole STP 802.1d
• Protocole de niveau 2
• Le niveau 2 ne sait pas gérer les boucles => 2
choix :
-pas de boucle, donc pas de redondance physique !
- STP
• STP = permet d’avoir une topologie avec
redondance physique sans avoir de boucle L2.
• Action = Le STP construit un arbre avec un
chemin unique entre chaque paire de LANs. Il
bloque certains ports afin d’éliminer les
boucles.
Bases du STP 802.1d

Un switch est élu “root”


F
A F F
Root
Root F
F F
Une topologie en
forme d’arbre et
sans boucle

F F
B
X F B

Ce port est dans l’état logique “Blocking”

Connectivité de niveau 2 sans boucle


Redondance physique de niveau 2
Terminologie Spanning Tree
• Root bridge
–Racine de l’arbre
–Le seul à générer des BPDUs en phase stable
–Sa bonne localisation dans le RESEAU est vitale
• Bridge ID
–Identifiant du bridge (Priorité Bridge | @ MAC du bridge)
(véhiculé dans les BPDUs)
• Root bridge ID
–Identifiant du Root (véhiculé dans les BPDUs)
• Port ID
–Identifiant du port du bridge qui émet la BPDU
Construction de la topologie STP
• Election du root bridge
–bridge ID = priorité du bridge | @ MAC du bridge
• Chaque switch détermine son meilleur chemin vers le
root
–path cost le plus bas
• Si deux chemins possibles de même coût, on choisit
celui sur lequel on reçoit le meilleur BPDU:
-celui avec le plus bas bridge ID du switch émetteur
-celui avec le plus bas port ID (port priority | port index) du
port émetteur
• Un switch qui reçoit sur un port un BPDU meilleur que
celui qu’il enverrait sur ce port passe ce port blocking.
Rapid Spanning Tree (RSTP)
• Nouveau protocole IEEE (802.1w)
• Compatible avec 802.1D
• Même configuration (une seule ligne
supplémentaire !), même topologie finale
• Convergence plus rapide:
Indépendante des timers STP si :
–- liens point-to-point
–- les ports edges sont correctement identifiés
–- pas d’interaction avec du 802.1D
• Inclut les équivalents des Port/Uplink/Backbone
fast de Cisco
Technologie et
Implémentation des
fonctionnalités Niveau 3
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
Routage Inter-Vlan

172.16.20.4

VLAN10 VLAN20

VLAN30

• Les communications entre Vlans nécessitent un routeur


Configuration d’une interface
logique sur un routeur Interne
RTR144(config)#interface vlan41
RTR144(config-if)#ip address 172.16.10.3 255.255.255.0
RTR144(config-if)#exit
RTR144(config)#interface vlan42
RTR144(config-if)#ip address 172.16.20.3 255.255.255.0
RTR144(config-if)#exit

• L’encapsulation par défaut de l’interface logique dépend


de l’équipement
• Une première configuration nécessite un no shutdown
de l’interface
Configuration d’une interface
logique sur un routeur externe
Port
Slot Subinterface Number

RSM144(config)#interface fastethernet 0/1.1


RSM144(config-if)#encapsulation dot1q 10
Encapsulation Type and
RSM144(config-if)#ip address 172.16.10.3 255.255.255.0 VLAN Number
RSM144(config-if)#exit
RSM144(config)#interface fastethernet 0/1.2
RSM144(config-if)#encapsulation dot1q 20
RSM144(config-if)#ip address 172.16.20.3 255.255.255.0
Interface FA 0/1
RSM144(config-if)#exit
Subinterface 0/1.1

VLA
N10

VLA
N20

Interface FA 0/1
Subinterface 0/1.2
• Les sous-interfaces permettent de router des flux différents à
travers la meme interface physique
• Une première configuration nécessite un no shutdown
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

You might also like