神州数码交换机路由器命令汇总(最简输入版)

神州数码交换机路由器命令汇总(最简输入版)
神州数码交换机路由器命令汇总(最简输入版)

神州数码交换机路由器命令汇总(部分)

2016年3月23日星期三修改_________________________________________________________________________

注:本文档命令为最简命令,如不懂请在机器上实验

注:交换机版本信息:

DCRS-5650-28(R4) Device, Compiled on Aug 12 10:58:26 2013

sysLocation China

CPU Mac 00:03:0f:24:a2:a7

Vlan MAC 00:03:0f:24:a2:a6

SoftWare Version 7.0.3.1(B0043.0003)

BootRom Version 7.1.103

HardWare Version 2.0.1

CPLD Version N/A

Serial No.:1

Copyright (C) 2001-2013 by Digital China Networks Limited.

All rights reserved

Last reboot is warm reset.

Uptime is 0 weeks, 0 days, 1 hours, 42 minutes

路由器版本信息:

Digital China Networks Limited Internetwork Operating System Software

DCR-2659 Series Software, Version 1.3.3H (MIDDLE), RELEASE SOFTWARE

Copyright 2012 by Digital China Networks(BeiJing) Limited

Compiled: 2012-06-07 11:58:07 by system, Image text-base: 0x6004

ROM: System Bootstrap, Version 0.4.2

Serial num:8IRTJ610CA15000001, ID num:201404

System image file is "DCR-2659_1.3.3H.bin"

Digital China-DCR-2659 (PowerPC) Processor

65536K bytes of memory,16384K bytes of flash

Router uptime is 0:00:44:44, The current time: 2002-01-01 00:44:44

Slot 0: SCC Slot

Port 0: 10/100Mbps full-duplex Ethernet

Port 1: 2M full-duplex Serial

Port 2: 2M full-duplex Serial

Port 3: 1000Mbps full-duplex Ethernet

Port 4: 1000Mbps full-duplex Ethernet

Port 5: 1000Mbps full-duplex Ethernet

Port 6: 1000Mbps full-duplex Ethernet

一、交换机配置命令

1.基本配置

switch>en (enable )进入特权用户模式 switch # con (config) 进入全局配置模式

switch (config)# ho switch (hostname) 配置交换机名称 switch (config)# in e1/0/1 进入接口配置模式 switch (config-if-ethernet1/0/1)# ex switch (config)# in vl 1进入VLAN 配置模式

switch (config-if-vlan1)#ip ad 192.168.1.252 255.255.255.0 switch (config-if-vlan1)# ex

switch (config)# ena p 1234配置交换机密码(不加密) switch (config)# ena p 7 1234配置交换机密码(加密) switch (config)# vl 10创建vlan switch (config-vlan10)#ex switch (config)# in vl 10

switch (config-if-vlan10)# ip ad 172.16.10.1 255.255.255.0配置VLAN 地址

2.生成树技术

switch(config)# sp (spanning-tree)启用全局生成树(默认mstp 生成树技术) switch(config)# sp mo stp/rstp/mstp (生成树/快速生成树/多生成树技术) switch(config)# sp ms 0p 4096设置交换机的优先级默认32768 switch (config)# sh sp (show spanning-tree) 查看生成树

3.交换机Web 管理

switch (config)# ip ht ser

switch (config)# usern admin pa 1234用户名和密码

4.交换机Telnet 管理

switch (config)# telnet-s e (telnet enable)开启telnet 服务 switch (config)# usern admin pa 1234用户名和密码

5.链路聚合(不需启动生成树)

switchA(config)# port-g 1 (prot-group) switchA(config)# in e1/0/1-2

switchA(config-port-range)# po 1 m on/active switchA(config-port-range)# ex switchA(config)# no port-g 1删除组1

switchB (config)# port-g 2 switchB (config)# in e1/0/3-4

switchB (config-port-range)# po 2 m on/active switchB (config-port-range)# ex switchB (config)# no port-g 2删除组2

6.交换机MAC 与IP 绑定

switch (config)# am e (am enable)启用全局am 功能 switch (config)# in e1/0/1

switch (config_if_ethernet1/0/1)# am p(am port)打开端口am 功能

switch (config_if_ethernet1/0/1)# am m (mac-ip-pool)00-A0-D1-D1-07-FF 192.168.1.101 switch (config_if_ethernet1/0/1)# ex switch (config)# in e1/0/2

输入这条命令会出现:Invalid ENCRYPTED password! Please input the ENCRYPTED password with length 32密码位数不够32位

switch (config_if_ethernet1/0/2)# no am p 解锁端口

7.交换机MAC与IP绑定

静态绑定

switch (config)# in e1/0/1

switch (config_if_ethernet1/0/1)# sw p (port-security)开启绑定功能

switch (config_if_ethernet1/0/1)# sw p mac 00-a0-d1- d1-07-ff 添加静态MAC地址

switch (config_if_ethernet1/0/1)# sw p max 4 绑定MAC地址的个数(默认为1)

动态绑定

(实验中交换机没有动态绑定命令)

switch (config)# in e1/0/1

switch (config_if_ethernet1/0/1)# sw p (port-security)开启绑定功能

switch (config_if_ethernet1/0/1)# sw port-security lock

switch (config_if_ethernet1/0/1)# sw port-security convert 将动态学习到绑定MAC的进行绑定

switch # sh port-s add 查看绑定的地址

8.交换机DHCP服务器配置

switch (config)# service dhcp 启用DHCP

switch (config)# ip dh po poolA定义地址池poolA

switch (dhcp-poolA- config)# netw (network-address)192.168.1.0 24

switch (dhcp-poolA- config)# de (default-router)192.168.1.254网关

switch (dhcp-poolA- config)# dn 60.191.244.5DNS服务器

switch (dhcp-poolA- config)# le 3租期3天

switch (dhcp-poolA- config)# ex

switch (config)#ip dh ex (excluded-add) 192.168.1.252 192.168.1.254排除地址范围

9.保留地址(一个地址池中只能配一个IP-MAC的绑定)

switch (config)# ip dh po poolC

switch (dhcp-poolC- config)#ho 192.168.1.100绑定的IP地址

switch (dhcp-poolC- config)#ha (hardware-add) 00-a0-d1- d1-07-ff绑定的MAC地址

switch (dhcp-poolC- config)# de192.168.1.254网关

10.ACL访问控制列表

switchA(config)# ip ac s(standard)test命名标准IP访问列表

switchA(config-std-nacl-test)# d (deny) 192.168.100.0 0.0.0.255反子网掩码(路由器上为子网掩码)switchA(config-std-nacl-test)# d192.168.200.0 0.0.0.255

switchA(config-std-nacl-test)# p (permit) a (permit any) 允许所有

switchA(config-std-nacl-test)# ex

switchA (config)# fir e(firewall enable)开启ACL功能

switchA(config)# in e1/0/1

switchA(config-if-interface1/0/1)# ip ac (access-group) test in/out 进in出out (二层交换机上不支持out)11.配置时间范围

switchA(config)#time-r worktime

switchA(config-time-range)#p (periodic)weekd 9:0:0 to 18:0:0

12.VRRP虚拟路由器冗余协议

Master Backup

switchA(config)#router v 1 switchB(config_router)#router v 1

switchA(config_router)#v (virtual-ip) 192.168.1.254switchB(config_router)#v192.168.1.254

switchA(config_router)#i v 1 (interface vlan 1)switchB (config_router)#i v 1

switchA(config_router)#pri 110switchB(config_router)#ena

switchA(config_router)#c (circuit-failover) v 10 20

switchA(config_router)#ena

13.DHCP中继

DHCP_relay(config)#service dhcp全局开启DHCP服务

DHCP_relay(config)#ip fo u b (ip forward-protocol udp bootps)全局开启转发

DHCP_relay(config)#in vl 10

DHCP_relay(config-if-vlan10)#ip h 172.16.1.1 转发到DHCP服务器地址

14.DHCP侦听

DHCP(config)#service dhcp

DHCP(config)#ip dh sn e 开启DHCP侦听功能

DHCP(config)#in e1/0/1

DHCP(config-if-ethernet1/0/1)#ip d s t (ip dhcp snooping trust)设置上联口为信任口

15.端口隔离

Switch(config)#is g test s i e1/0/1-2 (isolate-port group test switchport interface e1/0/1-2)

e1/0/1-2口不能互相通信,可以和其它端口通信。

16.端口镜像

Switch(config)#mo s1s i e1/0/1 both/rx/tx/access-l (monitor session 1 source interface e1/0/1) Switch(config)#mo s1d i e1/0/2 (monitor session 1 destination interface e1/0/2)

Source为被镜像的地址Destination为镜像到的地址both为全部流量rx为接收tx为发送

17.端口限速

Switch(config)#in e1/0/1

Switch(config-if-ethernet1/0/1)#ba c 10000 both/receive/transmit(bandwidth control)

18.ARP攻击防护

Switch(config)#in e1/0/1

Switch(config-if-ethernet1/0/1)#ar i192.168.1.254 (arp-guard ip) 绑定网关IP

Switch(config-if-ethernet1/0/1)#ex

Switch(config)#an e (anti-arpscan enable) 开启防ARP扫描

Switch(config)#an r e (anti-arpscan recovery enable) 开启自动恢复

Switch(config)#an r t 3600 (anti-arpscan recovery time) 设置自动恢复时间(单位:秒)

Switch(config)#in e1/0/1

Switch(config-if-ethernet1/0/1)#an t s (anti-arpscan trust supertrust-port) 设置上联口为超级信任端口19.QOS的PBR

Switch(config)#ip ac e route

Switch(config-ip-ext-nacl-route)#p ip 192.168.1.0 0.0.0.255 192.168.2.0 0.0.0.255

Switch(config-ip-ext-nacl-route)#ex

Switch(config)#cla map (class-map map)

Switch(config-classmap-map)#m a route (match access-group)

Switch(config-classmap-map)#ex

Switch(config)#pol map (policy-map)

Switch(config-policymap-map)#c map (class)

Switch(config-policymap-map-class-map)#se ip n 192.168.1.2 设置下一跳地址

Switch(config-policymap-map-class-map)#ex

Switch(config-policymap-map)#ex

Switch(config)#in e1/0/1

Switch(config-if-ethernet1/0/1)#ser input/output map 应用在接口下

20.清空交换机配置

Switch# set d (default)恢复出厂配置

Switch# wr (write)保存配置

Switch# rel (reload)重启交换机

_______________________________________________________________

二、路由器配置命令

1.基本配置

Router>ena 进入特权用户模式

Router#conf进入全局配置模式

Router_config# in f0/0

Router_config_f0/0# ip ad 10.1.1.1 255.255.255.0配置路由器端口地址

2.路由器之间的连接

================================================================================默认HDLC封装

RA_config#in s0/2 (DCE/V35FC)

RA_config_s0/2#ip ad 192.168.1.1 255.255.255.0

RA_config_s0/2#ph sp 64000 (physical-layer speed)配置端口速率(只在DCE端)

RB_config#in s0/1 (DTE/V35FC)

RB_config_s0/1#ip ad 192.168.1.2 255.255.255.0

================================================================================ PPP封装

RA_config#in s0/2 (DCE/V35FC)

RA_config_s0/2#ip ad 192.168.1.1 255.255.255.0

RA_config_s0/2#enc p PPP封装

RA_config_s0/2#ph sp 64000 配置端口速率(只在DCE端)

RB_config#in s0/1 (DTE/V35FC)

RB_config_s0/1#ip ad 192.168.1.2 255.255.255.0

RB_config_s0/1#enc p PPP封装

================================================================================ PPP封装CHAP认证

RA_config#u userb pa 123456 (username password)对方用户名和密码

RA_config#aa authe pp d local 本地认证

RA_config#in s0/2 (DCE/V35FC)

RA_config_s0/2#ip ad 192.168.1.1 255.255.255.0

RA_config_s0/2#enc p PPP封装

RA_config_s0/2# pp authe c CHAP认证

RA_config_s0/2# pp ch h usera 发送自己的用户名

RA_config_s0/2#pp ch p123456 发送自己的密码

RA_config_s0/2#ph sp 64000 配置端口速率(只在DCE端)

RA发送的用户名和密码需与RB建立的用户名密码一致。

RB_config#u usera pa 123456 对方用户名和密码

RB_config#aa authe pp dlocal 本地认证

RB_config#in s0/1 (DTE/V35MT)

RB_config_s0/1#ip ad 192.168.1.2 255.255.255.0

RB_config_s0/1#enc p PPP封装

RB_config_s0/1# pp authe c CHAP认证

RB_config_s0/1# pp ch h userb 发送自己的用户名

RB_config_s0/1# pp ch p 123456 发送自己的密码

================================================================================ PPP封装PAP认证

配置方法同CHAP认证

RA_config_s0/2#enc p PPP封装

RA_config_s0/2# pp authe p PAP认证

RA_config_s0/2# pp pap s usera123456发送自己的用户名和密码

RB_config_s0/1# enc p

RB_config_s0/1# pp authe p

RB_config_s0/1# pp pap s userb 123456

================================================================================ 3.NAT地址转换

RouterA_config#ip ac snat(ip access-list standard)定义访问控制列表

RouterA_config_std_nacl#p 192.168.0.0 255.255.255.0 定义允许转换的地址范围

RouterA_config_std_nacl#ex

RouterA_config#ip np poolA 192.168.1.10 192.168.1.20 255.255.255.0 定义转换地址池poolA

RouterA_config#ip n i s l nat p poolA o(ip nat inside source list nat pool poolA overload)地址转换

RouterA_config#in f0/0

RouterA_config_f0/0#ip n i 定义f0/0为内部接口

RouterA_config_f0/0#in s0/1

RouterA_config_s0/1#ip n o 定义s0/1为外部接口

4.静态路由

Router_config# ip route 10.1.2.0 (目标网段) 255.255.255.0(子网掩码)10.1.1.2(转发地址)

Router_config# ip route 0.0.0.0 (目标网段) 0.0.0.0(子网掩码)10.1.1.2(转发地址)默认静态路由5.RIP动态路由

Router_config# router r启用RIP路由

Router_config_rip# ve 2RIP路由版本号2

Router_config_rip#no a (auto-summary)关闭路由自动汇总功能

Router_config_rip# net10.1.1.0 255.255.255.0

Router_config_rip# net 10.1.2.0 255.255.255.0与路由器相连的网段

6.OSPF动态路由

Router_config# router o1启动ospf进程,进程号为1

Router_config_ospf_1# router- 1.1.1.1 (router-id) 设置路由器router-id

Router_config_ospf1# net 10.1.1.0 255.255.255.0 a 0网段、子网掩码和区域号

Router_config_ospf1# net 10.1.2.0 255.255.255.0 a 0第一个区域(即主干区域)区域号为0 Router_config_ospf1# [Ctrl+z]退到特权模式快捷键Ctrl+Z

Router# sh ip ro 查看路由

7.ACL访问控制列表

标准访问控制列表

Router_config#ip ac s access

Router_config_std_nacl#den 192.168.1.0 255.255.255.0 (路由器为子网掩码)

Router_config_std_nacl#p a (permit any)

Router_config_std_nacl#ex

Router_config#in f0/0

Router_config_f0/0#ip ac access in/out应用在接口下

扩展访问控制列表

Router_config#ip ac e access

Router_config_std_nacl#den ip 192.168.1.0 255.255.255.0 192.168.2.0 255.255.255.0

Router_config_std_nacl#p ip a a (permit ip any any)

Router_config_std_nacl#ex

Router_config#in f0/0

Router_config_f0/0#ip ac access in/out应用在接口下

标准ACL绑定离目标近的接口,拓展ACL绑定离源地址近的接口。

关键字IP(包括ICMP、TCP和UDP)匹配任何Internet协议

TCP端口有ftp(21)、www(80)、login、telnet、smtp 、pop3 和pop2等

TCP端口有tftp、snmp、domain、syslog等

8.GRE隧道配置

RA配置

RA_config#in f0/0

RA_config_f0/0#ip ad 202.102.24.3 255.255.255.240

RA_config_f0/0#ex

RA_config#in t 1

RA_config_t1#ip ad 172.17.1.1 255.255.255.0

RA_config_t1#t so f0/0

RA_config_t1#t d 202.102.24.2

RB配置

RB_config#in f0/0

RB_config_f0/0#ip ad 202.102.24.2 255.255.255.240 RB_config_f0/0#ex

RB_config#in t 1

RB_config_t1#ip ad 172.17.1.2 255.255.255.0

RB_config_t1#t so f0/0

RB_config_t1#t d 202.102.24.3

RB_config_t1#ex

9.清空路由器配置

Router# del (delete)删除启动配置文件

Router# reb (reboot) 重启路由器

Router_config#date (显示)配置路由器日期和时间附件1:配置文件导入与导出

Ps:快捷键:Alt+F+Lshow run 之后再按一遍。

神州数码交换机路由器命令汇总(最简输入版)

神州数码交换机路由器命令汇总(部分) 2016年3月23日星期三修改_________________________________________________________________________ 注:本文档命令为最简命令,如不懂请在机器上实验 注:交换机版本信息: DCRS-5650-28(R4) Device, Compiled on Aug 12 10:58:26 2013 sysLocation China CPU Mac 00:03:0f:24:a2:a7 Vlan MAC 00:03:0f:24:a2:a6 SoftWare Version 7.0.3.1(B0043.0003) BootRom Version 7.1.103 HardWare Version 2.0.1 CPLD Version N/A Serial No.:1 Copyright (C) 2001-2013 by Digital China Networks Limited. All rights reserved Last reboot is warm reset. Uptime is 0 weeks, 0 days, 1 hours, 42 minutes 路由器版本信息: Digital China Networks Limited Internetwork Operating System Software DCR-2659 Series Software, Version 1.3.3H (MIDDLE), RELEASE SOFTWARE Copyright 2012 by Digital China Networks(BeiJing) Limited Compiled: 2012-06-07 11:58:07 by system, Image text-base: 0x6004 ROM: System Bootstrap, Version 0.4.2 Serial num:8IRTJ610CA15000001, ID num:201404 System image file is "DCR-2659_1.3.3H.bin" Digital China-DCR-2659 (PowerPC) Processor 65536K bytes of memory,16384K bytes of flash Router uptime is 0:00:44:44, The current time: 2002-01-01 00:44:44 Slot 0: SCC Slot Port 0: 10/100Mbps full-duplex Ethernet Port 1: 2M full-duplex Serial Port 2: 2M full-duplex Serial Port 3: 1000Mbps full-duplex Ethernet Port 4: 1000Mbps full-duplex Ethernet Port 5: 1000Mbps full-duplex Ethernet Port 6: 1000Mbps full-duplex Ethernet

华为交换机路由器常用命令

华为交换机路由器常用命令

华为交换机路由器常用命令 网络技术/wangzhijun1743 发表于2007-03-24, 12:25 交换机命令 [Quidway]dis cur ;显示当前配置 [Quidway]display current-configuration ;显示当前配置[Quidway]display interfaces ;显示接口信息[Quidway]display vlan all ;显示路由信息 [Quidway]display version ;显示版本信息[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的I P地址 [Quidway]ip route-static 0.0.0.0 0.0.0.0 10.65.1.2 ;静态路由=网关[Quidway]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 ethernet 0/1 ;进入端口模式[Quidway]int e0/1 ;进入端口模式 [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]port access vlan 3 ;当前端口加入到VLA N [Quidway-Ethernet0/2]port trunk permit vlan {ID|All} ;设trunk允许的VLAN [Quidway-Ethernet0/3]port trunk pvid vlan 3 ;设置trunk端口的P VID [Quidway-Ethernet0/1]undo shutdown ;激活端口 [Quidway-Ethernet0/1]shutdown ;关闭端口 [Quidway-Ethernet0/1]quit ;返回 [Quidway]vlan 3 ;创建VLAN [Quidway-vlan3]port ethernet 0/1 ;在VLAN中增加端口 [Quidway-vlan3]port e0/1 ;简写方式

神州数码交换机“生成树”配置

神州数码交换机“生成树”配置 SwitchA配置: SwitchA(config)#spanning-tree(开启生成树)SwitchA(config)#spanning-tree mode mstp (选择生成树模式) SwitchA(config)#spanning-tree mst configuration (进入生成树实例配置) SwitchA(config-mstp-region)#name MSTP (设置MSTP域名为MSTP) SwitchA(config-mstp-region)#revision-level 2 (设置MSTP修正级别) SwitchA(config-mstp-region)#instance 0 vlan 10 (创建实例0将Vlan10划分进去) SwitchA(config-mstp-region)#instance 1 vlan 20 (创建实例1将Vlan20划分进去) SwitchA(config)#spanning mst 0 priority 0

(配置实例0的优先级为0,也是交换机的优先级,根交换机) SwitchA(config)#spanning mst 1 priority 4096 注:这儿的优先级越低越优先,优先级默认为32768,只能为4096的倍数。 SwitchB配置: SwitchB(config)#spanning-tree(开启生成树)SwitchB(config)#spanning-tree mode mstp (选择生成树模式) SwitchB(config)#spanning-tree mst configuration (进入生成树实例配置) SwitchB(config-mstp-region)#name MSTP (设置MSTP域名为MSTP) SwitchB(config-mstp-region)#revision-level 2 (设置MSTP修正级别) SwitchB(config-mstp-region)#instance 0 vlan 10 (创建实例0将Vlan10划分进去) SwitchB(config-mstp-region)#instance 1 vlan 20 (创建实例1将Vlan20划分进去) SwitchA(config)#spanning mst 0 priority 4096 SwitchA(config)#spanning mst 1 priority 0

交换机和路由器的基本配置

实验一交换机和路由器的基本配置 交换机的基本配置 【实验名称】 交换机的基本配置。 【实验目的】 掌握交换机命令行各种操作模式的区别,能够使用各种帮助信息,以及用命令进行基本的配置。 【背景描述】 你是某公司新进的网管,公司要求你熟悉网络产品,公司采用全系列锐捷网络产品,首先要求你登录交换机,了解、掌握交换机的命令行操作技巧,以及如何使用一些基本命令进行配置。 【需求分析】 需要在交换机上熟悉各种不同的配置模式以及如何在配置模式间切换,使用命令进行基本的配置,并熟悉命令行界面的操作技巧。 【实验拓扑】 图1-1 实验拓扑图 【实验设备】 三层交换机1台 【预备知识】 交换机的命令行界面和基本操作 【实验原理】 交换机的管理方式基本分为两种:带内管理和带外管理。通过交换机的Console口管理交换机属于带外管理,不占用交换机的网络接口,其特点是需要使用配置线缆,近距离配置。第一次配置交换机时必须利用Console端口进行配置。 交换机的命令行操作模式,主要包括:用户模式、特权模式、全局配置模式、端口模式等几种。 ???用户模式进入交换机后得到的第一个操作模式,该模式下可以简单查看交换机的软、硬件版本信息,并进行简单的测试。用户模式提示符为switch> ???特权模式由用户模式进入的下一级模式,该模式下可以对交换机的配置文件进行管理,查看交换机的配置信息,进行网络的测试和调试等。特权模式提示符为switch# ???全局配置模式属于特权模式的下一级模式,该模式下可以配置交换机的全局性参数(如主机名、登录信息等)。在该模式下可以进入下一级的配置模式,对交换机具体的功能进行配置。全局模式提示符为switch(config)# ???端口模式属于全局模式的下一级模式,该模式下可以对交换机的端口进行参数配置。端口模式提示符为switch(config-if)# 交换机的基本操作命令包括:

神州数码交换机配置实例

第7章综合实训 7.1 综合实训一 1.背景介绍 下图为园区网络的拓扑图,网络中使用了两台三层交换机DCRS-5526A和DCRS-5526B 提供内部网络的互联,网络边缘采用了一台路由器DCR-1702用于连接到internet,DCR-2611用于模拟Internet中的路由器。 DCRS-5526A上连接一台PC,PC处于Vlan100中。DCRS-5526B连接一台FTP服务器和一台打印服务器,两台服务器处于VLAN200中,DCRS-5526A与DCRS-5526B之间使用交换机间链路相连。DCRS-5526A与DCRS-5526B使用具有三层特性的物理端口与DCR-1702相连。在internet上有一台与DCR-2611相连的外部Web服务器。 说明:本实验采用的设备均为神州数码公司网络产品。其中DCRS-5526为三层交换机。 综合实训实验图如图7.1所示。 图7.1 综合实训1实验图 为了实现网络资源的共享,需要PC机能够访问内部网络中的FTP服务器,以实现文件的上传和下载,并且PC机需要连接到打印服务器以进行远程的打印操作,PC机需要能够通过园区网络连接到internet的Web服务器,并能够进行Web网页的浏览。 其中各计算机的IP地址及网关配置说明 计算机IP 子网掩码网关 PC机192.168.100.100 255.255.255.0 192.168.100.1 FTP服务器192.168.200.10 255.255.255.0 192.168.200.1 打印服务器192.168.200.20 255.255.255.0 192.168.200.1 Web服务器100.1.1.2 255.255.255.0 100.1.1.1

路由器常用配置命令

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/0d13170204.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/0d13170204.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模式

神州数码配置命令总结 (已更新)

第一部分交换机配置 一、基础配置 1、模式进入 Switch> Switch>en Switch#config Switch(Config)#interface ethernet 0/2 2、配置交换机主机名 命令:hostname <主机名> 3、配置交换机IP地址 Switch(Config)#interface vlan 1 Switch(Config-If-Vlan1)#ip address 10.1.128.251 255.255.255.0 Switch(Config-If-Vlan1)#no shut 4、为交换机设置Telnet授权用户和口令: 登录到Telnet的配置界面,需要输入正确的用户名和口令,否则交换机将拒绝该Telnet用户的访问。该项措施是为了保护交换机免受非授权用户的非法操作。若交换机没有设置授权Telnet用户,则任何用户都无法进入交换机的Telnet配置界面。因此在允许Telnet方式配置管理交换机时,必须在Console的全局配置模式下使用命令username privilege [password (0 | 7) ]为交换机设置Telnet授权用户和口令并使用命令authentication line vty login local打开本地验证方式,其中privilege选项必须存在且为15。 例:Switch>enable Switch#config Switch(config)#username test privilege 15 password 0 test Switch(config)#authentication line vty login local Switch(Config)#telnet-user test password 0 test Switch (Config)#telnet-server enable://启动远程服务功能 5、配置允许Telnet管理交换机的地址限制(单独IP或IP地址段) (1)限制单个IP允许Telnet登录交换机 switch(config)#authentication security ip 192.168.1.2 (2)限制允许IP地址段Telnet登录交换机 switch(config)#access-list 1 permit 192.168.1.0 0.0.0.255 switch(config)#authentication ip access-class 1 in 5、为交换机设置Web授权用户和口令:web-user <用户名>password {0|7} <密码> 例:Switch(Config)#web-user admin password 0 digital 6、设置系统日期和时钟:clock set 7、设置退出特权用户配置模式超时时间 exec timeout //单位为分钟,取值范围为0~300 8、保存配置:write 9、显示系统当前的时钟:Switch#show clock 10、指定登录用户的身份是管理级还是访问级 Enable [level {visitor|admin} [<密码>]] 11、指定登录配置模式的密码:Enable password level {visitor|admin}

神州数码交换机基本配置

神州数码交换机基本配置 恢复交换机的出厂设置 命令:set default 功能:恢复交换机的出厂设置。 命令模式:特权用户配置模式。 使用指南:恢复交换机的出厂设置,即用户对交换机做的所有配置都消失,用户重新启动交换机后,出现的提示与交换机首次上电一样。 注意:配置本命令后,必须执行write 命令,进行配置保留后重启交换机即可使交换机恢复到出厂设置。 举例: Switch#set default Are you sure? [Y/N] = y Switch#write Switch#reload 进入交换机的Setup配置模式 命令:setup 功能:进入交换机的Setup配置模式。 命令模式:特权用户配置模式。 使用指南:在Setup配置模式下用户可进行IP地址、Web 服务等的配置。 举例: Switch#setup Setup Configuration ---System Configuration Dialog--- At any point you may enter Ctrl+C to exit. Default settings are in square brackets [ ]. If you don't want to change the default settings, you can input enter. Continue with configuration dialog? [y/n]:y Please select language [0]:English [1]:中文 Selection(0|1) [0]:0 Configure menu [0]:Config hostname [1]:Config interface-Vlan1 [2]:Config telnet-server [3]:Config web-server [4]:Config SNMP [5]:Exit setup configuration without saving [6]:Exit setup configuration after saving

交换机路由器基本命令

准备工作: 1)SecureCRT 软件(推荐使用8.0注册机版) 2)console线一条,RS232转USB线一条(淘宝购买) RS232转USB线插在电脑上,打开设备管理(快捷键devmgmt.msc),就会有提示,用360驱动(或其他驱动软件)打上即可。 下图为驱动安装成功后的设备管理器界面(本人电脑系统为win10)。 注意:com口与电脑上USB口是对应的,接在另一个USB口,com口的序号会变化。 file:///C:/Users/Potter/AppData/Local/Temp/msohtmlclip1/01/clip_imag e002.jpg 3)电脑一台 4)网络基础知识(OSI,IP,路由交换基础等) 5)登陆设备( CLI命令行) 设备-----Console—RS232-USB---电脑,打开SecureCRT软件 file:///C:/Users/Potter/AppData/Local/Temp/msohtmlclip1/01/clip_imag e004.jpg 一,锐捷交换机( 和cisco命令类似) 1,设备登陆 Web登陆:192.168.1.1 admin/admin Console密码:默认为空,如果不行试试ruijie / admin 2,系统基本配置

enable //进入用户模式,华为H3C无对应命令clockset 10:00:00 3 17 2017 //clock set 小时:分:秒月日年! config //进入全局模式,对应华为H3C的sys hostname xx //修改设备名称 ! 3,配置vlan ! config //进入全局模式 vlan 10 name xxx //创建一个vlan,并命名 vlan 20 name xxx exit ! no vlan 10 //删除一个vlan ! int range gi 0/2-4 sw mo ac //配置多个接口为access模式 sw ac vl 10 //配置多个接口加入vlan10 exit

神州数码路由交换配置命令(全)

路由 ssh aaa authentication login ssh local aaa authentication enable default enable enable password 0 123456 username admin password 0 123456 ip sshd enable ip sshd auth-method ssh ip sshd auth-retries 5 ip sshd timeout 60 TELNET R1_config#aaa authentication login default local R1_config#aaa authentication enable default enable R1_config#enable password 0 ruijie R1_config#line vty 0 4 R1_config_line#login authentication default R1_config_line#password 0 cisco 方法2,不需要经过3A认证 R1_config#aaa authentication login default none R1_config#aaa authentication enable default enable R1_config#enable password 0 cisco R1_config#line vty 0 4 R1_config_line#login authentication default CHAP认证单向认证,密码可以不一致 R2_config#aaa authentication ppp test local R2_config#username R2 password 0 123456 R2_config_s0/2#enc ppp R2_config_s0/2#ppp authentication chap test R2_config_s0/2#ppp chap hostname R1 R1_config#aaa authentication ppp test local R1_config#username R1 password 0 123456 R1_config_s0/1#enc ppp R1_config_s0/1#ppp authentication chap test R1_config_s0/1#ppp chap hostname R2

神州、交换机知识要点

神州数码交换机路由器知识要点 https://www.360docs.net/doc/0d13170204.html, 2010年02月27日来源:本站原创作者:佚名收藏本文交换机 1. 交换机恢复出厂设置及其基本配置. 1) //进入特权模式 2) del config.text 2. Telnet方式管理交换机. 1) //进入全局配置模式 2) enable password 0 [密码] 3) Line 0 4 4) Password 0 [密码] 5) Login 3. 交换机文件备份、升级、还原。 1) rgnos.bin系统文件 2) config.text配置文件 4. Enable密码丢失的解决办法 1) 重启 2) CTRL+C 3) 选择 4 (file) 4) 1 (移除) 5) Config.text 6) Laod (重启) 5. 交换机Vlan的划分

1)Vlan 10 2) In vlan 10 3) Ip add [IP] [子网掩码] 6. 交换机端口与Mac绑定和过滤 1) //进入串口 2) sw mode trunk sw port-security 3) sw port-security mac-address [MAC] mac-address-table static address [MAC] vlan-ID interface ethernet [要绑定的端口] 7. 生成树实验 1) spanning-tree 8. 交换机链路聚合 1) Int aggregateport 1 2) sw mode trunk 3) //进入串口 4) port-group 1 9. 交换机端口镜像 1) monitor session 1 source interface fastEthernet 0/2 both //被镜像的 2) monitor session 1 destination interface fastEthernet 0/3 //镜像端口 10. 多层交换机静态路由实验 1) ip route [存在的IP段] [子网掩码] [下一跳IP] 11. RIP动态路由 1) router rip

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

思科交换机路由器命令 大全 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地址: 交换机显示命令:

神州数码路由器实训手册

10级网络设备常规实训【router】文档 -2011-2012学年第一学期- 实训老师:沈广东刘海涛 编辑:蒋立彪沈广东 目录 一、路由器基本配置-------------------------------------------03 二、使用访问控制列表(ACL)过滤网络数据包-------06 三、路由器的NAT功能--------------------------------------08 四、路由器DHCP 配置--------------------------------------10 五、本地局域网互联(路由协议配置)------------------14 六、使用DCVG-204实现VOIP ---------------------------19 七、跨路由使用DCVG-204---------------------------------22

一、路由器基本配置 一、试验目的: 1.掌握路由器本地设置的方法。 2.掌握路由器设置命令。(设置端口IP) 3.掌握路由器远程设置的方法。(telnet 服务) 二、试验设备 1.DCR-1700路由器1台 2.Console 线、直通双绞线 3.DCRS-3926S交换机1台 三、试验拓扑结构 :192.168.1.2/24 192.168.1.254 线 //思考1:如果路由器要直接和PC连接,是用直通线?还是交叉线? 三、实验任务及步骤 1.Console 口连接 2.任务模式:enable 特权配置模式 Config 全局配置模式 3.测试计算机与路由器的连通性 PC机配置: Route 配置: Router#delete this file will be erased,are you sure?(y/n)y no such file Router#reboot Do you want to reboot the router(y/n)? //恢复出厂设置并重启 Router_config#hostname RouterA RouterA _config# //修改主机名 RouterA _config#interface fastEthernet 0/0 (//进入100M端口,) //思考2:若想进入10M口如何? // RouterA _config#interface ethernet 0/1 进入10M口

神州数码交换机配置

神州数码交换机配置基本命令 交换机基本状态: hostname> ;用户模式 hostname# ;特权模式 hostname(config)# ;全局配置模式 hostname(config-if)# ;接口状态 交换机口令设置: 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 ;设置登录口令xx switch#exit ;返回命令 交换机VLAN设置: switch#vlan database ;进入VLAN设置 switch(vlan)#vlan 2 ;建VLAN 2 switch(vlan)#no vlan 2 ;删vlan 2 switch(config)#int f0/1 ;进入端口1 switch(config-if)#switchport access vlan 2 ;当前端口加入vlan 2 switch(config-if)#switchport mode trunk ;设置为干线 switch(config-if)#switchport trunk allowed vlan 1,2 ;设置允许的vlan switch(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地址: switch(config)#interface vlan 1 ;进入vlan 1 switch(config-if)#ip address ;设置IP地址 switch(config)#ip default-gateway ;设置默认网关 switch#dir Flash: ;查看闪存 交换机显示命令: switch#write ;保存配置信息 switch#show vtp ;查看vtp配置信息 switch#show run ;查看当前配置信息 switch#show vlan ;查看vlan配置信息 switch#show interface ;查看端口信息 switch#show int f0/0 ;查看指定端口信息 完了最最要的一步。要记得保存设置俄,

神州数码交换机telnet

配置Telnet方式登录 一、组网需求 1. PC通过Telnet登录交换机并对其进行管理。 2. 分别应用本地认证和Radius+本地认证方式对用户名密码进行验证。 3. 只允许192.168.1.2/24这个IP或只允许192.168.1.0/24这个IP地址段的PC进行Telnet 登录。 二、组网图 PC机和交换机之间保证路由可达,PC机可以Ping通交换机的管理地址。 三、配置步骤 1. 登录到交换机,配置本地的用户名密码 switch>enable switch#config terminal switch(config)#username test privilege15password0 test 2. 配置Telnet用户登录时的验证方式(本地验证或 Radius+本地验证) 本地验证 switch(config)#authentication line vty login local Radius + 本地验证 switch(config)#authentication line vty login radius local 注:开启Radius + 本地验证,需要根据现场情况配置Radius-Server参数,具体配置见本手册“安全认证功能配置”部分的描述。 3. 配置允许Telnet管理交换机的地址限制(单独IP 或 IP地址段) 限制单个IP允许Telnet登录交换机 switch(config)#authentication securityip192.168.1.2 限制允许IP地址段Telnet登录交换机 switch(config)#access-list1permit192.168.1.0 0.0.0.255 switch(config)#authentication ip access-class 1 in 四、配置关键点 1. 对于三层交换机,可以有多个三层虚接口,它的管理Vlan可以是任意一个具有三层接口

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

欢迎阅读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

相关文档
最新文档