电脑技术学习

广域网协议设置

dn001
 一、HDLC
  HDLC 是CISCO 路由器使用的缺省协议,一台新路由器在HDLC环境中使用时不需要设置广域网协议。
  
  1.有关命令
  端口设置
  设置HDLC 封装 encapsulation hdlc
  设置DCE 端线路速度
  clockrate speed
  2.举例
   

  Router1:
  Interface Serial0
  -- ip address 192.200.10.1 255.255.255.0
  -- Clockrate 1000000
  Router2:
  -- interface Serial0
  -- ip address 192.200.10.2 255.255.255.0
  二、X.25
  1.有关命令
  端口设置
  设置X.25 封装encapsulation x25[dce]
  设置X.121 地址x25 address x.121-address
  设置远方站点的地址映射x25 map ip IP address x.121-address
  2.举例
   
  Router1:
  interface Serial0
  -- encapsulation x25
  -- ip address 192.200.10.1 255.255.255.0
  -- x25 address 110101
  -- x25 map ip 192.200.10.2 110102
  
  Router2:
  interface Serial0
  -- encapsulation x25
  -- ip address 192.200.10.2 255.255.255.0
  -- x25 address 110102
  -- x25 map ip 192.200.10.1 110101
  三、Frame Relay
  1.有关命令
  端口设置
  设置FR 封装 encapsulation frame-relay
  设置FR LMI 类型
  子端口设置 frame-relay lmi-type {ansiciscoq933a}
  设置FR DLCI 编号frame-relay interface-dlci dlci[broadcast]
  2.举例
   
  Router1:
  interface Serial0
  -- encapsulation frame-relay
  -- frame-relay lmi-type ansi
  interface Serial0.16 point-to-point
  -- ip address 192.200.10.1 255.255.255.0
  -- frame-relay interfac dlci 16
  Router2:
  interfacte Serial0
  -- encapsulation frame-relay
  -- frame-relay lmi-type ansi
  interface Serial0.17 point-to-point
  -- ip address 192.200.10.2 255.255.255.0
  -- frame-relay interface-dlci 17
  四、PSTN
  电话网络(PSTN)是目前普及程度最高、成本最低的公用通讯网络,它在网络互连中也有广泛的应用。电话网络的应用一般可分为两种类型,一种是同等级别机构之间以按需拨号(DDR)的方式实现互连,一种是ISP 为拨号上网的用户提供的服务。这两种类型使用的设置命令大致相同,但在设置思想上又有重要的差别。
  
  2.相关命令
  全局设置:
  设置PPP 安全协议使用户名和密码 username username passWord password
  设置路由器与modem 的接口指令 chat-script script-name EXPECT SEND EXPECT SEND(etc.)
  设置用户的IP地址池 ip local pool {defaultpool-name low-ip-address [high-ip-address]}
  指定地址池的工作方式 ip address-pool [dhcp-proxy-clientlocal]
  指定DHCP服务器 ip dhcp-server [ip-addressname]
  指定TACACS 服务器 tacacs-server host hostname [single-connection] [port interger] [timeout integer] [key string]
  
  异步口(async)设置:
  设置封装形式为PPP encapsulation PPP

  启动异步口的路由功能 async default routing
  设置异步口的PPP工作方式 async mode {dedicated interactive}
  启动按需拨号功能 dialer in-band
  设置用户的IP地址 peer default ip address {ip-addressdhcppool [pool-name]}
  设置IP 地址与Ethernet0 相同 ip unnumbered Ehternet0
  启动TCP 头压缩 ip tcp header-compression passive
  设置端口在挂断前的等待时间 dialer idle-timeout seconds
  设置IP 地址与电话号码的映射 dialer map ip next-hop-address dialer-string
  设置PPP 安全协议 ppp authentication protocol
  
  line 拨号线设置:
  指定特定情况下路由器使用的chat-script script {dialerreset} script-name
  设置modem 的工作方式 modem {inoutdialin}
  自动配置modem 类型modem autoconfig discovery
  设置拨号线的通讯速率 speed speed
  设置通讯线路的流控方式 flowcontrol hardware
  连通后自动执行命令autocommand command
  2.DDR 实 例
   
  北京:
  -- username guangzhou password Legend
  -- (password 必须与广州的路由器设置的password 一样)
  -- chat-script rstmdm"""AT&FS0=1&B1&C1&D2&H1&K1&M4&R2"OK
  -- chat-script cisco-dial"""AT"TIMEOUT 30 OK" ATDTT" TIMEOUT 30 CONNECT c
  -- interface async1
  ---- encapsulation ppp
  ---- async default routing
  ---- async mode dedicated
  ---- dialer in-band
  ---- ip unnumbered Ethernet0
  ---- ip tcp header-compression passive
  ---- dialer idle-timeout 300
  ---- dialer map ip 20.1.1.1 name Guangzhou 02088888888
  ---- ppp authentication chap
  -- line aux 0
  ---- script dialer cisco-dial
  ---- script reset rstmdm
  ---- modem inout
  ---- modem autoconfig discovery
  ---- transport input all
  ---- rxspeed 38400
  ---- txspeed 38400
  ---- stopbits 1
  ---- flowcontrol hardware
  -- line vty 0 4
  ---- password telnet
  ---- login
  3.Access Server 实例
   
  Router:
  hostname Router
  enable secret 5 $ 1$EFqU$tYLJLrynNUKzE4bx6fmH//
  chat-script cisco-default ABORT ERROR "" "AT Z"OK "ATDT T"TIMEOUT 30 c CONNE
  interface Ethernet0
  --ip address 10.111.4.20 255.255.252.0
  interface Async1
  --ip unnumbered Ethernet0
  cencapsulation ppp
  --keepalive 10
  --async mode interactive
  --peer default ip address pool Cisco 2511-Group-142
  --ppp authentication pap
  ip local pool Cisco2511-Group-142 10.111.4.21 10.111.4.36
  tacacs-server host 10.111.4.2
  line 1
  --script dialer cisco-default
  --login authentication tacacs
  --modem InOut
  --modem autoconfigure discovery
  --flowcontrol hardware
  五、ISDN MPPP
  1.相关命令
  全局设置:
  设置ISDN 交换类型 isdn switch-type basic-nil
  
  接口设置
  设备PPP 封装 encapsulation ppp
  启动PPP 多连接 ppp multilink
  设置启动另一个B通道的阈值 dialer load-threshold load

  
  2.举例:
  
   Router1:
  isdn switch-type basic-nil
  interface Serial0
  -- ip address 192.200.10.1 255.255.255.0
  -- encapsulation ppp
  -- dialer map ip 192.200.10.2 54321
  -- dialer load-threshold 80
  -- ppp multilink

标签: