Здравствуйте. Подскажите как распарсить данные Opt.82 поступающие на сервер в строковом формате? DHCP option 82 Huawei OLT MA5603T (GPON) Не получается распарсить ответ релея Huawei MA5603T, он выдает строковое значение VLAN и PON-порт (Circuit-ID).
Это TCP dump сервера: IP (tos 0x0, ttl 255, id 36385, offset 0, flags [none], proto UDP (17), length 369) x.x.x.3.67 > x.x.x.30.67: BOOTP/DHCP, Request from d4:ca:6d:58:c7:de, length 341, hops 1, xid 0x55455574, secs 2, Flags [Broadcast] Gateway-IP x.x.x.3 Client-Ethernet-Address d4:ca:6d:58:c7:de Vendor-rfc1048 Extensions Magic Cookie 0x63825363 DHCP-Message Option 53, length 1: Discover Parameter-Request Option 55, length 7: Subnet-Mask, Classless-Static-Route, Default-Gateway, Static-Route Domain-Name-Server, NTP, Option 138 Hostname Option 12, length 8: "MikroTik" Client-ID Option 61, length 7: ether d4:ca:6d:58:c7:de Agent-Information Option 82, length 39: Circuit-ID SubOption 1, length 23: 48575443AE25BD84/14/701 Remote-ID SubOption 2, length 12: 643E8CAC8882
В логах биллинга: 03-20/11:50:43 INFO [dhcpLstnr-p-10-t-8] AbstractInetDhcpProcessor2 - REQUEST: Message type: BOOT_REQUEST Dhcp message type: DHCP Discover{1} htype: 1, hlen: 6, hops: 1 xid: 1430607220, secs: 7, flags: 11111111111111111000000000000000 Client IP: 0.0.0.0 Your IP: 0.0.0.0 Server IP: 0.0.0.0 Relay IP: x.x.x.3 Client MAC: {D4CA6D58C7DE} Param request list{55}={1, 121, 3, 33, 6, 42, -118} Host name{12}={MikroTik} Client-ident.{61}={01D4CA6D58C7DE} Agent information{82}= sub{1}={343835373534343341453235424438342F31342F373031} sub{2}={363433453843414338383832}
03-20/11:50:43 DEBUG [dhcpLstnr-p-10-t-8] AbstractInetDhcpProcessor2 - OP_BOOT_REQUEST 03-20/11:50:43 DEBUG [dhcpLstnr-p-10-t-8] AbstractInetDhcpProcessor2 - Found device by giaddr id=13 03-20/11:50:43 DEBUG [dhcpLstnr-p-10-t-8] AbstractInetDhcpProcessor2 - Found subDevice by identifier id=29 03-20/11:50:43 DEBUG [dhcpLstnr-p-10-t-8] InetDhcpProcessor2 - DHCP_DISCOVER 03-20/11:50:43 DEBUG [dhcpLstnr-p-10-t-8] InetDhcpProcessor2 - request.giaddr= x.x.x.3, clientAddress=/x.x.x.3:67 03-20/11:50:43 INFO [dhcpLstnr-p-10-t-8] InetDhcpDevice - Search serv on deviceId: 29; 2; vlanId: 0 03-20/11:50:43 INFO [dhcpLstnr-p-10-t-8] InetDhcpProcessor2 - InetServ not found.
_________________ Сервер: вер. 7.1.1021 / 11.09.2018 13:02:44 os: Linux; java: Java HotSpot(TM) 64-Bit Server VM, v.1.8.0_73 inet: вер. 7.1.628 / 11.09.2018 13:02:53
|