ME60 双栈计费不一致

发布时间:  2016-09-26 浏览次数:  277 下载次数:  0
问题描述

设备型号:ME60-X8

设备版本:V600R008C10SPC300

拓扑图:


 

配置脚本

user-group xmunet
 radius-server group test
 radius-server authentication 172.16.0.131 1812 weight 0
 radius-server authentication 172.16.0.136 1812 weight 1
 radius-server accounting 172.16.0.131 1813 weight 0
 radius-server accounting 172.16.0.136 1813 weight 1
 radius-server shared-key-cipher %$%$BZ%oD^"&[W"`Al:*JA1+C0,i%$%$
ip pool pool2 bas local
 gateway 10.20.64.1 255.255.192.0
 section 0 10.20.64.2 10.20.127.254
 dns-server 210.34.0.14 210.34.0.18
#
ipv6 prefix pre1 local
 prefix 2001:DA8:E800:7146::/64
#
ipv6 pool ipv6 bas local
 prefix pre1
aaa
 authentication-scheme test-auth1
 accounting-scheme test-acct1
  accounting interim interval 10 traffic hash
  accounting send-update
domain xmunet
  authentication-scheme test-auth1
  accounting-scheme test-acct1
  ip-pool pool2
  ipv6-pool ipv6
  radius-server group test
  accounting-start-delay 10 online user-type hybrid-access ppp
  user-group xmunet
interface GigabitEthernet4/0/1.1
 pppoe-server bind Virtual-Template 1
 ipv6 enable
 ipv6 address auto link-local            
 user-vlan 20 21 qinq 101
 bas
 #
  access-type layer2-subscriber default-domain authentication xmunet
  authentication-method ppp web

 

处理过程

在ME60上trace了一下用户的信息

 

1、用户认证后开始协商IP地址:

Aug 19 2016 17:19:56.960 FJFZ-MB-CMNET-BRAS01-JS-ME60 BTRC_DebugInfo: [objectID=1][slotID=0][RADIUS]

[user info:

  MAC Address    : 201A-0687-9928

  IP Address     : 255.255.255.255

  Interface      : Eth-Trunk6.4

  PE VLAN ID     : 2869

  CE VLAN ID     : 2384

  USERNAME       : 17805952790@fzlan]

[trace info:

[RDS(Evt):] Send a msg(Auth accept)]

 

 

 

2、终端首先发送了IPv6的协商报文:

Aug 19 2016 17:19:56.960 FJFZ-MB-CMNET-BRAS01-JS-ME60 BTRC_DebugInfo: [objectID=1][slotID=4][PPP]

[user info:

  MAC Address    : 201A-0687-9928

  IP Address     : 111.142.128.204

  IPv6 Address   : ::221A:618:3287:9928

  Interface      : Eth-Trunk6.4

  PE VLAN ID     : 2869

  CE VLAN ID     : 2384

  USERNAME       : 17805952790

  Access Mode    : PPPoE ]

[trace info:Received ip6cp negotiation packet in ip6cp negotiation phase-----收到IPv6的协商报文

        ff 03 80 57 01 05 00 0e 01 0a e4 fb 82 2d f1 89

        5b e1 ]

 

3、获取IPv6报文成功后向radius发送计费开始报文:

Aug 19 2016 17:19:56.960 FJFZ-MB-CMNET-BRAS01-JS-ME60 BTRC_DebugInfo: [objectID=1][slotID=0][RADIUS]

[user info:

  MAC Address    : 201A-0687-9928

  IP Address     : 255.255.255.255

  Interface      : Eth-Trunk6.4

  PE VLAN ID     : 2869

  CE VLAN ID     : 2384

  USERNAME       : 17805952790@fzlan]

[trace info:

  Radius Sent a Packet

  Server Template: 3

  Server IP   : 112.5.186.34

  Vpn-Instance: -

  NAS Port    : 1813

  Protocol: Standard

  Code    : Account request

  Len     : 444

  ID      : 72

  [User-Name(1)                       ] [13] [17805952790]

  [NAS-Port(5)                        ] [6 ] [2259900752]

  [NAS-IP-Address(4)                  ] [6 ] [218.207.223.238]

  [Filter-Id(11)                      ] [13] [daa-default]

  [NAS-Identifier(32)                 ] [30] [FJFZ-MB-CMNET-BRAS01-JS-ME60]

 [Acct-Status-Type(40)               ] [6 ] [1]-------计费开始报文

  [Acct-Delay-Time(41)                ] [6 ] [0]

  [Acct-Session-Id(44)                ] [35] [FJFZ-MB042062869023842ad518156143]

  [Acct-Authentic(45)                 ] [6 ] [1]

  [Event-Timestamp(55)                ] [6 ] [1471598396]

  [NAS-Port-Type(61)                  ] [6 ] [15]

  [Calling-Station-Id(31)             ] [19] [20:1a:06:87:99:28]

  [NAS-Port-Id(87)                    ] [51] [slot=4;subslot=2;port=6;vlanid=2384;vlanid2=2869;]

  [Framed-Interface-Id(96)            ] [10] [e4fb822df1895be1]-------IPv6相关属性

  [Framed-IPv6-Prefix(97)             ] [20] [004020010da8e800e4f30000000000000000]

  [Service-Type(6)                    ] [6 ] [2]

  [Framed-Protocol(7)                 ] [6 ] [1]

  [Connect-Info(77)                   ] [10] [20480000]

  [Acct-Link-Count(51)                ] [6 ] [0]

  [Idle-Timeout(28)                   ] [6 ] [0]

  [Session-Timeout(27)                ] [6 ] [604800]

  [HW-IP-Host-Address(Huawei-60)      ] [35] [255.255.255.255 20:1a:06:87:99:28]

  [HW-Input-Peak-Information-Rate(Huawei-3)] [6 ] [20480000]

  [HW-Input-Committed-Information-Rate(Huawei-2)] [6 ] [20480000]

  [HW-Output-Peak-Information-Rate(Huawei-6)] [6 ] [20480000]

  [HW-Output-Committed-Information-Rate(Huawei-5)] [6 ] [20480000]

  [HW-Priority(Huawei-22)             ] [6 ] [15]

  [HW-Connect-ID(Huawei-26)           ] [6 ] [156143]

  [HW-Domain-Name(Huawei-138)         ] [7 ] [fzlan]

  [HW-Accounting-Level(Huawei-84)     ] [6 ] [0]

  [HW-Up-Priority(Huawei-61)          ] [6 ] [15]

  [HW-Down-Priority(Huawei-62)        ] [6 ] [15]

  [HW-User-Mac(Huawei-153)            ] [19] [20:1a:06:87:99:28]

  [HW-Acct-Update-Address(Huawei-159) ] [6 ] [0]------稍后会更新IPv4报文,这个属性会变成1

  [HW-Input-Committed-Burst-Size(Huawei-1)] [6 ] [30638080]

  [HW-Output-Committed-Burst-Size(Huawei-4)] [6 ] [30638080]

  [HW-Input-Peak-Burst-Size(Huawei-77)] [6 ] [30638080]

  [HW-Output-Peak-Burst-Size(Huawei-78)] [6 ] [30638080]]

 

4IPv6计费开始后,终端发送ipv4的协商报文,开始协商IPv4地址:

Aug 19 2016 17:19:57.10 FJFZ-MB-CMNET-BRAS01-JS-ME60 BTRC_DebugInfo: [objectID=1][slotID=4][PPP]

[user info:

  MAC Address    : 201A-0687-9928

  IP Address     : 111.142.128.204

  IPv6 Address   : ::E4FB:822D:F189:5BE1

  Interface      : Eth-Trunk6.4

  PE VLAN ID     : 2869

  CE VLAN ID     : 2384

  USERNAME       : 17805952790

  Access Mode    : PPPoE ]

[trace info:Received ip4cp negotiation packet in ip4cp negotiation phase----终端发送IPv4的协商报文

        ff 03 80 21 01 08 00 16 03 06 00 00 00 00 81 06

        00 00 00 00 83 06 00 00 00 00 ]

 

5IPv4地址协商完之后,更新计费报文,上报刚刚获取到的IPv4地址:

Aug 19 2016 17:19:59.60 FJFZ-MB-CMNET-BRAS01-JS-ME60 BTRC_DebugInfo: [objectID=1][slotID=0][RADIUS]

[user info:

  MAC Address    : 201A-0687-9928

  IP Address     : 111.142.128.204

  Interface      : Eth-Trunk6.4

  PE VLAN ID     : 2869

  CE VLAN ID     : 2384

  USERNAME       : 17805952790@fzlan]

[trace info:

  Radius Sent a Packet

  Server Template: 3

  Server IP   : 112.5.186.34

  Vpn-Instance: -

  NAS Port    : 1813

  Protocol: Standard

  Code    : Account request

  Len     : 518

  ID      : 38

  [User-Name(1)                       ] [13] [17805952790]

  [NAS-Port(5)                        ] [6 ] [2259900752]

  [NAS-IP-Address(4)                  ] [6 ] [218.207.223.238]

 [Framed-IP-Address(8)               ] [6 ] [111.142.128.204]------这时候终端已经获取到IPv4的地址,上报该地址

  [Filter-Id(11)                      ] [13] [daa-default]

  [NAS-Identifier(32)                 ] [30] [FJFZ-MB-CMNET-BRAS01-JS-ME60]

  [Acct-Status-Type(40)               ] [6 ] [3]-----计费报文的类型为计费更新报文。

  [Acct-Delay-Time(41)                ] [6 ] [0]

  [Acct-Input-Octets(42)              ] [6 ] [0]

  [Acct-Output-Octets(43)             ] [6 ] [0]

  [Acct-Session-Id(44)                ] [35] [FJFZ-MB042062869023842ad518156143]

  [Acct-Authentic(45)                 ] [6 ] [1]

  [Acct-Session-Time(46)              ] [6 ] [2]

  [Acct-Input-Packets(47)             ] [6 ] [0]

  [Acct-Output-Packets(48)            ] [6 ] [0]

  [Acct-Input-Gigawords(52)           ] [6 ] [0]

  [Acct-Output-Gigawords(53)          ] [6 ] [0]

  [Event-Timestamp(55)                ] [6 ] [1471598398]

  [NAS-Port-Type(61)                  ] [6 ] [15]

  [Calling-Station-Id(31)             ] [19] [20:1a:06:87:99:28]

  [NAS-Port-Id(87)                    ] [51] [slot=4;subslot=2;port=6;vlanid=2384;vlanid2=2869;]

  [Framed-Interface-Id(96)            ] [10] [e4fb822df1895be1]

  [Framed-IPv6-Prefix(97)             ] [20] [004020010da8e800e4f30000000000000000]

  [Service-Type(6)                    ] [6 ] [2]

  [Framed-Protocol(7)                 ] [6 ] [1]

  [Acct-Link-Count(51)                ] [6 ] [0]

  [Idle-Timeout(28)                   ] [6 ] [0]

  [Session-Timeout(27)                ] [6 ] [604800]

  [HW-IP-Host-Address(Huawei-60)      ] [35] [111.142.128.204 20:1a:06:87:99:28]

  [HW-Input-Peak-Information-Rate(Huawei-3)] [6 ] [20480000]

  [HW-Input-Committed-Information-Rate(Huawei-2)] [6 ] [20480000]

  [HW-Output-Peak-Information-Rate(Huawei-6)] [6 ] [20480000]

  [HW-Output-Committed-Information-Rate(Huawei-5)] [6 ] [20480000]

  [HW-Priority(Huawei-22)             ] [6 ] [15]

  [HW-Connect-ID(Huawei-26)           ] [6 ] [156143]

  [HW-Domain-Name(Huawei-138)         ] [7 ] [fzlan]

  [HW-Accounting-Level(Huawei-84)     ] [6 ] [0]

  [HW-Up-Priority(Huawei-61)          ] [6 ] [15]

  [HW-Down-Priority(Huawei-62)        ] [6 ] [15]

  [HW-Acct-ipv6-Input-Octets(Huawei-144)] [6 ] [0]

  [HW-Acct-ipv6-Output-Octets(Huawei-145)] [6 ] [0]

  [HW-Acct-ipv6-Input-Packets(Huawei-146)] [6 ] [0]

  [HW-Acct-ipv6-Output-Packets(Huawei-147)] [6 ] [0]

  [HW-Acct-ipv6-Input-Gigawords(Huawei-148)] [6 ] [0]

  [HW-Acct-ipv6-Output-Gigawords(Huawei-149)] [6 ] [0]

  [HW-User-Mac(Huawei-153)            ] [19] [20:1a:06:87:99:28]

  [HW-Acct-Update-Address(Huawei-159) ] [6 ] [1]-------由于是在更新IPv4报文,所以该标志位置1

  [HW-Input-Committed-Burst-Size(Huawei-1)] [6 ] [30638080]

  [HW-Output-Committed-Burst-Size(Huawei-4)] [6 ] [30638080]

  [HW-Input-Peak-Burst-Size(Huawei-77)] [6 ] [30638080]

  [HW-Output-Peak-Burst-Size(Huawei-78)] [6 ] [30638080]]

终端首先获得IPV6地址后发送计费开始报文,该报文未包含IPV4地址[HW-Acct-Update-Address(Huawei-159) ] [6 ] [0]0表示没有;之后终端会发送IPV4的协商报文,用来获取IPV4地址,获取地址后开始发送计费更新报文,标准协议规定IPV4地址在计费更新报文中,由计费更新报文上报该IPV4地址;[HW-Acct-Update-Address(Huawei-159) ] [6 ] [1]-----地址更新中ME60也是这么做的(与yaxin服务器已实现);但是shenlan服务器是在计费开始报文中取地址的,而不是在计费更新报文中取IPV4地址,所以导致radius上的IPV40.0.0.0,导致IPV4计费异常,建议shenlan服务器侧也按照标准协议来实现,已保证客户业务的正常运行。

 

 

根因

对端的radius服务器无法识别计费更新报文Huawei-159,进而radius上用户的ipv4地址为0.0.0.0

radius记录

 19720132203408 0.0.0.0 b8:88:e3:fa:8d:6e 50.05M 4.39M  2016-08-24 10:54:43 xmunet 30012125  2001:da8:e800:7146:a419:f72a:e3aa:8e54
 19720132203037 0.0.0.0  20:89:84:e9:bd:c2 4.50M 1.20M  2016-08-24 10:54:03 xmunet 30022378  2001:da8:e800:7146:4c9c:74ae:90d5:4178
 19720132203131 0.0.0.0 ac:22:0b:6e:3d:59 121.45M 5.88M  2016-08-24 10:53:03 xmunet 30012353  2001:da8:e800:7146:7822:757d:4622:f134
 19720132203166 0.0.0.0  5c:f9:dd:62:a4:c0 30.64M 3.63M  2016-08-24 10:41:01 xmunet 30012307  2001:da8:e800:7146:d82f:3cf7:e27f:c149

解决方案
shenlan服务器侧也按照标准协议来实现,已保证客户业务的正常运行

END