1.路由器的配置
[Router]
[Router]inter e0
[Router-Ethernet0]ip add 10.0.0.1 255.255.255.0
[Router-Ethernet0]inter e0.1 //定义子接口E0.1
[Router-Ethernet0.1]ip add 172.16.1.1 255.255.255.0
[Router-Ethernet0.1]vlan-type dot1q vid 1 //指定以太网子接口属于VLAN1,此命令应用在以太网子接口上。只有配置了该命令之后,以太网子接口才会根据配置的VLAN ID 号在以太网帧头中嵌入VLAN 标签,与该网口相连的交换机接口才能正确处理接收到的帧。
[Router-Ethernet0.1]inter e0.2 //定义子接口E0.2
[Router-Ethernet0.2]ip add 172.16.2.1 255.255.255.0
[Router-Ethernet0.2]vlan-type dot1q vid 2 //指定以太网子接口属于VLAN2
[Router-Ethernet0.2]inter e0.3 //定义子接口E0.3
[Router-Ethernet0.3]ip add 172.16.3.1 255.255.255.0
[Router-Ethernet0.3]vlan-type dot1q vid 3 //指定以太网子接口属于VLAN3
[Router-Ethernet0.3]inter e0
[Router-Ethernet0]undo shut
% Interface Ethernet0 is up
[Router-Ethernet0] //用网线将E0端口连到S3026第24端口
%19:46:32: Interface Ethernet0 changed state to UP
%19:46:32: Line protocol ip on interface Ethernet0, changed state to UP
%19:46:32: Line protocol ip on interface Ethernet0.1, changed state to UP
%19:46:32: Line protocol ip on interface Ethernet0.2, changed state to UP
%19:46:32: Line protocol ip on interface Ethernet0.3, changed state to UP
2.交换机的配置
sys
Enter system view , return user view with Ctrl+Z.
[Quidway]vlan 1
[Quidway-vlan1]vlan 2
[Quidway-vlan2]port ethernet 0/17 to eth 0/19 eth 0/22 //将第17至19端口,和第22端口加入VLAN2
[Quidway-vlan2]vlan 3
[Quidway-vlan3]port eth 0/21 //将第21端口加入VLAN2
[Quidway-vlan3]inter e0/24
[Quidway-Ethernet0/24]port link-type trunk //将第24端口设为trunk口
[Quidway-Ethernet0/24]port trunk permit vlan all //允许所有VLAN流量通过
Please wait........................................... Done.
[Quidway-Ethernet0/24]dis port trunk //检验TRUNK口配置
Now, the following trunking ports exist:
Ethernet0/24
[Quidway-Ethernet0/24]dis vlan 2 //检验VLAN2的配置
VLAN ID: 2
VLAN Type: static
Route Interface: not configured
Description: VLAN 0002
Tagged Ports:
Ethernet0/24
Untagged Ports:
Ethernet0/17 Ethernet0/18 Ethernet0/19 Ethernet0/22
[Quidway-Ethernet0/24]dis vlan 3 //检验VLAN3的配置
VLAN ID: 3
VLAN Type: static
Route Interface: not configured
Description: VLAN 0003
Tagged Ports:
Ethernet0/24
Untagged Ports:
Ethernet0/21作者: jinyu0322 时间: 2009-3-11 17:28
有没有配置的电子书什么的 对华为的配置手册比较陌生 有的话 麻烦帮忙给传一个 谢谢作者: 思考的牛 时间: 2009-3-12 11:41 华为配置命令大全:http://bbs.xtjc.com/thread-51-1-1.html作者: le344914701 时间: 2009-8-19 13:35
学习中,感谢楼主作者: 我是菜鸟 时间: 2009-8-27 10:04
顶一下作者: --A-- 时间: 2009-10-8 16:38
菜鸟---