options.ttyS1  IP地址分配

配置PPP服务器端本地)IP地址和客户端远端)的IP地址

  1. /apps/etc/ppp >: cat options.ttyS1   
  2.  
  3. #Server_IP_address:Client_IP_address  
  4. 10.78.28.194:10.78.28.224  
  5.  
  6. chap和pap认证的帐号文件:  
  7. /apps/etc/ppp >: cat pap-secrets   
  8. # Secrets for authentication using  PAP  
  9.  
  10. #User           Server          Secret          IP Address  
  11. na_admin        *               123                   *  
  12.  
  13. /apps/etc/ppp >: cat chap-secrets   
  14. # Secrets for authentication using CHAP  
  15.  
  16. #User           Server          Secret          IP Address  
  17. na_admin        *               123                   * 


pppd启动拨号过程:

  1. /apps/etc/ppp >: pppd /dev/ttyS1  
  2.  
  3. OK  
  4. ATE0                //chat脚本的调试输出  
  5. OK  
  6.  
  7. RING  
  8.  
  9. CONNECTSerial connection established.  
  10. using channel 1  
  11. Using interface ppp0  
  12. Connect: ppp0 <--> /dev/ttyS1  
  13. rcvd [LCP ConfReq id=0x0 <asyncmap 0x0> <magic 0x58452c14> <pcomp> <accomp> <callback CBCP>]  
  14. Warning - secret file /etc/ppp/pap-secrets has world and/or group access  
  15. sent [LCP ConfReq id=0x1 <asyncmap 0x0> <auth pap> <magic 0xb701c04a> <pcomp> <accomp>]  
  16. sent [LCP ConfRej id=0x0 <callback CBCP>]  
  17. rcvd [LCP ConfAck id=0x1 <asyncmap 0x0> <auth pap> <magic 0xb701c04a> <pcomp> <accomp>]  
  18. rcvd [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x58452c14> <pcomp> <accomp>]  
  19. sent [LCP ConfAck id=0x1 <asyncmap 0x0> <magic 0x58452c14> <pcomp> <accomp>]  
  20. sent [LCP EchoReq id=0x0 magic=0xb701c04a]  
  21. rcvd [LCP code=0xc id=0x2 58 45 2c 14 4d 53 52 41 53 56 35 2e 31 30]  
  22. sent [LCP CodeRej id=0x2 0c 02 00 12 58 45 2c 14 4d 53 52 41 53 56 35 2e 31 30]  
  23. rcvd [LCP code=0xc id=0x3 58 45 2c 14 4d 53 52 41 53 2d 30 2d 4d 45 49 51 49 4e 50 43 30 31]  
  24. sent [LCP CodeRej id=0x3 0c 03 00 1a 58 45 2c 14 4d 53 52 41 53 2d 30 2d 4d 45 49 51 49 4e 50 43 30 31]  
  25. rcvd [PAP AuthReq id=0xc user="na_admin" password=<hidden>]  
  26. Warning - secret file /etc/ppp/pap-secrets has world and/or group access  
  27. sent [PAP AuthAck id=0xc "Login ok"]  
  28. PAP peer authentication succeeded for na_admin  
  29. sent [CCP ConfReq id=0x1 <deflate 15> <deflate(old#) 15> <bsd v1 15>]  
  30. sent [IPCP ConfReq id=0x1 <compress VJ 0f 01> <addr 10.78.28.194>]  
  31. rcvd [LCP EchoRep id=0x0 magic=0x58452c14]  
  32. rcvd [CCP ConfReq id=0x4 < 12 06 00 00 00 01>]  
  33. sent [CCP ConfRej id=0x4 < 12 06 00 00 00 01>]  
  34. rcvd [IPCP ConfReq id=0x5 <compress VJ 0f 01> <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-wins 0.0.0.0> <ms- 
  35.  
  36. dns3 0.0.0.0> <ms-wins 0.0.0.0>]  
  37. sent [IPCP ConfRej id=0x5 <ms-wins 0.0.0.0> <ms-wins 0.0.0.0>]  
  38. rcvd [CCP ConfRej id=0x1 <deflate 15> <deflate(old#) 15> <bsd v1 15>]  
  39. sent [CCP ConfReq id=0x2]  
  40. rcvd [IPCP ConfAck id=0x1 <compress VJ 0f 01> <addr 10.78.28.194>]  
  41. rcvd [CCP TermReq id=0x6"XE,\024\000<\315t\000\000\002\334"]  
  42. sent [CCP TermAck id=0x6]  
  43. rcvd [IPCP ConfReq id=0x7 <compress VJ 0f 01> <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns3 0.0.0.0>]  
  44. sent [IPCP ConfNak id=0x7 <addr 10.78.28.224> <ms-dns1 10.78.28.10> <ms-dns3 10.78.28.11>]  
  45. rcvd [IPCP ConfReq id=0x8 <compress VJ 0f 01> <addr 10.78.28.224> <ms-dns1 10.78.28.10> <ms-dns3   
  46.  
  47. 10.78.28.11>]  
  48. sent [IPCP ConfAck id=0x8 <compress VJ 0f 01> <addr 10.78.28.224> <ms-dns1 10.78.28.10> <ms-dns3   
  49.  
  50. 10.78.28.11>]  
  51. local  IP address 10.78.28.194  
  52. remote IP address 10.78.28.224 

测试

/apps/etc/ppp >: ping 10.78.28.224
PING 10.78.28.224 (10.78.28.224): 56 data bytes
64 bytes from 10.78.28.224: seq=0 ttl=64 time=194.570 ms
64 bytes from 10.78.28.224: seq=1 ttl=64 time=190.331 ms


相关内容