wstlwl 发表于 2018-7-13 06:21:16

CISCO配置命令大全(3)

6、配置PPP:  PPP(Point-to-Point Protocol)是SLIP(Serial Line IP protocol)的继承者,它提供了跨过同步和异步电路实现路由器到路由器(router-to-router)和主机到网络(host-to-network)的连接。
  CHAP(Challenge Handshake Authentication Protocol)和PAP(Password Authentication Protocol) (PAP)通常被用于在PPP封装的串行线路上提供安全性认证。使用CHAP和PAP认证,每个路由器通过名字来识别,可以防止未经授权的访问。
  CHAP和PAP在RFC 1334上有详细的说明。
  A. 有关命令
  端口设置
  任务 命令
  设置PPP封装 encapsulation ppp1
  设置认证方法 ppp authentication {chap | chap pap | pap chap | pap}
  指定口令 username name password secret
  设置DCE端线路速度 clockrate speed
  注:1、要使用CHAP/PAP必须使用PPP封装。在与非Cisco路由器连接时,一般采用PPP封装,其它厂家路由器一般不支持Cisco的HDLC封装协议。
  2. 举例
  路由器Router1和Router2的S0口均封装PPP协议,采用CHAP做认证,在Router1中应建立一个用户,以对端路由器主机名作为用户名,即用户名应为router2。同时在Router2中应建立一个用户,以对端路由器主机名作为用户名,即用户名应为router1。所建的这两用户的password必须相同。
  设置如下:
  Router1:
  hostname router1
  username router2 password xxx
  interface Serial0
  ip address 192.200.10.1 255.255.255.0
  clockrate 1000000
  ppp authentication chap
  !
  Router2:
  hostname router2
  username router1 password xxx
  interface Serial0
  ip address 192.200.10.2 255.255.255.0
  ppp authentication chap
  7、广域网配置实例
  DDR Example
  Dial Backup Example
  Configure subinterface Example

  Frame>  Channelized E1 Interface Example
  X.25 Example
  DDR Example
  例:
  Configuration for RouterA:
  ip route 131.108.29.0 131.108.126.2
  ip route 131.108.1.0 131.108.126.2
  dialer-list 1 protocol ip permit
  dialer-list 1 protocol ipx deny
  !
  interface serial 0
  ip address 131.108.126.1 255.255.255.0
  dialer in-band
  dialer-group 1
  !
  dialer map ip 131.108.126.2 5551234
  !

  dialer>  Dial Backup Example
  A)同步V.25 bits方式
  Configuration for RouterA:
  interface Serial0:0
  backup delay 0 10
  backup interface Serial10
  ip address 16.217.30.2 255.255.255.252
  !
  interface Serial10
  ip address 16.30.16.81 255.255.255.0
  encapsulation ppp
  dialer in-band
  dialer string 8292
  dialer-group 1
  pulse-time 1
  !
  dialer-list 1 protocol ip permit
  B)辅助口作拨号备份
  Configuration for RouterA:
  chat-script MYDIAL "" "atdt 8292" TIMEOUT 60 "CONNECT"
  !
  interface Serial0
  backup delay 0 0
  backup interface Async1
  ip address 16.3.1.1 255.255.255.0
  encapsulation ppp
  !
  interface Async1
  ip address 16.3.2.1 255.255.255.0
  encapsulation ppp
  keepalive 9
  async default routing
  async dynamic address
  async dynamic routing
  async mode dedicated
  dialer in-band
  dialer string 8292
  dialer-group 1
  !
  dialer-list 1 protocol ip permit
  !
  line aux 0
  script dialer MYDIAL
  modem InOut
  transport output none
  stopbits 1
  flowcontrol hardware
  speed 9600

  Subinterface Example(Frame>  Configuration for RouterA:
  interface serial 0
  encapsulation frame-relay
  interface s 0.1 multipoint
  ip address 11.10.11.1 255.255.255.0
  frame-relay interface-dlci 41
  frame-relay interface-dlci 42
  Configuration for RouterC:
  interface serial 0
  encapsulation frame-relay
  interface s 0.1 point-to-point
  ip address 11.10.16.2 255.255.255.0
  frame-relay interface-dlci 46
  Configuration for RouterB:
  interface serial 0
  encapsulation frame-relay
  interface s 0.1 multipoint
  ip address 11.10.11.3 255.255.255.0
  frame-relay interface-dlci 43
  frame-relay interface-dlci 44
  !
  interface s 0.2 point-to-point
  ip address 11.10.13.1 255.255.255.0
  frame-relay interface-dlci 48

  Frame>  Configuration for RouterA:
  frame-relay switching
  !
  int s 0
  no ip address
  frame-relay encapsulation
  frame-relay route 167 tun0 43
  frame-relay intf-type dce
  !
  int s 1
  ip address 131.108.100.1 255.255.255.0
  !
  int tu 0
  tunnel source serial 1
  tunnel destination 131.108.13.2
  Configuration for RouterB:
  frame-relay switching
  !
  int s 0
  no ip address
  frame-relay encapsulation
  frame-relay route 9 tun0 43
  frame-relay intf-type dce
  !
  int s 1
  ip address 131.108.13.2 255.255.255.0
  !
  int tu 0
  tunnel source serial 1
  tunnel destination 131.108.100.1
  Channelized E1 Interface Example
  假设是7500系列路由器,E1接口(MIP板)在插槽4上面.一个channel-group可对应多个时间槽,本例中serial4/0:1有5*64Kbps的数率. 
  Configuration for Router:
  controller E1 0
  framing NO-CRC4
  channel-group 0 timeslots 1
  channel-group 1 timeslots 2,7-9,20 speed 64
  !
  interface Serial4/0:0
  ip address 16.217.30.2 255.255.255.252
  encapsulation ppp
  !
  interface Serial4/0:1
  ip address 16.205.30.5 255.255.255.252
  X.25 Example
  在配置X.25时,为减少路由交换引起的呼叫,通常用静态路由.而当一对多情况下,
  不在一个子网中用subinterface配置.
  Configuration for Router:
  interface serial 0
  ip address 131.108.100.1 255.255.255.0
  encapsulation x25
  x25 address 041673226839
  x25 htc 16
  x25 map ip 131.108.100.2 041675222222
  int s 0.1
  ip address 131.108.101.1 255.255.255.0
  x25 map ip 131.108.101.2 041674222222
  !
  ip route 131.108.100.0 255.255.255.0 131.108.100.2
  ip route 131.108.101.0 255.255.255.0 131.108.101.2
页: [1]
查看完整版本: CISCO配置命令大全(3)