现在情况是PPP的LCP和PAP认证均完成,但IPCP请求IP地址还有问题
在设计程序连接数据链路层,GPRS用联通卡取得GPRS服务,通过ppp协议建立链路的时候,到了NCP协议处时,开始收到0xco,0c23,0c02,0x00,0x00,0x05,0x00,pap的验证通过,后收到0x80,0x21,0x01,0x00,0x00,0x04,的ppp报文,很是奇怪,没有给任何ip方面的信息,收到报文后,回馈一个请求ip地址的报文,马上就收到了链路终止报文0xff,0x03,0xc0,0x21,0x05,0x00,0x00,0x04,很是郁闷不知道问题出在那,下面是链路建立过程
0xff,0x03,0xc0,0x21,0x01,0x00,0x00,0x12,0x02,0x06,0x00,0x0a,0x00,0x00,0x03,0x04,0xc0,0x23,0x07,0x02,0x08,0x02开始接收到得报文,发送确认报文为
0xff,0x03,0xc0,0x21,0x02,0x00,0x00,0x12,0x02,0x06,0x00,0x0a,0x00,0x00,0x03,0x04,0xc0,0x23,0x07,0x02,0x08,0x02
在发送自己的请求报文,和联通给我的报文一致,接受到得报文和我发给联通的报文一致,
接着发送了PAP报文,就收到了上面的接受报文0Xco,0c23,0c02,0x00,0x00,0x05,0x00,马上又收到了NCP报文了
不过没有任何信息,及0x80,0x21,0x01,0x00,0x00,0x04,很是郁闷痛苦了!
直接被踢下来了
[解决办法]
是否因为红色部分引起的?
0xff,0x03,0xc0,0x21,0x01,0x00,0x00,0x12,0x02,0x06,0x00,0x0a,0x00,0x00,0x03,0x04,0xc0,0x23,0x07,0x02,0x08,0x02开始接收到得报文,发送确认报文为
0xff,0x03,0xc0,0x21,0x02,0x00,0x00,0x12,0x02,0x06,0x00,0x0a,0x00,0x00,0x03,0x04,0xc0,0x23,0x07,0x02,0x08,0x02