华为的网络中修改主机名的命令(华为交换机路由配置命令)

:暂无数据 2026-07-10 05:00:01 :0

华为的网络中修改主机名的命令(华为交换机路由配置命令)

大家好,如果您还对华为的网络中修改主机名的命令不太了解,没有关系,今天就由本站为大家分享华为的网络中修改主机名的命令的知识,包括华为交换机路由配置命令的问题都会给大家分析到,还望可以解决大家的问题,下面我们就开始吧!

本文目录

华为交换机路由配置命令

华为路由器交换机配置命令:路由器命令
displayversion;显示版本信息
displaycurrent-configuration;显示当前配置
displayinterfaces;显示接口信息
displayiproute;显示路由信息
sysnameaabbcc;更改主机名
superpasswrod123456;设置口令
interfaceserial0;进入接口
ipaddress;配置端口IP地址
undoshutdown;激活端口
link-protocolhdlc;绑定hdlc协议
user-interfacevty04
authentication-modepassword
setauthentication-modepasswordsimple222
userprivilegelevel3
quit
debugginghdlcallserial0;显示所有信息
debugginghdlceventserial0;调试事件信息
debugginghdlcpacketserial0;显示包的信息
华为路由器交换机配置命令:静态路由:
例如:iproute-static129.1.0.01610.0.0.2
iproute-static129.1.0.0255.255.0.010.0.0.2
iproute-static129.1.0.016Serial2
iproute-static0.0.0.00.0.0.010.0.0.2
华为路由器交换机配置命令:动态路由:
rip;设置动态路由
ripwork;设置工作允许
ripinput;设置入口允许
ripoutput;设置出口允许
network1.0.0.0;设置交换路由网络
networkall;设置与所有网络交换
peerip-address;
summary;路由聚合
ripversion1;设置工作在版本1
ripversion2multicast;设版本2,多播方式
ripsplit-horizon;水平分隔
routeridA.B.C.D;配置路由器的ID
ospfenable;启动OSPF协议
import-routedirect;引入直联路由
ospfenablearea;配置OSPF区域
华为路由器交换机配置命令:标准访问列表命令格式如下:
acl;默认前者顺序匹配。
rule
例:acl10
rulenormalpermitsource10.0.0.00.0.0.255
rulenormaldenysourceany
华为路由器交换机配置命令:扩展访问控制列表配置命令
配置TCP/UDP协议的扩展访问列表:
rule{normal|special}{permit|deny}{tcp|udp}source{|any}destination|any}
配置ICMP协议的扩展访问列表:
rule{normal|special}{permit|deny}icmpsource{|any]destination{|any]
华为路由器交换机配置命令:扩展访问控制列表操作符的含义
equalportnumber;等于
greater-thanportnumber;大于
less-thanportnumber;小于
not-equalportnumber;不等
rangeportnumber1portnumber2;区间

绝了!华为、H3C、锐捷交换机配置命令大全

华为交换机基础配置命令
常用命令视图

常用视图名称
进入视图
视图功能
用户视图
用户从终端成功登录至设备即进入用户视图,在屏幕上显示:《HUAWEI
在用户视图下,用户可以完成查看运行状态和统计信息等功能。
系统视图
在用户视图下,输入命令system-view后回车,进入系统视图。《HUAWEI》 system-view[HUAWEI
在系统视图下,用户可以配置系统参数以及通过该视图进入其他的功能配置视图。
接口视图
使用interface命令并指定接口类型及接口编号可以进入相应的接口视图。
配置接口参数的视图称为接口视图。在该视图下可以配置接口相关的物理属性、链路层特性及IP地址等重要参数。
路由协议视图
在系统视图下,使用路由协议进程运行命令可以进入到相应的路由协议视图。
路由协议的大部分参数是在相应的路由协议视图下进行配置的。例如IS-IS协议视图、OSPF协议视图、RIP协议视图。
1、创建VLAN

《Huawei》 //用户视图,一般display命令查看信息比较多。
《Huawei》system-view //准备进入系统视图。
vlan 100 //创建vlan 100。
quit //退回系统视图。
2、将端口加入到vlan中

interface GigabitEthernet2/0/1 //(10G光口)
port link-type access //定义端口传输模式
port default vlan 100 //将端口加入vlan100
quit //回到接口视图
interface GigabitEthernet1/0/0 //进入1号插槽上的第一个千兆网口接口视图中。0代表1号口
port link-type access //定义端口传输模式
port default vlan 10 //将这个端口加入到vlan10中
quit
3、将多个端口加入到VLAN中

《Huawei》system-view
vlan 10
port GigabitEthernet 1/0/0 to 1/0/29 //将0到29号口加入到vlan10中
quit
4、交换机配置IP地址

interface Vlanif100 // 进入vlan100接口视图与vlan 100命令进入的地方不同
ip address 192.168.1.1 255.255.255.0 // 定义vlan100管理IP三层 交换网关路由
quit //返回视图
5、配置默认网关

ip route-static 0.0.0.0 0.0.0.0 192.168.1.254 //配置默认网关。
6、交换机保存设置和重置命令

《Huawei》save //保存配置信息
《Huawei》reset saved-configuration //重置交换机的配置
《Huawei》reboot //重新启动交换机
7、交换机常用的显示命令

用户视图模式下:
《Huawei》display current-configuration //显示现在交换机正在运行的配置明细
《Huawei》display device //显示各设备状态
《Huawei》display interface xxx //显示个端口状态,用?可以查看后边跟的选项
《Huawei》display version //查看交换机固件版本信息
《Huawei》display vlan xxx // 查看vlan的配置信息
二、H3C交换机的基本配置
1、基本配置

《H3C》 //用户直行模式提示符,用户视图
《H3C》system-view // 进入系统视图
sysname xxx //设置主机名成为xxx这里使用修改特权用户密码
2、用户配置

《H3C》system-view
super password H3C //设置用户分级密码
undo superpassword //删除用户分级密码
localuser bigheap 1234561 //Web网管用户设置,1为管理级用户
undo localuser bigheap //删除Web网管用户
user-interface aux 0 //只支持0
idle-timeout 250 //设置超时为2分50秒,若为0则表示不超时,默认为5分钟
undoidle-timeout //恢复默认值
user-interface vty 0 //只支持0和1
idle-timeout 250 //设置超时为2分50秒,若为0则表示不超时,默认为5分钟
undoidle-timeout //恢复默认值
set authentication password123456 //设置telnet密码,必须设置
undo set authentication password //取消密码
displayusers //显示用户
displayuser-interface //用户界面状态
3、vlan配置

vlan 2 //创建VLAN2
undo vlan all //删除除缺省VLAN外的所有VLAN,缺省VLAN不能被删除
port Ethernet 0/4 to Ethernet0/7 //将4到7号端口加入到VLAN2中,此命令只能用来加access端口,不能用来增加trunk或者hybrid端口
port-isolate enable //打开VLAN内端口隔离特性,不能二层转发, 默认不启用该功能
port-isolate uplink-portvlan 2 //设置4为VLAN2的 隔离上行端口 ,用于转发二层数据,只能配置一个上行端口,若为trunk,则建议允许所有VLAN通过,隔离不能与汇聚同时配置
display vlan all // 显示所有VLAN的详细信息
user-group 20 //创建user-group 20,默认只存在user-group 1
port Ethernet 0/4 toEthernet 0/7 // 将4到7号端口加入到VLAN20中, 初始时都属于user-group 1中
display user-group 20 //显示user-group 20的相关信息
4、交换机IP配置

vlan 20 // 创建vlan
management-vlan 20 //管理vlan
interface vlan-interface 20 // 进入并管理vlan20
undo interface vlan-interface 20 //删除管理VLAN端口
ip address192.168.1.2 255.255.255.0 // 配置管理VLAN接口静态IP地址
undo ipaddress //删除IP地址
ip gateway 192.168.1.1 //指定缺省网关(默认无网关地址)
undo ip gateway
shutdown // 关闭接口
undo shutdown //开启
display ip //显示管理VLAN接口IP的相关信息
display interface vlan-interface20 //查看管理VLAN的接口信息
《H3C》debugging ip //开启IP调试功能
《H3C》undo debugging ip
5、DHCP客户端配置

ip address dhcp-alloc // 管理VLAN接口 通过DHCP方式获取IP地址
undo ip address dhcp-alloc // 取消
display dhcp //显示DHCP客户信息
《H3C》debugging dhcp-alloc //开启DHCP调试功能
《H3C》undo debugging dhcp-alloc
6、端口配置

interface Ethernet0/3 //进入端口
shutdown //关闭端口
speed 100 //速率可为10,100,1000和auto(缺省)
duplexfull // 双工,可 为half,full和auto,光口和汇聚后不能配置
flow-control // 开启流控,默认为关闭
broadcast-suppression 20 //设置抑制广播百分比为20%,可取5,10,20,100,缺省为100,同时组播和未知单播也受此影响
loopback internal //内环测试
port link-type trunk //设置链路的 类型为trunk
port trunk pvid vlan 20 //设置20为该trunk的缺省VLAN,默认为1(trunk线路两端的PVID必须一致)
port access vlan 20 //将当前 access端口加入指定的VLAN
port trunk permit vlan all //允许 所有的VLAN通过当前的trunk端口, 可多次使用该命令
link-aggregation Ethernet 0/1 to Ethernet 0/4 // 将1-4口加入汇聚组, 1为主端口,两端需要同时配置,设置了端口镜像以及端口隔离的端口无法汇聚
undo link-aggregation Ethernet 0/1 //删除该汇聚组
link-aggregation mode egress //配置端口汇聚模式为根据目的MAC地址进行负荷分担,可选为 ingress,egress和both,缺省为both
monitor-port Ethernet 0/2 // 将该端口设置为镜像端口 ,必须先设置镜像端口,删除时必须先删除被镜像端口,而且它们不能同在一个端口,该端口不能在汇聚组中,设置新镜像端口时,新取代旧,被镜像不变
mirroring-port Ethernet 0/3 toEthernet 0/4 both //将 端口3和4设置为被镜像端口 ,both为同时监控接收和发送的报文,inbound表示仅监控接收的报文,outbound表示仅监控发送的报文
display mirror
display interface Ethernet 0/3
《H3C》resetcounters // 清除所有端口的统计信息
三、锐捷交换机基础命令配置
1、基础命令

(config)# hostname switchA //配置设备名称为switchA
(config)#banner motd & //配置每日提示信息 &为终止符
(config)#enable secret level 1 0 star //配置远程登陆密码为star
(config)#enable secret level 15 0 star //配置特权密码为star
Level 1为普通用户级别,可选为1~15,15为最高权限级别;0表示密码不加密
(config)#enable services web-server //开启交换机WEB管理功能
Services 可选以下:web-server(WEB管理)、telnet-server(远程登陆)等
2、查看信息

3、端口基本配置

(config)#Interface fastethernet 0/3 //进入F0/3的端口配置模式
(config)#interface range fa 0/1-2,0/5,0/7-9 //进入F0/1、F0/2、F0/5、F0/7、F0/8、F0/9的端口配置模式
(config-if)#speed 10 //配置端口速率为10M,可选10,100,auto
(config-if)#duplex full //配置端口为全双工模式,可选full(全双工),half(半双式),auto(自适应)
(config-if)#no shutdown //开启该端口
(config-if)#switchport access vlan 10 //将该端口划入VLAN10中,用于VLAN
(config-if)#switchport mode trunk //将该端口设为trunk模式,可选模式为access , trunk
(config-if)#port-group 1 //将该端口划入聚合端口AG1中,用于聚合端口
4、端口聚合配置

(config)# interface aggregateport 1 //创建聚合接口AG1
(config-if)# switchport mode trunk //配置并保证AG1为 trunk 模式
(config)#int f0/23-24
(config-if-range)#port-group 1 //将端口(端口组)划入聚合端口AG1中
5、生成树

配置多生成树协议:
switch(config)#spanning-tree //开启生成树协议
switch(config)#spanning-tree mst configuration //建立多生成树协议
switch(config-mst)#name ruijie //命名为ruijie
switch(config-mst)#revision 1 //设定校订本为1
switch(config-mst)#instance 0 vlan 10,20 //建立实例0
switch(config-mst)#instance 1 vlan 30,40 //建立实例1
switch(config)#spanning-tree mst 0 priority 4096 //设置优先级为4096
switch(config)#spanning-tree mst 1 priority 8192 //设置优先级为8192
switch(config)#interface vlan 10
switch(config-if)#vrrp 1 ip 192.168.10.1 //此为vlan 10的IP地址
switch(config)#interface vlan 20
switch(config-if)#vrrp 1 ip 192.168.20.1 //此为vlan 20的IP地址
switch(config)#interface vlan 30
switch(config-if)#vrrp 2 ip 192.168.30.1 //此为vlan 30的IP地址(另一三层交换机)
switch(config)#interface vlan 40
switch(config-if)#vrrp 2 ip 192.168.40.1 //此为vlan 40的IP地址(另一三层交换机)
6、vlan的基本配置

(config)#vlan 10 //创建VLAN10
(config-vlan)#name vlanname // 命名VLAN为vlanname
(config-if)#switchport access vlan 10 //将该端口划入VLAN10中
某端口的接口配置模式下进行
(config)#interface vlan 10 //进入VLAN 10的虚拟端口配置模式
(config-if)# ip address 192.168.1.1 255.255.255.0 //为VLAN10的虚拟端口配置IP及掩码,二层交换机只能配置一个IP,此IP是作为管理IP使用,例如,使用Telnet的方式登录的IP地址
(config-if)# no shutdown //启用该端口
7、端口安全

(config)# interface fastethernet 0/1 //进入一个端口
(config-if)# switchport port-security //开启该端口的安全功能
a、配置最大连接数限制
(config-if)# switchport port-secruity maxmum 1 //配置端口的最大连接数为1,最大连接数为128
(config-if)# switchport port-secruity violation shutdown
//配置安全违例的处理方式为shutdown,可选为protect (当安全地址数满后,将未知名地址丢弃)、restrict(当违例时,发送一个Trap通知)、shutdown(当违例时将端口关闭,并发送Trap通知,可在全局模式下用errdisable recovery来恢复)
b、IP和MAC地址绑定
(config-if)#switchport port-security mac-address xxxx.xxxx.xxxx ip-address 172.16.1.1
//接口配置模式下配置MAC地址xxxx.xxxx.xxxx和IP172.16.1.1进行绑定(MAC地址注意用小写)
8、三层路由功能(针对三层交换机)

(config)# ip routing //开启三层交换机的路由功能
(config)# interface fastethernet 0/1
(config-if)# no switchport //开启端口的三层路由功能(这样就可以为某一端口配置IP)
(config-if)# ip address 192.168.1.1 255.255.255.0
(config-if)# no shutdown
9、三层交换机路由协议

(config)# ip route 172.16.1.0 255.255.255.0 172.16.2.1 //配置静态路由
注:172.16.1.0 255.255.255.0 //为目标网络的网络号及子网掩码
172.16.2.1 为下一跳的地址,也可用接口表示,如ip route 172.16.1.0 255.255.255.0 serial 1/2(172.16.2.0所接的端口)
(config)# router rip //开启RIP协议进程
(config-router)# network 172.16.1.0 //宣告本设备的直连网段信息
(config-router)# version 2 //开启RIP V2,可选为version 1(RIPV1)、version 2(RIPV2)
(config-router)# no auto-summary //关闭路由信息的自动汇总功能(只有在RIPV2支持)
(config)# router ospf //开启OSPF路由协议进程(针对1762,无需使用进程ID)
(config)# router ospf 1 //开启OSPF路由协议进程(针对2501,需要加OSPF进程ID)
(config-router)# network 192.168.1.0 0.0.0.255 area 0
//宣告直连网段信息,并分配区域号(area0为骨干区域)

分享史上最全华为路由器交换机配置命令大合集

华为路由器交换机配置命令:计算机命令

   PCAlogin:root;使用root用户

   password:linux;口令是linux

   #shutdown-hnow;关机

   #init0;关机

   #logout;用户注销

   #login;用户登录

   #ifconfig;显示IP地址

   #ifconfigeth0netmask;设置IP地址

   #ifconfigeht0netmaskdown;禁用IP地址

   #routeadd0.0.0.0gw;设置网关

   #routedel0.0.0.0gw;删除网关

   #routeadddefaultgw;设置网关

   #routedeldefaultgw;删除网关

   #route;显示网关

   #ping;发ECHO包

   #telnet;远程登录

华为路由器交换机配置命令:交换机命令

   discur;显示当前配置

   displaycurrent-configuration;显示当前配置

   displayinterfaces;显示接口信息

   displayvlanall;显示路由信息

   displayversion;显示版本信息

   superpassword;修改特权用户密码

   sysname;交换机命名

   interfaceethernet0/1;进入接口视图

   interfacevlanx;进入接口视图

   ipaddress10.65.1.1255.255.0.0;配置VLAN的IP地址

   iproute-static0.0.0.00.0.0.010.65.1.2;静态路由=网关

   rip;三层交换支持

   local-userftp

   user-interfacevty04;进入虚拟终端

   authentication-modepassword;设置口令模式

   setauthentication-modepasswordsimple222;设置口令

   userprivilegelevel3;用户级别

   interfaceethernet0/1;进入端口模式

   inte0/1;进入端口模式

   duplex{half|full|auto};配置端口工作状态

   speed{10|100|auto};配置端口工作速率

   flow-control;配置端口流控

   mdi{across|auto|normal};配置端口平接扭接

   portlink-type{trunk|access|hybrid};设置端口工作模式

   portaccessvlan3;当前端口加入到VLAN

   porttrunkpermitvlan{ID|All};设trunk允许的VLAN

   porttrunkpvidvlan3;设置trunk端口的PVID

   undoshutdown;激活端口

   shutdown;关闭端口

   quit;返回

   vlan3;创建VLAN

   portethernet0/1;在VLAN中增加端口

   porte0/1;简写方式

   portethernet0/1toethernet0/4;在VLAN中增加端口

   porte0/1toe0/4;简写方式

   monitor-port;指定镜像端口

   portmirror;指定被镜像端口

   portmirrorint_listobserving-portint_typeint_num;指定镜像和被镜像

   descriptionstring;指定VLAN描述字符

   description;删除VLAN描述字符

   ;查看VLAN设置

   stp{enable|disable};设置生成树,默认关闭

   stppriority4096;设置交换机的优先级

   stproot{primary|secondary};设置为根或根的备份

   stpcost200;设置交换机端口的花费

   link-aggregatione0/1toe0/4ingress|both;端口的聚合

   undolink-aggregatione0/1|all;始端口为通道号

   isolate-user-vlanenable;设置主vlan

   isolate-user-vlansecondary;设置主vlan包括的子vlan

   porthybridpvidvlan;设置vlan的pvid

   porthybridpvid;删除vlan的pvid

   porthybridvlanvlan_id_listuntagged;设置无标识的vlan

   如果包的vlanid与PVId一致,则去掉vlan信息.默认PVID=1。

   所以设置PVID为所属vlanid,设置可以互通的vlan为untagged.

华为路由器交换机配置命令:路由器命令

   displayversion;显示版本信息

   displaycurrent-configuration;显示当前配置

   displayinterfaces;显示接口信息

   displayiproute;显示路由信息

   sysnameaabbcc;更改主机名

   superpasswrod123456;设置口令

   interfaceserial0;进入接口

   ipaddress;配置端口IP地址

   undoshutdown;激活端口

   link-protocolhdlc;绑定hdlc协议

   user-interfacevty04

   authentication-modepassword

   setauthentication-modepasswordsimple222

   userprivilegelevel3

   quit

   debugginghdlcallserial0;显示所有信息

   debugginghdlceventserial0;调试事件信息

   debugginghdlcpacketserial0;显示包的信息

华为路由器交换机配置命令:静态路由:

   例如:iproute-static129.1.0.01610.0.0.2

   iproute-static129.1.0.0255.255.0.010.0.0.2

   iproute-static129.1.0.016Serial2

   iproute-static0.0.0.00.0.0.010.0.0.2

华为路由器交换机配置命令:动态路由:

   rip;设置动态路由

   ripwork;设置工作允许

   ripinput;设置入口允许

   ripoutput;设置出口允许

   network1.0.0.0;设置交换路由网络

   networkall;设置与所有网络交换

   peerip-address;

   summary;路由聚合

   ripversion1;设置工作在版本1

   ripversion2multicast;设版本2,多播方式

   ripsplit-horizon;水平分隔

   routeridA.B.C.D;配置路由器的ID

   ospfenable;启动OSPF协议

   import-routedirect;引入直联路由

   ospfenablearea;配置OSPF区域

华为路由器交换机配置命令:标准访问列表命令格式如下:

   acl;默认前者顺序匹配。

   rule

   例:acl10

   rulenormalpermitsource10.0.0.00.0.0.255

   rulenormaldenysourceany

华为路由器交换机配置命令:扩展访问控制列表配置命令

   配置TCP/UDP协议的扩展访问列表:

   rule{normal|special}{permit|deny}{tcp|udp}source{|any}destination|any}

   配置ICMP协议的扩展访问列表:

   rule{normal|special}{permit|deny}icmpsource{|any]destination{|any]

华为路由器交换机配置命令:扩展访问控制列表操作符的含义

   equalportnumber;等于

   greater-thanportnumber;大于

   less-thanportnumber;小于

   not-equalportnumber;不等

   rangeportnumber1portnumber2;区间

华为路由器交换机配置命令:扩展访问控制列表举例

   acl101

   ruledenysouceanydestinationany

   rulepermiticmpsourceanydestinationanyicmp-typeecho

   rulepermiticmpsourceanydestinationanyicmp-typeecho-reply

   acl102

   rulepermitipsource10.0.0.10.0.0.0destination202.0.0.10.0.0.0

   ruledenyipsourceanydestinationany

   acl103

   rulepermittcpsourceanydestination10.0.0.10.0.0.0destination-portequalftp

   rulepermittcpsourceanydestination10.0.0.20.0.0.0destination-portequalwww

   firewallenable

   firewalldefaultpermit|deny

   inte0

   firewallpacket-filter101inbound|outbound

华为路由器交换机配置命令:地址转换配置举例

   firewallenable

   firewalldefaultpermit

   acl101;内部指定主机可以进入e0

   ruledenyipsourceanydestinationany

   rulepermitipsource129.38.1.10destinationany

   rulepermitipsource129.38.1.20destinationany

   rulepermitipsource129.38.1.30destinationany

   rulepermitipsource129.38.1.40destinationany

   quit

   inte0

   firewallpacket-filter101inbound

   acl102;外部特定主机和大于1024端口的数据包允许进入S0

   ruledenyipsourceanydestinationany

   rulepermittcpsource202.39.2.30destination202.38.160.10

   rulepermittcpsourceanydestination202.38.160.10destination-portgreat-than

   1024

   quit

   ints0

   firewallpacket-filter102inbound;设202.38.160.1是路由器出口IP。

   natoutbound101interface;是Easyip,将acl101允许的IP从本接口出时变换源地址。

华为路由器交换机配置命令:内部服务器地址转换配置命令(静态nat):

   natserverglobal;global_port不写时使用inside_port

   natserverglobal202.38.160.1inside129.38.1.1ftptcp

   natserverglobal202.38.160.1inside129.38.1.2telnettcp

   natserverglobal202.38.160.1inside129.38.1.3wwwtcp

   设有公网IP:202.38.160.101~202.38.160.103可以使用。;对外访问(原例题)

   nataddress-group202.38.160.101202.38.160.103pool1;建立地址池

   acl1

   rulepermitsource10.110.10.00.0.0.255;指定允许的内部网络

   ruledenysourceany

   intserial0

   natoutbound1address-grouppool1;在s0口从地址池取出IP对外访问

   natserverglobal202.38.160.101inside10.110.10.1ftptcp

   natserverglobal202.38.160.102inside10.110.10.2wwwtcp

   natserverglobal202.38.160.1028080inside10.110.10.3wwwtcp

   natserverglobal202.38.160.103inside10.110.10.4smtpudp

   华为路由器交换机配置命令:PPP设置:link-protocolppp;默认的协议

华为路由器交换机配置命令:PPP验证:

   主验方:pap|chap

   local-userq2password{simple|cipher}hello;路由器1

   interfaceserial0

   pppauthentication-mode{pap|chap}

   pppchapuserq1;pap时,没有此句

华为路由交换机配置命令:pap被验方:

   interfaceserial0;路由器2

   ppppaplocal-userq2password{simple|cipher}hello

华为路由器交换机配置命令:chap被验方:

   interfaceserial0;路由器2

   pppchapuserq2;自己路由器名

   local-userq1password{simple|cipher}hello;对方路由器名

   帧中继frame-relay(二分册6-61)

   frswitching

   ints1

   ipaddress192.168.34.51255.255.255.0

   link-protocolfr;封装帧中继协议

   frinterface-typedce

   frdlci100

   frinarp

   frmapip192.168.34.52dlci100

   ints1

   ipaddress192.168.34.52255.255.255.0

   link-protocolfr

   frinterface-typedte

   frdlci100

   frinarp

   frmapip192.168.34.51dlci100

华为路由器交换机配置命令:帧中继监测

   displayfrmap

   displayfrdlci-switch

   displayfrinterface

   resetfrinarp-info

华为路由器交换机配置命令:启动ftp服务:

   local-userftppassword{simple|cipher}aaaservice-typeftp

   ftpserverenable

请问华为交换机配置命令有哪些 华为交换机配置命令介绍

***隐藏网址***
  熟练掌握下面的华为路由器交换机配置知识点,你只需花几分钟的时间就能明白华为交换机配置,华为交换机命令等等。
华为路由器交换机配置命令:计算机命令
  PCAlogin:root;使用root用户
  password:linux;口令是linux
  #shutdown-hnow;关机
  #init0;关机
  #logout;用户注销
  #login;用户登录
  #ifconfig;显示IP地址
  #ifconfigeth0netmask;设置IP地址
  #ifconfigeht0netmaskdown;禁用IP地址
  #routeadd0.0.0.0gw;设置网关
  #routedel0.0.0.0gw;删除网关
  #routeadddefaultgw;设置网关
  #routedeldefaultgw;删除网关
  #route;显示网关
  #ping;发ECHO包
  #telnet;远程登录
华为路由器交换机配置命令:交换机命令
  discur;显示当前配置
  displaycurrent-configuration;显示当前配置
  displayinterfaces;显示接口信息
  displayvlanall;显示路由信息
  displayversion;显示版本信息
  superpassword;修改特权用户密码
  sysname;交换机命名
  interfaceethernet0/1;进入接口视图
  interfacevlanx;进入接口视图
  ipaddress10.65.1.1255.255.0.0;配置VLAN的IP地址
  iproute-static0.0.0.00.0.0.010.65.1.2;静态路由=网关
  rip;三层交换支持
  local-userftp
  user-interfacevty04;进入虚拟终端
  authentication-modepassword;设置口令模式
  setauthentication-modepasswordsimple222;设置口令
  userprivilegelevel3;用户级别
  interfaceethernet0/1;进入端口模式
  inte0/1;进入端口模式
  duplex{half|full|auto};配置端口工作状态
  speed{10|100|auto};配置端口工作速率
  flow-control;配置端口流控
  mdi{across|auto|normal};配置端口平接扭接
  portlink-type{trunk|access|hybrid};设置端口工作模式
  portaccessvlan3;当前端口加入到VLAN
  porttrunkpermitvlan{ID|All};设trunk允许的VLAN
  porttrunkpvidvlan3;设置trunk端口的PVID
  undoshutdown;激活端口
  shutdown;关闭端口
  quit;返回
  vlan3;创建VLAN
  portethernet0/1;在VLAN中增加端口
  porte0/1;简写方式
  portethernet0/1toethernet0/4;在VLAN中增加端口
  porte0/1toe0/4;简写方式
  monitor-port;指定镜像端口
  portmirror;指定被镜像端口
  portmirrorint_listobserving-portint_typeint_num;指定镜像和被镜像
  descriptionstring;指定VLAN描述字符
  description;删除VLAN描述字符
  ;查看VLAN设置
  stp{enable|disable};设置生成树,默认关闭
  stppriority4096;设置交换机的优先级
  stproot{primary|secondary};设置为根或根的备份
  stpcost200;设置交换机端口的花费
  link-aggregatione0/1toe0/4ingress|both;端口的聚合
  undolink-aggregatione0/1|all;始端口为通道号
  isolate-user-vlanenable;设置主vlan
  isolate-user-vlansecondary;设置主vlan包括的子vlan
  porthybridpvidvlan;设置vlan的pvid
  porthybridpvid;删除vlan的pvid
  porthybridvlanvlan_id_listuntagged;设置无标识的vlan
  如果包的vlanid与PVId一致,则去掉vlan信息.默认PVID=1。
  所以设置PVID为所属vlanid,设置可以互通的vlan为untagged.
华为路由器交换机配置命令:路由器命令
  displayversion;显示版本信息
  displaycurrent-configuration;显示当前配置
  displayinterfaces;显示接口信息
  displayiproute;显示路由信息
  sysnameaabbcc;更改主机名
  superpasswrod123456;设置口令
  interfaceserial0;进入接口
  ipaddress;配置端口IP地址
  undoshutdown;激活端口
  link-protocolhdlc;绑定hdlc协议
  user-interfacevty04
  authentication-modepassword
  setauthentication-modepasswordsimple222
  userprivilegelevel3
  quit
  debugginghdlcallserial0;显示所有信息
  debugginghdlceventserial0;调试事件信息
  debugginghdlcpacketserial0;显示包的信息
 华为路由器交换机配置命令:静态路由:
  
  例如:
  iproute-static129.1.0.01610.0.0.2
  iproute-static129.1.0.0255.255.0.010.0.0.2
  iproute-static129.1.0.016Serial2
  iproute-static0.0.0.00.0.0.010.0.0.2
华为路由器交换机配置命令:动态路由:
  rip;设置动态路由
  ripwork;设置工作允许
  ripinput;设置入口允许
  ripoutput;设置出口允许
  network1.0.0.0;设置交换路由网络
  networkall;设置与所有网络交换
  peerip-address;
  summary;路由聚合
  ripversion1;设置工作在版本1
  ripversion2multicast;设版本2,多播方式
  ripsplit-horizon;水平分隔
  routeridA.B.C.D;配置路由器的ID
  ospfenable;启动OSPF协议
  import-routedirect;引入直联路由
  ospfenablearea;配置OSPF区域
华为路由器交换机配置命令:标准访问列表命令格式如下:
  acl;默认前者顺序匹配。
  rule
  例:
  acl10
  rulenormalpermitsource10.0.0.00.0.0.255
  rulenormaldenysourceany
 华为路由器交换机配置命令:扩展访问控制列表配置命令
  配置TCP/UDP协议的扩展访问列表:
  rule{normal|special}{permit|deny}{tcp|udp}source{|any}destination|any}
  
  配置ICMP协议的扩展访问列表:
  rule{normal|special}{permit|deny}icmpsource{|any]destination{|any]
  
华为路由器交换机配置命令:扩展访问控制列表操作符的含义
  equalportnumber;等于
  greater-thanportnumber;大于
  less-thanportnumber;小于
  not-equalportnumber;不等
  rangeportnumber1portnumber2;区间
华为路由器交换机配置命令:扩展访问控制列表举例
  acl101
  ruledenysouceanydestinationany
  rulepermiticmpsourceanydestinationanyicmp-typeecho
  rulepermiticmpsourceanydestinationanyicmp-typeecho-reply
  acl102
  rulepermitipsource10.0.0.10.0.0.0destination202.0.0.10.0.0.0
  ruledenyipsourceanydestinationany
  acl103
  rulepermittcpsourceanydestination10.0.0.10.0.0.0destination-portequalftp
  rulepermittcpsourceanydestination10.0.0.20.0.0.0destination-portequalwww
  firewallenable
  firewalldefaultpermit|deny
  inte0
  firewallpacket-filter101inbound|outbound
华为路由器交换机配置命令:地址转换配置举例
  firewallenable
  firewalldefaultpermit
  acl101;内部指定主机可以进入e0
  ruledenyipsourceanydestinationany
  rulepermitipsource129.38.1.10destinationany
  rulepermitipsource129.38.1.20destinationany
  rulepermitipsource129.38.1.30destinationany
  rulepermitipsource129.38.1.40destinationany
  quit
  inte0
  firewallpacket-filter101inbound
  acl102;外部特定主机和大于1024端口的数据包允许进入S0
  ruledenyipsourceanydestinationany
  rulepermittcpsource202.39.2.30destination202.38.160.10
  rulepermittcpsourceanydestination202.38.160.10destination-portgreat-than
  1024
  quit
  ints0
  firewallpacket-filter102inbound;设202.38.160.1是路由器出口IP。
  natoutbound101interface;是Easyip,将acl101允许的IP从本接口出时变换源地址。
华为路由器交换机配置命令:内部服务器地址转换配置命令(静态nat):
  natserverglobal;global_port不写时使用inside_port
  natserverglobal202.38.160.1inside129.38.1.1ftptcp
  natserverglobal202.38.160.1inside129.38.1.2telnettcp
  natserverglobal202.38.160.1inside129.38.1.3wwwtcp
  设有公网IP:202.38.160.101~202.38.160.103可以使用。;对外访问(原例题)
  nataddress-group202.38.160.101202.38.160.103pool1;建立地址池
  acl1
  rulepermitsource10.110.10.00.0.0.255;指定允许的内部网络
  ruledenysourceany
  intserial0
  natoutbound1address-grouppool1;在s0口从地址池取出IP对外访问
  natserverglobal202.38.160.101inside10.110.10.1ftptcp
  natserverglobal202.38.160.102inside10.110.10.2wwwtcp
  natserverglobal202.38.160.1028080inside10.110.10.3wwwtcp
  natserverglobal202.38.160.103inside10.110.10.4smtpudp
华为路由器交换机配置命令:PPP设置:
  link-protocolppp;默认的协议
华为路由器交换机配置命令:PPP验证 :
  主验方:pap|chap
  local-userq2password{simple|cipher}hello;路由器1
  interfaceserial0
  pppauthentication-mode{pap|chap}
  pppchapuserq1;pap时,没有此句
华为路由交换机配置命令:pap被验方:
  interfaceserial0;路由器2
  ppppaplocal-userq2password{simple|cipher}hello
华为路由器交换机配置命令:chap被验方:
  interfaceserial0;路由器2
  pppchapuserq2;自己路由器名
  local-userq1password{simple|cipher}hello;对方路由器名
  帧中继frame-relay(二分册6-61)
  frswitching
  ints1
  ipaddress192.168.34.51255.255.255.0
  link-protocolfr;封装帧中继协议
  frinterface-typedce
  frdlci100
  frinarp
  frmapip192.168.34.52dlci100
  ints1
  ipaddress192.168.34.52255.255.255.0
  link-protocolfr
  frinterface-typedte
  frdlci100
  frinarp
  frmapip192.168.34.51dlci100
华为路由器交换机配置命令:帧中继监测
  
  displayfrmap
  
  displayfrdlci-switch
  displayfrinterface
  resetfrinarp-info
  
  
  
  
华为路由器交换机配置命令:启动ftp服务:
  local-userftppassword{simple|cipher}aaaservice-typeftp
  ftpserverenable
***隐藏网址***

华为路由器dns配置方法有哪些

华为路由器配置方法:以华为WS328为例
1、网线一端接路由器的WAN口,另一端接猫的LAN口;
再一根网线两端分别接路由器的LAN口和电脑网口,启动计算机浏览器,在浏览器地址栏中输入“192.168.3.1”,按回车键。
2、在登录窗口中输入登录 Web 界面的用户名(出厂默认值为“admin”)和密码(出厂默认值为“admin”),确认登录。
3、选择网络连接类型,选择帐号认证方式,点击下一步。
4、输入宽带帐号和密码,点击保存。
5、选择家庭网络——无线网络设置,2.4GHz模块:输入无线网络名称。
WPA加密模式:选择加密类型
WPA预共享密钥:输入WIFI密码,点击保存。

华为、H3C、锐捷交换机配置命令大全

对于 华为、H3C、锐捷 交换机的命令配置,三家交换机的配置命令容易弄混,经常在实际项目配置中出错,因此,本期我把这三家交换机的基础配置命令显示在这里,大家可以分别来看下他们的命令有什么不同。

为了让大家更加清楚,每行代码都有解释。

一、华为交换机基础配置命令

1、创建vlan:

//用户视图,也就是在Quidway模式下运行命令。

system-view //进入配置视图

vlan 10 //创建vlan 10,并进入vlan10配置视图,如果vlan10存在就直接进入vlan10配置视图

quit //回到配置视图

vlan 100 //创建vlan 100,并进入vlan100配置视图,如果vlan10存在就直接进入vlan100配置视图

quit //回到配置视图

2、将端口加入到vlan中:

interface GigabitEthernet2/0/ // (10G光口)

port link-type access //定义端口传输模式

port default vlan 100 //将端口加入vlan100

quit //回到配置视图

interface GigabitEthernet1/0/0 //进入1号插槽上的第一个千兆网口配置视图中。0代表1号口

port link-type access //定义端口传输模式

port default vlan 10 //将这个端口加入到vlan10中

quit //退出

3、将多个端口加入到VLAN中

system-view

vlan 10

port GigabitEthernet 1/0/0 to 1/0/29 //将0到29号口加入到vlan10中

quit

4、交换机配置IP地址

interface Vlanif100 // 进入vlan100接口视图与vlan 100命令进入的地方不同

ip address 119.167.200.90 255.255.255.252 // 定义vlan100管理IP三层 交换网关路由

quit //返回视图

interface Vlanif10 // 进入vlan10接口视图与vlan 10命令进入的地方不同

ip address 119.167.206.129 255.255.255.128 // 定义vlan10管理IP三层交换网关路由

quit

5、配置默认网关:

ip route-static 0.0.0.0 0.0.0.0 119.167.200.89 //配置默认网关。

6、 交换机保存设置和重置命令

save //保存配置信息

reset saved-configuration //重置交换机的配置

reboot //重新启动交换机

7、交换机常用的显示命令

用户视图模式下:

display current-configuration //显示现在交换机正在运行的配置明细

display device //显示各设备状态

display interface ? //显示个端口状态,用?可以查看后边跟的选项

display version //查看交换机固件版本信息

display vlan ? // 查看vlan的配置信息

8、恢复交换机出厂设置

reset saved-configuration //重置交换机的配置

二、H3C交换机的基本配置

我们先来了解下h3c的配置命令与功能,都是常用的,基本上大部分网络配置都少不了这些命令。

1、基本配置

//用户直行模式提示符,用户视图

system-view //**进入配置视图**

sysname xxx //设置主机名成为xxx这里使用修改特权用户密码

2、用户配置

system-view

super password H3C //设置用户分级密码

undo superpassword //删除用户分级密码

localuser bigheap 1234561 //Web网管用户设置,1为管理级用户

undo localuser bigheap //删除Web网管用户

user-interface aux 0 //只支持0

idle-timeout 250 //设置超时为2分50秒,若为0则表示不超时,默认为5分钟

undoidle-timeout //恢复默认值

user-interface vty 0 //只支持0和1

idle-timeout 250 //设置超时为2分50秒,若为0则表示不超时,默认为5分钟

undoidle-timeout //恢复默认值

set authentication password123456 //设置telnet密码,必须设置

undo set authenticationpassword //取消密码

displayusers //显示用户

displayuser-interface //用户界面状态

3、vlan配置

vlan 2 //创建VLAN2

undo vlanall //删除除缺省VLAN外的所有VLAN,缺省VLAN不能被删除

port Ethernet 0/4 to Ethernet0/7 //将4到7号端口加入到VLAN2中,此命令只能用来加access端口,不能用来增加trunk或者hybrid端口

port-isolate enable //打开VLAN内端口隔离特性,不能二层转发,默认不启用该功能

port-isolate uplink-portvlan 2 //设置4为VLAN2的隔离上行端口,用于转发二层数据,只能配置一个上行端口,若为trunk,则建议允许所有VLAN通过,隔离不能与汇聚同时配置

display vlan all //显示所有VLAN的详细信息

user-group 20 //创建user-group 20,默认只存在user-group 1

port Ethernet 0/4 toEthernet 0/7 //将4到7号端口加入到VLAN20中,初始时都属于user-group 1中

display user-group 20 //显示user-group 20的相关信息

4、交换机ip配置

vlan 20 //创建vlan

management-vlan 20 //管理vlan

interface vlan-interface 20 //进入并管理vlan20

undo interface vlan-interface 20 //删除管理VLAN端口

ip address192.168.1.2 255.255.255.0 //配置管理VLAN接口静态IP地址

undo ipaddress //删除IP地址

ip gateway 192.168.1.1 //指定缺省网关(默认无网关地址)

undo ip gateway

shutdown //关闭接口

undo shutdown //开启

display ip //显示管理VLAN接口IP的相关信息

display interface vlan-interface20 //查看管理VLAN的接口信息

debugging ip //开启IP调试功能

undo debugging ip

5、DHCP客户端配置

ip address dhcp-alloc // 管理VLAN接口通过DHCP方式获取IP地址

undo ip address dhcp-alloc // 取消

display dhcp //显示DHCP客户信息

debugging dhcp-alloc //开启DHCP调试功能

undo debugging dhcp-alloc

6、端口配置

interface Ethernet0/3 //进入端口

shutdown //关闭端口

speed 100 //速率可为10,100,1000和auto(缺省)

duplexfull //双工,可为half,full和auto,光口和汇聚后不能配置

flow-control //开启流控,默认为关闭

broadcast-suppression 20 //设置抑制广播百分比为20%,可取5,10,20,100,缺省为100,同时组播和未知单播也受此影响

loopback internal //内环测试

port link-type trunk //设置链路的类型为trunk

port trunk pvid vlan 20 //设置20为该trunk的缺省VLAN,默认为1(trunk线路两端的PVID必须一致)

port access vlan 20 //将当前access端口加入指定的VLAN

port trunk permit vlanall //允许**所有的VLAN通过当前的trunk端口,可多次使用该命令

mdiauto //设置以太端口为自动监测,normal为直通线,across为交叉线

link-aggregation Ethernet 0/1 toEthernet 0/4 //将1-4口加入汇聚组,1为主端口,两端需要同时配置,设置了端口镜像以及端口隔离的端口无法汇聚

undo link-aggregation Ethernet 0/1 //删除该汇聚组

link-aggregation mode egress //配置端口汇聚模式为根据目的MAC地址进行负荷分担,可选为 ingress,egress和both,缺省为both

monitor-port Ethernet 0/2 //将该端口设置为镜像端口,必须先设置镜像端口,删除时必须先删除被镜像端口,而且它们不能同在一个端口,该端口不能在汇聚组中,设置新镜像端口时,新取代旧,被镜像不变

mirroring-port Ethernet 0/3 toEthernet 0/4 both //将端口3和4设置为被镜像端口,both为同时监控接收和发送的报文,inbound表示仅监控接收的报文,outbound表示仅监控发送的报文

display mirror

display interface Ethernet 0/3

resetcounters //清除所有端口的统计信息

display link-aggregation Ethernet0/3 //显示端口汇聚信息

virtual-cable-test //诊断该端口的电路状况

7、qos优先级配置

QoS配置步骤:设置端口的优先级,设置交换机信任报文的优先级方式,队列调度,端口限速

priority 7 //设置端口优先级为7,默认为0

priority-trustcos //设置交换机信任报文的优先级方式为cos(802.1p优先级,缺省值),还可以设为dscp方式

queue-scheduler hq-wrr 2 4 6 8 //设置队列调度算法为HQ-WRR(默认为WRR),权重为2,4,6,8

line-rate inbound 29 //将端口进口速率限制为2Mbps,取1-28时,速率为rate*8*1024/125,即64,128,192...1.792M;

29-127时,速率为(rate-27)*1024,即2M,3M,4M...100M。

displayqueue-scheduler //显示队列调度模式及参数

displaypriority-trust //显示优先级信任模式

三、锐捷交换机基础命令配置

连接上交换机后,肯定是需要进行命令配置,我们来看下基础命令配置。

1、准备命令

》Enable //进入特权模式

#Exit //返回上一级操作模式

#End //返回到特权模式

#copy running-config startup-config //保存配置文件

#del flash:config.text //删除配置文件(交换机及1700系列路由器)

#erase startup-config //删除配置文件(2500系列路由器)

#del flash:vlan.dat //删除Vlan配置信息(交换机)

#Configure terminal //进入全局配置模式

(config)# hostname switchA //配置设备名称为switchA

(config)#banner motd & //配置每日提示信息 &为终止符

(config)#enable secret level 1 0 star //配置远程登陆密码为star

(config)#enable secret level 15 0 star //配置特权密码为star

Level 1为普通用户级别,可选为1~15,15为最高权限级别;0表示密码不加密

(config)#enable services web-server //开启交换机WEB管理功能

Services 可选以下:web-server(WEB管理)、telnet-server(远程登陆)等

2、查看信息

#show running-config //查看当前生效的配置信息

#show interface fastethernet 0/3 //查看F0/3端口信息

#show interface serial 1/2 //查看S1/2端口信息

#show interface //查看所有端口信息

#show ip interface brief //以简洁方式汇总查看所有端口信息

#show ip interface //查看所有端口信息

#show version //查看版本信息

#show mac-address-table //查看交换机当前MAC地址表信息

#show running-config //查看当前生效的配置信息

#show vlan //查看所有VLAN信息

#show vlan id 10 //查看某一VLAN (如VLAN10)的信息

#show interface fastethernet 0/1 //查看某一端口模式(如F 0/1)

#show aggregateport 1 summary //查看聚合端口AG1的信息

#show spanning-tree //查看生成树配置信息

#show spanning-tree interface fastethernet 0/1 //查看该端口的生成树状态

#show port-security //查看交换机的端口安全配置信息

#show port-security address //查看地址安全绑定配置信息

#show ip access-lists listname //查看名为listname的列表的配置信息

3、端口的基本配置

(config)#Interface fastethernet 0/3 //进入F0/3的端口配置模式

(config)#interface range fa 0/1-2,0/5,0/7-9 //进入F0/1、F0/2、F0/5、F0/7、F0/8、F0/9的端口配置模式

(config-if)#speed 10 //配置端口速率为10M,可选10,100,auto

(config-if)#duplex full //配置端口为全双工模式,可选full(全双工),half(半双式),auto(自适应)

(config-if)#no shutdown //开启该端口

(config-if)#switchport access vlan 10 //将该端口划入VLAN10中,用于VLAN

(config-if)#switchport mode trunk //将该端口设为trunk模式,可选模式为access , trunk

(config-if)#port-group 1 //将该端口划入聚合端口AG1中,用于聚合端口

4、聚合端口的创建

(config)# interface aggregateport 1 //创建聚合接口AG1

(config-if)# switchport mode trunk //配置并保证AG1为 trunk 模式

(config)#int f0/23-24

(config-if-range)#port-group 1 //将端口(端口组)划入聚合端口AG1中

5、生成树

配置多生成树协议:

switch(config)#spanning-tree //开启生成树协议

switch(config)#spanning-tree mst configuration //建立多生成树协议

switch(config-mst)#name ruijie //命名为ruijie

switch(config-mst)#revision 1 //设定校订本为1

switch(config-mst)#instance 0 vlan 10,20 //建立实例0

switch(config-mst)#instance 1 vlan 30,40 //建立实例1

switch(config)#spanning-tree mst 0 priority 4096 //设置优先级为4096

switch(config)#spanning-tree mst 1 priority 8192 //设置优先级为8192

switch(config)#interface vlan 10

switch(config-if)#vrrp 1 ip 192.168.10.1 //此为vlan 10的IP地址

switch(config)#interface vlan 20

switch(config-if)#vrrp 1 ip 192.168.20.1 //此为vlan 20的IP地址

switch(config)#interface vlan 30

switch(config-if)#vrrp 2 ip 192.168.30.1 //此为vlan 30的IP地址(另一三层交换机)

switch(config)#interface vlan 40

switch(config-if)#vrrp 2 ip 192.168.40.1 //此为vlan 40的IP地址(另一三层交换机)

6、VLAN的基本配置

(config)#vlan 10 //创建VLAN10

(config-vlan)#name vlanname // 命名VLAN为vlanname

(config-if)#switchport access vlan 10 //将该端口划入VLAN10中

某端口的接口配置模式下进行

(config)#interface vlan 10 //进入VLAN 10的虚拟端口配置模式

(config-if)# ip address 192.168.1.1 255.255.255.0 //为VLAN10的虚拟端口配置IP及掩码,二层交换机只能配置一个IP,此IP是作为管理IP使用,例如,使用Telnet的方式登录的IP地址

(config-if)# no shutdown //启用该端口

7、端口安全

(config)# interface fastethernet 0/1 //进入一个端口

(config-if)# switchport port-security //开启该端口的安全功能

a、配置最大连接数限制

(config-if)# switchport port-secruity maxmum 1 //配置端口的最大连接数为1,最大连接数为128
(config-if)# switchport port-secruity violation shutdown
//配置安全违例的处理方式为shutdown,可选为protect (当安全地址数满后,将未知名地址丢弃)、restrict(当违例时,发送一个Trap通知)、shutdown(当违例时将端口关闭,并发送Trap通知,可在全局模式下用errdisable recovery来恢复)

b、IP和MAC地址绑定

(config-if)#switchport port-security mac-address xxxx.xxxx.xxxx ip-address 172.16.1.1
//接口配置模式下配置MAC地址xxxx.xxxx.xxxx和IP172.16.1.1进行绑定 (MAC地址注意用小写)

8、三层路由功能(针对三层交换机)

(config)# ip routing //开启三层交换机的路由功能

(config)# interface fastethernet 0/1

(config-if)# no switchport //开启端口的三层路由功能(这样就可以为某一端口配置IP)

(config-if)# ip address 192.168.1.1 255.255.255.0

(config-if)# no shutdown

9、三层交换机路由协议

(config)# ip route 172.16.1.0 255.255.255.0 172.16.2.1 //配置静态路

注:172.16.1.0 255.255.255.0 //为目标网络的网络号及子网掩码

172.16.2.1 为下一跳的地址,也可用接口表示,如ip route 172.16.1.0 255.255.255.0 serial 1/2(172.16.2.0所接的端口)

(config)# router rip //开启RIP协议进程

(config-router)# network 172.16.1.0 //申明本设备的直连网段信息

(config-router)# version 2 //开启RIP V2,可选为version 1(RIPV1)、version 2(RIPV2)

(config-router)# no auto-summary //关闭路由信息的自动汇总功能(只有在RIPV2支持)

(config)# router ospf //开启OSPF路由协议进程(针对1762,无需使用进程ID)

(config)# router ospf 1 //开启OSPF路由协议进程(针对2501,需要加OSPF进程ID)

(config-router)# network 192.168.1.0 0.0.0.255 area 0

//申明直连网段信息,并分配区域号(area0为骨干区域)

可以明显看出,三家命令大同小异,其实华为与H3C更加类似。

secure CRT在交换机上如何修改主机名字

华为或者H3C的交换机在登陆进去之后是《》 输入sys进入#模式 输入sysname 主机名字 就可以了
思科的话进去后是》enable
之后输入configuration terminal
之后输入hostname 主机名字就可以了

交换机的配置

哪种交换机?CISCO?华为?
switch(config)# hostname hostname
在基于CLI的交换机上设置主机名/系统名:
switch(enable) set system name name-string
2.在基于IOS的交换机上设置登录口令:
switch(config)# enable password level 1 password
在基于CLI的交换机上设置登录口令:
switch(enable) set password
switch(enable) set enalbepass
3.在基于IOS的交换机上设置远程访问:
switch(config)# interface vlan 1
switch(config-if)# ip address ip-address netmask
switch(config-if)# ip default-gateway ip-address
在基于CLI的交换机上设置远程访问:
switch(enable) set interface sc0 ip-address netmask broadcast-address
switch(enable) set interface sc0 vlan
switch(enable) set ip route default gateway
4.在基于IOS的交换机上启用和浏览CDP信息:
switch(config-if)# cdp enable
switch(config-if)# no cdp enable
为了查看Cisco邻接设备的CDP通告信息:
switch# show cdp interface
switch# show cdp neighbors
在基于CLI的交换机上启用和浏览CDP信息:
switch(enable) set cdp {enable|disable} module/port
为了查看Cisco邻接设备的CDP通告信息:
switch(enable) show cdp neighbors
5.基于IOS的交换机的端口描述:
switch(config-if)# description description-string
基于CLI的交换机的端口描述:
switch(enable)set port name module/number description-string
6.在基于IOS的交换机上设置端口速度:
switch(config-if)# speed{10|100|auto}
在基于CLI的交换机上设置端口速度:
switch(enable) set port speed moudle/number {10|100|auto}
switch(enable) set port speed moudle/number {4|16|auto}
7.在基于IOS的交换机上设置以太网的链路模式:
switch(config-if)# duplex {auto|full|half}
在基于CLI的交换机上设置以太网的链路模式:
switch(enable) set port duplex module/number {full|half}
8.在基于IOS的交换机上配置静态VLAN:
switch# vlan database
switch(vlan)# vlan vlan-num name vla
switch(vlan)# exit
switch# configure teriminal
switch(config)# interface interface module/number
switch(config-if)# switchport mode access
switch(config-if)# switchport access vlan vlan-num
switch(config-if)# end
在基于CLI的交换机上配置静态VLAN:
switch(enable) set vlan vlan-num
switch(enable) set vlan vlan-num mod-num/port-list
9. 在基于IOS的交换机上配置VLAN中继线:
switch(config)# interface interface mod/port
switch(config-if)# switchport mode trunk
switch(config-if)# switchport trunk encapsulation {isl|dotlq}
switch(config-if)# switchport trunk allowed vlan remove vlan-list
switch(config-if)# switchport trunk allowed vlan add vlan-list
在基于CLI的交换机上配置VLAN中继线:
switch(enable) set trunk module/port
Vlan-range
10.在基于IOS的交换机上配置VTP管理域:
switch# vlan database
switch(vlan)# vtp domain domain-name
在基于CLI的交换机上配置VTP管理域:
switch(enable) set vtp
11.在基于IOS的交换机上配置VTP 模式:
switch# vlan database
switch(vlan)# vtp domain domain-name
switch(vlan)# vtp {sever|cilent|transparent}
switch(vlan)# vtp password password
在基于CLI的交换机上配置VTP 模式:
switch(enable) set vtp
12. 在基于IOS的交换机上配置VTP版本:
switch# vlan database
switch(vlan)# vtp v2-mode
在基于CLI的交换机上配置VTP版本:
switch(enable) set vtp v2 enable
13. 在基于IOS的交换机上启动VTP剪裁:
switch# vlan database
switch(vlan)# vtp pruning
在基于CL I 的交换机上启动VTP剪裁:
switch(enable) set vtp pruning enable
14.在基于IOS的交换机上配置以太信道:
switch(config-if)# port group group-number
在基于CLI的交换机上配置以太信道:
switch(enable) set port channel moudle/port-range mode{on|off|desirable|auto}
15.在基于IOS的交换机上调整根路径成本:
switch(config-if)# spanning-tree cost cost
在基于CLI的交换机上调整根路径成本:
switch(enable) set spantree portcost moudle/port cost
switch(enable) set spantree portvlancost moudle/port

华为路由查看配置命令是什么

以下为查看路由配置的相关命令:

display version 显示版本信息

display current-configuration 显示当前配置

display interfaces 显示接口信息

display ip route 显示路由信息

扩展资料:

华为设置路由器命令:

sysname aabbcc 更改主机名

super passwrod 123456 设置口令

interface serial0 进入接口

ip address 

undo shutdown 激活端口

link-protocol hdlc 绑定hdlc协议

user-interface vty 0 4

authentication-mode password

set authentication-mode password simple 222

user privilege level 3

quit

debugging hdlc all serial0 显示所有信息

debugging hdlc event serial0 调试事件信息

debugging hdlc packet serial0 显示包的信息

如果你还想了解更多这方面的信息,记得收藏关注本站。

华为的网络中修改主机名的命令(华为交换机路由配置命令)

本文编辑:admin

更多文章:


可信验证系统(什么是可信云认证)

可信验证系统(什么是可信云认证)

今天给各位分享什么是可信云认证的知识,其中也会对什么是可信云认证进行解释,如果能碰巧解决你现在面临的问题,别忘了关注本站,现在开始吧!

2026年10月15日 10:00

百度站长改版链接多跳一错误(网站更换了https协议,但是站长平台总是审核不过)

百度站长改版链接多跳一错误(网站更换了https协议,但是站长平台总是审核不过)

大家好,如果您还对百度站长改版链接多跳一错误不太了解,没有关系,今天就由本站为大家分享百度站长改版链接多跳一错误的知识,包括网站更换了https协议,但是站长平台总是审核不过的问题都会给大家分析到,还望可以解决大家的问题,下面我们就开始吧!

2026年10月15日 08:30

天津医科大学2021研究生招生(天津医学院2023录取分数线)

天津医科大学2021研究生招生(天津医学院2023录取分数线)

其实天津医科大学2021研究生招生的问题并不复杂,但是又很多的朋友都不太了解天津医学院2023录取分数线,因此呢,今天小编就来为大家分享天津医科大学2021研究生招生的一些知识,希望可以帮助到大家,下面我们一起来看看这个问题的分析吧!

2026年10月15日 05:10

天津小客车摇号查询结果(天津摇号结果查询怎么查询)

天津小客车摇号查询结果(天津摇号结果查询怎么查询)

本篇文章给大家谈谈天津小客车摇号查询结果,以及天津摇号结果查询怎么查询对应的知识点,文章可能有点长,但是希望大家可以阅读完,增长自己的知识,最重要的是希望对各位有所帮助,可以解决了您的问题,不要忘了收藏本站喔。

2026年10月15日 00:20

亚马逊云服务器永久免费(亚马逊云可以注册域名吗)

亚马逊云服务器永久免费(亚马逊云可以注册域名吗)

其实亚马逊云服务器永久免费的问题并不复杂,但是又很多的朋友都不太了解亚马逊云可以注册域名吗,因此呢,今天小编就来为大家分享亚马逊云服务器永久免费的一些知识,希望可以帮助到大家,下面我们一起来看看这个问题的分析吧!

2026年10月14日 23:30

海外市场推广(要做海外品牌推广,这几点很重要)

海外市场推广(要做海外品牌推广,这几点很重要)

“海外市场推广”相关信息最新大全有哪些,这是大家都非常关心的,接下来就一起看看海外市场推广(要做海外品牌推广,这几点很重要)!

2026年10月14日 22:50

天津民办大专学校有哪些(天津有哪些大专)

天津民办大专学校有哪些(天津有哪些大专)

大家好,如果您还对天津民办大专学校有哪些不太了解,没有关系,今天就由本站为大家分享天津民办大专学校有哪些的知识,包括天津有哪些大专的问题都会给大家分析到,还望可以解决大家的问题,下面我们就开始吧!

2026年10月14日 20:00

经济双循环是什么时候提出的(内外双循环是什么时候提出的)

经济双循环是什么时候提出的(内外双循环是什么时候提出的)

“经济双循环是什么时候提出的”相关信息最新大全有哪些,这是大家都非常关心的,接下来就一起看看经济双循环是什么时候提出的(内外双循环是什么时候提出的)!

2026年10月14日 19:30

根服务器价格(ipv6为何在中国有根服务器)

根服务器价格(ipv6为何在中国有根服务器)

这篇文章给大家聊聊关于根服务器价格,以及ipv6为何在中国有根服务器对应的知识点,希望对各位有所帮助,不要忘了收藏本站哦。

2026年10月14日 16:50

域名被别人备案了(我们网站域名被人备案了怎么办)

域名被别人备案了(我们网站域名被人备案了怎么办)

大家好,今天小编来为大家解答以下的问题,关于域名被别人备案了,我们网站域名被人备案了怎么办这个很多人还不知道,现在让我们一起来看看吧!

2026年10月14日 15:40

最近更新

可信验证系统(什么是可信云认证)
2026-10-15 10:00:23 浏览:0
广告推广app(常见的app推广方式)
2026-10-15 09:20:01 浏览:0
热刺vs马赛比赛(热刺赛程比分)
2026-10-15 09:10:01 浏览:0
热门文章

标签列表