Hello All, I am trying to use the DHCP server coming with the systemd-networkd. I am trying to set the Gateway IP address different from the eth0/server ip address. but i am always getting in the dhcpclient the IP address of the eth0/server IP .
Below is the network file [Match] Name=eth0 [Network] Address=192.168.0.1/24 Gateway=192.168.0.2 DHCPServer=yes [DHCPServer] PoolOffset=112 PoolSize=16 EmitTimezone=false looking at the source code src/libsystemd-network/sd-dhcp-server.c if (server->emit_router) { r = dhcp_option_append(&packet->dhcp, req->max_optlen, &offset, 0, SD_DHCP_OPTION_ROUTER, 4, &server->address); if (r < 0) return r; } I see that it's appending SD_DHCP_OPTION_ROUTER with server->address, if my above understanding is correct, Is the dhcp server only designed to allocate gateway ip address same as the server IP address? or am I missing some configuration or it's a bug we need to fix ?
_______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/systemd-devel