H3C交换机产品已经在数据中心、*、金融、交通、能源、教育、企业和SOHO等领域取得了广泛、成熟、稳定的应用。以下是一些H3C交换机的配置命令,供大家参考:

配置主机名

csharpCopy code

[H3C] system-name H3C

配置console口密码

bashCopy code

# 进入系统视图。

system-view

# 进入AUX用户界面视图。

[H3C] user-interface aux 0

# 设置通过Console口登录交换机的用户进行Password认证。

[H3C-ui-aux0] authentication-mode password

# 设置用户的认证口令为加密方式,口令为123456。

[H3C-ui-aux0] set authentication password cipher 123456

# 设置从AUX用户界面登录后可以访问的命令级别为2级。

[H3C-ui-aux0] user-privilege level 2

配置Telnet

bashCopy code

# 进入系统视图。

system-view

# 进入VTY0用户界面视图。

[H3C] user-interface vty 0

# 设置通过VTY0口登录交换机的用户进行Password认证。

[H3C-ui-vty0] authentication-mode password

# 设置用户的认证口令为密码方式,口令为123456。

[H3C-ui-vty0] set authentication password cipher 123456

# 设置从VTY0用户界面登录后可以访问的命令级别为2级。

[H3C-ui-vty0] user-privilege level 2

# 设置VTY0用户界面支持Telnet协议。

[H3C-ui-vty0] protocol inbound telnet

配置交换机VLAN1管理地址

cssCopy code

system-view

[H3C] interface vlan-interface 1[H3C-VLAN-interface1] ip address 192.168.0.129 255.255.255.0

配置交换机网关地址

csharpCopy code

[H3C] ip route-static 0.0.0.0 0.0.0.0 192.168.0.1

配置HTTP服务

csharpCopy code

[H3C] local-user admin

[H3C-luser-admin] service-type tel

[H3C-luser-admin] authorization-attribute level 3

[H3C-luser-admin] password cipher admin # 设置HTTP用户密码,并加密显示

配置SNMP

csharpCopy code

[H3C] snmp-agent

[H3C] snmp-agent community read 123456 # 设置SNMP团体名称,权限为只读

[H3C] snmp-agent sys-info version v1v2c # 设置SNMP版本v1和v2

QoS端口限速

cssCopy code

[H3C] interface gigabitethernet 1/0/1

# 配置限速参数,端口进/出速率限制为5120kbps。

[H3C-GigabitEther1/0/1] qos lr inbound cir 5120[H3C-GigabitEther1/0/1] qos lr outbound cir 5120

创建VLAN

csharpCopy code

[H3C] vlan 100

删除VLAN

csharpCopy code

[H3C] undo vlan 100

将端口加入VLAN100

csharpCopy code

[H3C] interface GigabitEthernet 1/0/24

[H3C] port access vlan 100

查看VLAN

cssCopy code

[H3C] display vlan all

查看端口状态

csharpCopy code

[H3C] display interface GigabitEthernet 1/0/24

启用端口

csharpCopy code

[H3C] interface GigabitEthernet 1/0/24

[H3C] undo shutdown

关闭端口

csharpCopy code

[H3C] interface GigabitEthernet 1/0/24

[H3C] shutdown

查看MAC地址列表

cssCopy code

[H3C] display mac-address

查看ARP信息

cssCopy code

[H3C] display arp

查看current配置

cssCopy code

[H3C] display current-configuration

查看saved配置

csharpCopy code

[H3C] display saved-configuration

# 注:current配置保存在交换机内存中,重启时不会生效。# 若要在交换机重启时生效,必须保存在saved-configuration中。

保存交换机配置

csharpCopy code

[H3C] save

H3C交换机配置命令汇总2

凭借丰富的产品系列和深厚的技术积累,H3C交换机产品在数据中心、*、金融、交通、能源、教育、企业、SOHO等领域都有广泛成熟稳定的应用。以下是关于H3C交换机配置命令的整理,希望对您有所帮助。

配置主机名

plaintextCopy code

[H3C]system-name H3C

配置Console口密码

plaintextCopy code

# 进入系统视图。

system-view

# 进入AUX用户界面视图。

[H3C]user-interface aux 0

# 设置通过Console口登录交换机的用户进行Password认证。

[H3C-ui-aux0]authentication-mode password

# 设置用户的认证口令为加密方式,口令为123456。

[H3C-ui-aux0]set authentication password cipher 123456

# 设置从AUX用户界面登录后可以访问的命令级别为2级。

[H3C-ui-aux0]user privilege level 2

配置Telnet

plaintextCopy code

# 进入系统视图。

system-view

# 进入VTY0用户界面视图。

[H3C]user-interface vty 0

# 设置通过VTY0口登录交换机的用户进行Password认证。

[H3C-ui-vty0]authentication-mode password

# 设置用户的认证口令为密码方式,口令为123456。

[H3C-ui-vty0]set authentication password cipher 123456

# 设置从VTY0用户界面登录后可以访问的命令级别为2级。

[H3C-ui-vty0]user privilege level 2

# 设置VTY0用户界面支持Telnet协议。

[H3C-ui-vty0]protocol inbound telnet

配置交换机VLAN1管理地址

plaintextCopy code

system-view

[H3C]interface Vlan-interface 1

[H3C-Vlan-interface1]ip address 192.168.0.129 255.255.255.0

配置交换机网关地址

plaintextCopy code

[H3C]ip route-static 0.0.0.0 0.0.0.0 192.168.0.1

配置HTTP服务

plaintextCopy code

[H3C]local-user admin // 创建http用户

[H3C-luser-admin] service-type telnet

[H3C-luser-admin] authorization-attribute level 3

[H3C-luser-admin] password cipher admin // 设置http用户密码,并加密显示

配置SNMP

plaintextCopy code

[H3C]snmp-agent

[H3C]snmp-agent community read 123456 // 设置snmp团体名称,权限为只读

[H3C]snmp-agent sys-info version v1 v2c // 设置snmp版本v1和v2

QoS端口限速

plaintextCopy code

[H3C]interface GigabitEthernet 1/0/1

# 配置限速参数,端口进/出速率限制为5120kbps。

[H3C-GigabitEthernet1/0/1] qos lr inbound cir 5120

[H3C-GigabitEthernet1/0/1] qos lr outbound cir 5120

创建VLAN

plaintextCopy code

[H3C]vlan 100

删除VLAN

plaintextCopy code

[H3C]undo vlan 100

将端口加入VLAN100

plaintextCopy code

[H3C]interface GigabitEthernet 1/0/24

[H3C]port access vlan 100

查看VLAN

plaintextCopy code

[H3C]display vlan all

查看端口状态

plaintextCopy code

[H3C]display interface GigabitEthernet 1/0/24

启用端口

plaintextCopy code

[H3C]interface GigabitEthernet 1/0/24

[H3C]undo shutdown

关闭端口

plaintextCopy code

[H3C]interface GigabitEthernet 1/0/24

[H3C]shutdown

查看MAC地址列表

plaintextCopy code

[H3C]display mac-address

查看ARP信息

plaintextCopy code

[H3C]display arp

查看当前配置

plaintextCopy code

[H3C]display current-configuration

查看保存的配置

plaintextCopy code

[H3C]display saved-configuration

注: 当前配置是保存在交换机内存中,当交换机重启时,不会生效。要在交换机重启时生效,必须保存在保存的配置中。

保存交换机配置

plaintextCopy code

[H3C]save

希望以上信息对您有所帮助。

H3C机配置三层交换机的具体步骤3

H3C配置三层交换机的步骤总共包括4个,分别是划分VLAN并进行描述、给VLAN划分网关、给VLAN指定端口、配置路由协议。下面我们一起来详细了解一下吧!

首先,我们进入系统视图:

shellCopy code

system-view

然后,显示当前三层交换机的配置:

shellCopy code

[H3C]display current-configuration

接下来,我们开始配置三层交换机的第一步:划分VLAN并进行描述。

shellCopy code

# 配置VLAN1

vlan 1

description local-s3600 // 本交换机使用

# 配置VLAN2

vlan 2

description link-to-shanxicentre // 陕西省中心

# 配置VLAN3

vlan 3

description link-to-shangjiecentre // 商界分中心内部使用

# 配置VLAN4

vlan 4

description link-to-shangdongsuo // 商东所

# 配置VLAN5

vlan 5

description link-to-shangnansuo // 商南所

配置三层交换机的第二步是给VLAN划分网关。

shellCopy code

# 配置VLAN2的网关

interface Vlan-interface2

description link-to-shanxicentre

ip address 10.61.242.110 255.255.255.252 // 省中心指定广域网关、子网掩码

# 配置VLAN3的网关

interface Vlan-interface3

description link-to-shangjiecentre

ip address 10.161.134.65 255.255.255.192 // 商界分中心局域网关、子网掩码

# 配置VLAN4的网关

interface Vlan-interface4

description link-to-shangdongsuo

ip address 10.61.242.113 255.255.255.252 // 商东所广域网关、子网掩码

# 配置VLAN5的网关

interface Vlan-interface5

description link-to-shangnansuo

ip address 10.61.242.117 255.255.255.252 // 商南所广域网关、子网掩码

三层交换机的第三步是给VLAN指定端口。

shellCopy code

# 将端口2指定给省中心使用

interface Ethernet1/0/2

description link-to-shanxicentre

port access vlan 2

# 将端口15-24指定给分中心内部使用

interface Ethernet1/0/15-24

description link-to-shangjiecentre

port access vlan 3

# 将端口3指定给商东所使用

interface Ethernet1/0/3

description link-to-shangdongsuo

port access vlan 4

# 将端口4指定给商南所使用

interface Ethernet1/0/4

description link-to-shangnansuo

port access vlan 5

最后,配置三层交换机的第四步:配置路由协议。

shellCopy code

# 配置静态路由,指定所有网段到商东所的路由

ip route 0.0.0.0 0.0.0.0 10.61.242.109

# 配置商东所的反向路由

ip route 10.161.134.0 255.255.255.0 10.61.242.114

ip route 10.161.135.0 255.255.255.0 10.61.242.114

# 配置商南所的反向路由

ip route 10.161.135.0 255.255.255.0 10.61.242.118

ip route 10.161.136.0 255.255.255.0 10.61.242.118

# 配置省中心的路由

ip route 10.61.242.0 255.255.255.0 10.61.242.110 // 商东所242.114和商南所242.118共属的242.0指向分中心网关

ip route 10.161.134.0 255.255.255.0 10.61.242.110 // 分中心内部网段指向分中心网关

这样,配置步骤就完成了。请确保在进行配置时,根据实际网络环境进行相应的调整。H3C配置三层交换机的步骤总共有四个,让我们一起来一下吧!

首先,进入系统视图:

shellCopy code

system-view

显示当前配置三层交换机:

shellCopy code

display current-configuration

下面开始配置三层交换机:

第一步:划分VLAN,并描述

shellCopy code

vlan 1

description local-s3600 // 本交换机使用

#

vlan 2

description link-to-shanxicentre // 陕西省中心

#

vlan 3

description link-to-shangjiecentre // 商界分中心内部使用

#

vlan 4

description link-to-shangdongsuo // 商东所

#

vlan 5

description link-to-shangnansuo // 商南所

第二步:给VLAN划网关

shellCopy code

interface Vlan-interface 2

description link-to-shanxicentre

ip address 10.61.242.110 255.255.255.252 // 省中心指定广域网关、子网掩码

#

interface Vlan-interface 3

description link-to-shangjiecentre

ip address 10.161.134.65 255.255.255.192 // 商界分中心局域网关、子网掩码

#

interface Vlan-interface 4

description link-to-shangdongsuo

ip address 10.61.242.113 255.255.255.252 // 商东所广域网关、子网掩码

#

interface Vlan-interface 5

description link-to-shangnansuo

ip address 10.61.242.117 255.255.255.252 // 商南所广域网关、子网掩码

第三步:给VLAN指定端口

shellCopy code

interface Ethernet 1/0/2 // 将交换机的端口2指定给省中心使用

description link-to-shanxicentre

port access vlan 2

#

interface Ethernet 1/0/15-24 // 将交换机的端口15-24指定给分中心内部使用

description link-to-shangjiecentre

port access vlan 3

#

interface Ethernet 1/0/3 // 将交换机的端口3指定给商东所使用

description link-to-shangdongsuo

port access vlan 4

#

interface Ethernet 1/0/4 // 将交换机的端口4指定给商南所使用

description link-to-shangnansuo

port access vlan 5

第四步:配置路由协议

shellCopy code

// 配置静态路由(只用对远端设备配一条路由即可,本地自通)

ip route 0.0.0.0 0.0.0.0 10.61.242.109 // 指定所有网段到商东所的路由

// 配置三层交换机商东所的反向路由

ip route 10.161.134.0 255.255.255.0 10.61.242.114

ip route 10.161.135.0 255.255.255.0 10.61.242.114

// 配置三层交换机商南所的反向路由

ip route 10.161.135.0 255.255.255.0 10.61.242.118

ip route 10.161.136.0 255.255.255.0 10.61.242.118

// 省中心配置三层交换机:

ip route 10.61.242.0 255.255.255.0 10.61.242.110 // 商东所242.114和商南所242.118共属的242.0指向分中心网关

ip route 10.161.134.0 255.255.255.0 10.61.242.110 // 分中心内部网段指向分中心网关

// ip route 10.161.134.0 255.255.255.0 10.61.242.110

// ip route 10.161.135.0 255.255.255.0 10.61.242.110

// ip route 10.161.136.0 255.255.255.0 10.61.242.110

这样,你的三层交换机配置就完成了!

阅读剩余 0%
本站所有文章资讯、展示的图片素材等内容均为注册用户上传(部分报媒/平媒内容转载自网络合作媒体),仅供学习参考。 用户通过本站上传、发布的任何内容的知识产权归属用户或原始著作权人所有。如有侵犯您的版权,请联系我们反馈本站将在三个工作日内改正。