路由器的基本配置_第1页
路由器的基本配置_第2页
路由器的基本配置_第3页
路由器的基本配置_第4页
路由器的基本配置_第5页
已阅读5页,还剩50页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、n 路由器的功能、结构和接口路由器的功能、结构和接口n 路由器的基本配置路由器的基本配置n 常见广域网协议常见广域网协议课程目标课程目标学习完本课程,您应该能够:学习完本课程,您应该能够:n 路由器的功能、结构和接口路由器的功能、结构和接口n 路由器的基本配置路由器的基本配置n 常见广域网协议常见广域网协议目录目录3路由器工作流程路由器工作流程IPETHPPP以太网口以太网口串口串口IPPPPETH串口串口以太网口以太网口协议封装协议封装路由选择路由选择协议转换协议转换路由器路由器路由器路由器传送传送拆包拆包接收接收发送发送工作过程工作过程4路由器的结构路由器的结构l 硬件组成硬件组成CPU(

2、处理器)RAM(存储系统运行时的程序和与CPU的通信数据 )FLASH或CF(存放OS的映像和路由器的配置文件)Boot ROM (存放启动时的引导程序文件 )接口(完成路由器与其它设备的数据交换)l 软件结构软件结构BOOT ROM软件:主要功能是路由器加电后完成有关初始化工作,并向内存中加入操作系统代码COMWARE:H3C路由器上运行的软件平台5Comware v5平台结构平台结构VPNVPN子系统子系统MPLSMPLS子系统子系统网络接口子系统网络接口子系统IPv6IPv6支持支持QoSQoS增强增强IPIP栈子系统栈子系统 安全子系统安全子系统QoSQoS子系统子系统路由子系统路由子

3、系统服务控制平面服务控制平面数据转发平面数据转发平面配置管理子系统配置管理子系统系系 统统 服服 务务 平平 台台通用控制平面通用控制平面系统管理平面系统管理平面设备管理子系统设备管理子系统信息管理子系统信息管理子系统MPLSMPLS增强增强n 路由器的功能、结构和接口路由器的功能、结构和接口n 路由器的基本配置路由器的基本配置n 常见广域网协议常见广域网协议目录目录7MSR 30-20配置(配置(CONSOLE )口位于上方)口位于上方备份(备份(AUX )口位于下方)口位于下方8配置路由器配置路由器l 通过通过console口配置口配置l 通过拨号远程配置通过拨号远程配置l 通过通过tel

4、net方式配置方式配置l 通过哑终端方式配置通过哑终端方式配置l 通过通过FTP方式传送配置文件方式传送配置文件9通过通过console口配置口配置建立本地配置环境R232 串口串口 配置(配置(Console)电缆)电缆10创建超级终端(创建超级终端(II)11选择串口(选择串口(III)12端口设置(端口设置(IV)13通过拨号线路配置路由器通过拨号线路配置路由器l将路由器和将路由器和PC分别与分别与modem连接连接 备份(备份(AUX)电缆)电缆modemmodemPSTN/ISDN14通过通过Telnet配置本地路由器配置本地路由器lH3C-Ethernet0/0ip address

5、 00 24 l缺省的缺省的telnet登录用户名:登录用户名:admin 口令:口令:admin服务器服务器PC工作站工作站工作站工作站1000Base-T 网口网口15通过哑终端配置通过哑终端配置lH3C-Serial1/0physical-mode async同同/异步串口异步串口16通过通过FTP配置配置l在路由器上启动在路由器上启动FTP服务器服务器l在终端上启动在终端上启动FTP客户端程序客户端程序FTP serverFTP clientE17命令行概述命令行概述l用户视图用户视图l系统视图系统视图 lRIP视图视图lOSPF

6、视图视图lBGP视图视图l以太网接口视图以太网接口视图l同步串口视图同步串口视图lDialer接口视图接口视图18进入路由器配置界面进入路由器配置界面 User interface Con 0 is available. Press ENTER to get started. 19用户视图常用命令用户视图常用命令l ? cdChange current directory debugging Enable system debugging functions delete Delete a file displayDisplay current system informationpingSe

7、nd echo messagessaveSave current configuration resetReset operationreboot Reboot 20系统视图常用命令系统视图常用命令l system-viewl H3C?aclSpecify acl configuration information arpAdd static ARP entry bgpSpecify BGP(Border Gateway Protocol) configuration informationfirewallSpecify firewall configuration information i

8、psecSpecify IPSec(IP Security) configuration information local-userSpecify local user configuration information pppSpecify PPP(the Point-to-Point Protocol)21接口视图命令接口视图命令lH3Cinterface s1/0 lH3C-Serial1/0? baudrateSet transmit and receive baudrate async Asynchronous line configuration command ipSpecif

9、y IP configuration information shutdownShut down the specified interface physical-mode Set synchronous or asynchronous mode on serial interfacedialer Specify DCC(Dial-Control-Center) configuration information quit Exit from current command view loopbackSet loopback on an 22在线帮助在线帮助l H3C display ?acl

10、Acl status and configuration information arp Display ARP entryaspf ASPF status and configuration information auto-config Specify auto configuration information bgp BGP status and configuration informationcurrent-configurationCurrent configurationdebuggingCurrent setting of debugging switches dhcp DH

11、CP configuration subcommands diagnostic-information System Information for Diagnosis 23命令行错误信息命令行错误信息 H3Cdispaly ? % Unrecognized command found at position. H3Cdisplay % Incomplete command found at position. H3Cdisplay interface Serial 0/0 0 % Too many parameters found at 24l 历史命令历史命令display history

12、-commandl 补全命令补全命令使用Tab键l 查看历史记录查看历史记录使用 键使用Ctrl P快捷键历史命令历史命令25编辑特性编辑特性l 普通按键普通按键 输入字符到当前光标位置输入字符到当前光标位置l 退格键退格键BackSpace 删除光标位置的前一个字删除光标位置的前一个字符符l 删除键删除键Delete 删除光标位置字符删除光标位置字符l 左光标键左光标键 光标向左移动一个字符位置光标向左移动一个字符位置l 右光标键右光标键 光标向右移动一个字符位置光标向右移动一个字符位置l 上下光标键上下光标键 显示历史命令显示历史命令26l Language中英文显示方式切换中英文显示方式

13、切换l 暂停显示时键入暂停显示时键入Ctrl+c 停止显示和命令停止显示和命令执行执行l 暂停显示时键入空格键暂停显示时键入空格键继续显示下一屏继续显示下一屏信息信息l 暂停显示时键入回车键暂停显示时键入回车键继续显示下一行继续显示下一行信息信息显示特性显示特性27display versiondisplay current-configurationdisplay interfacedisplay ip route 基本操作命令基本操作命令28display versionH3Cdisplay version H3C Comware Platform SoftwareComware Soft

14、ware, Version 5.20, Release 1618, StandardCopyright (c) 2004-2008 Hangzhou H3C Tech. Co., Ltd. All rights reserved.H3C MSR20-21 uptime is 0 week, 0 day, 0 hour, 1 minuteLast reboot 2008/05/26 11:37:35System returned to ROM By Command.CPU type: FREESCALE PowerPC 8248 400MHz256M bytes SDRAM Memory4M b

15、ytes Flash MemoryPcb Version: 3.0Logic Version: 3.0Basic BootROM Version: 2.11Extended BootROM Version: 2.12SLOT 0CON (Hardware)3.0, (Driver)1.0, (Cpld)3.0SLOT 0AUX (Hardware)3.0, (Driver)1.0, (Cpld)3.0SLOT 0ETH0/0 (Hardware)3.0, (Driver)1.0, (Cpld)3.0SLOT 0ETH0/1 (Hardware)3.0, (Driver)1.0, (Cpld)3

16、.0SLOT 0ETH0/2 (Hardware)3.0, (Driver)1.0, (Cpld)3.0SLOT 0ETH0/3 (Hardware)3.0, (Driver)1.0, (Cpld)3.0SLOT 0ETH0/4 (Hardware)3.0, (Driver)1.0, (Cpld)3.0SLOT 0ETH0/5 (Hardware)3.0, (Driver)1.0, (Cpld)3.0SLOT 0ETH0/6 (Hardware)3.0, (Driver)1.0, (Cpld)3.0SLOT 0ETH0/7 (Hardware)3.0, (Driver)1.0, (Cpld)3

17、.0SLOT 0ETH0/8 (Hardware)3.0, (Driver)1.0, (Cpld)3.0SLOT 0ETH0/9 (Hardware)3.0, (Driver)1.0, (Cpld)3.0SLOT 1SIC-1SAE (Hardware)2.0, (Driver)1.0, (Cpld)1.0SLOT 2SIC-EPRI (Hardware)1.0, (Driver)1.0, (Cpld)2.0 29display current-configurationH3Cdisplay current-configuration# version 5.20, Release 1618,

18、Standard# sysname H3C# domain default enable system#vlan 1#domain system access-limit disable state active idle-cut disable self-service-url disable#local-user admin password cipher .USE=B,53Q=QMAF41! service-type telnet level 3#controller E1 2/0#30display interface显示接口信息显示接口信息H3Cdisplay interface S

19、erial 1/0Serial0/0 current state :UPLine protocol current state :UPDescription : Serial1/0 InterfaceThe Maximum Transmit Unit is 1500, Hold timer is 10(sec)Internet protocol processing : disabledInternet Address is /8 Link layer protocol is PPPLCP initialOutput queue : (Urgent queue : Size/L

20、ength/Discards) 0/50/0Output queue : (Protocol queue : Size/Length/Discards) 0/500/0Output queue : (FIFO queuing : Size/Length/Discards) 0/75/0Physical layer is synchronous, Virtual Baudrate is 64000 bpsInterface has no cable, Clock mode is DTECLK1 Last 300 seconds input rate 0.00 bytes/sec, 0.00 pa

21、ckets/sec Last 300 seconds output rate 0.00 bytes/sec, 0.00 packets/sec Input: 0 packets, 0 bytes 0 broadcasts, 0 multicasts 0 errors, 0 runts, 0 giants 0 CRC, 0 align errors, 0 overruns 0 dribbles, 0 aborts, 0 no buffers 0 frame errors Output:0 packets, 0 bytes 0 errors, 0 underruns, 0 collisions 0

22、 deferred DCD=UP DTR=UP DSR=UP RTS=UP CTS=UP 31H3C interface serial 1/0H3C-serial0/0 undo shutdown开启或关闭端口开启或关闭端口l开启已经关闭的端口开启已经关闭的端口H3C interface serial 1/0H3C-serial 0/0 shutdownl人工关闭端口人工关闭端口32解读端口状态解读端口状态H3Cdisplay interface serial 1/0Link layer protocol is PPP LCP initialphysical layer is synchron

23、ous, Virtualbaudrate is 64000 bpsInterface has no cable, Clock mode is DTECLK1line protocol current state: downSerial0/0 current state: down,物理层组件的状态物理层组件的状态数据链路层的状态数据链路层的状态33display ip routing-tableH3Cdis ip routing-tableRouting Tables: PublicDestinations : 12 Routes : 12Destination/Mask Proto Pre

24、Cost NextHop Interface/0 Static 60 0 Serial1/0/8 RIP 100 3 Serial1/0/8 OSPF 10 50 Ethernet0/0/8 RIP 100 4 Serial1/0/8 Static 60 0 Serial1/0/8 Direct 0 0 Ethernet0/0/32 Direct 0 0

25、InLoop0 . 34l terminal debuggingl debugging ? all All debugging functionsarp ARP moduleaspf ASPF moduleatm ATM modulebgp BGP modulebridge Debugging bridgedhcp DHCP moduledialer DCC moduledlsw Data Link Switching moduledns Domain name system module调试命令:调试命令:35l H3Cping PING : 56 data

26、 bytes, press CTRL_C to break Reply from : bytes=56 Sequence=0 ttl=255 time = 31 ms Reply from : bytes=56 Sequence=1 ttl=255 time = 31 ms Reply from : bytes=56 Sequence=2 ttl=255 time = 32 ms Reply from : bytes=56 Sequence=3 ttl=255 time = 31 ms Reply from : b

27、ytes=56 Sequence=4 ttl=255 time = 31 ms - ping statistics - 5 packets transmitted 5 packets received 0.00% packet loss round-trip min/avg/max = 31/31/32 msping:网络连通测试命令网络连通测试命令36tracert:网络连通测试命令网络连通测试命令l H3C tracert 86 traceroute to 86(86) 30 hops max, 40

28、 bytes packet, press CTRL_C to break 1 29 ms 22 ms 21 ms 2 86 38 ms 24 ms 24 msn 路由器的功能、结构和接口路由器的功能、结构和接口n 路由器的基本配置路由器的基本配置n 常见广域网协议常见广域网协议目录目录38广域网广域网 V.24 ,V.35, X.21BisEIA/TIA-232/449LAPB,Frame Relay,HDLC,PPP,SDLC网络层网络层X.25物理层物理层数据链路层数据链路层路由器路由器 A A广域网的下三层广域网的下三层网络层网络层物理层物理层数

29、据链路层数据链路层路由器路由器 B B39广域网的数据链路层广域网的数据链路层专用点到点专用点到点HDLC,PPP分组交换分组交换X.25,帧中继电路交换PSTN:PPPISDN B信道:PPPISDN D信道:LAPD40高级数据链路控制高级数据链路控制HDLCl 面向比特面向比特l 透明传输零比特填充法透明传输零比特填充法l 运行于同步串行线路运行于同步串行线路地址地址标志标志控制控制信息信息帧校验帧校验标志标志41HDLC协议的配置协议的配置l在接口上封装在接口上封装HDLC协议协议H3C-Serial1/0 link-protocol hdlcl打开打开HDLC所有报文调试信息开关所有

30、报文调试信息开关 debugging hdlc all l打开打开HDLC事件调试信息开关事件调试信息开关 debugging hdlc event interface type number 42PPP配置命令配置命令l封装封装PPPH3C-Serial1/0link-protocol pppl设置验证类型设置验证类型H3C-Serial1/0 ppp authentication-mode pap|chap l设置用户名、口令、服务类型设置用户名、口令、服务类型H3Clocal-user usernameH3C-luser-huaweipassword simple passwordH3C

31、-luser-huaweiservice-type 43PAP配置命令配置命令l验证方配置验证方配置 配置验证方式H3C-Serial1/0 ppp authentication-mode pap 配置用户列表H3Clocal-user user-cH3C-luser-user-cpassword simple pass-cH3C-luser-user-cservice-type pppl被验证方配置被验证方配置 配置PAP用户名H3C-Serial1/0 ppp pap local-user user-c password simple pass-44CHAP配置命令配置命令l主验证方配置主

32、验证方配置:配置本地验证对端(方式为CHAP) H3C-Serial1/0ppp authentication-mode chap配置本地名称 H3C-Serial1/0ppp chap user user-s将对端用户名和密码加入本地用户列表 H3Clocal-user user-c H3C-luser-user-cpassword simple sharepass H3C-luser-user-cservice-type pppl被验证方配置被验证方配置:配置本地名称 H3C-Serial1/0 ppp chap user user-c将对端用户名和密码加入本地用户列表 H3Clocal-

33、user user-s H3C-luser-user-spassword simple sharepass H3C-luser-user-sservice-type 45PPP典型配置举例一典型配置举例一主验证方主验证方被验证方被验证方RouterA RouterB PAP 验证验证S0/0S0/0RouterAlocal-user routerb RouterA-luser-routerbpassword simple helloRouterA-luser-routerbservice-type pppRouterAinterface serial 0/0RouterA-Serial0/0p

34、pp authentication-mode papRouterBinterface serial 0/0 RouterB-Serial0/0ppp pap local-user routerb password simple 46PPP典型配置举例二典型配置举例二RouterARouterBCHAP 验证验证S0/0S0/0RouterAlocal-user routerbRouterA-luser-routerbpassword simple helloRouterA-luser-routerbservice-type pppRouterAinterface serial 0/0Route

35、rA-Serial0/0ppp chap user routeraRouterA-Serial0/0ppp authentication-mode chapRouterBlocal-user routera RouterB-luser-routerapassword simple helloRouterBinterface serial 0/0RouterB-Serial0/0ppp chap user routerb主验证方主验证方被验证方被验证方47帧中继的配置帧中继的配置l封装帧中继协议封装帧中继协议 H3C-Serial1/0link-protocol fr ietf | mfr |n

36、onstandard l配置帧中继接口的终端类型配置帧中继接口的终端类型 H3C-Serial1/0fr interface-type dce | dte | nni l选择选择LMI类型类型 H3C-Serial1/0fr lmi type ansi | nonstandard | q933a 48配置帧中继地址映射配置帧中继地址映射l手工配置静态映射:手工配置静态映射: H3C-Serial1/0fr map ip protocol-address dlci broadcast l动态建立:使能动态逆向地址解析协议动态建立:使能动态逆向地址解析协议 H3C-Serial1/0fr inar

37、p ip dlci 帧中继地址映射也就是建立对端协议地址与本地帧中继地址映射也就是建立对端协议地址与本地DLCI的映射的映射关系,该地址映射可静态配置,也可动态建立关系,该地址映射可静态配置,也可动态建立49配置帧中继本地虚电路配置帧中继本地虚电路l为主接口分配一条虚电路号为主接口分配一条虚电路号 H3C-Serial1/0fr dlci 50配置帧中继子接口配置帧中继子接口l创建帧中继子接口,进入子接口配置模式创建帧中继子接口,进入子接口配置模式interface type number.subinterface-number p2mp | p2p l配置帧中继子接口的虚电路号配置帧中继子接

38、口的虚电路号H3C-Serial1/0.1fr dlci dlci建立地址映射的命令和物理接口相同,可以使用静态或动态建立地址映射的命令和物理接口相同,可以使用静态或动态地址映射。地址映射只有在点到多点的情况下才地址映射。地址映射只有在点到多点的情况下才需要配置需要配置子接口有两种类型:点到点和点到多点子接口有两种类型:点到点和点到多点51配置帧中继交换配置帧中继交换l允许帧中继进行允许帧中继进行PVC交换交换H3Cfr switchingl设置帧中继接口类型设置帧中继接口类型H3C-Serial1/0fr interface-type dce | dte | nni l配置帧中继配置帧中继PVC交换的路由交换的路由H3C-Serial1/0fr dlci-switch input-dlci interface Serial 1/1 dlci output-dlci 注意:如果使用帧中继交换,接口类型必

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论