h3c3180g如何配置
Ⅰ H3C交换机如何初始化配置
H3C交换机如何初始化配置
你知道H3C交换机如何初始化吗?配置命令是哪些呢?下面跟我一起来看看吧!
1、连接配置电缆
1.1 将配置电缆的DB-9孔式插头接到要对交换机进行配置的PC的串口上;
1.2 将配置电缆的 RJ-45 的一端连到交换机的 Console 口上。
2、设置终端参数
2.1 打开 PC,并在 PC 上运行终端仿真程序(如超级终端)
2.2 设置终端参数(以 Windows XP 的超级终端为例)
2.2.1 参数要求:波特率为9600,数据位为8,奇偶校验为无,停止位为1,流量控制为无
2.2.2 在超级终端属性对话框中选择【文件/属性】菜单项,进入属性窗口。点击属性窗口中的“设置”页签,进入属性设置窗口,在其中选择终端仿真为 VT100,选择完成后,单击<确定>按钮。
3、起动交换机
接通交换机电源,起动交换机。
4、设置交换机名称
system-view // 进入系统视图模式
[H3C] sysname h3c-3100 // 为设备命名
[h3c-3100]
注:修改交换机名称,只需重新输入 sysname XXXX 就可以重命名为:XXXX
5、设置 VLAN 管理地址
[h3c-3100] interface vlan-interface 1 // 进入 VLAN 1
[h3c-3100] ip address 192.168.12.11 255.255.255.0 // 设置VLAN 1 的管理地址为:192.168.12.11/24
注:修改地址不需用 undo 命令,只需重新输入 ip address 命令即可用新地址替换原地址
[h3c-3100] ip address 192.168.12.12 255.255.255.0 // 修改 ip 为:192.168.12.12/24
6、设置默认网关路由
如果不设置路由,交换机将不能与LAN外通信
[h3c-3100] ip route-static 0.0.0.0 255.255.255.0 192.168.12.1 // 设置 192.168.12.1/24 为网关路由地址
注:修改、替换网关路由,需首先用 undo 命令删除原来的路由
[h3c-3100] undo ip route-static 0.0.0.0 255.255.255.0 192.168.12.1 // 删除原有路由
[h3c-3100] ip route-static 0.0.0.0 255.255.255.0 192.168.12.254 // 设置新的网关路由
7、设置 Console 用户登陆的口令认证
Console 用户有如下三种认证方式:
None: 不需要口令认证
Password: 需要简单的本地口令认证,包含明文(Simple)和密文(cipher)
Scheme: 通过 RADIUS 服务器或本地提供用户名和认证口令
配置命令如下:
system-view
[H3C] user-interface aux 0
[H3C-ui-aux0] authentication-mode password
[H3C-ui-aux0] set authentication password simple h3c
退出重新启动后,交换机提示用户输入访问口令
Login authentication
Password:
用户的命令控制级别设置
[H3C-ui-aux0] user privilege level 0
[H3C] super password level 1 simple 111111
[H3C] super password level 2 simple 222222
[H3C] super password level 3 simple 333333
8、TELNET密码验证配置
[h3c-3100] user-interface vty 0 4
[h3c-3100-ui-vty0-4] authentication-mode password // 设置认证方式为密码验证
[h3c-3100-ui-vty0-4] set authentication password simple h3c // 设置登陆验证密码为h3c(明文保存)
[h3c-3100-ui-vty0-4] user privilege level 3 // 设置登陆用户的级别为最高级3(缺省为1)
9、TELNET本地用户名和密码验证配置
需要输入用户名和密码才可以登陆交换机。
[h3c-3100] user-interface vty 0 4
[h3c-3100-ui-vty0-4] authentication-mode scheme
[h3c-3100-ui-vty0-4] local-user h3c // 设置本地用户名为:h3c
[h3c-3100-user-h3c] password simple h3c // 设置验证密码为:h3c (明码保存)
[h3c-3100-user-h3c] service-type telnet level 3 // 设置为TELNET服务,级别为3
10、保存交换机配置
[h3c-3100] save
[h3c-3100] quit
至此,可以断开与交换机的Console口的连接,转而通过交换机的网络接口连接PC,通过 Telnet 登陆,对交换机进行进一步的管理和配置。
11、如果忘记登陆密码
11.1、重新启动该设备,在启动阶段看到显示“press ctrl-b to enter boot menu”界面时按Ctrl和B键。这样将进入启动菜单,一般这个密码是不会被设置的,默认是空口令,直接回车即可。如果这个密码也被设置那么我们就只有将设备返厂维修了。
11.2、当交换机显示出boot menu界面时,我们会看到有9个选项
BOOT MENU
1. Download application file to flash
2. Select application file to boot
3. Display all files in flash
4. Delete file from flash
5. Modify bootrom password
6. Enter bootrom upgrade menu
7. Skip current configuration file
8. Set bootrom password recovery
9. Set switch startup mode
0. Reboot
Enter your choice(0-9):
依次为:
download application file to flash -- 下载配置文件到flash中
select application file to boot -- 选择要启动的配置文件
display all files in flash -- 显示flash中保存的所有配置文件信息
delete file from flash -- 删除flash中的配置文件
modify bootrom password -- 修改boot menu的密码
enter bootrom upgrade menu -- 进入bootrom升级菜单
skip current configuration file -- 启动加载时跳过当前配置文件
set bootrom password recovery -- 设置bootrom恢复密码
set switch startup mode -- 设置交换机启动模式
reboot -- 重新启动交换机
选择 7.skip current configuration file(启动加载时跳过当前配置文件)即可。
11.3、选择skip current configuration file(启动加载时跳过当前配置文件)后,继续选择 0.Reboot 来重新启动交换机,不过这次启动和以往不同的是将不加载当前的configuration file配置文件,也就是说里面设置的密码验证都将暂时无效。
11.4、再次启动交换机自检完毕后就会显示startup configuration is skipped,user interface aux0 is available的.信息,这表明当前的配置文件没有加载,用户顺利进入 aux0 即 console 控制台管理界面,不用输入任何密码就可以近来了。
11.5、通过user-interface aux 0进入console设置模式,然后通过authentication-mode none将控制台验证密码取消。最后千万不要忘记使用save将修改保存,否则重新启动后又将回到之前的配置文件,同样需要密码验证了。
system-view
[H3C] user-interface aux 0
[H3C-ui-aux0] authentication-mode none
[H3C-ui-aux0] quit
[H3C] quit
save
12、如何恢复出厂设置
reset saved-configuration
The saved configuration file will be erased. Are you sure? [Y/N]: y // 提示是否擦除配置文件
Configuration in the device is being cleared.
Please wait ...
...
Configuration in the device is cleared.
reboot
This command will reboot the system. Since the current configuration may have been changed, all changes may be lost if you continue. Continue? [Y/N] Y // 提示是否重启设备,按Y将重新启动
【提示】擦除配置文件后,必须要重启设备后才能恢复到出厂设置。
13、主要H3C品牌路由交换设备命令行查询条码的方法
display device manuinfo [slot x]
//(用户视图下输入display device manuinfo)x指槽位号。
13.1 对于盒式设备查询主机条码时,省略slot x,直接输入display device manuinfo。
举例一:查询H3C S3100主机条码
display device manuinfo
DEVICE NAME : S3100-26TP-EI // 设备名称
DEVICE SERIAL NUMBER : 210235A23LX07B000100 // 设备序列号
MAC ADDRESS : 000F-E274-933D // 设备出厂 MAC 地址
MANUFACTURED DATE : 2007-11-07 // 设备调测日期
VENDOR NAME : H3C // 制造商名称
13.2 对于机箱式设备,根据主控板和接口模块所插入的槽位号输入相应的值可以查询主控板条码和接口板条码,如果省略slot x参数则输出所有模块条码。
注:机箱式设备无法查询机箱条码,只能查询主控板及接口模块条码。
举例二:查询H3C S7502E主控板条码(主控板插在0号槽)
display device manuinfo slot 0
DEVICE_NAME : LSQ1MPUA0
DEVICE_SERIAL_NUMBER : 210231A73SX079000033
MAC_ADDRESS : 000F-E22E-9C75
MANUFACTURING_DATE : 2007-9-13
VENDOR_NAME : H3C
13.3 对于接口模块上面携带子卡的模块,如需要查询子卡条码,除了需要指定模块所插的槽位号外,还需输入子卡号
举例三:查询H3C SR8800插槽6模块上面1号子卡条码
display device manuinfo slot 6 subslot 1
DEVICE_NAME : PIC-GT20R
DEVICE_SERIAL_NUMBER : 210231A76C007B000019
MAC_ADDRESS : NONE
MANUFACTURING_DATE : 2007-12-02
VENDOR_NAME : H3C
如有部分主机或模块不能通过该命令查询出条码,可能是因为主机版本或模块型号不支持通过命令行方式查询,或者需要使用特殊命令查询,如有此种情况请联系H3C呼叫中心进一步确认。
13.4 对于华为设备,查询命令为:display elabel
;Ⅱ H3C交换机配置
分那么少
给你一些命令你好好看看吧
Cisco路由器交换机配置命令详解
1. 交换机支持的命令:
交换机基本状态:
switch: ;
ROM状态,
路由器是rommon>hostname> ;
用户模式hostname# ;
特权模式hostname(config)# ;
全局配置模式hostname(config-if)# ;
接口状态
交换机口令设置:
switch>enable ;
进入特权模式switch#config terminal ;
进入全局配置模式switch(config)#hostname ;
设置交换机的主机名switch(config)#enable secret xxx ;
设置特权加密口令switch(config)#enable password xxa ;
设置特权非密口令switch(config)#line console 0 ;
进入控制台口switch(config-line)#line vty 0 4 ;
进入虚拟终端switch(config-line)#login ;
允许登录switch(config-line)#password xx ;
设置登录口令xxswitch#exit ;
返回命令
交换机VLAN设置:
switch#vlan database ;
进入VLAN设置switch(vlan)#vlan 2 ;
建VLAN 2switch(vlan)#no vlan 2 ;
删vlan 2switch(config)#int f0/1 ;
进入端口1switch(config-if)#switchport access vlan 2 ;
当前端口加入vlan 2switch(config-if)#switchport mode trunk ;
设置为干线switch(config-if)#switchport trunk allowed vlan 1,2 ;
设置允许的vlanswitch(config-if)#switchport trunk encap dot1q ;
设置vlan 中继switch(config)#vtp domain ;
设置发vtp域名switch(config)#vtp password ;
设置发vtp密码switch(config)#vtp mode server ;
设置发vtp模式switch(config)#vtp mode client ;
设置发vtp模式
交换机设置IP地址:
switch(config)#interface vlan 1 ;
进入vlan 1switch(config-if)#ip address ;
设置IP地址switch(config)#ip default-gateway ;
设置默认网关switch#dir flash: ;
查看闪存
交换机显示命令:
switch#write ;
保存配置信息switch#show vtp ;
查看vtp配置信息switch#show run ;
查看当前配置信息switch#show vlan ;
查看vlan配置信息switch#show interface ;
查看端口信息switch#show int f0/0 ;
查看指定端口信息
2. 路由器支持的命令:
路由器显示命令:
router#show run ;
显示配置信息router#show interface ;
显示接口信息router#show ip route ;
显示路由信息router#show cdp nei ;
显示邻居信息router#reload ;重新起动
路由器口令设置:
router>enable ;
进入特权模式router#config terminal ;
进入全局配置模式router(config)#hostname ;
设置交换机的主机名router(config)#enable secret xxx ;
设置特权加密口令router(config)#enable password xxb ;
设置特权非密口令router(config)#line console 0 ;
进入控制台口router(config-line)#line vty 0 4 ;
进入虚拟终端router(config-line)#login ;
要求口令验证router(config-line)#password xx ;
设置登录口令xxrouter(config)#(Ctrl+z) ;
返回特权模式router#exit ;返回命令
路由器配置:
router(config)#int s0/0 ;
进入Serail接口router(config-if)#no shutdown ;
激活当前接口router(config-if)#clock rate 64000 ;
设置同步时钟router(config-if)#ip address ;
设置IP地址router(config-if)#ip address second ;
设置第二个IProuter(config-if)#int f0/0.1 ;
进入子接口router(config-subif.1)#ip address ;
设置子接口IProuter(config-subif.1)#encapsulation dot1q ;
绑定vlan中继协议router(config)#config-register 0x2142 ;
跳过配置文件router(config)#config-register 0x2102 ;
正常使用配置文件router#reload ;重新引导
路由器文件操作:
router# running-config startup-config ;
保存配置router# running-config tftp ;
保存配置到tftprouter# startup-config tftp ;
开机配置存到tftprouter# tftp flash: ;
下传文件到flashrouter# tftp startup-config;
下载配置文件ROM状态:Ctrl+Break ;
进入ROM监控状态rommon>confreg 0x2142 ;
跳过配置文件rommon>confreg 0x2102 ;
恢复配置文件rommon>reset ;
重新引导rommon> xmodem: flash: ;
从console传输文件rommon>IP_ADDRESS=10.65.1.2 ;
设置路由器IPrommon>IP_SUBNET_MASK=255.255.0.0 ;
设置路由器掩码rommon>TFTP_SERVER=10.65.1.1 ;
指定TFTP服务器IPrommon>TFTP_FILE=c2600.bin ;
指定下载的文件rommon>tftpdnld ;
从tftp下载rommon>dir flash: ;
查看闪存内容rommon>boot ;引导IOS
静态路由:
ip route ;
命令格式router(config)#ip route 2.0.0.0 255.0.0.0 1.1.1.2 ;
静态路由举例router(config)#ip route 0.0.0.0 0.0.0.0 1.1.1.2 ;默认路由举例
动态路由:
router(config)#ip routing ;
启动路由转发router(config)#router rip ;
启动RIP路由协议。router(config-router)#network ;
设置发布路由router(config-router)#negihbor ;点对点帧中继用。
帧中继命令:
router(config)#frame-relay switching ;
使能帧中继交换router(config-s0)#encapsulation frame-relay ;
使能帧中继router(config-s0)#fram-relay lmi-type cisco ;
设置管理类型router(config-s0)#frame-relay intf-type DCE ;
设置为DCErouter(config-s0)#frame-relay dlci 16 ;router(config-s0)#frame-relay local-dlci 20 ;
设置虚电路号router(config-s0)#frame-relay interface-dlci 16 ;
router(config)#log-adjacency-changes ;
记录邻接变化router(config)#int s0/0.1 point-to-point ;
设置子接口点对点router#show frame pvc ;
显示永久虚电路router#show frame map ;显示映射
基本访问控制列表:
router(config)#access-list permit|deny router(config)#interface ;
default:deny anyrouter(config-if)#ip access-group in|out ;
default: Out
例1:router(config)#access-list 4 permit 10.8.1.1router(config)#access-list 4 deny 10.8.1.0 0.0.0.255
router(config)#access-list 4 permit 10.8.0.0 0.0.255.255
router(config)#access-list 4 deny 10.0.0.0 0.255.255.255
router(config)#access-list 4 permit any
router(config)#int f0/0router(config-if)#ip access-group 4 in
扩展访问控制列表:
access-list permit|deny icmp <DESTINATIONIPwild>[type]access-list permit|deny tcp <DESTINATIONIPwild>[port]
例3:router(config)#access-list 101 deny icmp any 10.64.0.2 0.0.0.0 echorouter(config)#access-list 101 permit ip any any
router(config)#int s0/0
router(config-if)#ip access-group 101 in
例3:router(config)#access-list 102 deny tcp any 10.65.0.2 0.0.0.0 eq 80
router(config)#access-list 102 permit ip any any
router(config)#interface s0/1
router(config-if)#ip access-group 102 out
删除访问控制例表:
router(config)#no access-list 102
router(config-if)#no ip access-group 101 in
路由器的nat配置
Router(config-if)#ip nat inside ;
当前接口指定为内部接口Router(config-if)#ip nat outside ;
当前接口指定为外部接口Router(config)#ip nat inside source static [p] <私有IP><公网IP> [port]
Router(config)#ip nat inside source static 10.65.1.2 60.1.1.1
Router(config)#ip nat inside source static tcp 10.65.1.3 80 60.1.1.1 80
Router(config)#ip nat pool p1 60.1.1.1 60.1.1.20 255.255.255.0
Router(config)#ip nat inside source list 1 pool p1
Router(config)#ip nat inside destination list 2 pool p2
Router(config)#ip nat inside source list 2 interface s0/0 overload
Router(config)#ip nat pool p2 10.65.1.2 10.65.1.4 255.255.255.0 type rotary
Router#show ip nat translationrotary 参数是轮流的意思,地址池中的IP轮流与NAT分配的地址匹配。overload参数用于PAT 将内部IP映射到一个公网IP不同的端口上。
外部网关协议配置:
routerA(config)#router bgp 100
routerA(config-router)#network 19.0.0.0
routerA(config-router)#neighbor 8.1.1.2 remote-as 200
配置PPP验证:
RouterA(config)#username password
RouterA(config)#int s0
RouterA(config-if)#ppp authentication {chap|pap}
3.PIX防火墙命令
Pix525(config)#nameif ethernet0 outside security0 ;
命名接口和级别Pix525(config)#interface ethernet0 auto ;
设置接口方式Pix525(config)#interface ethernet1 100full ;
设置接口方式Pix525(config)#interface ethernet1 100full shutdown
Pix525(config)#ip address inside 192.168.0.1 255.255.255.0
Pix525(config)#ip address outside 133.0.0.1 255.255.255.252
Pix525(config)#global (if_name) natid ip-ip ;定义公网IP区间
Pix525(config)#global (outside) 1 7.0.0.1-7.0.0.15 ;
例句Pix525(config)#global (outside) 1 133.0.0.1 ;
例句Pix525(config)#no global (outside) 1 133.0.0.1 ;
去掉设置Pix525(config)#nat (if_name) nat_id local_ip [netmark]
Pix525(config)#nat (inside) 1 0 0内网所有主机(0代表0.0.0.0)可以访问global 1指定的外网。
Pix525(config)#nat (inside) 1 172.16.5.0 255.255.0.0内网172.16.5.0/16网段的主机可以访问global 1指定的外网。
Pix525(config)#route if_name 0 0 gateway_ip [metric] ;
命令格式Pix525(config)#route outside 0 0 133.0.0.1 1 ;
例句Pix525(config)#route inside 10.1.0.0 255.255.0.0 10.8.0.1 1 ;
例句Pix525(config)#static (inside, outside) 133.0.0.1 192.168.0.8表示内部ip地址192.168.0.8,访问外部时被翻译成133.0.0.1全局地址。
Pix525(config)#static (dmz, outside) 133.0.0.1 172.16.0.8中间区域ip地址172.16.0.8,访问外部时被翻译成133.0.0.1全局地址。
Ⅲ H3C交换机如何设置
H3C交换机怎么设置呢?交换机比较常见的设置是跨网段管理问题通常有如下几种:跨网段限制电脑网速、跨网段控制电脑上网行为(比如禁止迅雷下载、禁止在线玩游戏、限制在线看视频、禁止上班炒股、禁止工作时间网购等),跨网段绑定电脑IP和MAC地址,防止电脑修改IP地址等行为。
那么,如何实现上述跨网段监控电脑上网、管理三层交换机多网段电脑上网行为呢? 可以通过以下两种方法来实现:
第一、通过三层交换机自带的'网管功能来实现控制多网段电脑网速、跨网段限制电脑上网行为以及跨网段实现交换机端口限速、跨网段实现三层交换机固定IP上网。
两种设置IP地址的命令:一种直接在物理端口上设置IP地址,设置过程比较简单。如三层交换机上配置端口1/0/1为路由端口,IP地址为172.16.1.0,OSPF采用点到点类型,配置过程如下:
#interface Ethernet 1/1
#port link-mode route
#ip address 172.16.1.0 255.255.255.0
#ospf networt-type p2p
第二种IP地址配置方式是通过逻辑VLAN设置IP地址,需先给VLAN设置IP地址,然后将物理端口配置在VLAN下。为了保证IP地址和物理端口一一对应的关系。例如在和上面一样的三层交换机上要配置端口1/0/1为路由端口,并配置端口的VLAN ID为101,VLAN 101 IP地址为172.16.1.1,OSPF采用点到点类型,配置过程如下:
#interface Vlan-interface 101
#ip address 172.16.1.0 255.255.255.0
#ospf network-type p2p
#interface Ethernet 1/0/1
#port link-mode route
#port access Vlan 101
以上两种方法都能为交换机端口设置IP地址,从操作步骤上看,第一种方法比较简单,第二种方法需要先将端口和VLAN对应起来再设置IP地址。而且第2种方法在配置IP地址时还需同时使用对应的VLAN,过多使用VLAN号后可能会给日后的运行维护带来了不便。
Ⅳ H3C交换机常用配置方法
H3C交换机常用配置方法
交换机的配置一直以来是非常神秘的,不仅对于一般用户,对于绝大多数网管人员来说也是如此,同时也是作为网管水平高低衡量的一个重要而又基本的标志。以下是关于H3C交换机常用配置方法,希望大家认真阅读!
华为H3C配置
1.h3C交换机WEB管理用户配置
在系统试图[H3C]下,输入localuser XXX(WEB user name) XXX(WEB user password) 1(权限,当该值为0的时候只具有guest权限,1为管理员权限)
如:为系统添加一个名为test,密码为123,具有管理员权限的用户
Localuser test 123 1
2.H3C交换机配置ip地址以及网关
先<>下sys进入配置界面
因为是二层交换机,要为其配置ip地址及网关必须在管理vlan接口下配置:vlan1
从系统试图进如vlan1接口试图:interface vlan-interface 1
在vlan接口试图下配置ip地址:ip address X.X.X.X X.X..X..X(前面为ip地址,后面为子网掩码)
在vlan接口试图下配置网关:ip gateway X.X.X.X
如:interface vlan-interface 1
ip address 1.1.1.2 255.255.255.0
ip gateway 1.1.1.1
3.H3C交换机配置telnet
从系统试图进入vty接口:user-interface vty 0
在vty接口下配置验证密码:set authentication password XXX
如:设置telnet密码为123
user-interface vty 0
set authentication password 123
4.将H3C交换机当前的配置保存起来
在用户试图下执行save命令,会提示是否保存,输入Y,系统将当前正在运行的配置保存到寄存器中
如: save
This will save the configuration in the EEPROM memory
Are you sure?[Y/N]y
可以查看当前寄存器中保存的配置: display saved-configuration
可以查看当前系统运行的配置: display current-configuration
5.H3C交换机SNMP流量统计配置
在系统试图下开启snmp服务。
[H3C] snmp-agent
然后配置snmp的团体名,同时为此团体名指定权限(有可读权限,和读写权限,做流量统计时读权限就可以)
[H3C]snmp-agent community read XXX
其次设置snmp的版本,如果不知道mrtg服务器所使用的.版本,可以在设备上设置所有版本
[H3C]snmp-agent sys-info version all
最后开启snmp 的trap功能,不同型号设备有可能支持trap功能不一同。
[H3C]snmp-agent trap enable standard
(注:输入snmp-agent trap enable命令回车后,将把所有trap信息发送,后面可加需要发送特定信息的参数)
6.恢复出厂值
sys
[sys]restore default 也可以 res d
7.端口与MAC绑定 (防止非法接入,不防ARP)
IP-add static mac地址 intface e0/端口号
8.查看交换机上每个端口对应的服务器的MAC 地址
dis mac 或
dis int e0/1
7.镜像端口
例:将eht0/1上联口作为被镜像端口,eht0/25作为镜像监控端口。命令如下
sys
[quidway] monitor eth 0/25
[quidway] mirror eht 0/1 both (both表示双向)
[quidway] dis mir (查看像像配置)
[quidway] quit
save
;