[Kea-users] Problem receive IP

Suporte2 - TVC Tubarão suporte2 at tvc.tv.br
Thu Apr 14 19:25:06 UTC 2016


In my test lab, using a network cable modem, the DEBUG dhcp get the
application packet, it does the processing package and return to the CMTS.
At the CMTS, in debug mode, no receipt of this package. Running tcpdump in
the dhcp server, has the record of sending this package. The cable modem log
accuses be expecting record in DHCP.

Can someone help me?

 

Config file Kea (kea.conf)

 

# This is a basic configuration for the Kea DHCPv4 and DHCPv6 servers.

# Subnet declarations are commented out and no interfaces are listed.

# Therefore, the servers will not listen or respond to any queries.

# The basic configuration must be extended to specify interfaces on

# which the servers should listen. Also, subnets and options must be

# declared.

{

 

# DHCPv4 configuration starts here.

"Dhcp4":

{

# Add names of interfaces to listen on.

  "interfaces-config": {

    "interfaces": [ "ens192" ],

    "dhcp-socket-type": "raw"

  },

 

# Use Memfile lease database backend to store leases in a CSV file.

#  "lease-database": {

#    "type": "mysql",

#    "host": "localhost",

#    "user": "root",

#    "password": "********",

#    "name": "kea"

#  },

"lease-database": {

        "type": "memfile",

        "persist": true,

        "name": "/dhcp4.leases"

    },

    "match-client-id": true,

# Setup reclamation of the expired leases and leases affinity.

# Expired leases will be reclaimed every 10 seconds. Every 25

# seconds reclaimed leases, which have expired more than 3600

# seconds ago, will be removed. The limits for leases reclamation

# are 100 leases or 250 ms for a single cycle. A warning message

# will be logged if there are still expired leases in the

# database after 5 consecutive reclamation cycles.

  "expired-leases-processing": {

    "reclaim-timer-wait-time": 10,

    "flush-reclaimed-timer-wait-time": 25,

    "hold-reclaimed-time": 3600,

    "max-reclaim-leases": 100,

    "max-reclaim-time": 250,

    "unwarned-reclaim-cycles": 5

  },

 

# Global (inherited by all subnets) lease lifetime is mandatory parameter.

  "valid-lifetime": 4000,

  "echo-client-id": false,

  "decline-probation-period": 3600,

# Below an example of the simple subnet declaration. Uncomment to

# enable it. This is a list, denoted with [ ], of structure, denoted

# with { }. Each structure describes a single subnet and may have

# several parameters. One of those parameters is "pools" that is

# also a list of structures.

  "client-classes": [

        {

            "name": "docsis",

            "test": "substring(option[60].hex,0,9) == 'docsis2.0'"

        },

        ],

  "subnet4": [

  {    

  "subnet": "10.250.0.0/24",

       "pools": [ { "pool": "10.250.0.2 - 10.250.0.255" } ] ,

       "client-class": "docsis",

        "relay": {

                "ip-address": "10.250.0.1"

            },

        "reservations": [

            {

                "hw-address": "00:23:ed:ad:95:08",

                "ip-address": "10.250.0.200"

            }

        ],            

        "next-server": "10.250.0.1",

        "option-data":[

       {

         "name": "boot-file-name",

         "data": "cm_mta_5121_10m.bin"

       },

       {

         "name": "time-offset",

         "data": "-10800"

       },

       {

         "name": "time-servers",

         "data": "172.18.1.54"

       },

       {

         "name": "domain-name-servers",

         "data": "xxx.xxx.xxx.xxx"

       },

       {

         "name": "routers",

         "data": "100.250.0.1"

       },

       {

         "name": "tftp-server-name",

         "data": "172.18.1.54"

       },

       {

         "name": "log-servers",

         "data": "172.18.1.54"

       },

     ]

       },

      {

            "subnet": "10.251.0.1/24",

            "pools": [ { "pool": "10.251.0.2 - 10.251.0.255" } ],

            "client-class": "CPE",

            "relay": {

                "ip-address": "10.251.0.1"

            }

        }

      

  ]

},

 

# DHCPv6 configuration starts here.

"Dhcp6":

{

# Add names of interfaces to listen on.

  "interfaces-config": {

    "interfaces": [ "ens192" ]

  },

 

# Use Memfile lease database backend to store leases in a CSV file.

  "lease-database": {

    "type": "mysql",

    "host": "localhost",

    "user": "root",

    "password": "**********",

    "name": "kea"

  },

 

# Setup reclamation of the expired leases and leases affinity.

# Expired leases will be reclaimed every 10 seconds. Every 25

# seconds reclaimed leases, which have expired more than 3600

# seconds ago, will be removed. The limits for leases reclamation

# are 100 leases or 250 ms for a single cycle. A warning message

# will be logged if there are still expired leases in the

# database after 5 consecutive reclamation cycles.

  "expired-leases-processing": {

    "reclaim-timer-wait-time": 10,

    "flush-reclaimed-timer-wait-time": 25,

    "hold-reclaimed-time": 3600,

    "max-reclaim-leases": 100,

    "max-reclaim-time": 250,

    "unwarned-reclaim-cycles": 5

  },

 

# Addresses will be assigned with preferred and valid lifetimes

# being 3000 and 4000, respectively. Client is told to start

# renewing after 1000 seconds. If the server does not respond

# after 2000 seconds since the lease was granted, client is supposed

# to start REBIND procedure (emergency renewal that allows switching

# to a different server).

  "preferred-lifetime": 3000,

  "valid-lifetime": 4000,

  "renew-timer": 1000,

  "rebind-timer": 2000,

 

# The following list defines subnets. Uncomment to enable them.

  "subnet6": [

#  {    "subnet": "2001:db8:1::/64",

#       "pools": [ { "pool": "2001:db8:1::/80" } ] },

#  {    "subnet": "2001:db8:2::/64",

#       "pools": [ { "pool": "2001:db8:2::/80" } ] },

#  {    "subnet": "2001:db8:3::/64",

#       "pools": [ { "pool": "2001:db8:3::/80" } ] },

#  {    "subnet": "2001:db8:4::/64",

#       "pools": [ { "pool": "2001:db8:4::/80" } ] }

   ]

},

 

# DHCP DDNS configuration starts here.

"DhcpDdns":

{

  "ip-address": "127.0.0.1",

  "port": 53001,

  "tsig-keys": [],

  "forward-ddns" : {},

  "reverse-ddns" : {}

},

 

# Logging configuration starts here. It tells Kea servers to store

# all log messages (on severity INFO or more) in a file.

# debuglevel variable is used on DEBUG level only.

"Logging":

{

  "loggers": [

    {

      "name": "kea-dhcp4",

      "output_options": [

          {

            "output": "/usr/local/var/log/kea-dhcp4.log",

                                               "maxver": 8,

                                               "maxsize": 204800,

                                               "flush": true

          }

      ],

      "severity": "DEBUG",

      "debuglevel": 99

    },

    {

      "name": "kea-dhcp6",

      "output_options": [

          {

            "output": "/usr/local/var/log/kea-dhcp6.log"

          }

      ],

      "severity": "INFO",

      "debuglevel": 0

    },

    {

      "name": "kea-dhcp-ddns",

      "output_options": [

          {

            "output": "/usr/local/var/log/kea-ddns.log"

          }

      ],

      "severity": "INFO",

      "debuglevel": 0

    }

  ]

}

}

 

DEBUG file kea:

 

2016-04-14 16:09:19.222 DEBUG [kea-dhcp4.packets/29795] DHCP4_BUFFER_WAIT
waiting for next DHCPv4 packet with timeout 1000 ms

2016-04-14 16:09:20.571 DEBUG [kea-dhcp4.packets/29795]
DHCP4_BUFFER_RECEIVED received buffer from 10.250.0.1:68 to 172.18.1.54:67
over interface ens192

2016-04-14 16:09:20.571 DEBUG [kea-dhcp4.options/29795] DHCP4_BUFFER_UNPACK
parsing buffer received from 10.250.0.1 to 172.18.1.54 over interface ens192

2016-04-14 16:09:20.571 INFO  [kea-dhcp4.options/29795] EVAL_RESULT
Expression docsis evaluated to 1

2016-04-14 16:09:20.571 DEBUG [kea-dhcp4.dhcp4/29795] DHCP4_CLASS_ASSIGNED
[hwtype=1 00:23:ed:ad:95:08], cid=[01:00:23:ed:ad:95:08], tid=0x5c76374:
client packet has been assigned to the following class(es):
VENDOR_CLASS_docsis2.0:053501010102010203010104010105010106010107010f0801100
901000a01010b01180c01010d0200700e0200100f0101100400000004docsis 

2016-04-14 16:09:20.572 DEBUG [kea-dhcp4.packets/29795]
DHCP4_PACKET_RECEIVED [hwtype=1 00:23:ed:ad:95:08],
cid=[01:00:23:ed:ad:95:08], tid=0x5c76374: DHCPDISCOVER (type 1) received
from 10.250.0.1 to 172.18.1.54 on interface ens192

2016-04-14 16:09:20.572 DEBUG [kea-dhcp4.packets/29795] DHCP4_QUERY_DATA
[hwtype=1 00:23:ed:ad:95:08], cid=[01:00:23:ed:ad:95:08], tid=0x5c76374,
packet details: local_address=172.18.1.54:67, remote_adress=10.250.0.1:68,
msg_type=DHCPDISCOVER (1), transid=0x5c76374,

options:

  type=043, len=122:,

options:

    type=002, len=003: 45:43:4d

    type=003, len=008: 45:43:4d:3a:45:4d:54:41

    type=004, len=024:
31:39:32:36:36:34:39:32:30:35:30:30:30:37:39:36:30:36:30:32:30:30:34:35

    type=005, len=003: 31:2e:30

    type=006, len=030:
53:42:56:35:31:32:31:2d:53:49:50:2d:31:2e:30:2e:37:2d:53:43:4d:2d:30:35:2d:5
3:48:50:43:20

    type=007, len=003: 38:2e:35

    type=008, len=006: 30:30:32:30:34:30

    type=009, len=007: 53:42:56:35:31:32:31

    type=010, len=020:
4d:6f:74:6f:72:6f:6c:61:20:43:6f:72:70:6f:72:61:74:69:6f:6e

  type=053, len=001: 1 (uint8)

  type=055, len=008: 66(uint8) 67(uint8) 1(uint8) 3(uint8) 2(uint8) 4(uint8)
7(uint8) 122(uint8)

  type=057, len=002: 600 (uint16)

  type=060, len=120:
"docsis2.0:053501010102010203010104010105010106010107010f0801100901000a01010
b01180c01010d0200700e0200100f0101100400000004" (string)

  type=061, len=007: 01:00:23:ed:ad:95:08

  type=082, len=008:,

options:

    type=002, len=006: 00:23:ed:ad:95:08

2016-04-14 16:09:20.572 DEBUG [kea-dhcp4.packets/29795]
DHCP4_SUBNET_SELECTED [hwtype=1 00:23:ed:ad:95:08],
cid=[01:00:23:ed:ad:95:08], tid=0x5c76374: the subnet with ID 1 was selected
for client assignments

2016-04-14 16:09:20.572 DEBUG [kea-dhcp4.packets/29795] DHCP4_SUBNET_DATA
[hwtype=1 00:23:ed:ad:95:08], cid=[01:00:23:ed:ad:95:08], tid=0x5c76374: the
selected subnet details: 10.250.0.0/24

2016-04-14 16:09:20.572 DEBUG [kea-dhcp4.hosts/29795]
HOSTS_CFG_GET_ONE_SUBNET_ID_HWADDR_DUID get one host with IPv4 reservation
for subnet id 1, HWADDR hwtype=1 00:23:ed:ad:95:08, DUID
01:00:23:ed:ad:95:08

2016-04-14 16:09:20.572 DEBUG [kea-dhcp4.hosts/29795]
HOSTS_CFG_GET_ALL_HWADDR_DUID get all hosts with reservations for HWADDR
hwtype=1 00:23:ed:ad:95:08 and DUID 01:00:23:ed:ad:95:08

2016-04-14 16:09:20.572 DEBUG [kea-dhcp4.hosts/29795]
HOSTS_CFG_GET_ALL_IDENTIFIER get all hosts with reservations using
identifier: hwaddr=00:23:ed:ad:95:08

2016-04-14 16:09:20.572 DEBUG [kea-dhcp4.hosts/29795]
HOSTS_CFG_GET_ALL_IDENTIFIER_HOST using identifier:
hwaddr=00:23:ed:ad:95:08, found host: hwaddr=00:23:ed:ad:95:08
ipv4_subnet_id=1 hostname=(empty) ipv4_reservation=10.250.0.200
ipv6_reservations=(none)

2016-04-14 16:09:20.572 DEBUG [kea-dhcp4.hosts/29795]
HOSTS_CFG_GET_ALL_IDENTIFIER_COUNT using identifier
hwaddr=00:23:ed:ad:95:08, found 1 host(s)

2016-04-14 16:09:20.572 DEBUG [kea-dhcp4.hosts/29795]
HOSTS_CFG_GET_ALL_IDENTIFIER get all hosts with reservations using
identifier: duid=01:00:23:ed:ad:95:08

2016-04-14 16:09:20.572 DEBUG [kea-dhcp4.hosts/29795]
HOSTS_CFG_GET_ALL_IDENTIFIER_COUNT using identifier
duid=01:00:23:ed:ad:95:08, found 1 host(s)

2016-04-14 16:09:20.572 DEBUG [kea-dhcp4.hosts/29795]
HOSTS_CFG_GET_ONE_SUBNET_ID_HWADDR_DUID get one host with 1 reservation for
subnet id hwtype=1 00:23:ed:ad:95:08, HWADDR 01:00:23:ed:ad:95:08, DUID
hwaddr=00:23:ed:ad:95:08 ipv4_subnet_id=1 hostname=(empty)
ipv4_reservation=10.250.0.200 ipv6_reservations=(none)

2016-04-14 16:09:20.572 DEBUG [kea-dhcp4.dhcpsrv/29795]
DHCPSRV_MEMFILE_GET_SUBID_CLIENTID obtaining IPv4 lease for subnet ID 1 and
client ID 01:00:23:ed:ad:95:08

2016-04-14 16:09:20.572 DEBUG [kea-dhcp4.dhcpsrv/29795]
DHCPSRV_MEMFILE_GET_SUBID_HWADDR obtaining IPv4 lease for subnet ID 1 and
hardware address hwtype=1 00:23:ed:ad:95:08

2016-04-14 16:09:20.572 DEBUG [kea-dhcp4.alloc-engine/29795]
ALLOC_ENGINE_V4_DISCOVER_HR client [hwtype=1 00:23:ed:ad:95:08],
cid=[01:00:23:ed:ad:95:08], tid=0x5c76374 sending DHCPDISCOVER has
reservation for the address 10.250.0.200

2016-04-14 16:09:20.572 DEBUG [kea-dhcp4.dhcpsrv/29795]
DHCPSRV_MEMFILE_GET_ADDR4 obtaining IPv4 lease for address 10.250.0.200

2016-04-14 16:09:20.572 DEBUG [kea-dhcp4.dhcpsrv/29795]
DHCPSRV_MEMFILE_GET_ADDR4 obtaining IPv4 lease for address 10.250.0.200

2016-04-14 16:09:20.572 DEBUG [kea-dhcp4.leases/29795] DHCP4_LEASE_ADVERT
[hwtype=1 00:23:ed:ad:95:08], cid=[01:00:23:ed:ad:95:08], tid=0x5c76374:
lease 10.250.0.200 will be advertised

2016-04-14 16:09:20.572 DEBUG [kea-dhcp4.options/29795] DHCP4_PACKET_PACK
[hwtype=1 00:23:ed:ad:95:08], cid=[no info], tid=0x5c76374: preparing
on-wire format of the packet to be sent

2016-04-14 16:09:20.572 DEBUG [kea-dhcp4.packets/29795] DHCP4_PACKET_SEND
[hwtype=1 00:23:ed:ad:95:08], cid=[no info], tid=0x5c76374: trying to send
packet DHCPOFFER (type 2) from 172.18.1.54:67 to 10.250.0.1:67 on interface
ens192

2016-04-14 16:09:20.572 DEBUG [kea-dhcp4.packets/29795] DHCP4_RESPONSE_DATA
[hwtype=1 00:23:ed:ad:95:08], cid=[no info], tid=0x5c76374: responding with
packet DHCPOFFER (type 2), packet details: local_address=172.18.1.54:67,
remote_adress=10.250.0.1:67, msg_type=DHCPOFFER (2), transid=0x5c76374,

options:

  type=001, len=004: 4294967040 (uint32)

  type=002, len=004: -10800 (int32)

  type=003, len=004: 100.250.0.1

  type=004, len=004: 172.18.1.54

  type=006, len=004: xxx.xxx.xxx.xxx

  type=007, len=004: 172.18.1.54

  type=051, len=004: 4000 (uint32)

  type=053, len=001: 2 (uint8)

  type=054, len=004: 172.18.1.54

  type=066, len=011: "172.18.1.54" (string)

  type=067, len=019: "cm_mta_5121_10m.bin" (string)

  type=082, len=008:,

options:

    type=002, len=006: 00:23:ed:ad:95:08

2016-04-14 16:09:20.572 DEBUG [kea-dhcp4.packets/29795] DHCP4_BUFFER_WAIT
waiting for next DHCPv4 packet with timeout 1000 ms

 

 

tcpdump file:

 

    10.250.0.1.bootpc > dhcp-cmmta.bootps: [udp sum ok] BOOTP/DHCP, Request
from 00:23:ed:ad:95:08 (oui Unknown), length 610, hops 1, xid 0x5c76374,
Flags [Broadcast] (0x8000)

                  Gateway-IP 10.250.0.1

                  Client-Ethernet-Address 00:23:ed:ad:95:08 (oui Unknown)

                  Vendor-rfc1048 Extensions

                    Magic Cookie 0x63825363

                    DHCP-Message Option 53, length 1: Discover

                    MSZ Option 57, length 2: 600

                    Vendor-Class Option 60, length 120:
"docsis2.0:053501010102010203010104010105010106010107010f0801100901000a01010
b01180c01010d0200700e0200100f0101100400000004"

                    Parameter-Request Option 55, length 8: 

                      TFTP, BF, Subnet-Mask, Default-Gateway

                      Time-Zone, Time-Server, LOG, Option 122

                    Client-ID Option 61, length 7: ether 00:23:ed:ad:95:08

                    Vendor-Option Option 43, length 122:
2.3.69.67.77.3.8.69.67.77.58.69.77.84.65.5.3.49.46.48.6.30.83.66.86.53.49.50
.49.45.83.73.80.45.49.46.48.46.55.45.83.67.77.45.48.53.45.83.72.80.67.32.7.3
.56.46.53.8.6.48.48.50.48.52.48.9.7.83.66.86.53.49.50.49.10.20.77.111.116.11
1.114.111.108.97.32.67.111.114.112.111.114.97.116.105.111.110.4.24.49.57.50.
54.54.52.57.50.48.53.48.48.48.55.57.54.48.54.48.50.48.48.52.53

                    Agent-Information Option 82, length 8: 

                      Remote-ID SubOption 2, length 6: ^@#M-mM--M-^U^H

15:59:52.978075 IP (tos 0x10, ttl 128, id 0, offset 0, flags [DF], proto UDP
(17), length 364)

    dhcp-cmmta.bootps > 10.250.0.1.bootps: [udp sum ok] BOOTP/DHCP, Reply,
length 336, hops 1, xid 0x5c76374, Flags [none] (0x0000)

                  Your-IP 10.250.0.200

                  Server-IP 10.250.0.1

                  Gateway-IP 10.250.0.1

                  Client-Ethernet-Address 00:23:ed:ad:95:08 (oui Unknown)

                  Vendor-rfc1048 Extensions

                    Magic Cookie 0x63825363

                    Subnet-Mask Option 1, length 4: 255.255.255.0

                    Time-Zone Option 2, length 4: -10800

                    Default-Gateway Option 3, length 4: 100.250.0.1

                    Time-Server Option 4, length 4: dhcp-cmmta

                    Domain-Name-Server Option 6, length 4: ns2.tvc.tv.br

                    LOG Option 7, length 4: dhcp-cmmta

                    Lease-Time Option 51, length 4: 4000

                    DHCP-Message Option 53, length 1: Offer

                    Server-ID Option 54, length 4: dhcp-cmmta

                    TFTP Option 66, length 11: "172.18.1.54"

                    BF Option 67, length 19: "cm_mta_5121_10m.bin"

                    Agent-Information Option 82, length 8: 

                      Remote-ID SubOption 2, length 6: ^@#M-mM--M-^U^H



---
Este email foi escaneado pelo Avast antivírus.
https://www.avast.com/antivirus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/kea-users/attachments/20160414/75ee19b9/attachment-0001.html>


More information about the Kea-users mailing list