标签 : 网络实验
这是配置交换机的最直接的方式,也是首次配置交换机的唯一方法 直接使用console电缆将电脑的COM端口与交换机console端口相连
直接通过internet,使交换机可以远程登录
但是需要对交换机提前做好配置
system
[QW] interface vlan-interface 1
[QW-vlan-interface1] ip address 192.168.0.2 255.255.255.0
[QW]telnet server enable
[QW] user-interface vty 0 4
[QW-ui-vty0-4] authentication-mode password
[QW-ui-vty0-4] set authentication password simple 123456
[QW-ui-vty0-4] user privilege level 3
[Quidway-Ethernet0/1] speed { 10 | 100 | 1000 | auto }
[Quidway-Ethernet0/1] duplex { full | half | auto}
[Quidway-Ethernet0/1] mdi { normal | cross | auto }
指两个交换机之间通过两个或多个端口并行连接,以获得更高的带宽。
参加聚合的端口必须工作在全双工方式下并且速率相同
端口聚合必须在链路两端同时配置才能生效
[Quidway-Ethernet0/1] duplex full
[Quidway-Ethernet0/1] speed 100
创建聚合接口,并进入聚合接口视图
[h3c]interface bridge-aggregation interface-number
interface-number :聚合端口
系列取值范围为1-1024(不同版本数值有差别,见配置手册)
将以太网接口加入聚合组
[H3C-GigabitEthernet1/0/1] port link-aggregation group number
(注:此处number与聚合端口的数值一致)
例:将以太网端口GigabitEthernet1/0/1 加入聚合端口22
[H3C] interface bridge-aggregation 22
[H3C] interface GigabitEthernet1/0/1
[H3C-GigabitEthernet1/0/1]port link-aggregation group 22
清除端口聚合
S3500交换机:
[Quidway] undo link-aggregation { ethernet master_port_num | all }
master_port_num:聚合端口中的起始端口号
all:表示删除所有端口聚合
S3900或S3610交换机:
[Quidway] undo link-aggregation group agg-id
显示端口聚合的信息
[Quidway] display link-aggregation [ethernet master_port_num] (S3500交换机)
[Quidway] display link-aggregation summary (S3900或S3610交换机)
[Quidway] vlan vlan_id
注:执行后提示符变为“[Quidway-vlanid]”;若该VLAN已存在,则仅进入VLAN视图
[Quidway] undo vlan vlan_id
参数说明:vlan-id :VLAN接口的ID,取值范围为1~4094
[Quidway-vlan2] port port_num [ to port_num ] & < 1-10 >
[Quidway-vlan2] undo port port_num [ to port_num ] & <1-10>
参数说明:port_num:由Interface类型和端口序号组成;端口序号由槽号和端口号的二元组组成
将端口添加到VLAN:
[Quidway-Ethernet0/2] port access vlan vlan-id
将端口从VLAN中删除
[Quidway-Ethernet0/2] undo port access vlan vlan-id
设置命令:
[Quidway-Ethernet0/1] port link-type { access | trunk | hybrid }
恢复为缺省值命令:
[Quidway-Ethernet0/1] undo port link-type
将当前Trunk端口加入到某些VLAN:
[Quidway-Ethernet0/1] port trunk permit vlan { vlan_id_list | all }
vlan_id_list: vlan_id1 [to vlan_id2] & <1-10>
将当前Trunk端口从某些VLAN中删除:
[Quidway-Ethernet0/1] [undo] port trunk permit vlan { vlan_id_list | all }
[H3C]interface bridge-aggregation 1
[H3C-bridge-aggregation1]port link-type trunk
[H3C-bridge-aggregation1]port trunk permit vlan 2 to 3
设置端口的缺省VLAN ID(pvid, Port Vlan ID):
[Quidway-Ethernet0/1] port trunk pvid vlan vlan_id
恢复端口的缺省VLAN ID:
[Quidway-Ethernet0/1] undo port trunk pvid
注:vlan_id的缺省值为1
设定IP地址
[Quidway-vlan-inferface1] ip address ip-addr netmask
取消IP地址
[Quidway-vlan-inferface1] undo ip address
添加一条静态路由表项
[Quidway] ip route-static ip-address { mask | mask-length } { interface-type interface-number | gateway-address }
删除一条静态路由表项
[Quidway] undo ip route-static ip-address { mask | mask-length }
缺省路由的配置
[Quidway]ip route-static 0.0.0.0 0 ip-address