Sunteți pe pagina 1din 14

VLAN Routing

HUAWEI TECHNOLOGIES CO., LTD.


Foreword

The implementation of VLAN technology within an enterprise network


effectively establishes broadcast domains that control the scope of traffic.
One of the limitations of broadcast domains is that communication at the
link layer is hindered between hosts that are not part of the same VLAN.
Traditional link layer switches supporting VLANs are not capable of
forwarding traffic between these broadcast domains, and therefore
routing must be introduced to facilitate communication. The application of
VLAN routing when using link layer switches, together with a device
capable of routing VLAN traffic is introduced, along with details of how
layer three switches capable of network layer operations can enable
communication over VLAN defined broadcast domains.

Copyright 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 2
Objectives

Upon completion of this section, trainees will be able to:


Explain the purpose of VLAN routing.
Explain how VLAN routing is achieved for layer 2 & layer 3 switches.
Configure VLAN routing.

Copyright 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 3
VLAN Disadvantages

SWA

VLAN 100 VLAN 200

Attempts to limit broadcast domain size through VLAN


implementation isolates users.

Copyright 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 4
VLAN Routing

RTA

SWA

Host A Host B

VLAN 2 VLAN 3
VLAN frames are routed over a trunk link for port conservation.

Copyright 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 5
VLAN Routing Features

RTA

G0/0/1.1 G0/0/1.2
192.168.2.254 192.168.3.254
VLAN Trunk

SWA

Host A Host B
GW:192.168.2.254 GW:192.168.3.254
VLAN 2 VLAN 3
A single trunk supports VLAN routes by using sub-interfaces.

Copyright 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 6
VLAN Routing Configuration

Host A SWA RTA

VLAN 2 G0/0/3
G0/0/1

192.168.2.1/24 VLAN 3 G0/0/2

Host B
192.168.3.1/24

[SWA]vlan batch 2 3
[SWA-GigabitEthernet0/0/1]port link-type access
[SWA-GigabitEthernet0/0/1]port default vlan 2
[SWA-GigabitEthernet0/0/2]port link-type access
[SWA-GigabitEthernet0/0/2]port default vlan 3
[SWA-GigabitEthernet0/0/3]port link-type trunk
[SWA-GigabitEthernet0/0/3]port trunk allow-pass vlan all

Copyright 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 7
VLAN Routing Configuration

Host A SWA RTA


G0/0/1.1
VLAN 2 G0/0/3 192.168.2.254/24
G0/0/1 G0/0/1.2
192.168.3.254/24
192.168.2.1/24 VLAN 3 G0/0/2

Host B
192.168.3.1/24

[RTA]interface GigabitEthernet0/0/1.1
[RTA-GigabitEthernet0/0/1.1]dot1q termination vid 2
[RTA-GigabitEthernet0/0/1.1]ip address 192.168.2.254 24
[RTA-GigabitEthernet0/0/1.1]arp broadcast enable
[RTA]interface GigabitEthernet0/0/1.2
[RTA-GigabitEthernet0/0/1.2]dot1q termination vid 3
[RTA-GigabitEthernet0/0/1.2]ip address 192.168.3.254 24
[RTA-GigabitEthernet0/0/1.2]arp broadcast enable

Copyright 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 8
VLAN Routing Configuration

HostA>ping
HostA>ping 192.168.3.1
192.168.3.1

Ping
Ping 192.168.3.1:
192.168.3.1: 32
32 data
data bytes,
bytes, Press
Press Ctrl_C
Ctrl_C to
to break
break
From
From 192.168.3.1:
192.168.3.1: bytes=32
bytes=32 seq=1
seq=1 ttl=127
ttl=127 time=15
time=15 ms
ms
From
From 192.168.3.1:
192.168.3.1: bytes=32
bytes=32 seq=2
seq=2 ttl=127
ttl=127 time=15
time=15 ms
ms
From
From 192.168.3.1:
192.168.3.1: bytes=32
bytes=32 seq=3
seq=3 ttl=127
ttl=127 time=32
time=32 ms
ms
From
From 192.168.3.1:
192.168.3.1: bytes=32
bytes=32 seq=4
seq=4 ttl=127
ttl=127 time=16
time=16 ms
ms
From
From 192.168.3.1:
192.168.3.1: bytes=32
bytes=32 seq=5
seq=5 ttl=127
ttl=127 time=31
time=31 ms
ms

---
--- 192.168.3.1
192.168.3.1 ping
ping statistics
statistics ---
---
55 packet(s)
packet(s) transmitted
transmitted
55 packet(s)
packet(s) received
received
0.00%
0.00% packet
packet loss
loss
round-trip
round-trip min/avg/max
min/avg/max == 15/21/32
15/21/32 ms
ms

Copyright 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 9
L3 Switch based VLAN Routing

SWA

VLANIF 2: 192.168.2.254/24
VLANIF 3: 192.168.3.254/24

Host A Host B Host C Host D


GW:192.168.2.254 GW:192.168.2.254 GW:192.168.3.254 GW:192.168.3.254

VLAN 2 VLAN 3
VLANIF are used by each VLAN as a route gateway.

Copyright 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 10
L3 Switch Configuration

SWA

VLANIF 2: 192.168.2.254/24
VLANIF 3: 192.168.3.254/24
G0/0/1 G0/0/2
VLAN 2 VLAN 3

Host A Host B
192.168.2.2/24 192.168.3.2/24

[SWA]vlan
[SWA]vlan batch
batch 22 33
[SWA-GigabitEthernet0/0/1]port
[SWA-GigabitEthernet0/0/1]port link-type
link-type access
access
[SWA-GigabitEthernet0/0/1]port
[SWA-GigabitEthernet0/0/1]port default
default vlan
vlan 22
[SWA-GigabitEthernet0/0/2]port
[SWA-GigabitEthernet0/0/2]port link-type
link-type access
access
[SWA-GigabitEthernet0/0/2]port
[SWA-GigabitEthernet0/0/2]port default
default vlan
vlan 33

Copyright 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 11
L3 Switch Configuration

SWA

VLANIF 2: 192.168.2.254/24
VLANIF 3: 192.168.3.254/24
G0/0/1 G0/0/2
VLAN 2 VLAN 3

Host A Host B
192.168.2.2/24 192.168.3.2/24

[SWA]interface
[SWA]interface vlanif
vlanif 22
[SWA-Vlanif2]ip
[SWA-Vlanif2]ip address
address 192.168.2.254
192.168.2.254 24
24
[SWA-Vlanif2]quit
[SWA-Vlanif2]quit
[SWA]interface
[SWA]interface vlanif
vlanif 33
[SWA-Vlanif3]ip
[SWA-Vlanif3]ip address
address 192.168.3.254
192.168.3.254 24
24
[SWA-Vlanif3]quit
[SWA-Vlanif3]quit

Copyright 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 12
Summary

What is the purpose of the dot1q termination vid <vlan-id> command?


What is required to be configured on the switch to allow VLAN traffic
to be forwarded to the configured sub-interfaces?

Copyright 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 13
Thank you
www.huawei.com

S-ar putea să vă placă și