当前位置:才华咖 > 互联网计算机 > IT认证 > H3C认证 > H3C交换机配置实例
手机版

H3C交换机配置实例

来源:才华咖 阅读:1.32W 次

在中国交换机市场,H3C自2003年公司成立以来,已累计出货上百万台,以太网交换机端口数占全球的市场份额23.4%,在交换机领域内综合技术实力和市场份额排名均达到业界第一。下面小编准备了关于H3C交换机配置的例子,提供给大家参考!

H3C交换机配置实例

  配置H3C交换机实例,设置安全策略版。

1.能够通过WEB登录,并且设置安全策略。通过源 IP地址对 WEB登录用户进行控制。

2.使用SSH+密码认证(基本SSH配置方法)。H3C交换机SSH配置完全攻略。[同时也是telnet]

3.更改交换机名称,时间,管理IP配置IP网管等基本配置。基础配置 改时间 启动ssh 修改com口密码 关闭一些没用的服务

  配置实例:

------------------------------------------------------------------------

sys

sysname 交换机名字

management-vlan 1

interface Vlan-interface 1

ip address IP地址

quit

ip route 网关

dis cur

#interface Aux1/0/0 默认

undo ip http shutdown

local-user 用户

service-type telnet level 3

password simple 密码

===

使用SSH+密码认证(基本SSH配置方法)。

public-key local create rsa

public-key local create dsa

user-interface vty 0 4

authentication-mode scheme

protocol inbound ssh

===

local-user 用户

password cipher 密码

service-type ssh level 3

ssh user 对应用户 authentication-type password

===

通过源 IP地址对 WEB登录用户进行控制,仅允许 IP地址为 x.x.x.x的 WEB用户通过 最划算团购网

HTTP方式访问交换机。

system-view

acl number 2003 match-order config

rule 0 permit source IP地址

rule 1 permit source IP地址

rule 2 permit source IP地址

rule 3 permit source IP地址

rule 4 permit source IP地址

quit

ip http acl 2003

经过以上命令设置,H3C交换机就完成了安全设置。指定了能够通过HTTP访问交换机WEB登录,只有在设置好的网段的机器,才能够访问。

同时能够通SSH登录交换机,加强了安全性。同时也可以加入ACL策略,来限制访问登录的IP网段。

------------------------------------------------------------------------

  h3c acl通过源 IP对 WEB登录用户进行控制配置举例

1. 组网需求

通过源 IP地址对 WEB登录用户进行控制,仅允许 IP地址为 的 WEB用户通过

HTTP方式访问交换机。

2. 组网图

3. 配置步骤

# 定义基本 ACL 2001。

system-view

[Sysname] acl number 2001 match-order config

[Sysname-acl-basic-2001] rule 1 permit source 0

[Sysname-acl-basic-2001] quit

# 配置 WEB服务器引用基本 ACL 2001,对 WEB登录用户进行控制。

[Sysname] ip http acl 2001

------------------------------------------------------------------------

H3C命令记录 说明,注释 # 最划算团购网#

------------------------------------------------------------------------

clock datetime 15:02:00 05/03/2011

system

public-key local create rsa //生成本地RSA密钥对

rsa local-key-pair create

/**/

H3C和华为三层交换机RSA密钥生成命令

H3C: public-key local create rsa

HUAWEI: rsa local-key-pair create

/**/

local-user admin //(设置用户名为admin)

password cipher SSH密码

service-type ssh /设置服务类型为ssh/

level 3 /设置用户优先级为3/

/**/

service-type ssh level 3 //创建本地用户服务类型为ssh

/**/

authorization-attribute level 3 //设置用户级别为最高级3,这点很重要

state active //激活该用户

quit

user-interface vty 0 15

authentication-mode scheme /设置scheme认证/配置认证的方式

protocol inbound ssh

user privilege level 3 //用户级别为3级即为管理

quit

ssh server enable //ssh server enable命令用来使能SSH服务器功能。undo ssh server enable命令用来关闭SSH服务器功能。缺省情况下,SSH服务器功能处于关闭状态。

ssh user admin authentication-type password /配置SSH用户验证方式为password/

user-interface aux 0 //开启AUX接口

authentication-mode password

set authentication password cipher COM口密码 //上面3行设置,console登录只用密码不用用户名的配置

undo ip http enable

ip http shutdown

/**/

undo ip http shutdown 使能HTTP 服务器

ip https enable 命令用来使能HTTPS 服务。

undo ip https enable 命令用来关闭 HTTPS 服务。

http 服务器

使能HTTP 服务器 undo ip http shutdown

关闭HTTP 服务器 ip http shutdown

ip http enable命令用来启动WEB Server。

undo ip http enable命令用来关闭WEB Server。

缺省情况下,WEB Server为开启状态。

/**/

undo ip https enable

undo ip ttl-expires

undo ip unreachables

基础配置 改时间 启动ssh 修改com口密码 关闭一些没用的服务

配置IP网管

sys

management-vlan 1

interface Vlan-interface 643 //interface Vlan-interface 1

ip address 网管IP

quit

ip route 网管IP网关

H3C的默认HTTP SERVER是没有打开的, 如果没有打开需要执行 undo ip http shutdown

------------------------------------------------------------------------

------------------------------------------------------------------------

clock datetime 15:02:00 05/03/2011

system

public-key local create rsa //生成本地RSA密钥对

rsa local-key-pair create

/**/

H3C和华为三层交换机RSA密钥生成命令

H3C: public-key local create rsa

HUAWEI: rsa local-key-pair create

/**/

local-user admin //(设置用户名为admin)

password cipher SSH密码

service-type ssh

level 3

authorization-attribute level 3

state active

quit

user-interface vty 0 15

authentication-mode scheme

protocol inbound ssh

user privilege level 3

quit

ssh server enable

ssh user admin authentication-type password

user-interface aux 0

authentication-mode password

set authentication password cipher COM口密码

undo ip http enable

ip http shutdown

undo ip https enable

undo ip ttl-expires

undo ip unreachables

基础配置 改时间 启动ssh 修改com口密码 关闭一些没用的服务

配置IP网管

management-vlan 1

interface Vlan-interface 643

ip address 网管IP 掩码

quit

ip route 网管IP网关

------------------------------------------------------------------------

H3C S3100 SI交换机怎么查看光口和电口是打开还是关闭?如何打开关闭它们?命令是什么?

默认情况下是电口开启。

g1/1/1 第一电口

g1/1/2 第一光口

g1/2/1 第二电口

g1/2/2 第二光口

开启光口命令为

int g1/1/2

undo shutdown

光口开启之后电口就关闭了。如果在想开电口就是

int g1/1/1

undo shutdown

本文链接:https://www.caihuaka.com/itrz/h3c/plxynm.html

Copyright © 2024. 才华咖 All right reserved. 浙ICP备20120231号-3

文字美图素材,版权属于原作者。部分文章内容由网友提供推送时因种种原因未能与原作者联系上,若涉及版权问题,敬请原作者联系我们,立即处理。