实验2 MVRP
实验任务一 MVRP的基本配置
-
建立物理连接
-
配置基于端口的VLAN
[SWA-GigabitEthernet1/0/3]port link-type trunk
[SWA-GigabitEthernet1/0/3]port trunk permit vlan all
[SWA-vlan10]port GigabitEthernet 1/0/1
[SWB-GigabitEthernet1/0/1]port link-type trunk
[SWB-GigabitEthernet1/0/1]port trunk permit vlan all
[SWB-GigabitEthernet1/0/2]port link-type trunk
[SWB-GigabitEthernet1/0/2]port trunk permit vlan all
[SWC-GigabitEthernet1/0/1]port link-type trunk
[SWC-GigabitEthernet1/0/1]port trunk permit vlan all
[SWC-vlan10]port GigabitEthernet 1/0/2
因为中间的交换机SWB没有缺省VLAN10,所以不会转发数据。
VLAN能不能通过还是要看VLAN PASSING
[SWB]display interface ge1/0/2
GigabitEthernet1/0/2
Current state: UP
Line protocol state: UP
IP packet frame type: Ethernet II, hardware address: 9ed5-49e0-0400
Description: GigabitEthernet1/0/2 Interface
Bandwidth: 1000000 kbps
Loopback is not set
1000Mbps-speed mode, full-duplex mode
Link speed type is autonegotiation, link duplex type is autonegotiation
Flow-control is not enabled
Maximum frame length: 9216
Allow jumbo frames to pass
Broadcast max-ratio: 100%
Multicast max-ratio: 100%
Unicast max-ratio: 100%
PVID: 1
MDI type: Automdix
Port link-type: Trunk
VLAN Passing: 1(default vlan)
VLAN permitted: 1(default vlan), 2-4094
Trunk port encapsulation: IEEE 802.1q
Port priority: 2
Last link flapping: 0 hours 9 minutes 25 seconds
Last clearing of counters: Never
Current system time:2018-05-28 10:07:44
Last time when physical state changed to up:2018-05-28 09:58:19
Last time when physical state changed to down:2018-05-28 09:58:06
Peak input rate: 0 bytes/sec, at 00-00-00 00:00:00
Peak output rate: 0 bytes/sec, at 00-00-00 00:00:00
Last 300 second input: 0 packets/sec 0 bytes/sec 0%
Last 300 second output: 0 packets/sec 0 bytes/sec 0%
Input (total): 0 packets, 0 bytes
0 unicasts, 0 broadcasts, 0 multicasts, 0 pauses
Input (normal): 0 packets, 0 bytes
0 unicasts, 0 broadcasts, 0 multicasts, 0 pauses
Input: 0 input errors, 0 runts, 0 giants, 0 throttles
0 CRC, 0 frame, 0 overruns, 0 aborts
0 ignored, 0 parity errors
Output (total): 0 packets, 0 bytes
0 unicasts, 0 broadcasts, 0 multicasts, 0 pauses
Output (normal): 0 packets, 0 bytes
0 unicasts, 0 broadcasts, 0 multicasts, 0 pauses
Output: 0 output errors, 0 underruns, 0 buffer failures
0 aborts, 0 deferred, 0 collisions, 0 late collisions
0 lost carrier, 0 no carrier
[SWA]display interface GigabitEthernet 1/0/3
GigabitEthernet1/0/3
Current state: UP
Line protocol state: UP
IP packet frame type: Ethernet II, hardware address: 9ed5-43f4-0300
Description: GigabitEthernet1/0/3 Interface
Bandwidth: 1000000 kbps
Loopback is not set
1000Mbps-speed mode, full-duplex mode
Link speed type is autonegotiation, link duplex type is autonegotiation
Flow-control is not enabled
Maximum frame length: 9216
Allow jumbo frames to pass
Broadcast max-ratio: 100%
Multicast max-ratio: 100%
Unicast max-ratio: 100%
PVID: 1
MDI type: Automdix
Port link-type: Trunk
VLAN Passing: 1(default vlan), 10
VLAN permitted: 1(default vlan), 2-4094
Trunk port encapsulation: IEEE 802.1q
Port priority: 2
Last link flapping: 0 hours 11 minutes 46 seconds
Last clearing of counters: Never
Current system time:2018-05-28 10:09:56
Last time when physical state changed to up:2018-05-28 09:58:10
Last time when physical state changed to down:2018-05-28 09:57:58
Peak input rate: 0 bytes/sec, at 00-00-00 00:00:00
Peak output rate: 0 bytes/sec, at 00-00-00 00:00:00
Last 300 second input: 0 packets/sec 0 bytes/sec 0%
Last 300 second output: 0 packets/sec 0 bytes/sec 0%
Input (total): 0 packets, 0 bytes
0 unicasts, 0 broadcasts, 0 multicasts, 0 pauses
Input (normal): 0 packets, 0 bytes
0 unicasts, 0 broadcasts, 0 multicasts, 0 pauses
Input: 0 input errors, 0 runts, 0 giants, 0 throttles
0 CRC, 0 frame, 0 overruns, 0 aborts
0 ignored, 0 parity errors
Output (total): 0 packets, 0 bytes
0 unicasts, 0 broadcasts, 0 multicasts, 0 pauses
Output (normal): 0 packets, 0 bytes
0 unicasts, 0 broadcasts, 0 multicasts, 0 pauses
Output: 0 output errors, 0 underruns, 0 buffer failures
0 aborts, 0 deferred, 0 collisions, 0 late collisions
0 lost carrier, 0 no carrier
- SWA SWB SWC的Trunk端口启动MVRP
[SWA]mvrp global enable
[SWA-GigabitEthernet1/0/3]mvrp enable
[SWB]mvrp global enable
[SWB-GigabitEthernet1/0/2]mvrp enable
[SWB-GigabitEthernet1/0/1]mvrp enable
[SWC]mvrp global enable
[SWC-GigabitEthernet1/0/1]mvrp enable
查看各个交换机上的VLAN
[SWA]display vlan all
VLAN ID: 10
VLAN type: Static
Route interface: Not configured
Description: VLAN 0010
Name: VLAN 0010
Tagged ports:
GigabitEthernet1/0/3
Untagged ports:
GigabitEthernet1/0/1
[SWB]display vlan all
VLAN ID: 10
VLAN type: Dynamic
Route interface: Not configured
Description: VLAN 0010
Name: VLAN 0010
Tagged ports:
GigabitEthernet1/0/1 GigabitEthernet1/0/2
Untagged ports: None
[SWCdisplay vlan all
VLAN ID: 10
VLAN type: Static
Route interface: Not configured
Description: VLAN 0010
Name: VLAN 0010
Tagged ports:
GigabitEthernet1/0/1
Untagged ports:
GigabitEthernet1/0/2
PCA可以ping通PCC
实验任务二:MVRP端口注册模式配置
-
建立物理连接
-
在SWA配置VLAN20
[SWA]vlan 20
[SWB]display vlan all
VLAN ID: 1
VLAN type: Static
Route interface: Not configured
Description: VLAN 0001
Name: VLAN 0001
Tagged ports: None
Untagged ports:
FortyGigE1/0/53 FortyGigE1/0/54
GigabitEthernet1/0/1 GigabitEthernet1/0/2
GigabitEthernet1/0/3 GigabitEthernet1/0/4
GigabitEthernet1/0/5 GigabitEthernet1/0/6
GigabitEthernet1/0/7 GigabitEthernet1/0/8
GigabitEthernet1/0/9 GigabitEthernet1/0/10
GigabitEthernet1/0/11 GigabitEthernet1/0/12
GigabitEthernet1/0/13 GigabitEthernet1/0/14
GigabitEthernet1/0/15 GigabitEthernet1/0/16
GigabitEthernet1/0/17 GigabitEthernet1/0/18
GigabitEthernet1/0/19 GigabitEthernet1/0/20
GigabitEthernet1/0/21 GigabitEthernet1/0/22
GigabitEthernet1/0/23 GigabitEthernet1/0/24
GigabitEthernet1/0/25 GigabitEthernet1/0/26
GigabitEthernet1/0/27 GigabitEthernet1/0/28
GigabitEthernet1/0/29 GigabitEthernet1/0/30
GigabitEthernet1/0/31 GigabitEthernet1/0/32
GigabitEthernet1/0/33 GigabitEthernet1/0/34
GigabitEthernet1/0/35 GigabitEthernet1/0/36
GigabitEthernet1/0/37 GigabitEthernet1/0/38
GigabitEthernet1/0/39 GigabitEthernet1/0/40
GigabitEthernet1/0/41 GigabitEthernet1/0/42
GigabitEthernet1/0/43 GigabitEthernet1/0/44
GigabitEthernet1/0/45 GigabitEthernet1/0/46
GigabitEthernet1/0/47 GigabitEthernet1/0/48
Ten-GigabitEthernet1/0/49
Ten-GigabitEthernet1/0/50
Ten-GigabitEthernet1/0/51
Ten-GigabitEthernet1/0/52
VLAN ID: 10
VLAN type: Dynamic
Route interface: Not configured
Description: VLAN 0010
Name: VLAN 0010
Tagged ports:
GigabitEthernet1/0/1 GigabitEthernet1/0/2
Untagged ports: None
VLAN ID: 20
VLAN type: Dynamic
Route interface: Not configured
Description: VLAN 0020
Name: VLAN 0020
Tagged ports:
GigabitEthernet1/0/1
Untagged ports: None
[SWC]display vlan all
VLAN ID: 1
VLAN type: Static
Route interface: Not configured
Description: VLAN 0001
Name: VLAN 0001
Tagged ports: None
Untagged ports:
FortyGigE1/0/53 FortyGigE1/0/54
GigabitEthernet1/0/2 GigabitEthernet1/0/3
GigabitEthernet1/0/4 GigabitEthernet1/0/5
GigabitEthernet1/0/6 GigabitEthernet1/0/7
GigabitEthernet1/0/8 GigabitEthernet1/0/9
GigabitEthernet1/0/10 GigabitEthernet1/0/11
GigabitEthernet1/0/12 GigabitEthernet1/0/13
GigabitEthernet1/0/14 GigabitEthernet1/0/15
GigabitEthernet1/0/16 GigabitEthernet1/0/17
GigabitEthernet1/0/18 GigabitEthernet1/0/19
GigabitEthernet1/0/20 GigabitEthernet1/0/21
GigabitEthernet1/0/22 GigabitEthernet1/0/23
GigabitEthernet1/0/24 GigabitEthernet1/0/25
GigabitEthernet1/0/26 GigabitEthernet1/0/27
GigabitEthernet1/0/28 GigabitEthernet1/0/29
GigabitEthernet1/0/30 GigabitEthernet1/0/31
GigabitEthernet1/0/32 GigabitEthernet1/0/33
GigabitEthernet1/0/34 GigabitEthernet1/0/35
GigabitEthernet1/0/36 GigabitEthernet1/0/37
GigabitEthernet1/0/38 GigabitEthernet1/0/39
GigabitEthernet1/0/40 GigabitEthernet1/0/41
GigabitEthernet1/0/42 GigabitEthernet1/0/43
GigabitEthernet1/0/44 GigabitEthernet1/0/45
GigabitEthernet1/0/46 GigabitEthernet1/0/47
GigabitEthernet1/0/48
Ten-GigabitEthernet1/0/49
Ten-GigabitEthernet1/0/50
Ten-GigabitEthernet1/0/51
Ten-GigabitEthernet1/0/52
VLAN ID: 10
VLAN type: Static
Route interface: Not configured
Description: VLAN 0010
Name: VLAN 0010
Tagged ports:
GigabitEthernet1/0/3
Untagged ports:
GigabitEthernet1/0/1
VLAN ID: 20
VLAN type: Dynamic
Route interface: Not configured
Description: VLAN 0020
Name: VLAN 0020
Tagged ports:
GigabitEthernet1/0/3
Untagged ports: None
[SWA]display interface GigabitEthernet 1/0/3
Port link-type: Trunk
VLAN Passing: 1(default vlan), 10, 20
VLAN permitted: 1(default vlan), 2-4094
Trunk port encapsulation: IEEE 802.1q
[SWB]display interface GigabitEthernet 1/0/1
Port link-type: Trunk
VLAN Passing: 1(default vlan), 10, 20
VLAN permitted: 1(default vlan), 2-4094
Trunk port encapsulation: IEEE 802.1q
[SWB]display interface GigabitEthernet 1/0/2
Port link-type: Trunk
VLAN Passing: 1(default vlan), 10
VLAN permitted: 1(default vlan), 2-4094
Trunk port encapsulation: IEEE 802.1q
[SWC]display interface GigabitEthernet 1/0/3
Port link-type: Trunk
VLAN Passing: 1(default vlan), 10, 20
VLAN permitted: 1(default vlan), 2-4094
Trunk port encapsulation: IEEE 802.1q
从上面可知,SWA SWB SWC的Trunk端口允许VLAN10 VLAN 20通过, 但是SWB的1/0/2口只允许VLAN10通过。
实际上MVRP协议是进行VLAN注册时,声明注册过程是沿着网络路径单向传播。
过程:SWA1/0/3声明VLAN20的属性,SWB1/0/1注册VLAN20属性,再通过SWB的1/0/2声明VLAN20属性,SWC1/0/3注册该属性。
[SWC-GigabitEthernet1/0/2]port access vlan 20
The specified dynamic VLANs have been changed to static VLANs.
当配置了基于端口的VLAN,动态VLAN自动转换为静态VLAN。
此时,PCB和PCD能够ping通。
3. MVRP端口Fixed注册模式配置
[SWA-GigabitEthernet1/0/3]mvrp registration fixed
[SWC]vlan 30
[SWA]display vlan dynamic
No dynamic VLAN exists.
Dynamic VLANs: 3
The dynamic VLANs include:
10, 20, 30
[SWA]display mvrp running-status
-------[MVRP Global Info]-------
Global Status : Enabled
Compliance-GVRP : False
----[GigabitEthernet1/0/3]----
Config Status : Enabled
Running Status : Enabled
Join Timer : 20 (centiseconds)
Leave Timer : 60 (centiseconds)
Periodic Timer : 100 (centiseconds)
LeaveAll Timer : 1000 (centiseconds)
Registration Type : Fixed
Registered VLANs :
1(default), 10
Declared VLANs :
1(default), 10, 20
Propagated VLANs :
1(default), 10
//Fixed模式下不动态注册或注销VLAN,但是传播静态路由,比如说VLAN10。
4. MVRP端口Forbidden注册模式配置
[SWA-GigabitEthernet1/0/3]mvrp registration forbidden
[SWA-GigabitEthernet1/0/3]display vlan dynamic
No dynamic VLAN exists.
[SWA]display mvrp running-status
-------[MVRP Global Info]-------
Global Status : Enabled
Compliance-GVRP : False
----[GigabitEthernet1/0/3]----
Config Status : Enabled
Running Status : Enabled
Join Timer : 20 (centiseconds)
Leave Timer : 60 (centiseconds)
Periodic Timer : 100 (centiseconds)
LeaveAll Timer : 1000 (centiseconds)
Registration Type : Forbidden
Registered VLANs :
None
Declared VLANs :
1(default), 10, 20
Propagated VLANs :
None
//不动态注册或注销VLAN,不传播VLAN1之外的任何VLAN信息。即是不接受对端的vlan注册注销消息,也不传播。