路由器的配置命令

路由器的配置命令
路由器的配置命令

路由器的配置命令

1.路由器的模式

Router>用户模式

Router#特权模式

Router(config)#配置模式

Router(config-if)# 接口模式

Router(config)#interface f0/0.1 进入子接口

Router(config-subif)# 子接口模式

Router(config-line)# 进行线模式

Router(config-router)# 路由配置模式

2.配置静态路由条目

Router(config)# ip route 192.168.10.0 255.255.255.0 192.168.9.2 /192.168.10.0网段及掩码需要经过相邻路由器接口的IP地址

3.配置默认路由

Router B(config)#ip route 0.0.0.0 0.0.0.0 192.168.2.2 /所以外出的数据包如果找不到路由表目均找192.168.2.2接口。

4.配置路由控制台密码

teacher(config)#line console 0

teacher(config-line)#login

teacher(config-line)password cisco

teacher(config)#enable password cisco /配置特权模式密码teacher(config)#enable secret 1234 /配置加密保存的密码teacher(config)#service password-encryption / 对所有密码加密

5.配置控制台会话时间

teacher(config)#line console 0

teacher(config-line)exec-timeout 0 0

6.配置控制台输出日志同步

teacher(config)#line console 0

teacher(config-line)#logging synchronous

7.路由密码恢复

(1)进入ROM Monitor 模式

(2)修改配置寄存器的值,启动是绕过 startup-config文件

rommon1>confreg ox2140

rommon2>reset

(3)用startup-config覆盖running-config

ROuter#copy starup-config running-config

修改密码

Router(config)#enable password cisco

(4)修改配置寄存器的值

Router(config)#config-register ox2102

8.动态路由配置

(1)截断超时

(2)打开接口

(3)为接口设置IP 地址

Router(config)#interface f0/0

Router(config-if)#ip address 192.168.1.1

Router(configif)#no shutdown

(4)启动RIP进程,并宣告主网络号

Router(config)#router rip

Router(config-router)#network 192.68.1.0

9.单臂路由配置

Router(config)#interface f0/0.1

router(config-subif)#encapsolution dotlq 1 :子接口封装dot1q针对的是VLAN1

Router(config-subif)#ip address 192.168.1.1 255.255.255.0 :设置VLAN的网关地址

Router(config)#interface f0/0.2

router(config-subif)# encapsolution dotlq 2 子网接口封装do1q针对的是VLAN2 Router(config-subif)# 192.168.2.1 255.255.255.0 :设置VLAN2的网关地址

路由器的操作系统,它是一个功能非常强大的系统,特别是在一些高档的路由器中,它具有相当丰富的操作命令,就像我们的DOS系统一样。正确掌握这些命令对于配置路由器是最为关键的一步,否则根本无从谈起,因为一般来说都是以命令的方式对路由器进行配置的。下面我就仍以Cisco路由器为例讲一下路由器的常用操作命令。路由器的IOS操作命令较多,下面分类介绍。

1. 帮助命令

在IOS操作中,无论任何状态和位置,都可以通过键入"?"得到系统的帮助,所以说"?"就是路由器的帮助命令。

2.改变设置状态的命令

因为路由器有许多不同权限和选项的设置,所以也就必须有相应的命令来进入相应的设置状态,这些改变设置状态的

路由器改变设置状态命令列表任务

命令

进入特权命令状态

enable

退出特权命令状态

disable

进入设置对话状态

setup

进入全局设置状态

config terminal

退出全局设置状态

end

进入端口设置状态

interface type slot/number

进入子端口设置状态

interface type number . subinterface [point-to-point | multipoint]

进入线路设置状态

line type slot/number

进入路由设置状态

router protocol

退出局部设置状态

exit

3.显示命令

显示命令就是用于显示某些特定需要的命令,以方便用户查看某些特定设置信息。表2就是常见的信息显示命令。

表2 信息显示命令列表任务

命令

查看版本及引导信息

show version

查看运行设置

show running-config

查看开机设置

show startup-config

显示端口信息

show interface type slot/number

显示路由信息

show ip router

因为路由器有时要进行网络管理,所以也必须具有一些网络进入命令,表3所示的就是这些有关网络进入和设置方面的命令。

表3 网络命令列表任务

命令

登录远程主机

Telnet hostname|IP address

网络侦测

ping hostname|IP address

路由跟踪

trace hostname|IP address

4.基本命令

除上面我们所说的一些特殊命令之外,更多的还是一些基本命令,如表4所示。

表4 基本命令列表任务

命令

全局设置

config terminal

设置访问用户及密码

username username password password

设置特权密码

enable secret password

设置路由器名

hostname name

设置静态路由

ip route destination subnet-mask next-hop

启动IP 路由

ip routing

启动IPX 路由

ipx routing

端口设置

interface type slot/number

设置IP 地址

ip address address subnet-mask

设置IPX 网络

ipx network network

激活端口

no shutdown

物理线路设置

line type number

启动登录进程

login [local|tacacs server]

设置登录密码

password password

五、简单配置实例

现在,我们以一个具体的示例来说明路由器的配置过程。目前,许多单位都以DDN专线方式接入Internet,在这种情况下,DDN专线通过一台NTU设备接到路由器的同步口,再通过一条双绞线,一端接路由器的以太网端口,另一端接内部网的网络交换机或Hub。一般只需选购具备一个同步口和一个以太口的路由器即可,现假设这台路由器是Cisco2611。对这样网络环境下的一台路由器配置过程我们可以简单地按如下方法进行。

1.定义路由器机器名

如果要将路由器机器名定义为cisco2611,进入路由器的IOS后,使用以下命令:

router> enable

password:////////////

router# config terminal

router(config)# hostname cisco2611

2.设置特权模式密码

我们在上一步的设备中可以看到,在对路由器操作时,输入"enable"后需输入相应的密码,那么这个密码是如何设置的呢?为了这个设置密码,应在配置模式中(也就是说是要第三级用户权限下,并不是在用户模式下)使用如下命令:

router(config)# enable secret mypassword

以便将密码改为mypassword。

3.配置以太网端口信息

在配置模式中输入以下命令:

router(config)# interface ethernet 0/0

router(config-if) # ip address 202.102.224.25 255.255.255.0

第1条命令进入端口配置模式,第2条命令配置该端口的IP地址和子网掩码。需要指出的是,目前Cisco公司生产的路由器大多是基于模块化的,每个模块上可以有多个端口。比如一个具有2个以太网接口的网络模块,如果插在路由器槽位0上,则2个以太网端口就要用"ethernet 0/0"和"ethernet 0/1"来表示,在"/"符号的左边是模块的槽位号,右边是端口编号。

4.配置同步端口

router(config)# interface serial 0/0

router(config-if)# ip address 202.102.211.108 255.255.255.248

DDN专线一般接入路由器的同步口,用"serial 0/0"表示,其中"0/0"代表端口位置。使用

上面第1条命令进入端口配置模式,使用上面第2条命令配置该端口的IP地址和子网掩码。

5.添加静态路由表

在这种Internet接入方式中,采用的是静态路由方式,因此需要将一条静态路由记录加入,内容如下:

router(config)# ip router 0.0.0.0 0.0.0.0 202.102.211.107

这条命令表示,将内部网段上发给路由器的包转发给DDN专线另一端的地址202.102.211.107。

6.查看配置

router# show running-config

Building configuration...

Current configuration:

!

version 12.0

service config

service timestamps debug uptime

service timestamps log uptime

service password-encryption

!

hostname cisco2611

!

enable secret 5 ?$MJrb$o3NCu6DPwG/TGFBT7xiLv/

!

ip subnet-zero

ip domain-name https://www.360docs.net/doc/4f10213608.html,

ip name-server 202.102.224.1

!

interface Ethernet0/0

ip address 202.102.224.25 255.255.255.0

!

interface serial0/0

ip address 202.102.211.108 255.255.255.248

!

ip classless

ip default-network 0.0.0.0

ip router 0.0.0.0 0.0.0.0 202.102.211.107

no ip http server

!

line con 0

exec-timeout 1 0

password 7 061C0731

login

transport input none

line aux 0

line vty 0 4

access-class 2 in

password 7 131F1F02

login

!

end

上面列出的是路由器的当前配置,使用show running-config命令可以进行查看,若要查看存在NVRAM中的配置,需要使用show startup-config命令。

7.保存配置

当我们对路由器的配置进行修改之后,一定要将其存入NVRAM中才能在下一次启动时生效,为此,需要使用如下命令:

router# copy running-config startup-config

经过以上操作,路由器的配置工作基本完成。在路由器的不同操作级别上,都可以输入"?"符号来查看当前能够使用的命令有哪些。对于配置文件中不想要的语句,只需使用"no"命令,然后加上整条语句,即可删除。

好了,路由器的简单配置方法就介绍至此,在下一篇中我们将结构实例介绍路由器高级配置中的一些具体应用配置,想要进一步了解路由器的高级配置读者一定要注意了,非常有用的!

(5)进入">"提示符状态

路由器处于RXBOOT状态,在开机后60秒内按ctrl-break可进入此状态,这时路由器不能完成正常的功能,只能进行软件升级和手工引导。

(6)设置对话状态

这是一台新路由器开机时自动进入的状态,在特权命令状态使用"Setup.exe"命令也可进入此状态,这时可通过对话方式对路由器进行设置。

华为路由器配置命令

全局配置模式

aaa-enable 使能配置AAA(认证,授权和计费)

Access-list 配置标准访问表

arp 设置静态ARP人口

https://www.360docs.net/doc/4f10213608.html, 推出各大专业服务器评测Linux服务器的安全性能SUN服务器HP服务器DELL服务器IBM服务器联想服务器浪潮服务器曙光服务器同方服务器华硕服务器宝德服务器

chat-script 生成一个用在modem上的执行脚本

custom-list 创建定制队列列表

dialer-list 创建dialer-list

dram-wait 设置DRAM等待状态

enable 修改ENABLE口令

exit 退出全局配置模式

firewall 配置防火墙状态

flow-interval 设置流量控制时间间隔

frame-relay 帧中继全局配置命令集

FTP-server FTP 服务器

help 系统帮助命令简述

host 添加主机名称和其IP地址

hostname 修改主机名

ifquelen 更改接口队列长度

interface 选择配置接口

ip 全局IP配置命令子集

ipx 全局IPX配置命令子集

loGhost 设置日志主机IP地址

logic-channel 配置逻辑通道

login 启动EXEC登录验证

modem-timeout 设置modem 超时时间

multilink 配置multilink 用户使用的接口multilink-user 配置multilink 用户使用的接口natserver 设置FTP,TELNET,WWW服务的IP地址no 关闭某些参数开关

priority-list 创建优先级队列列表

router 启动路由处理

settr 设置时间范围

snmp-server 修改SNMP参数

tcp 配置全局TCP参数

timerange 启动或关闭时间区域

user 为PPP验证向系统中加入用户

vpdn 设置VPDN

vpdn-group 设置VPDN组

x25 X.25协议分组层

交换机

一.交换机的五种模式

swith>用户模式

swith#特权模式

swith(config)# 全局配置模式

swith(config-if)# 接口模式

swith(config-li)# 线模式

二.设置交换机的密码

1.用户模式到特权模式的密码

swith(config)#enable password 123 : 明文

swith(config)#enable secret : 密文

如果两个都设则密文生效

2.控制台CONSOLE密码设置

swith(config)#line con 0

swith(config-line)#login

swith(config-line)#password telnet123 : 设置 console密码为telnet123 3.启用telnet密码

swith(config)#line vty 0 15 :最多有0-15个人可以teinet访问swith swith(config-line)#login

swith(config-line)#password telnet123:设置telnet密码为telnet123

注意:要真正生效telnet还要设置特权密码

三.交换机命名

swith(config)#hostname benetsw01 :使用benesw01作为交换机的名字

四.show命令集

swith#show version :显示IOS版本信息

swith#show int vlan 1 briet :简单的显示VLAN1的信息

swith#show running-config :显示正在运行的配置信息

swith#show startup-config :显示已经保存的配置文件

swith#show mac-address-table :显示MAC地址表

swith#show neihbor detail :显示邻居详细信息

swith#show traffic :显示CDP的流量

五.设置交换机的网关和DNS名称服务器的IP

swith(config)#ip default-gateway 192.168.10.8 :设置交换机的网关

swith(config)#domain-name server 202.160.0.20 :设置DNS名称服务器地址swith(config)#no ip domain-lookup :交换机名称服务器的域名查询

华三华为交换机路由器配置常用命令汇总定稿版

华三华为交换机路由器 配置常用命令汇总 HUA system office room 【HUA16H-TTMS2A-HUAS8Q8-HUAH1688】

H3C交换机配置命令大全1、system-view 进入系统视图模式 2、sysname 为设备命名 3、display current-configuration 当前配置情况 4、 language-mode Chinese|English 中英文切换 5、interface Ethernet 1/0/1 进入以太网端口视图 6、 port link-type Access|Trunk|Hybrid 设置端口访问模式 7、 undo shutdown 打开以太网端口 8、 shutdown 关闭以太网端口

9、 quit 退出当前视图模式 10、 vlan 10 创建VLAN 10并进入VLAN 10的视图模式 11、 port access vlan 10 在端口模式下将当前端口加入到vlan 10中 12、port E1/0/2 to E1/0/5 在VLAN模式下将指定端口加入到当前vlan中 13、port trunk permit vlan all 允许所有的vlan通过 H3C路由器配置命令大全华为交换机常用配置实例 H3C交换机路由器telnet和console口登录配置 2009年11月09日星期一 10:00

级别说明 Level 名称 命令 参观 ping、tracert、telnet 1 监控 display、debugging 2 配置 所有配置命令(管理级的命令除外)

H3C路由器配置命令

H3C路由器配置命令 一、路由器基本配置命令 1、system-view 进入系统视图模式 2、sysname R1 为设备命名为R 3、display ip routing-table 显示当前路由表 4、language-mode Chinese|English 中英文切换 5、interface Ethernet 0/0 进入以太网端口视图 6、ip address 192.168.1.1 255.255.255.0 配置IP地址和子网掩码 7、undo shutdown 打开以太网端口 8、shutdown 关闭以太网端口 9、quit 退出当前视图模式 10、ip route-static 192.168.2.0 255.255.255.0 192.168.12.2 description To.R2配置静态路由 11、ip route-static 0.0.0.0 0.0.0.0 192.168.12.2 description To.R2配置默认的路由 基本配置案例 [Quidway]display version 显示版本信息 [Quidway]display current-configuration 显示当前配置 [Quidway]display interfaces 显示接口信息 [Quidway]display ip route 显示路由信息 [Quidway]sysname aabbcc 更改主机名 [Quidway]super passwrod 123456 设置口令 [Quidway]interface serial0 进入接口 [Quidway-serial0]ip address [Quidway-serial0]undo shutdown 激活端口 [Quidway]link-protocol hdlc 绑定hdlc协议 [Quidway]user-interface vty 0 4 [Quidway-ui-vty0-4]authentication-mode password [Quidway-ui-vty0-4]set authentication-mode password simple 2 [Quidway-ui-vty0-4]user privilege level 3 [Quidway-ui-vty0-4]quit [Quidway]debugging hdlc all serial0 显示所有信息 [Quidway]debugging hdlc event serial0 调试事件信息 [Quidway]debugging hdlc packet serial0 显示包的信息 静态路由配置案例: [Quidway]ip route-static {interface

Cisco路由器的基本配置命令

Cisco路由器的基本配置命令 Cisco 路由器的基本配置命令 一(实训目的 1(掌握路由器的连接方式和使用基本规则。 2(掌握路由器的基本配置命令。 二(实训器材及环境 1(安装 Windows 2000 Server 系统的计算机一台。 2(安装模拟软件 Boson Netsim 5.31。 3(模拟环境如下: 图 11-1 实验拓扑环境 三(实训理论基础 1(路由器的基本配置语句 (1)配置路由器名字和特权密码: Router1> enable Router1# conf t Router1(config)# hostname R1 R1(config)# enable secret 123456
b5E2RGbCAP
(2)配置路由器的 Ethernet 端口:
R1(config)# interface e0 R1(config-if)# ip address 192.168.1.1 255.255.255.0 p1EanqFDPw R1(config-if)# no shutdown (3)配置路由器的 Serial 端口(DTE 端):DXDiTa9E3d R1(config)# interface s0 R1(config-if)# ip address 10.0.0.1 255.0.0.0 R1(config-if)# no shutdown (4)配置路由器的 Serial 端口(DCE 端):
RTCrpUDGiT
R2(config)# interface s0 R2(config-if)# ip address 10.0.0.2 255.0.0.0 R2(config-if)# clock rate 64000 R2(config-if)# no shutdown 2(路由器可以有多种类型的端口,用于连接 不同的网络,常用的有以太网端口(Ethernet)、快速以太网端口 (FastEthernet)、高速同步串口(Serial)等。有的端口是固定端口,有的端
5PCzVD7HxA
- 1 -

路由器配置常用命令汇总

Access-enable允许路由器在动态访问列表中创建临时访问列表入口 Access-group把访问控制列表(ACL)应用到接口上 Access-list定义一个标准的IP ACL Access-template在连接的路由器上手动替换临时访问列表入口 Appn向APPN子系统发送命令 Atmsig执行ATM信令命令 B 手动引导操作系统 Bandwidth 设置接口的带宽 Banner motd 指定日期信息标语 Bfe 设置突发事件手册模式 Boot system 指定路由器启动时加载的系统映像 Calendar 设置硬件日历 Cd 更改路径 Cdp enable 允许接口运行CDP协议 Clear 复位功能 Clear counters 清除接口计数器 Clear interface 重新启动接口上的件逻辑 Clockrate 设置串口硬件连接的时钟速率,如网络接口模块和接口处理器能接受的速率Cmt 开启/关闭FDDI连接管理功能 Config-register 修改配置寄存器设置 Configure 允许进入存在的配置模式,在中心站点上维护并保存配置信息 Configure memory 从NVRAM加载配置信息 Configure terminal 从终端进行手动配置 Connect 打开一个终端连接

Copy 复制配置或映像数据 Copy flash tftp 备份系统映像文件到TFTP服务器 Copy running-config startup-config 将RAM中的当前配置存储到NVRAM Copy running-config tftp 将RAM中的当前配置存储到网络TFTP服务器上 Copy tftp flash 从TFTP服务器上下载新映像到Flash Copy tftp running-config 从TFTP服务器上下载配置文件 Debug 使用调试功能 Debug dialer 显示接口在拨什么号及诸如此类的信息 Debug ip rip 显示RIP路由选择更新数据 Debug ipx routing activity 显示关于路由选择协议(RIP)更新数据包的信息 Debug ipx sap 显示关于SAP(业务通告协议)更新数据包信息 Debug isdn q921 显示在路由器D通道ISDN接口上发生的数据链路层(第2层)的访问过程 Debug ppp 显示在实施PPP中发生的业务和交换信息 Delete 删除文件 Deny 为一个已命名的IP ACL设置条件 Dialer idle-timeout 规定线路断开前的空闲时间的长度 Dialer map 设置一个串行接口来呼叫一个或多个地点 Dialer wait-for-carrier-time 规定花多长时间等待一个载体 Dialer-group 通过对属于一个特定拨号组的接口进行配置来访问控制 Dialer-list protocol 定义一个数字数据接受器(DDR)拨号表以通过协议或ACL与协议的组合来控制控制拨号 Dir 显示给定设备上的文件 Disable 关闭特许模式 Disconnect 断开已建立的连接

华为企业级路由器配置命令大全

华为华为路由器交换机配置命令大全 一、计算机命令 PCAlogin:root;使用root用户 password:linux;口令是linux #shutdown-hnow;关机 #init 0;关机 #logout;用户注销 #login;用户登录 #ifconfig;显示IP地址 #ifconfig eth0 netmask;设置IP地址 #ifconfig eht0 netmask down;禁用IP地址 #route add 0.0.0.0 gw;设置网关 #route del 0.0.0.0 gw;删除网关 #route add default gw;设置网关 #route del default gw;删除网关 #route;显示网关 #ping;发ECHO包 #telnet;远程登录 二、华为路由器交换机配置命令:交换机命令 [Quidway]dis cur;显示当前配置 [Quidway]display current-configuration;显示当前配置 [Quidway]display interfaces;显示接口信息 [Quidway]display vlan;显示vlan信息 [Quidway]display version;显示版本信息 [Quidway]super password;修改特权用户密码 [Quidway]sysname;交换机命名 [Quidway]interface ethernet0/1;进入接口视图 [Quidway]interface vlan x;进入接口视图 [Quidway-Vlan-interfacex]ip address 10.65.1.1 255.255.0.0;配置VLAN的IP地址[Quidway]Ip route-static 0.0.0.0 0.0.0.0 10.65.1.2;静态路由=网关[Quidway]rip; rip协议 [Quidway]local-user ftp [Quidway]user-interface vty 0 4;进入虚拟终端 [S3026-ui-vty0-4]authentication-mode password;设置口令模式 [S3026-ui-vty0-4]set authentication-mode password simple 222;设置口令 [S3026-ui-vty0-4]user privilege level 3;用户级别 [Quidway]interface ethernet0/1;进入端口模式 [Quidway]int e0/1;进入端口模式 [Quidway-Ethernet0/1]duplex{half|full|auto};配置端口工作状态 [Quidway-Ethernet0/1]speed{10|100|auto};配置端口工作速率 [Quidway-Ethernet0/1]flow-control;配置端口流控

路由器常用配置命令

Cisco常用配置命令Cisco常用配置命令 一.交换机的基本配置 C2950# config terminal 进入全局配置模式 show interface fastethernet0/1 查看端口0/1的配置结果 show interface fastethernet0/1 status 查看端口0/1的状态 show mac-address-table 查看整个MAC地址表 clear mac-address-table restricted static 清除限定性地址 C2950(config)# hostname 2950A / 设置主机名为2950A interface f0/23 / 进入端口23的配置模式 enable password cisco / 设置enable password为cisco enable secret cisco1 / 设置enable secret为cisco1 ip address 192.168.1.1 255.255.255.0 / 设置交换机IP 地址 ip default-gateway 192.168.1.254 / 设置默认网关 ip domain-name https://www.360docs.net/doc/4f10213608.html, / 设置域名 ip name-server 200.0.0.1 / 设置域名服务器 配置查看MAC地址表 mac-address-table ? mac-address-table aging-time 100 / 设置超时是时间为100s mac-address-table permanent https://www.360docs.net/doc/4f10213608.html, /f0/3 加入永久地址mac-address-table restricted static 0000.0c02.bbcc / f0/6 f0/7 加入静态地址 end show mac-address-table /查看整个Mac地址表 clear mac-address-table restricted static C2950(config-if)# interface fastethernet0/1 /进入接口F0/1子配置模式 interface Ethernet0 /进入以太网口0子配置模式 no shutdown /激活接口 speed ? /查看speed命令的子命令 speed 100 /设置该端口速率为100Mb/s dulplex full/half/auto /设置该端口为全双工 description TO_PC1 /设置该端口描述为TO_PC1 show interface fastethernet 0/1 /查看端口0/1的配置结果 show interface fastethernet 0/1 status /查看端口0/1的状态 配置VTP和STP 一. 配置VTP 2950A #vlan database /进入VLAN配置子模式 show vtp status /查看VTP设置信息 show vlan /查看VLAN配置信息 copy running-config startup-config /保存配置文件 2950A(vlan)#vtp server/client /设置本交换机为server/client模式

思科交换机路由器命令大全

思科交换机路由器命令 大全 YUKI was compiled on the morning of December 16, 2020

1. 交换机支持的命令:交换机基本状态: 交换机口令设置: 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)#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地址: 交换机显示命令:

H3C路由器配置命令

telnet 防火墙IP地址 用户名 密码 --进入普通用户权限-- --在此命令下可输入一般命令-- --可用?看有哪些命令和命令的作用-- system-view --进入超级管理员权限界面-- --此提示符下可输绝大部分命令-- --(极少数需要在com终端输入)-- quit --退出当前状态,返回上一级-- 一般命令(不一定要把命令写全) display current 展示当前配置 acl number 3050 进入访问控制列表3050号 rule 66 permit ip ........ 在当前访问控制表增加或修改规则66号 rule的具体用法可用rule ?一步步显示出来,亦可参考我原写的命令 我原配置需要涉及的部分 1.ip和mac绑定,绑定方法具体看一下参数文件你就可明白 2.策略号3050 在该条策略中如有permit就是允许你指定的ip或ip段上网 3.策略号3051和305作用是限流 在该策略号具体用法可参考其中的rule规则 最后是save 否则一重启这些改动就会无效 sH3C路由器 ##################################################################### 1、system-view 进入系统视图模式 2、sysname R1 为设备命名为R1 3、display ip routing-table 显示当前路由表 4、 language-mode Chinese|English 中英文切换 5、interface Ethernet 0/0 进入以太网端口视图

6、 ip address 192.168.1.1 255.255.255.0 配置IP地址和子网掩码 7、 undo shutdown 打开以太网端口 8、 shutdown 关闭以太网端口 9、 quit 退出当前视图模式 10、 ip route-static 192.168.2.0 255.255.255.0 192.168.12.2 description To.R2 配置静态路由 11、 ip route-static 0.0.0.0 0.0.0.0 192.168.12.2 description To.R2 配置默认的路由 H3C S3100 Switch H3C S3600 Switch H3C MSR 20-20 Router ##################################################################### 1、调整超级终端的显示字号; 2、捕获超级终端操作命令行,以备日后查对; 3、 language-mode Chinese|English 中英文切换; 4、复制命令到超级终端命令行,粘贴到主机; 5、交换机清除配置 :reset save ;reboot ; 6、路由器、交换机配置时不能掉电,连通测试前一定要 检查网络的连通性,不要犯最低级的错误。 7、192.168.1.1/24 等同 192.168.1.1 255.255.255.0;在配置交换机和路由器时, 192.168.1.1 255.255.255.0 可以写成: 192.168.1.1 24 8、设备命名规则:地名-设备名-系列号例:PingGu-R-S3600

华三华为交换机-路由器配置常用命令汇总

欢迎阅读H3C交换机配置命令大全 1、system-view 进入系统视图模式 2、sysname 为设备命名 3、display current-configuration 当前配置情况 4、language-mode Chinese|English 中英文切换 5、interface Ethernet 1/0/1 进入以太网端口视图 6、port link-type Access|Trunk|Hybrid 设置端口访问模式 7、undo shutdown 打开以太网端口 8、shutdown 关闭以太网端口 9、quit 退出当前视图模式 10、vlan 10 创建VLAN 10并进入VLAN 10的视图模式 11、port access vlan 10 在端口模式下将当前端口加入到vlan 10中 12、port E1/0/2 to E1/0/5 在VLAN模式下将指定端口加入到当前vlan中 13、port trunk permit vlan all 允许所有的vlan通过 H3C路由器配置命令大全华为交换机常用配置实例 H3C交换机路由器telnet和console口登录配置 2009年11月09日星期一 10:00 级别说明 Level 名称 命令 参观 ping、tracert、telnet 1 监控 display、debugging

2 配置 所有配置命令(管理级的命令除外) 3 管理 文件系统命令、FTP命令、TFTP命令、XMODEM命令 telnet仅用密码登录,管理员权限 [Router]user-interface vty 0 4[Router-ui-vty0-4]user privilege level 3[Router-ui-vty0-4]set authentication password simple abc telnet仅用密码登录,非管理员权限 [Router]super password level 3 simple super [Router]user-interface vty 0 4[Router-ui-vty0-4]user privilege level 1[Router-ui-vty0-4]set authentication password simple abc telnet使用路由器上配置的用户名密码登录,管理员权限 [Router]local-user admin password simple admin[Router]local-user admin service-type telnet[Router]local-user admin level 3 [Router]user-interface vty 0 4[Router-ui-vty0-4]authentication-mode local telnet使用路由器上配置的用户名密码登录,非管理员权限 [Router]super password level 3 simple super [Router]local-user manage password simple manage[Router]local-user manage service-type telnet[Router]local-user manage level 2 [Router]user-interface vty 0 4[Router-ui-vty0-4]authentication-mode local 对console口设置密码,登录后使用管理员权限 [Router]user-interface con 0[Router-ui-console0]user privilege level 3[Router-ui-console0]set authentication password simple abc 对console口设置密码,登录后使用非管理员权限 [Router]super password level 3 simple super [Router]user-interface con 0[Router-ui-console0]user privilege level 1[Router-ui-console0]set authentication password simple abc 对console口设置用户名和密码,登录后使用管理员权限 [Router]local-user admin password simple admin[Router]local-user admin service-type terminal[Router]local-user admin level 3 [Router]user-interface con 0[Router-ui-console0]authentication-mode local 对console口设置用户名和密码,登录后使用非管理员权限 [Router]super password level 3 simple super [Router]local-user manage password simple manage[Router]local-user

路由基础配置命令

路由基础配置命令UTP双绞线类型: 直通线: 交叉线: 广域网线缆连接类型: DTE: DCE: 时钟速率: 路由器的接口:(作用) 1. 广域网接口: serial 2. 内网接口: fastethernet 3. 管理接口: console (控制台) AUX(备份) 连接两个设备: 1. 物理连接 2. 逻辑连接 配置网络设备: 1. 管理属性:用户名密码描述警告 2. 协议地址:IP IPX 3. 协议策略:vlan 静态访问控制 交换机直接可以应用 路由器需要初始配置才能应用 设备启动过程: 1. 加电自检 2. 查找加载操作系统 3. 查找加载配置文件 配置网络设备方式: 1. 初始配置:console 2. 初始配置后通过interface(拥有ip地址的接口): 1)telnet 2)TFTP 3)WEB 4)网络管理工具: SNA SDM 配置直接应用到内存

登陆路由器: Router> Router>enable /*进入特权模式 Router# Router#disable /*退出特权模式 Router> Router>logout /*退出路由器 Router>exit /*退出路由器 路由器IOS帮助功能:?的三个用法 1/ 直接问号 2/ Router#cl? clear clock Router#cl 3/ Router#clock % Incomplete command. Router#clock ? set Set the time and date Router#clock 问号的帮助功能:(查找路由器设置时间的命令并设置时间) Router#cl? clear clock Router#clock % Incomplete command. Router#clock ? set Set the time and date Router#clock set % Incomplete command. Router#clock set ? hh:mm:ss Current Time Router#clock set 11:04:50 % Incomplete command. Router#clock set 11:04:50 ? <1-31> Day of the month MONTH Month of the year Router#clock set 11:04:50 15

华三华为交换机-路由器配置常用命令汇总

H3C交换机配置命令大全 1、system-view 进入系统视图模式 2、sysname 为设备命名 3、display current-configuration 当前配置情况 4、language-mode Chinese|English 中英文切换 5、interface Ethernet 1/0/1 进入以太网端口视图 6、port link-type Access|Trunk|Hybrid 设置端口访问模式 7、undo shutdown 打开以太网端口 8、shutdown 关闭以太网端口 9、quit 退出当前视图模式 10、vlan 10 创建VLAN 10并进入VLAN 10的视图模式 11、port access vlan 10 在端口模式下将当前端口加入到vlan 10中 12、port E1/0/2 to E1/0/5 在VLAN模式下将指定端口加入到当前vlan中 13、port trunk permit vlan all 允许所有的vlan通过 H3C路由器配置命令大全 1、system-view 进入系统视图模式 2、sysname R1 为设备命名为R1 3、display ip routing-table 显示当前路由表 4、language-mode Chinese|English 中英文切换 5、interface Ethernet 0/0 进入以太网端口视图 6、ip address 192.168.1.1 255.255.255.0 配置IP地址和子网掩码 7、undo shutdown 打开以太网端口 8、shutdown 关闭以太网端口

路由器配置命令详细列表

启动接口,分配IP地址 router> router> enable router# router# configure terminal router(config)# router(config)# interface Type Port router(config-if)# no shutdown router(config-if)# ip address IP-Address Subnet-Mask router(config-if)# ^z [编辑] 配置RIP路由协议:30秒更新一次

router(config)# router rip router(config-if)# network Network-Number <——通告标准A,B,C类网——> router(config-if)# ^z [编辑] 配置IGRP路由协议:90秒更新一次 router(config)# router igrp AS-Number <—— AS-Number范围1~65535——> router(config-if)# network Network-Number <——通告标准A,B,C类网——> router(config-if)# ^z [编辑] 配置Novell IPX路由协议:Novell RIP 60秒更新一次router(config)# ipx routing [node address] router(config)# ipx maximum-paths Paths <——设置负载平衡,范围1~512——>

router(config)# interface Type Port router(config-if)# ipx network Network-Number [encapsulation encapsulation-type] [secondary] <——通告标准A,B,C类网——> router(config-if)# ^z [编辑] 配置DDR: router(config)# dialer-list Group-Number protocol Protocol-Type permit [list ACL-Number] router(config)# interface bri 0 router(config-if)# dialer-group Group-Number router(config-if)# dialer map Protocol-Type Next-Hop-Address name Hostname Telphone-Number router(config-if)# ^z

思科中路由器的基础配置命令

思科中路由器的基础配置命令。 Cd 更改路径 Cdp enable 允许接口运行CDP协议 Clear 复位功能 Clear counters 清除接口计数器 Clear interface 重新启动接口上的件逻辑 Clockrate 设置串口硬件连接的时钟速率,如网络接口模块和接口处理器能接受的速率Cmt 开启/关闭FDDI连接管理功能 Config-register 修改配置寄存器设置 Configure 允许进入存在的配置模式,在中心站点上维护并保存配置信息 Configure memory 从NVRAM加载配置信息 Configure terminal 从终端进行手动配置 Connect 打开一个终端连接 Copy 复制配置或映像数据 Copy flash tftp 备份系统映像文件到TFTP服务器 Copy running-config startup-config 将RAM中的当前配置存储到NVRAM Copy running-config tftp 将RAM中的当前配置存储到网络TFTP服务器上 Copy tftp flash 从TFTP服务器上下载新映像到Flash Copy tftp running-config 从TFTP服务器上下载配置文件 Debug 使用调试功能 Debug dialer 显示接口在拨什么号及诸如此类的信息 Debug ip rip 显示RIP路由选择更新数据

Debug ipx routing activity 显示关于路由选择协议(RIP)更新数据包的信息 Debug ipx sap 显示关于SAP(业务通告协议)更新数据包信息 Debug isdn q921 显示在路由器D通道ISDN接口上发生的数据链路层(第2层)的访问过程 Debug ppp 显示在实施PPP中发生的业务和交换信息 Delete 删除文件 Deny 为一个已命名的IP ACL设置条件 Dialer idle-timeout 规定线路断开前的空闲时间的长度 Dialer map 设置一个串行接口来呼叫一个或多个地点 Dialer wait-for-carrier-time 规定花多长时间等待一个载体 Dialer-group 通过对属于一个特定拨号组的接口进行配置来访问控制 Dialer-list protocol 定义一个数字数据接受器(DDR)拨号表以通过协议或ACL与协议的组合来控制控制拨号 Dir 显示给定设备上的文件 Disable 关闭特许模式 Disconnect 断开已建立的连接 Enable 打开特许模式 Enable password 确定一个密码以防止对路由器非授权的访问 Enable password 设置本地口令控制不同特权级别的访问 Enable secret 为enable password命令定义额外一层安全性(强制安全,密码非明文显示) Encapsulation frame-relay 启动帧中继封装 Encapsulation novell-ether 规定在网络段上使用的Novell独一无二的格式 Encapsulation PPP 把PPP设置为由串口或ISDN接口使用的封装方法

C路由器常用基本配置命令

C路由器常用基本配置命 令 Revised by Jack on December 14,2020

H3C路由器常用基本配置命令 [Quidway]sysname router_name命名路由器(或交换机) [Quidway]delete删除Flash ROM中的配置 [Quidway]save将配置写入Flash ROM [Quidway]interface serial 0进入接口配置模式 [Quidway]quit退出接口模式到系统视图 [Quidway]shutdown/undo shutdown关闭/重启接口 [Quidway]ip address ip_address subnet_mask为接口配置IP地址和子网掩码 [Quidway]display version显示VRP版本号 [Quidway]display current-configuration显示系统运行配置信息 [Quidway]display interfaces显示接口配置信息 [Quidway]display ip routing显示路由表 [Quidway]ping ip_address测试网络连通性 [Quidway]tracert ip_address测试数据包从主机到目的地所经过的网关 [Quidway]debug all打开所有调试信息 [Quidway]undo debug all关闭所有调试信息 [Quidway]info-center enable开启调试信息输出功能 [Quidway]info-center console dubugging将调试信息输出到PC [Quidway]info-center monitor dubugging将调试信息输出到Telnet终端或哑终端 换机配置命令举例(大括号{}中的选项为单选项,斜体字部分为参数值 [Quidway]super password password修改特权模式口令 [Quidway]sysname switch_name命名交换机(或路 [Quidway]interface ethernet 0/1进入接口视图 [Quidway]quit退出系统视图 [Quidway-Ethernet0/1]duplex {half|full|auto}配置接口双工工 [Quidway-Ethernet0/1]speed {10|100|auto}配置接口速率 [Quidway-Ethernet0/1]flow-control开启流控制 [Quidway-Ethernet0/1]mdi {across|normal|auto}配置MDI/MDIX [Quidway-Ethernet0/1]shutdown/undo shutdown关闭/重启端口 VLAN基本配置命令(以Quidway S3026为例) [Quidway]vlan 3创建并进入VLAN配置模式,缺省时系统将所有端口加入VLAN 1,这个端口既不能被创建也不能被删除。 [Quidway]undo vlan 3删除一个VLAN [Quidway-vlan3]port ethernet 0/1 to ethernet 0/4给VLAN增加/删除以太网接口

路由器配置命令大全

路由器配置命令大全 视图模式介绍: 普通视图router> 特权视图router# /在普通模式下输入enable 全局视图router(config)# /在特权模式下输入config t 接口视图router(config-if)# /在全局模式下输入int 接口名称例如int s0或int e0 路由协议视图router(config-route)# /在全局模式下输入router 动态路由协议名称 1、基本配置: router>enable /进入特权模式 router#conf t /进入全局配置模式 router(config)# hostname xxx /设置设备名称就好像给我们的计算机起个名字 router(config)#enable password /设置特权口令 router(config)#no ip domain lookup /不允许路由器缺省使用DNS解析命令 router(config)# Service password-encrypt /对所有在路由器上输入的口令进行暗文加密 router(config)#line vty 0 4 /进入设置telnet服务模式 router(config-line)#password xxx /设置telnet的密码 router(config-line)#login /使能可以登陆 router(config)#line con 0 /进入控制口的服务模式 router(config-line)#password xxx /要设置console的密码 router(config-line)#login /使能可以登陆 2、接口配置: router(config)#int s0 /进入接口配置模式serial 0 端口配置(如果是模块化的路由器前面加上槽位编号,例如serial0/0 代表这个路由器的0槽位上的第一个接口) router(config-if)#ip add xxx.xxx.xxx.xxx xxx.xxx.xxx.xxx /添加ip 地址和掩码 router(config-if)#enca hdlc/ppp 捆绑链路协议hdlc 或者ppp 思科缺省串口封装的链路层协议是HDLC所以在show run配置的时候接口上的配置没有,如果要封装为别的链路层协议例如PPP/FR/X25就是看到接口下的enca ppp或者enca fr router(config)#int loopback /建立环回口(逻辑接口)模拟不同的本机网段 router(config-if)#ip add xxx.xxx.xxx.xxx xxx.xxx.xxx.xxx /添加ip 地址和掩码给环回口 在物理接口上配置了ip地址后用no shut启用这个物理接口反之可以用shutdown管理性的关闭接口 3、路由配置: (1)静态路由 router(config)#ip route xxx.xxx.xxx.xxx xxx.xxx.xxx.xxx 下一条或自己的接口 router(config)#ip route 0.0.0.0 0.0.0.0 s 0 添加缺省路由 (2)动态路由 rip协议 router(config)#router rip /启动rip协议 router(config-router)#network xxx.xxx.xxx.xxx /宣告自己的网段 router(config-router)#version 2 转换为rip 2版本 router(config-router)#no auto-summary /关闭自动汇总功能,rip V2才有作用 router(config-router)# passive-int 接口名/启动本路由器的那个接口为被动接口 router(config-router)# nei xxx.xxx.xxx.xxx /广播转单播报文,指定邻居的接ip,

相关文档
最新文档