一、初次配置H3C交换机过程简备(采用超级终端)
- 超级终端路径有两个:C:\WINDOWS\system32和C:\Program Files\Windows NT下,将两个文件拷到这里就可;只要执行hypertrm.exe文件即可,前提得有hypertrm.dll文件;菜单快捷键则可将文件复制到“C:\Documents and Settings\Administrator\「开始」菜单\程序\附件\通讯\超级终端”下。
- 运行超级终端------名称H3C,com;----com属性还原默认值----ENTER键----
选择“文件”---属性---设置---VT100
3、[H3C]telnet server enable--这是华为路由的,但交换机里默认、省略、无此命令
[H3C]user-interface vty 0 4
[H3C -ui-vty0-4] authentication-mode password
[H3C -ui-vty0-4] set authentication password cipher xxx(远程登录密码)
[H3C -ui-vty0-4] user privilege level 3
[H3C]quit
[H3C]save
The current configuration will be written to the device. Are you sure? [Y/N]: Y
Please input the file name(*.cfg)[cf:/startup.cfg]
(To leave the existing filename unchanged, press the enter key):回车
cf:/startup.cfg exists, overwrite? [Y/N]:Y
[H3C]quit
< H3C >reboot 密码:xxxxx
---------------------------------------------------------------------------------------------------------------
Copyright(c) 2004-2010 Hangzhou H3C Technologies Co., Ltd.
Creation date : Jul 28 2010, 20:20:25
CPU Clock Speed : 200MHz
BUS Clock Speed : 33MHz
Memory Size : 64MB
Mac Address : 3822d63e0a3c
Press Ctrl-B to enter Boot Menu... 0
Auto-booting...
Decompress Image................................................................
................................................................................
................................................................................
................................................................................
................................................................................
........................................OK!
Starting at 0x80100000...
User interface aux0 is available.
Press ENTER to get started.
<H3C>
%Apr 1 23:56:17:326 2000 H3C SHELL/5/LOGIN:- 1 - Console(aux0) in unit1 login
<H3C>H3C
^
% Unrecognized command found at '^' position.
<H3C>NK6000
^
% Unrecognized command found at '^' position.
<H3C>en
^
% Unrecognized command found at '^' position.--------黄色为错误的
<H3C>SYS
System View: return to User View with Ctrl+Z.
[H3C]DIS CUR
#
sysname H3C
#
radius scheme system
#
domain system
#
vlan 1
#
interface Aux1/0/0
#
interface Ethernet1/0/1
#
interface Ethernet1/0/2
#
interface Ethernet1/0/3
#
interface Ethernet1/0/4
#
interface Ethernet1/0/5
#
interface Ethernet1/0/6
#
interface Ethernet1/0/7
#
interface Ethernet1/0/8
#
interface Ethernet1/0/9
#
interface Ethernet1/0/10
#
interface Ethernet1/0/11
#
interface Ethernet1/0/12
#
interface Ethernet1/0/13
#
interface Ethernet1/0/14
#
interface Ethernet1/0/15
#
interface Ethernet1/0/16
#
interface Ethernet1/0/17
#
interface Ethernet1/0/18
#
interface Ethernet1/0/19
#
interface Ethernet1/0/20
#
interface Ethernet1/0/21
#
interface Ethernet1/0/22
#
interface Ethernet1/0/23
#
interface Ethernet1/0/24
#
interface GigabitEthernet1/1/1
#
interface GigabitEthernet1/1/2
#
interface GigabitEthernet1/1/3
#
interface GigabitEthernet1/1/4
#
undo irf-fabric authentication-mode
#
interface NULL0
#
voice vlan mac-address 0001-e300-0000 mask ffff-ff00-0000
#
user-interface aux 0 7
user-interface vty 0 4
user privilege level 3
set authentication password cipher 19UK^\_S/7aQ=^Q`MAF4<1!!
#
Return
[H3C]vlan 1---------------------------------默认的,不要用这个
[H3C-vlan1]ip?
^
% Unrecognized command found at '^' position.
[H3C-vlan1]quit
[H3C]dis vlan
Total 1 VLAN exist(s).
The following VLANs exist:
1(default)
[H3C]vlan 10
[H3C-vlan10]?
Vlan view commands:
arp Specify ARP(Address Resolution Protocol) configuration
information
description Description of VLAN
display Display current system information
igmp-snooping IGMP snooping
multicast Specify multicast configuration information
name Name of VLAN
nslookup Query Internet name servers
ping Ping function
port Add ports to or delete ports from VLAN
protocol-vlan Protocol-based VLAN
quit Exit from current command view
return Exit to User View
save Save current configuration
service-type Specify Service-VLAN characteristic
tracemac Trace MAC function
tracert Trace route function
undo Cancel current setting
[H3C-vlan10]quit
[H3C]int ?
Aux Aux interface
Ethernet Ethernet interface
GigabitEthernet GigabitEthernet interface
LoopBack LoopBack interface
NULL NULL interface
Vlan-interface VLAN interface
[H3C]int vlan 10
[H3C-Vlan-interface10]ip address 192.168.110.199 255.255.255.0
[H3C-Vlan-interface10]quit
[H3C]vlan 10
[H3C-vlan10]?
Vlan view commands:
arp Specify ARP(Address Resolution Protocol) configuration
information
description Description of VLAN
display Display current system information
igmp-snooping IGMP snooping
multicast Specify multicast configuration information
name Name of VLAN
nslookup Query Internet name servers
ping Ping function
port Add ports to or delete ports from VLAN
protocol-vlan Protocol-based VLAN
quit Exit from current command view
return Exit to User View
save Save current configuration
service-type Specify Service-VLAN characteristic
tracemac Trace MAC function
tracert Trace route function
undo Cancel current setting
[H3C-vlan10]port Ethernet1/0/23
[H3C-vlan10]quit
[H3C]dis cur
#
sysname H3C
#
radius scheme system
#
domain system
#
vlan 1
#
vlan 10
#
interface Vlan-interface10
ip address 192.168.110.199 255.255.255.0
#
interface Aux1/0/0
#
interface Ethernet1/0/1
#
interface Ethernet1/0/2
#
interface Ethernet1/0/3
#
interface Ethernet1/0/4
#
interface Ethernet1/0/5
#
interface Ethernet1/0/6
#
interface Ethernet1/0/7
#
interface Ethernet1/0/8
#
interface Ethernet1/0/9
#
interface Ethernet1/0/10
#
interface Ethernet1/0/11
#
interface Ethernet1/0/12
#
interface Ethernet1/0/13
#
interface Ethernet1/0/14
#
interface Ethernet1/0/15
#
interface Ethernet1/0/16
#
interface Ethernet1/0/17
#
interface Ethernet1/0/18
#
interface Ethernet1/0/19
#
interface Ethernet1/0/20
#
interface Ethernet1/0/21
#
interface Ethernet1/0/22
#
interface Ethernet1/0/23
port access vlan 10
#
interface Ethernet1/0/24
#
interface GigabitEthernet1/1/1
#
interface GigabitEthernet1/1/2
#
interface GigabitEthernet1/1/3
#
interface GigabitEthernet1/1/4
#
undo irf-fabric authentication-mode
#
interface NULL0
#
voice vlan mac-address 0001-e300-0000 mask ffff-ff00-0000
#
user-interface aux 0 7
user-interface vty 0 4
user privilege level 3
set authentication password cipher 19UK^\_S/7aQ=^Q`MAF4<1!!
#
Return
[H3C]
[H3C]save
The configuration will be written to the device.
Are you sure?[Y/N]y
Please input the file name(*.cfg)(To leave the existing filename
unchanged press the enter key):
Now saving current configuration to the device.
Saving configuration. Please wait...
......
Unit1 save configuration flash:/config.cfg successfully
[H3C]
- 配置H3C交换机(cmd里)
- telnet IP,登陆,密码nk6000
- <H3C>
<H3C>sys
[H3C]dis cur
3、划分vlan: [H3C]vlan 30
[H3C-vlan30]
[H3C-vlan30]port Ethernet1/0/3
[H3C-vlan30]port Ethernet1/0/4
[H3C-vlan30]quit
[H3C]
[H3C]int vlan 30
[H3C-Vlan-interface30]ip address 192.168.20.199 255.255.255.0
[H3C-Vlan-interface30]quit
[H3C]dis cur
[H3C]save
- H3C交换机是默认开启路由功能的;举例:
分3个VLAN,分别为192.168.10.0;192.168.20.0;192.168.30.0,子网掩码都是255.255.255.0.分别把Ethernet 1/0/1,Ethernet 1/0/2,Ethernet 1/0/3分给3个VLAN,要求,通过三层交换的路由功能实现3个VLAN之间能互连互通。
“在三层交换机配置了 VLAN 后,VLAN之间不能直接通信,如果需要通信,可以通过三层交换机配置的三层接口使两个VLAN 间通过三层转发进行通信。”(好像默认通过接口可以通信,或者说如何配置这一块??)
# 创建VLAN100
[SwitchA] vlan 100 ,分配Ethernet 1/0/1给vlan100
[SwitchA-vlan100] description vlan_100
[SwitchA-vlan100] port Ethernet 1/0/1
[SwitchA-vlan100] quit
# 创建VLAN200
[SwitchA] vlan 200 ,分配Ethernet 1/0/2给vlan200
[SwitchA-vlan200] description vlan_200
[SwitchA-vlan100] port Ethernet 1/0/2
[SwitchA-vlan200] quit
# 创建VLAN300,分配Ethernet 1/0/3给vlan300
[SwitchA] vlan 300
[SwitchA-vlan300] description vlan_300
[SwitchA-vlan300] port Ethernet 1/0/3
[SwitchA-vlan300] quit
# 创建VLAN接口,IP 地址分别三层交换机配置为192.168.10.1 和
192.168.20.1,192.168.30.1
[SwitchA] interface Vlan-interface 100
[SwitchA-Vlan-interface100] ip address 192.168.10.1 24
[SwitchA-Vlan-interface100] quit
[SwitchA] interface Vlan-interface 200
[SwitchA-Vlan-interface200] ip address 192.168.20.1 24
[SwitchA-Vlan-interface200] quit
[SwitchA] interface Vlan-interface 300
[SwitchA-Vlan-interface300] ip address 192.168.30.1 24
[SwitchA-Vlan-interface300] quit
- H3C交换机命令
4.1、system-view 进入系统视图模式 sys
4.2、sysname 命名
4.3、display current-configuration即dis cur 查看当前配置
4.4、language-mode Chinese | English 中英文切换
4.5、interface Ethernet1/0/1 进入以太网口视图
4.6、undo shutdown 打开以太网端口
4.7、shutdown 关闭以太网端口
4.8、quit 退出
4.9、vlan 10 创建vlan 10,并进入vlan 10的视图模式
4.10、Port E1/0/2 to E1/0/5 在vlan模式下将指定端口加入到当前vlan中
4.11、dis ip routing-table 显示当前路由表
4.12、
- 华为交换机如何删除vlan-----先删除加入VLAN的端口,再删vlan
undo interface VLAN_ID
undo VLAN_ID
例如:[H3C]undo int vlan 20
[H3C]undo vlan 20
[H3C]undo int vlan 30
[H3C]undo vlan 30
删除vlan20与vlan30,且原本默认全部都属于vlan1的,是通过新建vlan划分出去的,当删除后自动回归默认的vlan1里。
来源:CSDN
作者:Teingi
链接:https://blog.csdn.net/weixin_40449300/article/details/85346449