Cisco路由器简明配置手册第二章广域网协议设置一、HDLCHDLC是CISCO路由器使用的缺省协议,一台新路由器在HDLC环境中使用时不需要设置广域网协议。1.有关命令端口设置设置HDLC封装encapsulationhdlc设置DCE端线路速度clockratespeed2.3.举例Router1:InterfaceSerial0--ipaddress192.200.10.1255.255.255.0--Clockrate1000000Router2:--interfaceSerial0--ipaddress192.200.10.2255.255.255.0二、X.251.有关命令端口设置设置X.25封装encapsulationx25[dce]设置X.121地址x25addressx.121-address设置远方站点的地址映射x25mapipIPaddressx.121-address2.举例Router1:interfaceSerial0--encapsulationx25--ipaddress192.200.10.1255.255.255.0--x25address110101--x25mapip192.200.10.21101023.Router2:interfaceSerial0--encapsulationx25--ipaddress192.200.10.2255.255.255.0--x25address110102--x25mapip192.200.10.1110101三、FrameRelay1.有关命令端口设置设置FR封装encapsulationframe-relay设置FRLMI类型frame-relaylmi-type{ansi|cisco|q933a}子端口设置设置FRDLCI编号frame-relayinterface-dlcidlci[broadcast]2.3.举例Router1:interfaceSerial0--encapsulationframe-relay--frame-relaylmi-typeansiinterfaceSerial0.16point-to-point--ipaddress192.200.10.1255.255.255.0--frame-relayinterfacdlci16Router2:interfacteSerial0--encapsulationframe-relay--frame-relaylmi-typeansiinterfaceSerial0.17point-to-point--ipaddress192.200.10.2255.255.255.0--frame-relayinterface-dlci17四、PSTN电话网络(PSTN)是目前普及程度最高、成本最低的公用通讯网络,它在网络互连中也有广泛的应用。电话网络的应用一般可分为两种类型,一种是同等级别机构之间以按需拨号(DDR)的方式实现互连,一种是ISP为拨号上网的用户提供的服务。这两种类型使用的设置命令大致相同,但在设置思想上又有重要的差别。1.相关命令全局设置:设置PPP安全协议使用的用户名和密码设置路由器与modem的接口指令设置用户的IP地址池指定地址池的工作方usernameusernamepasswordpasswordchat-scriptscript-nameEXPECTSENDEXPECTSEND(etc.)iplocalpool{default|pool-namelow-ip-address[high-ip-address]}ipaddress-pool[dhcp-proxy-client|local]式指定DHCP服务器指定TACACS服务器ipdhcp-server[ip-address|name]tacacs-serverhosthostname[single-connection][portinterger][timeoutinteger][keystring]异步口(async)设置:设置封装形式为PPP启动异步口的路由功能设置异步口的PPP工作方式启动按需拨号功能设置用户的IP地址设置IP地址与Ethernet0相同启动TCP头压缩设置端口在挂断前的等待时间设置IP地址与电话号码的映射设置PPP安全协议encapsulationPPPasyncdefaultroutingasyncmode{dedicatedinteractive}dialerin-bandpeerdefaultipaddress{ip-address|dhcp|pool[pool-name]}ipunnumberedEhternet0iptcpheader-compressionpassivedialeridle-timeoutsecondsdialermapipnext-hop-addressdialer-stringpppauthenticationprotocolline拨号线设置:指定特定情况下路由script{dialer|reset}script-name器使用的chat-script设置modem的工作方式modem{inout|dialin}自动配置modem类型modemautoconfigdiscovery设置拨号线的通讯速speedspeed率设置通讯线路的流控flowcontrolhardware方式连通后自动执行命令autocommandcommand2.3.DDR实例北京:--usernameguangzhoupasswordLegend--(password必须与广州的路由器设置的password一样)--chat-scriptrstmdm"""AT&FS0=1&B1&C1&D2&H1&K1&M4&R2"OK--chat-scriptcisco-dial"""AT"TIMEOUT30OK"ATDT\T"TIMEOUT30CONNECT\c--interfaceasync1----encapsulationppp----asyncdefaultrouting----asyncmodededicated----dialerin-band----ipunnumberedEthernet0----iptcpheader-compressionpassive----dialeridle-timeout300----dialermapip20.1.1.1nameGuangzhou02088888888----pppauthenticationchap--lineaux0----scriptdialercisco-dial----scriptresetrstmdm----modemi...