




版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、神州数码交换机路由器命令汇总(部分2016年3月23日星期三修改_注:本文档命令为最简命令,如不懂请在机器上实验注:交换机版本信息:DCRS-5650-28(R4 Device, Compiled on Aug 12 10:58:26 2013sysLocation ChinaCPU Mac 00:03:0f:24:a2:a7Vlan MAC 00:03:0f:24:a2:a6CPLD Version N/ASerial No.:1Copyright (C 2001-2013 by Digital China Networks Limited.All rights reservedLast r
2、eboot is warm reset.Uptime is 0 weeks, 0 days, 1 hours, 42 minutes路由器版本信息:Digital China Networks Limited Internetwork Operating System SoftwareDCR-2659 Series Software, Version 1.3.3H (MIDDLE, RELEASE SOFTWARECopyright 2012 by Digital China Networks(BeiJing LimitedCompiled: 2012-06-07 11:58:07 by sy
3、stem, Image text-base: 0x6004Serial num:8IRTJ610CA15000001, ID num:201404System image file is "DCR-2659_1.3.3H.bin"Digital China-DCR-2659 (PowerPC Processor65536K bytes of memory,16384K bytes of flashRouter uptime is 0:00:44:44, The current time: 2002-01-01 00:44:44Slot 0: SCC SlotPort 0:
4、10/100Mbps full-duplex EthernetPort 1: 2M full-duplex SerialPort 2: 2M full-duplex SerialPort 3: 1000Mbps full-duplex EthernetPort 4: 1000Mbps full-duplex EthernetPort 5: 1000Mbps full-duplex EthernetPort 6: 1000Mbps full-duplex Ethernet一、交换机配置命令switch>en (enable 进入特权用户模式 switch # con (config 进入全
5、局配置模式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# exswitch (config# ena p 1234配置交换机密码(不加密 switch (config# ena p 7
6、 1234配置交换机密码(加密 switch (config# vl 10创建vlan switch (config-vlan10#ex switch (config# in vl 10switch (config-if-vlan10# ip ad 172.16.10.1 255.255.255.0配置VLAN 地址switch(config# sp (spanning-tree启用全局生成树(默认mstp 生成树技术 switch(config# sp mo stp/rstp/mstp (生成树/快速生成树/多生成树技术 switch(config# sp ms 0p 4096设置交换机的优
7、先级默认32768 switch (config# sh sp (show spanning-tree 查看生成树3.交换机Web 管理switch (config# ip ht serswitch (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
8、(config# in e1/0/1-2switchA(config-port-range# po 1 m on/active switchA(config-port-range# ex switchA(config# no port-g 1删除组1switchB (config# port-g 2 switchB (config# in e1/0/3-4switchB (config-port-range# po 2 m on/active switchB (config-port-range# ex switchB (config# no port-g 2删除组26.交换机MAC 与IP
9、绑定switch (config# am e (am enable启用全局am 功能 switch (config# in e1/0/1switch (config_if_ethernet1/0/1# am p(am port打开端口am 功能switch (config_if_ethernet1/0/1# am m (mac-ip-pool00-A0-D1-D1-07-FF 192.168.1.101 switch (config_if_ethernet1/0/1# ex switch (config# in e1/0/2输入这条命令会出现:Invalid ENCRYPTED passwor
10、d! Please input the ENCRYPTED password with length 32密码位数不够32位switch (config_if_ethernet1/0/2# no am p 解锁端口静态绑定switch (config# in e1/0/1switch (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
11、p max 4 绑定MAC地址的个数(默认为1动态绑定(实验中交换机没有动态绑定命令switch (config# in e1/0/1switch (config_if_ethernet1/0/1# sw p (port-security开启绑定功能switch (config_if_ethernet1/0/1# sw port-security lockswitch (config_if_ethernet1/0/1# sw port-security convert 将动态学习到绑定MAC的进行绑定switch # sh port-s add 查看绑定的地址switch (config# s
12、ervice dhcp 启用DHCPswitch (config# ip dh po poolA定义地址池poolAswitch (dhcp-poolA- config# netw (network-address192.168.1.0 24switch (dhcp-poolA- config# le 3租期3天switch (dhcp-poolA- config# ex9.保留地址(一个地址池中只能配一个IP-MAC的绑定switch (config# ip dh po poolCswitch (dhcp-poolC- config#ha (hardware-add 00-a0-d1- d1
13、-07-ff绑定的MAC地址switchA(config# ip ac s(standardtest命名标准IP访问列表switchA(config-std-nacl-test# p (permit a (permit any 允许所有switchA(config-std-nacl-test# exswitchA (config# fir e(firewall enable开启ACL功能switchA(config# in e1/0/1switchA(config#time-r worktimeswitchA(config-time-range#p (periodicweekd 9:0:0 t
14、o 18:0:0Master BackupswitchA(config#router v 1 switchB(config_router#router v 1switchA(config_router#i v 1 (interface vlan 1switchB (config_router#i v 1switchA(config_router#pri 110switchB(config_router#enaswitchA(config_router#c (circuit-failover v 10 20switchA(config_router#enaDHCP_relay(config#se
15、rvice dhcp全局开启DHCP服务DHCP_relay(config#ip fo u b (ip forward-protocol udp bootps全局开启转发DHCP_relay(config#in vl 10DHCP_relay(config-if-vlan10#ip h 172.16.1.1 转发到DHCP服务器地址DHCP(config#service dhcpDHCP(config#ip dh sn e 开启DHCP侦听功能DHCP(config#in e1/0/1DHCP(config-if-ethernet1/0/1#ip d s t (ip dhcp snooping
16、 trust设置上联口为信任口Switch(config#is g test s i e1/0/1-2 (isolate-port group test switchport interface e1/0/1-2e1/0/1-2口不能互相通信,可以和其它端口通信。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
17、/2Source为被镜像的地址Destination为镜像到的地址both为全部流量rx为接收tx为发送Switch(config#in e1/0/1Switch(config-if-ethernet1/0/1#ba c 10000 both/receive/transmit(bandwidth controlSwitch(config#in e1/0/1Switch(config-if-ethernet1/0/1#ar i192.168.1.254 (arp-guard ip 绑定网关IPSwitch(config-if-ethernet1/0/1#exSwitch(config#an e
18、(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/1Switch(config#ip ac e routeSwitch(config-ip-ext-nacl-route#exSwitch(config#cla map (class-map mapSwitch(config-classmap-map#
19、m a route (match access-groupSwitch(config-classmap-map#exSwitch(config#pol map (policy-mapSwitch(config-policymap-map#c map (classSwitch(config-policymap-map-class-map#se ip n 192.168.1.2 设置下一跳地址Switch(config-policymap-map-class-map#exSwitch(config-policymap-map#exSwitch(config#in e1/0/1Switch(conf
20、ig-if-ethernet1/0/1#ser input/output map 应用在接口下Switch# set d (default恢复出厂配置Switch# wr (write保存配置Switch# rel (reload重启交换机_二、路由器配置命令Router>ena 进入特权用户模式Router#conf进入全局配置模式Router_config# in f0/0=默认HDLC封装RA_config#in s0/2 (DCE/V35FCRA_config_s0/2#ph sp 64000 (physical-layer speed配置端口速率(只在DCE端RB_config
21、#in s0/1 (DTE/V35FC= PPP封装RA_config#in s0/2 (DCE/V35FCRA_config_s0/2#enc p PPP封装RA_config_s0/2#ph sp 64000 配置端口速率(只在DCE端RB_config#in s0/1 (DTE/V35FCRB_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 R
22、A_config_s0/2#enc p RA_config_s0/2# pp authe c RA_config_s0/2# pp ch h usera 本地认证 (DCE/V35FC PPP 封装 CHAP 认证 发送自己的用户名 RA_config_s0/2#ip ad 192.168.1.1 255.255.255.0 RA_config_s0/2#pp ch p123456 发送自己的密码 RA_config_s0/2#ph sp 64000 配置端口速率(只在 DCE 端) RA 发送的用户名和密码需与 RB 建立的用户名密码一致。 RB_config#u usera pa 1234
23、56 RB_config#aa authe pp dlocal RB_config#in s0/1 RB_config_s0/1#enc p RB_config_s0/1# pp authe c RB_config_s0/1# pp ch h userb 对方用户名和密码 本地认证 (DTE/V35MT PPP 封装 CHAP 认证 发送自己的用户名 RB_config_s0/1#ip ad 192.168.1.2 255.255.255.0 RB_config_s0/1# pp ch p 123456 发送自己的密码 = PPP 封装 PAP 认证 配置方法同 CHAP 认证 RA_conf
24、ig_s0/2#enc p RA_config_s0/2# pp authe p PPP 封装 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
25、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 RouterA_config_f0/0#in s0/1 Router
26、A_config_s0/1#ip n o 定义 s0/1 为外部接口 定义 f0/0 为内部接口 定义允许转换的地址范围 4.静态路由 Router_config# ip route 10.1.2.0 (目标网段 255.255.255.0(子网掩码) 10.1.1.2(转发地址) 第 6 页共 8 页 青岛开发区职业中专 Router_config# ip route 0.0.0.0 (目标网段 0.0.0.0(子网掩码)10.1.1.2(转发地址)默认静态路由 5.RIP 动态路由 Router_config# router Router_config_rip# ve 2 r 启用 RIP
27、 路由 RIP 路由版本号 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 o 1 启动 ospf 进程,进程号为 1 Router_config_ospf_1# router- 1.1.1.1 (router-id 设置路由器 router-id Router_config_o
28、spf1# 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 标准访问控制列表 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 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 Rou
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 电商设计中的文案撰写技巧试题及答案
- 基因与性状的联动机制试题及答案
- 2025年室外环境清洁电器项目合作计划书
- 遗传学的基本原理试题及答案
- 和考官对话CPMM试题及答案
- CPSM价值评估试题及答案分享
- 基因表达调控的基本机制试题及答案
- 体温监测防控系统课件
- 2025年冷墩钢合作协议书
- 2024国际物流师的考前准备事项与试题及答案
- 中国特色社会主义理论与实践研究知识点整理及思考题答案
- 创意知名画家达芬奇个人生平介绍PPT
- 篮球-行进间单手肩上投篮教案
- 临检基础小知识点整理
- T∕CATSI 08001-2020 小产区产品认定通则
- 《汉服》PPT课件(完整版)
- R-朗格汉斯细胞组织细胞增生症
- 高中毕业生登记表完整A4版
- GB 8408-2018 大型游乐设施安全规范(高清版)
- 新人教版小学数学一年级下册教材分析[1]
- 植物纤维化学答案(华工)
评论
0/150
提交评论