搜档网
当前位置:搜档网 › 路由器常用配置命令

路由器常用配置命令

路由器常用配置命令
路由器常用配置命令

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.sodocs.net/doc/164769077.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.sodocs.net/doc/164769077.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模式

vtp pruning /启动修剪功能

vtp domain vtpserver /设置域名为vtpserver

vlan 2 /创建VLAN2,系统将自动命名

vlan 3 name vlan3 /创建VLAN3,并命名为vlan3 Switch(config-if)#

switchport mode trunk /设置当前端口为Trunk模式

switchport trunk allowed vlan all /设置允许从该端口交换数据的VLAN

switchport trunk vlan remote vlan6 /设置允许交换数据的Vlan(除vlan6外)

switchport mode access /设置端口为静态VLAN访问模式

switchport access vlan2 /将端口9分配给相信的VLAN2

show vlan

生成树协议配置(负载均衡)

Switch#

spanning-tree vlan 1 port-priority 10 /设置VLAN 1的端口的权值为10 (默认值为128)

spanning-tree vlan 1 cost 19 /设置VLAN 1生成树路径值为19

专题三配置路由协议

Router# enable

Router#config terminal

Router(conf)#hostname R1

show session /查看终端服务器的会话

show line 1 /查看线路1的状态clear line 2 /清除线路2

A. 静态路由

格式:ip route ip-addr subnet-mask gateway 加入静态路由

R1(conf)#ip route 192.168.1.0 255.255.255.0 10.1.1.1

ip routing /启动IP路由

B. 动态路由

(1)配置RIP协议

no logging console 防止大量的端口状态变化信息和报警信息对配置过程的影响

[no] ip routing 允许/不允许路由选择协议

router ri p 进入RIP协议配置模式

network 192.168.1.0 声明192.168.1.0与路由器R1直接邻接

version 2 设置RIP协议的版本为2

neighbor ip-addr 说明邻接路由器,以使它们能够自动更新路由

passive interface 接口阻止在指定的接口发送路由更新协议

show ip route 查看路由表信息

show ip route rip/igrp/ospf 查看RIP/IGRP/OSPF协议路由信息

(2)配置IGRP协议

no keepalive /不监测keepalive信号,即不连接设备时可激活该接口

bandwidth x /设置带宽为x(Kb/s)

clockrate x /设置时钟频率为x(HZ)

timer basic /更新时间到期时间抑制与否清除时间设置自定义的路由更新时间……

no metric holddown /禁止抑制功能,路由信息删除后可立即接受新的

metric maximum-hop 50 /当信息包穿过50个路由器时,删除信息包

router igrp/eigrp autonomous-system /进入IGRP协议配置子模式

(3)配置OSPF协议

router ospf 1 /指定使用ospf选择协议,并运行在1号进程中

network 网络地址掩码反码area 区域号/说明与区域1的172.16.4.6邻接

area 区域号stub /将区域x转化为根区

show ip ospf neighbor /列出与本路由器是“邻接”关系的路由器

no ospf auto-cost-determination /使OSPF不自动根据每个接口的带宽,计算出其cost

ip ospf cost /手动设置接口的cost

area 1 range 172.16.4.0 255.255.255.0 /说明区域一的范围是子网172.16.4.0/24

(4)配置EIGRP协议

no auto-summary 关闭EIGRP协议的路由自动汇总功能

network network-addr 掩码反码

广域网接入

一.配置ISDN

isdn switch-type switch-type /设置交换机类型为switch-type interface bri 0 /进入ISDN的BRI接口配置模式encapsulation ppp /设置封装协议为ppp

ppp multilink /启动ppp多连接

dialer string 80000002 /设置拨号串,R2的ISDN号码为80000002

dialer-group 1 /设置拨号组号为1,把BRI 0接口与拨号列表1相关联

dialer-list 1 protocol ip permit /设置拨号列表1,即当有IP包时将引起拨号

dialer load-threshold load /设置达到load后,启动第二个B通道.

logging console /在终端上显示监测信息

debug dialer /监测dialer信息

undebug all /关闭所有调试信息

二. 配置PPP和DDR

ppp authentication chap /设置PPP认证方式为CHAP clockrate speed /设置DCE端线路速度为speed dialer idle-timeout 120 /设置拨号空闲时间为120s

no cdp enable /禁止通过此接口传递CDP控制数据

dialer map ip 192.168.1.2 name R2 broadcast 800000002

/设置拨号串,将IP地址与ISDN的SPID对应起来. usename R2 password secret

/设置用户名和口令,即设置拨号链路对端路由器名为R2,口令为secret.

三. 配置帧中继

frame-relay lmi-type cisco /设置帧中继的LMI类型为cisco

no frame-relay inverse-arp /关闭帧中继逆向ARP

no ip address /只在数据链路层工作,无需IP地址

frame-relay interface-dlci dlci

interface serial 2 /进入串行口2端口配置模式

frame-relay route 303 interface Serial 1 302 在串行口2的DLCI 303与串行口1的DLCI 302之间

建立关联

show frame route /显示完整的路由信息

frame-relay map ip 192.168.1.2 302 broadcast /将IP地址192.168.1.2与帧中继的DLCI 302关联

起来

interface s 0.1 划分子接口,对其进行逻辑划分

interface s 0.1 point-to-point 划分子接口,并设置为点对点模式

VPN配置

一L2TP的配置与测试

A:命令模式:特权用户模式Quidway#

(1)show l2tp session 显示当前的L2TP会话的信息

举例:Quidway#show l2tp session

(2) show l2tp tunnel 显示当前的L2TP通道的信息

举例:Quidway#show l2tp tunnel

(3)clear vpdn tunnel l2tp remote-name 断开通道对端名称为X的通道连接

举例:Quidway#clear vpdn tunnel l2tp A8010 B:命令模式:全局配置模式Quidway(config)#

(4) [no] vpdn-group group-nunmber 创建/删除组号为x的VPDN组

举例:Quidway(config)#vpdn-group 2

默认情况:系统默认没有创建VPDN组

(5)[no] interface vitual-template vitual-template-number 创建/删除虚接口模块

举例:Quidway(config)#interface virtual-template 1

默认配置:系统默认没有创建虚接口模块

C:命令模式:VPDN组配置模式Quidway(config-vpdn1)#

(6) [no]lcp renegotiation 允许/不允许LCP再次协商

举例:Quidway(config-vpdn1)#lcp renegotiation

扩展:lcp renegotiation always 一直允许进行LCP协商

默认情况:系统默认不重新进行LCP协商

(7)local name name 指定通道本端的名称为name no local name 将通道本端的名称恢复成默认名称

举例:Quidway(config-vpdn1)#local name itsme

默认情况:系统默认的本端名称为路由器名

(8)[no] l2tp tunnel authentication 启用/关闭L2TP 通道验证功能

举例:Quidway(config-vpdn1)#no l2tp tunnel authentication

默认情况:系统默认对L2TP通道进行验证

(9) l2tp tunnel password password 设置L2TP通道验证的密码为password

no l2tp tunnel password 将L2TP通道验证的密码还原为默认值

举例:Quidway(config-vpdn1)#l2tp tunnel password yougotit

默认情况:系统默认的通道验证密码为路由器名

(10) [no] force-local-chap 强制/禁止LNS与Client之间重新进行CHAP验证

举例:Quidway(config-vpdn1)#force-local-chap

默认情况:系统默认不进行CHAP的重新验证

(11)accept-dialin l2tp virtual-template virtual-template-number remote

remote-peer-name 接受名称为remote-peer-name的对端发起的L2TP通道连接请求,并根据vitual-

template virtual-template-number 创建virtual-access 接口

no accept dialin 删除此设置

举例:Quidway(config-vpdn1)#accept-dialin l2tp virtual-template 1 remote A8010

, 默认情况:系统默认为禁止接受呼入

二IPSec的配置

Crypto isakmp policy1 /配置IKE策略1

Authentication pre-share /IKE策略1的验证方法设为pre-share

Group 2;1024-bit Diffie-Hellman /加密算法未设置则取默认值:DES

Crypto isakmp key test123 address 202.96.1.2 /设置Pre-share密钥为test123,此值两端需一

crypto ipsec transform-set VPNtag ah-md5-hmac esp-des

/设置AH散列算法为md5,ESP加密算法为DES.

crypto map VPNdemo 10 ipsec-isakmp /定义crypto map

set peer 202.96.1.2 /设置隧道对端IP地址

set transform-set VPNtag /设置隧道AH及ESP

match address 101

interface Tunnel0 /定义隧道接口

ipaddress 192.168.1.1 255.255.255.0 /隧道端口IP地址no ip directed-broadcast

tunnel source 202.96.1.1 /隧道源端地址

tunnel destination 202.96.1.2 /隧道目的端地址crypto map VPNdemo /应用VPNdemo于此接口

其他的略

NAT——网络地址转换

(1)静态地址转换

ip nat inside source static 内部地址合法地址(全局配置模式)

举例:ip nat inside source static 10.1.1.2 192.1.1.2

在内部地址X和合法地址Y之间建立静态转换

ip nat inside /说明该端口是内网接口

ip nat outside /说明该端口是外网接口

(2)动态地址转换

ip nat pool 地址池名称起始IP地址终止IP地址netmask 子网掩码(全局配置模式)

举例:ip nat pool poolA 192.1.1.2 192.1.1.10 netmask 255.255.255.0

/设置合法地址池,名为PoolA, 地址范围为192.1.1.2~192.1.1.10,子网掩码为255.255.255.0

access-list 标号permit 源地址通配符(其中标号为1~99间的整数)

举例:access-list 1 permit 10.1.1.0 0.0.0.255

定义标准访问列表1,指出10.1.1.0/24的本地地址进行NAT转换

ip nat inside source list 访问列表标号pool 地址池名称

举例:ip nat inside source list 1 pool poolA

设置:对访问列表1中设置的本地地址,应用PoolA 池进行动态地址转换

(3)复用动态地址转换

ip nat inside source list 访问列表标号pool 地址池名称overload

举例:ip nat inside source list 1 pool poolA overload

设置:对访问列表1中设置的本地地址,应用PoolA 池进行复用动态地址转换

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

华三华为交换机路由器 配置常用命令汇总 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的路由器配置命令详解 en 进入特权模式 conf 进入全局配置模式 in s0 进入serial 0 端口配置 ip add xxx.xxx.xxx.xxx xxx.xxx.xxx.xxx 添加ip 地址和掩码,电信分配enca hdlc/ppp 捆绑链路协议hdlc 或者ppp ip unn e0 exit 回到全局配置模式 in e0 进入以太接口配置 ip add xxx.xxx.xxx.xxx xxx.xxx.xxx.xxx 添加ip 地址和掩码,电信分配exit 回到全局配置模式 ip route 0.0.0.0 0.0.0.0 s 0 添加路由表 ena password 口令 write exit 以上根据中国电信ddn 专线多数情况应用 普通用户模式 enable 转入特权用户模式 exit 退出配置 help 系统帮助简述 language 语言模式切换 ping 检查网络主机连接及主机是否可达 show 显示系统运行信息 telnet 远程登录功能 tracert 跟踪到目的地经过了哪些路由器 特权用户模式 #? clear 清除各项统计信息

clock 管理系统时钟 configure 进入全局配置模式 debug 开启调试开关 disable 返回普通用户模式 download 下载新版本软件和配置文件 erase 擦除FLASH中的配置 exec-timeout 打开EXEC超时退出开关 exit 退出配置 first-config 设置或清除初次配置标志 help 系统帮助简述 language 语言模式切换 monitor 打开用户屏幕调试信息输出开关 no 关闭调试开关 ping 检查网络主机连接及主机是否可达 reboot 路由器重启 setup 配置路由器参数 show 显示系统运行信息 telnet 远程登录功能 tracert 跟踪到目的地经过了哪些路由器unmonitor 关闭用户屏幕调试信息输出开关write 将当前配置参数保存至FLASH MEM中 全局配置模式 aaa-enable 使能配置AAA(认证,授权和计费) access-list 配置标准访问表 arp 设置静态ARP人口 chat-script 生成一个用在modem上的执行脚本custom-list 创建定制队列列表 dialer-list 创建dialer-list dram-wait 设置DRAM等待状态

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 断开已建立的连接

H3C路由器配置命令详解

华为H3C路由器交换机配置命令详解 2009-12-28 22:40:13| 分类: Quidway-h3c|举报|字号订阅 交换机命令 [Quidway]super password 修改特权用户密码 [Quidway]sysname 交换机命名 [Quidway]interface ethernet 0/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]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-Ethernet0/1]duplex {half|full|auto} 配置端口工作状态[Quidway-Ethernet0/1]speed {10|100|auto} 配置端口工作速率[Quidway-Ethernet0/1]flow-control 配置端口流控 [Quidway-Ethernet0/1]mdi {across|auto|normal} 配置端口平接扭接[Quidway-Ethernet0/1]port link-type {trunk|access|hybrid} 设置端口工作模式[Quidway-Ethernet0/1]undo shutdown 激活端口 [Quidway-Ethernet0/2]quit 退出系统视图 [Quidway]vlan 3 创建VLAN [Quidway-vlan3]port ethernet 0/1 to ethernet 0/4 在VLAN中增加端口[Quidway-Ethernet0/2]port access vlan 3 当前端口加入到VLAN [Quidway-Ethernet0/2]port trunk permit vlan {ID|All} 设trunk允许的VLAN [Quidway-Ethernet0/2]port trunk pvid vlan 3 设置trunk端口的PVID [Quidway]monitor-port 指定镜像端口[Quidway]port mirror 指定被镜像端口[Quidway]port mirror int_list observing-port int_type int_num 指定镜像和被镜像[Quidway]description string 指定VLAN描述字符[Quidway]description 删除VLAN描述字符[Quidway]display vlan [vlan_id] 查看VLAN设置 [Quidway]stp {enable|disable} 设置生成树,默认关闭[Quidway]stp priority 4096 设置交换机的优先级[Quidway]stp root {primary|secondary} 设置为根或根的备份[Quidway-Ethernet0/1]stp cost 200 设置交换机端口的花费 [SwitchA-vlanx]isolate-user-vlan enable 设置主vlan [SwitchA]Isolate-user-vlan secondary 设置主vlan包括的子vlan [Quidway-Ethernet0/2]port hybrid pvid vlan 设置vlan的pvid

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

华为华为路由器交换机配置命令大全 一、计算机命令 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.sodocs.net/doc/164769077.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.sodocs.net/doc/164769077.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模式

路由器常用命令

cisco路由器常用命令 1:三大模式 router> 用户模式 router > enable 进入特权模式 router # router > enable 进入全局配置模式 router #configure terminal router (conf)# 2:其它模式 Router(config)#interface f1/0 进入接口配置模式Router(config-if)# Router(config)#interface f1/0.1 进入子接口配置模式Router(config-subif)# Router(config)#line console 0 进入line模式Router(config-line)# Router(config)#router rip 进入路由模式Router(config-router)# 3:路由器命名 hostname routera,以routerA为例 router > enable router #configure terminal router(conf)#hostname routerA routera (conf)# 4:配置各类密码 配置特权模式密码(使能口令) enable password cisco,以cisco为例 router > enable router #configure terminal router(conf)#hostname routerA routerA (conf)# enable password cisco 设置VTY(虚拟终端接口)密码 Router(config)#line vty 0 1

路由器配置命令详细列表

启动接口,分配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

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

思科交换机路由器命令 大全 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交换机配置命令大全 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

路由器配置命令大全

路由器配置命令大全 视图模式介绍: 普通视图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,

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

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 关闭以太网端口

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

思科中路由器的基础配置命令。 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接口使用的封装方法

相关主题