1、客户端发送CODE_PP_DOMAIN_REQUSET报文给portal服务器,此时可以看到客户端发送给portal是服务器NAT后地址10.217.90.20
[2019-09-20
15:47:02] [DtlCmn] [1250] PortalPkt
Packet Type: [CODE_PP_DOMAIN_REQUEST]Client ---> Server/Bas
Head: Version =
0x2(Portal); HeadType = 0x6e; AuthType = 0; Rsvd = 0; SeriOno= 6085; ReqId =
0; UserIP = 10.222.22.71; UserPort = 0; ErrCode = 0; AttrNum = 2;
EX_ATTR_PRIVATE_IP_ADDRESS
= 10.222.22.71;
EX_ATTR_PUBLIC_IP_ADDRESS
= 10.222.22.71;
[2019-09-20
15:47:02] [Dbg] [1250] Portal sendAndReceivePkt: PKT to 10.217.90.20 and 50200. TimeOut is 5000
2、portal服务器回应CODE_PP_DOMAIN_RESPONES报文给客户端,注意此时在回应此报文时,报文使用EX_ATTR_PORTAL_SERVER_ADDR携带了portal服务器的真实的IP地址10.49.66.140。
[2019-09-20 15:47:02] [DtlCmn] [1250]
PortalPkt
Packet Type:
[CODE_PP_DOMAIN_RESPONES]Client
Head: Version =
0x2(Portal); HeadType = 0x6f; AuthType = 1; Rsvd = 0; SeriOno= 6085; ReqId0 =
0; ReqId1 = 0; UserIP = 10.222.22.71; UserPort = 0; ErrCode = 0; AttrNum = 26;
Attributes:
EX_ATTR_USER_ID = 8996123784895677117;
EX_ATTR_PORTAL_VERSION
= 2;
EX_ATTR_PROTOCAL_TYPE
= http;
EX_ATTR_LOGIN_LANGUAGE
= Dynamic;
EX_ATTR_NEED_NAME
= 1;
=
EX_ATTR_NAT_TYPE =
0
EX_ATTR_HANDSHAKE_DELAY
= 0;
EX_ATTR_HANDSHAKE_OVERTIME
= 9223372036854775807;
EX_ATTR_LOGIN_TIMEOUT
= 4000;
EX_ATTR_LOGOUT_TIMEOUT
= 8000;
EX_ATTR_DHCP_DELAY
= 3000;
EX_ATTR_DHCP_TIMES
= 3;
EX_ATTR_DEVICE_IP2FLAG
= 0;
EX_ATTR_PORTAL_SERVER_ADDR = 10.49.66.170;
EX_ATTR_PORTAL_SERVER_PORT
= 50200;
EX_ATTR_SERVER_TYPE_ID
= ZWWW,HLW;
EX_ATTR_SERVER_TYPE_DESC
= zwww,hlw;
EX_ATTR_ENCRYPT_FLAG
= 1;
3、客户端发送CODE_PP_LOGIN_REQUEST报文给PORTAL服务器,注意此时发送给的PORTAL服务器的IP地址是NAT前的IP地址(真实PORTAL服务器的IP地址)10.49.66.170,此IP地址就是从上个报文中携带过来的,可以看到发送此报文给PORTAL服务器的真实IP地址后,实际网络是不通的,PORTAL服务器一直没有回应此报文,导致认证失败。
[2019-09-20
15:47:02] [DtlCmn] [1250] PortalPkt
Packet Type: [CODE_PP_LOGIN_REQUEST]Client ---> Server/Bas
Head: Version =
0x2(Portal); HeadType = 0x64; AuthType = 1; Rsvd = 0; SeriOno= 6085; ReqId =
0; UserIP = 10.222.22.71; UserPort = 0; ErrCode = 0; AttrNum = 7;
[2019-09-20 15:47:03] [Dbg] [1250] Portal
sendAndReceivePkt: PKT to 10.49.66.170 and 50200. TimeOut is 4000
[2019-09-20 15:47:07] [Err] [1250] Portal
sendAndReceivePkt: recvfrom packets failed, ErrCode is: 10060.
[2019-09-20
15:47:07] [Err] [1250] Portal sendAndReceivePkt:An error occured while sending or receiving
packet.
[2019-09-20
15:47:07] [Err] [1250] Portal authentiction: Failed to send/receive a packet type=
CODE_PP_LOGIN_REQUEST
4、此时web界面认证是正常的,抓取此时终端和PORTAL服务器的交互报文,认证报文如下,可以看到整个认证报文,都是和NAT后的PORTAL服务器IP=10.217.90.20交互报文,这个IP对于客户端而言是可达的,所以报文交互正常,没有出现认证失败的问题。