Escolar Documentos
Profissional Documentos
Cultura Documentos
VLANs e LACP
VLANs
Origem
● Problema: todos os equipamentos ligados aos mesmos switchs constituem
um único barramento de comunicação L2 (domínio de broadcast).
LAN 2 LAN 2
LAN 1 LAN 1
VLAN 1 VLAN 1
● Quadros ACESSO:
4 Bytes
00be baca fe12 00be baca fe21 0806 0001 Quadro com Quadro passando
0800 0604 0001 00be baca fe21 0a00 0002 42 bytes
0000 0000 0000 0a00 0001 em porta ACCESS
Descrição:
MAC-DST: 00:be:ba:ca:fe:12
MAC-SRC: 00:be:ba:ca:fe:21
EtherType: 0806 (ARP)
ARP: Request (01) - IPv4 (0800) - who-has 10.0.0.1 tell 10.0.0.2
interface GigabitEthernet0/0/1
port link-type trunk Switch 2
#
interface GigabitEthernet0/0/2
#
interface GigabitEthernet0/0/3
#
Nuva Soluções em TIC - http://www.nuva.com.br Página
● Criar uma nova VLAN cria um barramento virtual (varal!);
● Sem portas associadas, a nova vlan "flutua" no nada!
vlan 2
VLAN 2
interface GigabitEthernet0/0/1
# VLAN 1
interface GigabitEthernet0/0/2
#
interface GigabitEthernet0/0/3
#
interface GigabitEthernet0/0/4
#
interface GigabitEthernet0/0/3
port link-type access
port default vlan 2
#
interface GigabitEthernet0/0/4
port link-type access
port default vlan 2
#
vlan 2
vlan 4000
interface GigabitEthernet0/0/1
#
interface GigabitEthernet0/0/2
#
interface GigabitEthernet0/0/3
port link-type access VLAN 4000
port default vlan 2
# VLAN 2
interface GigabitEthernet0/0/4 VLAN 1
port link-type access
port default vlan 2
#
interface GigabitEthernet0/0/5
port link-type trunk
port trunk allow-pass vlan 2 4000
port trunk pvid vlan 4000
undo port trunk allow-pass vlan 1
#
192.168.0.2 192.168.0.3 10.0.2.10 10.0.2.11
Nuva Soluções em TIC - http://www.nuva.com.br Página
● Numa rede perfeita, a vlan 1 é aliada do administrador:
○ Qualquer porta trunk pode ser usada para ligar um notebook ou
equipamento de gerência e acessar todas as estações, servidores,
roteadores e demais equipamentos.
○ Portas trunk uplink de terminadores de acesso (OLT, Wifi) devem
enviar na uplink os clientes em uma ou mais vlans tagged, e ficar
com a administração em untagged (dhcp?), facilitando o suporte e
acesso direto pelos técnicos.
Acesso (untagged):
192.168.0.21
BRAS VLANs serviços e
clientes:
3000 a 3999
ONU
Bridge
SW/PE OLT
Router
Acesso (untagged):
192.168.0.20
VLANs serviços e
clientes:
ONT
2000 a 2999
Router
Nuva Soluções em TIC - http://www.nuva.com.br Página
# Criar vlans uma a uma # Criar vlans em lote
vlan 10 vlan batch 10 to 20 3999 4001
vlan 11
vlan 12
vlan 13
vlan 14
vlan 15
vlan 16
vlan 17
vlan 18
vlan 19
vlan 20
Vlan 3999
Vlan 4001
Nuva Soluções em TIC - http://www.nuva.com.br Página
vlan 10
description VLAN-WIFI-A
#
# Acesso como pvid de porta trunk (permite adicionar outras vlans tagged):
interface GigabitEthernet0/0/1
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 10
#
NuvaMatriz
C-VLANs Q-IN-Q
TRUNK Datacenter-01
VLANs do vlan 2
Q-IN-Q
Cliente TRUNK Backbone
vlan 2
Rede dist. MPLS
Campus MSTP
CXP-01 Q-IN-Q
Access Q-IN-Q
vlan 2 Q-IN-Q
TRUNK
vlan 2
Access
vlan 2
Q-IN-Q
C-VLANs
Access
VLANs do vlan 2 C-VLANs
Cliente VLANs do
Cliente VLANs
1000-4092
Campus
CXP-02 NuvaFilial
Nuva Soluções em TIC - http://www.nuva.com.br Datacenter-02 Página
● Quadros vlan - ethertype = 88A8 (padrão) ou 9100
● Tudo que entra em uma porta de acesso Q-IN-Q é adicionado ao
barramento da VLAN Q-IN-Q, não importa o que tem dentro!
○ Se o cliente enviar um quadro tipo Q-IN-Q numa porta de acesso
Q-IN-Q o quadro será encapsulado com mais uma tag Q-in-Q.
0x0800 = IPv4 0x8863 = PPPoE Discovery
0x0806 = ARP 0x8864 = PPPoE Session
0x8100 = VLAN 802.1q 0x88A8 = Q-in-Q Provider Bridge (VLAN 802.1ad)
0x86DD = IPv6 0x88CC = LLDP (link layer discovery protocol)
0x8847 = MPLS unicast 0x9100 = VAN Tagged with double tagging
0x8848 = MPLS multicast
88A8 ou 4 Bytes
9100
Priority: 802.1p CFI VID TPID
3 bits 1 bit 12 bits ETHER-TYPE
000 0 000000000000 0x0800
Descrição:
MAC-DST: ff:ff:ff:ff:ff:ff
MAC-SRC: 00:22:22:bb:bb:bb
EtherType: 88a8 (Q-IN-Q) priority 0 (802.1p) vlan 20 (hex 014)
EtherType: 8100 (802.1Q) priority 0 (802.1p) vlan 4000 (hex fa0)
EtherType: 0806 (ARP)
ARP: Request (01) - IPv4 (0800) - who-has 45.255.128.254 tell 45.255.128.253
vlan 20
VLAN 1 VLAN 1
protocol-transparent
g0/0/1
Q-IN-Q
# TRUNK Q-IN-Q TRUNK
interface GigabitEthernet0/0/2 vlan 2
port link-type trunk
port trunk allow-pass vlan 20
qinq protocol 88a8
#
CLIENTE CLIENTE
BRAS 1 BRAS 2
10 Gbit/s
MAC:
MAC:
00:01:02:AA:BB:CC
F0:F1:F2:44:55:66
Buffer IN 10 Gbit/s
HASHING Buffer OUT 2
xGiga 0/0/2
DISTRIBUTOR
Algoritmo de hash analisa cabeçalho para obter um
BIT final, com o BIT final será decidido entre o buffer
de saída 1 ou 2
Eth-Trunk0 Eth-Trunk0
# Switch:
interface Eth-Trunk10
mode lacp
#
interface GigabitEthernet0/3/4
undo shutdown
eth-trunk 10
#
interface GigabitEthernet0/3/5
undo shutdown
eth-trunk 10
#
# Modo de balanceamento:
interface Eth-Trunk1
load-balance dst-ip
interface Eth-Trunk1
load-balance dst-mac
interface Eth-Trunk1
load-balance src-dst-ip
interface Eth-Trunk1
load-balance src-dst-mac
interface Eth-Trunk1
load-balance src-ip
interface Eth-Trunk1
load-balance src-mac
#
10.0.0.31 10.0.0.2
10.0.0.32 10.0.0.3
10.0.0.33 10.0.0.4
10.0.0.34 10.0.0.5
10.0.0.2
10.0.0.3
10.0.0.4
10.0.0.1
10.0.0.5
10.0.0.2
10.0.0.3
10.0.0.4
10.0.0.1
10.0.0.5
10.0.0.31 10.0.0.2
10.0.0.32 10.0.0.3
10.0.0.33 10.0.0.4
10.0.0.34 10.0.0.5
20.1.0.2
30.9.1.0
40.13.4.3
10.0.0.1
90.1.1.8
23.90.14.169 20.1.0.2
192.140.90.71 30.9.1.0
200.202.215.251 40.13.4.3
203.251.254.2 90.1.1.8
# Modo de balanceamento:
interface Eth-Trunk1
load-balance dst-ip
interface Eth-Trunk1
load-balance dst-mac
interface Eth-Trunk1
load-balance src-dst-ip
interface Eth-Trunk1
load-balance src-dst-mac
interface Eth-Trunk1
load-balance src-ip
interface Eth-Trunk1
load-balance src-mac
#
# Opcoes:
interface Eth-Trunk1
lacp timeout fast
lacp preempt enable
lacp preempt delay 10
#
# Transporte LADO 2
interface Vlanif 300
mpls l2vc 10.200.255.5 300
mpls l2vpn flow-label both
#