Capitolo 5
VLAN: reti locali virtuali
Copyright © 2002 - The McGraw-Hill Companies srl
LAN A
LAN B
LAN A
LAN B
LAN A
LAN B
Copyright © 2002 - The McGraw-Hill Companies srl
Lan produzione
Lan amministrazione
Lan progettazione
Lan presidenza
Copyright © 2002 - The McGraw-Hill Companies srl
Switch
Switch
Trunk Backbone
VLAN 8
VLAN 8
VLAN 2
VLAN 2
VLAN 8
VLAN 2
VLAN 8
Copyright © 2002 - The McGraw-Hill Companies srl
Switch A
TRUNK
Switch B
TRUNK
TRUNK
TRUNK
TRUNK
(tagged)
(tagged)
(tagged)
ACCESS
ACCESS
(untagged)
(untagged)
Switch C
TRUNK
Switch D
ACCESS
ACCESS
(untagged)
(untagged)
Copyright © 2002 - The McGraw-Hill Companies srl
SW-Prova#sho vlan brief
VLAN Name
Status
Ports
---- -------------------- --------- ------------------------------1
default
active
Fa0/1, Fa0/2, Fa0/3, Fa0/4,
Fa0/5, Fa0/6, Fa0/7, Fa0/8,
Fa0/9, Fa0/10, Fa0/11, Fa0/12,
Fa0/13, Fa0/14, Fa0/15, Fa0/16,
Fa0/17, Fa0/18, Fa0/19, Fa0/20,
Fa0/21, Fa0/22, Fa0/23, Fa0/24,
Fa0/25, Fa0/26, Fa0/27, Fa0/28,
Fa0/29, Fa0/30, Fa0/31, Fa0/32,
Fa0/33, Fa0/34, Fa0/35, Fa0/36,
Fa0/37, Fa0/38, Fa0/39, Fa0/40,
Fa0/41, Fa0/42, Fa0/43, Fa0/44,
Fa0/45, Fa0/46, Fa0/47, Fa0/48,
Gi0/1, Gi0/2
Copyright © 2002 - The McGraw-Hill Companies srl
SW-Prova#vlan database
Switch(vlan)#vlan 2 name Amministrazione
VLAN 2 added:
Name: Amministrazione
Switch(vlan)#vlan 3 name Vendite
VLAN 3 added:
Name: Vendite
Switch(vlan)#vlan 4 name prova-1
VLAN 4 added:
Name: prova-1
Switch(vlan)#vlan 5 name prova-2
VLAN 5 added:
Name: prova-2
Switch(vlan)#vlan 6 name prova-3
VLAN 6 added:
Name: prova-3
Switch(vlan)#vlan 100 name Produzione
VLAN 100 added:
Name: Produzione
SW-Prova(vlan)#exit
APPLY completed.
Exiting....
SW-Prova#
Copyright © 2002 - The McGraw-Hill Companies srl
SW-Prova(config)#int fastEthernet 0/12
SW-Prova(config-if)#switchport access vlan
Switch(config-if)#exit
…….
SW-Prova(config)#int fastEthernet 0/16
SW-Prova(config-if)#switchport access vlan
SW-Prova(config-if)#exit
……..
SW-Prova(config)#int fastEthernet 0/20
SW-Prova(config-if)#switchport access vlan
SW-Prova(config-if)#exit
……..
SW-Prova(config)#int fastEthernet 0/24
SW-Prova(config-if)#switchport access vlan
SW-Prova(config-if)#exit
…….
SW-Prova(config)#int fastEthernet 0/28
SW-Prova(config-if)#switchport access vlan
SW-Prova(config-if)#exit
……..
SW-Prova(config)#int fastEthernet 0/32
SW-Prova(config-if)#switchport access vlan
SW-Prova(config-if)#exit
……..
100
2
3
4
5
6
Copyright © 2002 - The McGraw-Hill Companies srl
SW-Prova#show vlan brief
VLAN Name
Status
Ports
---- -------------------- --------- ------------------------------1
default
active
Fa0/1, Fa0/2, Fa0/3, Fa0/4,
Fa0/5, Fa0/6, Fa0/7, Fa0/8,
Fa0/9, Fa0/10, Fa0/11, Fa0/36,
Fa0/37, Fa0/38, Fa0/39, Fa0/40,
Fa0/41, Fa0/42, Fa0/43, Fa0/44,
Fa0/45, Fa0/46, Fa0/47, Fa0/48,
Gi0/1, Gi0/2
2
Amministrazione
active
Fa0/16, Fa0/17, Fa0/18, Fa0/19
3
Vendite
active
Fa0/20, Fa0/21, Fa0/22, Fa0/23
4
prova-1
active
Fa0/24, Fa0/25, Fa0/26, Fa0/27
5
prova-2
active
Fa0/28, Fa0/29, Fa0/30, Fa0/31
6
prova-3
active
Fa0/32, Fa0/33, Fa0/34, Fa0/35
100
Produzione
active
Fa0/12, Fa0/13, Fa0/14, Fa0/15
Copyright © 2002 - The McGraw-Hill Companies srl
SW-A
SW-Prova
TRUNK
TRUNK
SW-B
TRUNK
1
2
5
6
ACCESS
ACCESS
ACCESS
(untagged)
(untagged)
(untagged)
VLAN
VLAN
VLAN
VLAN
VLAN 1
VLAN 2
VLAN 3
VLAN 4
VLAN 5
VLAN 6
VLAN 100
(tagged)
VLAN 1
VLAN 2
VLAN 3
VLAN 4
VLAN 5
VLAN 6
VLAN 100
(tagged)
TRUNK
SW-Prova(config)#interface GigabitEthernet 0/1
SW-Prova(config-if)#switchport mode trunk
SW-Prova(config-if)#switchport trunk allowed vlan add 1,2,5,6
SW-Prova(config-if)#exit
SW-Prova(config)#interface GigabitEthernet 0/2
SW-Prova(config-if)#switchport mode trunk
SW-Prova(config-if)#switchport trunk allowed vlan all
Copyright © 2002 - The McGraw-Hill Companies srl
(tagged)
1
2
5
6
TRUNK
VLAN
VLAN
VLAN
VLAN
TRUNK
VLAN 1
VLAN 2
VLAN 3
VLAN 4
VLAN 5
VLAN 6
VLAN 100
VLAN 1
VLAN 2
VLAN 3
VLAN 4
VLAN 5
VLAN 6
VLAN 100
SW-A
SW-Prova
SW-B
TRUNK
TRUNK
(tagged)
Copyright © 2002 - The McGraw-Hill Companies srl
6 Destination Address
81-00
801.Q Tag
6
Source Address
2
Length/Type = TPID
2
Tag Control Information
2
Client Length/Type
42
1500
MAC Client DATA
3
1
user
CFI
priority
VID (VLAN ID) - 12 bits
Definito in:
 IEEE 802.3ac
 IEEE 802.1Q
PAD
4
FCS
Copyright © 2002 - The McGraw-Hill Companies srl
HUB /
Repeater
HUB /
Repeater
HUB /
Repeater
HUB /
Repeater
Tutte le interfacce dei calcolatori
sono VLAN-aware e devono
essere configurate come trunk
(generazione di pacchetti tagged)
REALIZZAZIONE ANARCHICA DELLE VLAN
Copyright © 2002 - The McGraw-Hill Companies srl
Switch A
TRUNK
Switch B
TRUNK
TRUNK
TRUNK
TRUNK
(tagged)
(tagged)
(tagged)
TRUNK
TRUNK
(tagged)
(tagged)
Switch C
TRUNK
(tagged)
TRUNK
Switch D
Tutte le interfacce dei calcolatori
sono VLAN-aware e devono
essere configurate come trunk
(generazione di pacchetti tagged)
TRUNK
(tagged)
REALIZZAZIONE ANARCHICA DELLE VLAN
Copyright © 2002 - The McGraw-Hill Companies srl
Switch A
TRUNK
Switch B
TRUNK
TRUNK
TRUNK
TRUNK
(tagged)
(tagged)
(tagged)
ACCESS
ACCESS
(untagged)
(untagged)
Switch C
TRUNK
Switch D
TRUNK
TRUNK
ACCESS
ACCESS
(untagged)
(untagged)
Copyright © 2002 - The McGraw-Hill Companies srl
LAN XY
VLAN 10
VLAN 10
Access VLAN-aware
bridge
link
VLAN 30
VLAN-aware Access
bridge
link
Hybrid
link
VLAN-unaware
Associate dai
end station
bridge
alla VLAN 30 VLAN-unaware
end station
VLAN 20
Access
link
VLAN-unaware
VLAN 30
end station
VLAN-aware
end station
VLAN 20
Copyright © 2002 - The McGraw-Hill Companies srl
Destination Addr. Source Addr. Length DSAP SSAP Control
Multicast
Singlecast
01-80-C2-00-00-21
Indirizzo
del Bridge
XY
Attributo 1
042H 042H
GVRP PDU
XID
Protocol Identifier: 00-01
Attribute Type:
00-01
Attribute Length:
04
Attribute Event
VLAN ID
1÷2
3
4
5
6 ÷7
0=
1=
2=
3=
4=
5=
FCS
LeaveALL
JoinEmpty
JoinIn
Leave Empty
LeaveIN
Empty
Lista degli
attibuti
Attributo n
Attribute Length:
Attribute Event
VLAN ID
End Mark
04
00
Copyright © 2002 - The McGraw-Hill Companies srl
9
VLAN 6
VLAN 6
8
VLAN 4
VLAN 2
6 7
VLAN 4
5
VLAN 2
4
VLAN 2
Switch SVL
Port
MAC adress
Ag. Time
VLAN
4
08-00-2b-16-50-a0
1
2
7
08-00-2b-c4-e6-aa
2
4
5
08-00-2b-20-10-56
7
2
2
08-00-5a-10-40-e1
12
6
08-00-5a-10-40-e1
08-00-2b-16-50-a0
08-00-2b-c4-e6-aa
08-00-2b-20-10-56
Copyright © 2002 - The McGraw-Hill Companies srl
Switch IVL
9
VLAN 6
MAC adress
Ag. Time
4
08-00-2b-16-50-a0
1
5
08-00-2b-20-10-56
7
7
08-00-2b-c4-e6-aa
2
2
08-00-5a-10-40-e1
12
VLAN 6
8
VLAN 4
VLAN 2
6 7
VLAN 4
5
VLAN 2
4
VLAN 2
FID # 1
VLAN 2
Port
FID # 2
VLAN 4
08-00-5a-10-40-e1
08-00-2b-16-50-a0
FID # 3
VLAN 6
08-00-2b-c4-e6-aa
08-00-2b-20-10-56
Copyright © 2002 - The McGraw-Hill Companies srl
Server
Porta 3 TRUNK
Switch IVL
Porta 1 VLAN 10
VLAN 15 Porta 2
VLAN 15
VLAN 10
Client A
Client B
Switch(config)#int fastEthernet 0/3
Switch(config-if)#switchport mode trunk
Switch(config-if)#switchport trunk allowed vlan add 10,15
Switch(config-if)#end
Copyright © 2002 - The McGraw-Hill Companies srl
Server
Porta 3
Switch IVL
Porta 1 VLAN 10
VLAN 15 Porta 2
VLAN 15
VLAN 10
Client A
Client B
Switch(config)#int fastEthernet 0/3
Switch(config-if)#switchport mode multi
Switch(config-if)#switchport multi vlan add 10
Switch(config-if)#switchport multi vlan add 15
Switch(config-if)#end
Copyright © 2002 - The McGraw-Hill Companies srl
VLAN 20
Server
VLAN - Tabella
di condivisione
Porta 3
VLAN 20
VLAN Porte condivise
20
porta 1 e 2
10
porta 3
15
porta 3
Switch SVL
Porta 1 VLAN 10
VLAN 15 Porta 2
VLAN 15
VLAN 10
Client A
Client B
Copyright © 2002 - The McGraw-Hill Companies srl
Trunk link
(tutte le VLAN)
1o Caso
Bridge
VLAN-aware
Bridge
VLAN-aware
Access link
VLAN 15
Trunk link
(tutte le VLAN)
Spanning tree
porta Blocking
Spanning tree
porta Blocking
Bridge
VLAN-aware
Bridge
o
2 Caso VLAN-aware
Access link
VLAN 15
Copyright © 2002 - The McGraw-Hill Companies srl
Server A
(VLAN 10)
1o Caso
Server B
(VLAN 15)
(VLAN 10)
bridge 802.1D
VLAN -unaware
Bridge 802.1Q
VLAN-aware
Client del
Server A
STP
porta Blocking
(VLAN 15)
bridge 802.1D
VLAN -unaware
Client del
Server B
STP
Porta Blocking
Server A
(VLAN 10)
2o Caso
Server B
(VLAN 15)
(VLAN 10)
bridge 802.1D
VLAN -unaware
Client del
Server A
Bridge 802.1Q
VLAN-aware
(VLAN 15)
bridge 802.1D
VLAN -unaware
Client del
Server B
Copyright © 2002 - The McGraw-Hill Companies srl
……….
1 - Ethernet
DA/SA
Type
2 - 802.3 RFC 1042
DA/SA
Length
AA-AA-03 00-00-00
3 - 802.3 Private SNAP
DA/SA
Length
AA-AA-03
4 - 802.3 conforme a
802.1H
DA/SA
Length
AA-AA-03 00-00-F8
5 - 802.3 con altri
indirizzi LLC
DA/SA
Length
LLC DSAP/SSAP
Type
……….
……….
PID
Type
……….
……….
Copyright © 2002 - The McGraw-Hill Companies srl
Ethernet
802.3 RFC 1042
DA/SA
Type
DA/SA
Length
Protocol Group Database
Tipo di
pacchetto
Ether Type/
Group ID
LLC
Ethernet
08-00
A
Ethernet
08-06
B
RFC 1042
08-00
C
RFC 1042
08-06
F
……….
AA-AA-03 00-00-00
……….
Type
Group ID
VID
A
234
B
567
C
234
D
567
1
Insieme di
VID per la
porta 1
PVID porta 1
(Port VLAN ID)
Group ID
VID
A
123
B
123
789
Insieme di
VID per la
porta 2
PVID porta 2
Copyright © 2002 - The McGraw-Hill Companies srl
Albero 1
Bridge Priority
1,7000,08002b201056
Indirizzo MAC
A
B
1,6000,08002bc4e6aa
Root albero 1
1,8000,08002b102062
C
Albero 2
Bridge Priority
2,7000,08002b201056
Indirizzo MAC
A
B
2,8000,08002bc4e6aa
C
Albero 1
VLAN 1, 3, 8, 10
Albero 2
VLAN 2, 4, 5, 6
2,6000,08002b102062
Root albero 2
Copyright © 2002 - The McGraw-Hill Companies srl
Region 1
4420
RG1
(4420/4420)
A
8570
RG1
(4420/4420)
B
6830
RG1
(4420/4420)
C
D
E
4530
SST
(4420)
H
4860
RG2
(4420/4860)
4970
RG2
(4420/4860)
J
G
K
F
4750
SST
(4420)
8840
RG2
(4420/4860)
8720
RG2
(4420/4860)
R
S
Region 3
Q
L
O
M
4770
RG2
(4420/4860)
I
N
4650
RG2
(4420/4860)
P
Region 2
4940
RG3
(4420/4940)
4690
RG4
(4420/4690)
Region 4
Copyright © 2002 - The McGraw-Hill Companies srl
4420
RG1
(4420/4420)
E
4530
SST
(4420)
Region 2
G
4860
RG2
(4420/4860)
P
F
D
S
R
4750
SST
(4420)
Q
Region 3
4940
RG3
(4420/4940)
O
Region 4
4690
RG4
(4420/4690)
Copyright © 2002 - The McGraw-Hill Companies srl
Porzione del CST nella Region 1
0,4420,08002b201056
Region 1
A
0,8570,08002bc4e6aa
CIST Root
B
Region 1
0,6830,08002b102062
Region 1
C
1,7000,08002b201056
MSTI 1
Region 1
A
B
1,6000,08002bc4e6aa
Region 1
1,8000,08002b102062
Region 1
Root MSTI 1
C
2,7000,08002b201056
MSTI 2
Region 1
A
B
2,8000,08002bc4e6aa
Region 1
2,6000,08002b102062
Region 1
C
Root MSTI 2
Copyright © 2002 - The McGraw-Hill Companies srl
MSTI BPDU
Protocol Identifier
Protocol Version Identifier
3
BPDU Type
4
CIST Flags
5
CIST Root Identifier
6–13
CIST External Path Cost
14–17
CIST Regional Root Identifier
18–25
CIST Port Identifier
26–27
Message Age
28–29
Max Age
30–31
Hello Time
32–33
Forward Delay
34–35
Version 1 Length = 0
MSTI Configuration Message
1–2
36
Version 3 Length
37–38
1
MST Configuration Identifier
39–89
MSTI Regional Root Identifier
2–9
CIST Internal Root Path Cost
90–93
MSTI Internal Root Path Cost
10–13
CIST Bridge Identifier
94–101
MSTI Bridge Priority
14
CIST Remaining Hops
102
MSTI Port Priority
15
MSTI Configuration Messages
103
MSTI Remaining Hops
16
(può essere assente)
MSTI Flags
Copyright © 2002 - The McGraw-Hill Companies srl
Scarica

TRUNK - bYTEBoss