Routing & switching vol1
Routing & switching vol1
Routing vol1
PRESENTATION
Début du cours 9h30
Pause café ….
Pause déjeuner 12h30
Reprise 13h30
Pause café ….
Fin …..
SOMMAIRE
INTRODUCTION –CONCEPTS
D’INTERCONNEXIONS
Defining Components of
the Network
Home Mobile
Office Users
Internet
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
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
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
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
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
OR 802.2 (SAP)
# Bytes 1 1 1 or 2 Variable
Dest Source
Ctrl Data
SAP SAP
1 2 3 4 OR 1 2
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)
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
• 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
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
Source
Source Dest.
Dest. …
…
Port
Port Port
Port
Telnet Z
Host A Host Z
Send SYN
1 (seq=100 ctl=SYN)
SYN received
Send 2
Receive 2
Send ACK 3
Receive ACK 3
Send 3
Receive 3
•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.
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)
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
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
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
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.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
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
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
176.16.1.1
176.16.1.22
176.16.1.23
176.16.1.33
176.16.1.32
176.16.1.31
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
Network
Router server
FLASH Network
server
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
Premier mode:
Mode User
• Un examen rapide du switch ou routeur
• Le prompt User est hostname>
Cisco IOS Software EXEC (suite)
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
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:
Switch(enable)#prompt CORE1
CORE1(enable)
• 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)#
Router(config-if)#exit
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
Config Config
IOS
show show
running-config startup-config
Console
Setup utility
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”
wg_ro_c#
wg_ro_c#copy running-config startup-config
Destination filename [startup-config]?
Building configuration…
wg_ro_c#
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
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
Switch A
Switch A Switch B
Switch A Switch B
Trunk
Fast Ethernet
• 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
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
IOS
Switch (config-if)#switchport mode {access | dot1q-tunnel |
dynamic {auto | desirable} | trunk}
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
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
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
F F
B
X F B
172.16.20.4
VLAN10 VLAN20
VLAN30
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
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