[Kea-users] Assigning IP to Cisco Switch

Marcin Siodelski marcin at isc.org
Wed Sep 27 06:46:26 UTC 2017


On 08.09.2017 14:08, Gokulakrishnan Gopalakrishnan wrote:
> Hi
> I'm migrating from dhcpd to Kea in assigning IP to Nexus 3K Cisco
> <https://www.cisco.com/c/en/us/products/collateral/switches/nexus-5000-series-switches/white_paper_c11-522337.html>
> Switches. I was able to assign IP using dhcpd but I'm facing issues with
> Kea. I've given below the dhcpd.conf(working) and kea.conf(not working).
> Please let me know where I'm doing wrong
> 
> *dhcpd.conf*
> 
> not authoritative;
> 
> option routers 192.216.22.129;
> 
> next-server 192.253.130.210;
> 
> subnet 192.250.226.208 netmask 255.255.255.248 {
> 
> class "Cisco-3k-v6" {
> 
>       match if substring(option vendor-class-identifier, 0, 22) = "Cisco
> N3K-C3172TQ-10GT";
> 
>        option bootfile-name "poap_script_ops_6.0.2.U5.1.py
> <http://poap_script_ops_6.0.2.U5.1.py>";
> 
>  }
> 
>   default-lease-time 3600;
> 
>   max-lease-time 3600;
> 
>   option domain-name “example.net <http://example.net>";
> 
>   option routers 192.250.226.209;
> 
>   option domain-name-servers 192.253.130.210;
> 
>   option tftp-server-name "192.253.130.210";
> 
>   pool {
> 
>     allow members of "Cisco-3k-v6";
> 
>     range 192.250.226.212 192.250.226.212;  }}
> 
> *Kea.conf*
> 
> "valid-lifetime": 3600,
> 
> "next-server":"192.253.130.210",
> 
> "subnet4": [ {
> 
>         "pools" : [{"pool": "192.250.226.212 - 192.250.226.212"}],
> 
>         "subnet" : "192.250.226.208/29 <http://192.250.226.208/29>",
> 
>         "option-data" : [
> 
>                 {"name" : "routers",
> 
>                 "data" : "192.250.226.209"},
> 
>                 {"name":"boot-file-name",
> 
>                 "data":"poap_script_ops_6.0.2.U5.1.py
> <http://poap_script_ops_6.0.2.U5.1.py>"},
> 
>                 {"name":"tftp-server-name",
> 
>                 "data" : "192.253.130.210"},
> 
>                 { "name":"host-name",
> 
>                 "data" : "example.net <http://example.net>"},
> 
>                 {"name":"domain-name-servers",
> 
>                 "data" : "192.253.130.210"}
> 
>         ]}]},
> 
> 
> 


It is really hard to say what is wrong without having any log output
stating the reasons for not assigning an IP address or dropping client's
packet.

You're not saying whether it is a configuration with a relay or directly
connected clients. Usually, for a relayed traffic you'd specify a
"relay" parameter for a subnet to indicate that your subnet should be
selected for assignments when the specified relay (giaddr) is forwarding
requests to the server. If this is a directly connected client, you'd
specify an "interface" parameter that indicates that for the particular
local (server's) interface the particular subnet should be selected.

The following section of the user guide may be helpful for you:

http://kea.isc.org/docs/kea-guide.html#dhcp4-subnet-selection

although, now I see that this section is not giving examples of the
"interface" parameter specification for a subnet. So, here it is:

"Dhcp4": {
    "subnet4" [
        {
            "subnet": "10.0.0.0/8",
            ....
            "interface": "eth0" // eth0 is a name of the local interface
        }
    ]
}


For the relayed traffic use "relay" parameter instead as described in
the guide.

Marcin Siodelski
ISC



More information about the Kea-users mailing list