华为交换机的VLAN基本配置
2017-10-24 20:13
393 查看
配置SW1的vlan
<Huawei>
<Huawei>language-mode Chinese //修改提示语言为中文
Changelanguage mode, confirm? [Y/N] y
提示:改变语言模式成功。
<Huawei>undo terminal monitor //关闭终端显示信息
Info:Current terminal monitor is off.
<Huawei>system-view
Entersystem view, return user view with Ctrl+Z.
[Huawei]sysname SW1
[SW1]vlan 10
[SW1-vlan10]vlan 20
[SW1-vlan20]vlan 30
[SW1-vlan30]qu
[SW1]int e0/0/2
[SW1-Ethernet0/0/2]port link-type access
[SW1-Ethernet0/0/2]port default vlan 10
[SW1-Ethernet0/0/2]int e0/0/3
[SW1-Ethernet0/0/3]port link-type access
[SW1-Ethernet0/0/3]port default vlan 20
[SW1-Ethernet0/0/3]int e0/0/4
[SW1-Ethernet0/0/4]port link-type access
[SW1-Ethernet0/0/4]port default vlan 30
[SW1-Ethernet0/0/4]quit
[SW1]int e0/0/1
[SW1-Ethernet0/0/1]port link-type trunk
[SW1-Ethernet0/0/1]port trunk allow-pass vlan all
[SW1-Ethernet0/0/1]quit
[SW1]interface Vlan 10
[SW1-Vlanif10]ip address 192.168.1.1 24
[SW1-Vlanif10]undo sh
[SW1-Vlanif10]int vlan 20
[SW1-Vlanif20]ip address 192.168.2.1 24
[SW1-Vlanif20]undo sh
[SW1-Vlanif20]int vlan 30
[SW1-Vlanif30]ipadd 192.168.3.1 24
[SW1-Vlanif30]undo sh
[SW1]display ip int br
*down:administratively down
^down:standby
(l):loopback
(s):spoofing
The numberof interface that is UP in Physical is 5
The numberof interface that is DOWN in Physical is 1
The numberof interface that is UP in Protocol is 4
The numberof interface that is DOWN in Protocol is 2
Interface IP Address/Mask Physical Protocol
MEth0/0/1 unassigned down down
NULL0 unassigned up up(s)
Vlanif1 unassigned up down
Vlanif10 192.168.1.1/24 up up
Vlanif20 192.168.2.1/24 up up
Vlanif30 192.168.3.1/24 up up
[SW1]display vlan
The totalnumber of vlans is : 4
------------------------------------------------------------------
U:Up; D: Down; TG: Tagged; UT: Untagged;
MP:Vlan-mapping; ST:Vlan-stacking;
#:ProtocolTransparent-vlan; *:Management-vlan;
------------------------------------------------------------------
VID Type Ports
------------------------------------------------------------------
1 common UT: Eth0/0/1(U) Eth0/0/5(D) Eth0/0/6(D) Eth0/0/7(D) Eth0/0/8(D) Eth0/0/9(D) Eth0/0/10(D) Eth0/0/11(D) Eth0/0/12(D) Eth0/0/13(D) Eth0/0/14(D) Eth0/0/15(D)
Eth0/0/16(D) Eth0/0/17(D) Eth0/0/18(D) Eth0/0/19(D) Eth0/0/20(D) Eth0/0/21(D) Eth0/0/22(D) GE0/0/1(D) GE0/0/2(D)
10 common UT: Eth0/0/2(U)
TG:Eth0/0/1(U) 20 common UT:Eth0/0/3(U)
TG:Eth0/0/1(U) 30 common UT:Eth0/0/4(U)
TG:Eth0/0/1(U)
VID Status Property MAC-LRN StatisticsDescription
------------------------------------------------------------------
1 enable default enable disable VLAN 0001 10 enable default enable disable VLAN 0010
20 enable default enable disable VLAN 0020 30 enable default enable disable VLAN 0030
配置SW2的vlan
<Huawei>
<Huawei>language-mode Chinese
Changelanguage mode, confirm? [Y/N] y
提示:改变语言模式成功。
<Huawei>undo terminal monitor
Info:Current terminal monitor is off.
<Huawei>system-view
Entersystem view, return user view with Ctrl+Z.
[Huawei]sysname SW2
[SW2]vlan 10
[SW2-vlan10]vlan 20
[SW2-vlan20]vlan 30
[SW2-vlan30]qu
[SW2]int e0/0/2
[SW2-Ethernet0/0/2]port link-type access
[SW2-Ethernet0/0/2]port default vlan 10
[SW2-Ethernet0/0/2]int e0/0/3
[SW2-Ethernet0/0/3]port link-type access
[SW2-Ethernet0/0/3]port default vlan 20
[SW2-Ethernet0/0/3]int e0/0/4
[SW2-Ethernet0/0/4]port link-type access
[SW2-Ethernet0/0/4]port default vlan 30
[SW2-Ethernet0/0/4]qu
[SW2]int e0/0/1
[SW2-Ethernet0/0/1]port link-type trunk
[SW2-Ethernet0/0/1]port trunk allow-pass vlan all
[SW2-Ethernet0/0/1]qu
[SW2]int vlan 10
[SW2-Vlanif10]ip address 192.168.1.1 24
[SW2-Vlanif10]undo sh
[SW2-Vlanif10]int vlan 20
[SW2-Vlanif20]ip address 192.168.2.1 24
[SW2-Vlanif20]undo sh
[SW2-Vlanif20]int vlan 30
[SW2-Vlanif30]ip address 192.168.3.1 24
[SW2-Vlanif30]undo sh
[SW2-Vlanif30]qu
[SW2]display ip int br
*down:administratively down
^down:standby
(l):loopback
(s):spoofing
The numberof interface that is UP in Physical is 5
The numberof interface that is DOWN in Physical is 1
The numberof interface that is UP in Protocol is 4
The numberof interface that is DOWN in Protocol is 2
Interface IP Address/Mask Physical Protocol
MEth0/0/1 unassigned down down
NULL0 unassigned up up(s)
Vlanif1 unassigned up down
Vlanif10 192.168.1.1/24 up up
Vlanif20 192.168.2.1/24 up up
Vlanif30 192.168.3.1/24 up up
[SW2]display vlan
The totalnumber of vlans is : 4
------------------------------------------------------------------
U:Up; D: Down; TG: Tagged; UT: Untagged;
MP:Vlan-mapping; ST: Vlan-stacking;
#:ProtocolTransparent-vlan; *:Management-vlan;
------------------------------------------------------------------
VID Type Ports
------------------------------------------------------------------
1 common UT:Eth0/0/1(U) Eth0/0/5(D) Eth0/0/6(D) Eth0/0/7(D) Eth0/0/8(D) Eth0/0/9(D) Eth0/0/10(D) Eth0/0/11(D) Eth0/0/12(D) Eth0/0/13(D) Eth0/0/14(D) Eth0/0/15(D)
Eth0/0/16(D) Eth0/0/17(D) Eth0/0/18(D) Eth0/0/19(D) Eth0/0/20(D) Eth0/0/21(D) Eth0/0/22(D) GE0/0/1(D) GE0/0/2(D) 10 common UT:Eth0/0/2(U)
TG:Eth0/0/1(U) 20 common UT:Eth0/0/3(U)
TG:Eth0/0/1(U) 30 common UT:Eth0/0/4(U)
TG:Eth0/0/1(U)
VID Status Property MAC-LRN StatisticsDescription
------------------------------------------------------------------
1 enable default enable disable VLAN 0001 10 enable default enable disable VLAN 0010 20 enable default enable disable VLAN 0020 30 enable default enable disable VLAN 0030 配置完后用PC机开始互相PING
几台PC机都能互相PING通。
相关文章推荐
- 华为交换机基本命令配置:建立VLAN,把端口划分到对于vlan上
- 华为交换机基本命令配置:建立VLAN,把端口划分到对于vlan上
- 思科-Vlan(虚拟局域网)基本配置命令--Smallbaal的博客
- Cisco 的基本配置实例之四----vlan的规划及配置(接入交换机)
- 华为交换机vlan配置
- 华为交换机基本配置命令明细
- 华为交换机基本配置总结
- 基本VLAN特性配置与管理——4
- 华为交换机基本配置命令
- 接入层交换机 华为s5700 基本配置指南 sysname SH_QC_5700_office_core1 \\命名设备名 SH_QC_5700_office_core1 # vlan
- H3C交换机基本配置(vlan,dhcp,telnet)
- 华为交换机基本配置命令明细
- 华为交换机基本配置
- 基本VLAN特性配置与管理——2
- CCNA配置试验五 vlan的基本配置
- 华为交换机基本配置(上)
- 华为交换机端口基本配置
- 华为交换机vlan聚合与H3C Supervlan 配置实战对比
- 基本VLAN特性配置与管理——5
- 华为交换机配置基本命令——视图切换