Closed ppikh closed 2 years ago
Summary: Newly added configuration is not picked up immediately. And dhcp relay docker restart doesn't pick it up either. A full config reload will pick it up.
@kellyyeh is the configuration format correct? Do we need to add dhcp relay config to the vlan config instead of a separate configuration?
@yxieca The configuration format is correct. We want dhcp6relay configuration in DHCP_RELAY, configuration in VLAN config will not be picked up by dhcp6relay.
@ppikh You can use command "show dhcprelay_helper ipv6" to check if dhcpv6 server ip are added to dhcp6relay configuration. Restarting dhcp relay service is needed after changing dhcp6relay configuration.
Hi @kellyyeh Command "show dhcprelay_helper ipv6" shows that DHCP servers IPs are added to DHCP relay configuration. But if restart dhcp relay server - dhcp relay still does not work. Which command should we use for restart dhcp relay service without "config reload -y"?
Hi @ppikh "config reload -y" is required to change configuration for dhcp6relay. We will add implementation to allow in time config change for dhcp6relay in the near future.
Hi @ppikh "config reload -y" is required to change configuration for dhcp6relay. We will add implementation to allow in time config change for dhcp6relay in the near future.
Hi @ppikh, to correct and add on to this, one way to change dhcp6relay server IP is to make in memory change. You can use sonic-db-cli to change dhcpv6 server addresses in DHCP_RELAY table, then restart dhcp_relay service and the changes should take it effect.
Hi @kellyyeh
I tried sonic-db-cli using next scenario:
sonic-db-cli CONFIG_DB HSET "DHCP_RELAY|Vlan690" "dhcpv6_servers" "6900::2"
config save -y
Then I checked that DHCP settings applied:
root@r-spider-05:/home/admin# sonic-db-cli CONFIG_DB HGETALL "DHCP_RELAY|Vlan690"
{'dhcpv6_servers': '6900::2'}
and via: show dhcprelay_helper ipv6
Then I did restart for DHCP relay service:
systemctl restart dhcp_relay.service
Then tried to get IPv6 address from DHCPv6 client - but it was not successful. Packet was not forwarded to DHCP server. It looks like DHCP relay service not running.
root@r-spider-05:/home/admin# show services
dhcp_relay docker
---------------------------
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 2.1 0.2 32288 23748 pts/0 Ss+ 10:31 0:00 /usr/bin/python3 /usr/local/bin/supervisord
root 14 1.0 0.2 27648 18900 pts/0 S 10:31 0:00 python3 /usr/bin/supervisor-proc-exit-listener --container-name dhcp_relay
root 17 0.0 0.0 225860 3636 pts/0 Sl 10:31 0:00 /usr/sbin/rsyslogd -n -iNONE
Please check from your side, or provide me step by step scenario(if I'm doing something wrong). Thanks
Hi @ppikh which image are you running these commands on?
Description
DHCPv6 relay does not work after load json config with DHCPv6 relay configuration
Topology used in test: DHCP client (enp66s0f0) -----access VLAN 690----- (Ethernet64) DUT (Ethernet60) ----- (enp67s0f1) DHCP server
DHCP server has IP: 6900::2/64 and can advertise IP for subnet 6900:1::/64
Steps to reproduce the issue:
Describe the results you received:
DHCPv6 client can not get IP address. After apply DHCPv6 configuration DHCP relay docker did not restart but DHCPv6 relay settings can see in output for cmd: "show vlan brief"
Describe the results you expected:
After apply DHCPv6 configuration DHCPv6 client can get IPv6 address from server
Output of
show version
:Output of
show techsupport
:Additional information you deem important (e.g. issue happens only occasionally):
If do:
Then wait until all ifaces UP and try to get IPv6 address from DHCPv6 client - address can be obtained successfully.