Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BMC is not extracting Domain Name & configuring it on BMC #47

Closed
swe12345 opened this issue Jan 5, 2022 · 5 comments
Closed

BMC is not extracting Domain Name & configuring it on BMC #47

swe12345 opened this issue Jan 5, 2022 · 5 comments

Comments

@swe12345
Copy link

swe12345 commented Jan 5, 2022

Problem Description

BMC is not extracting Domain Name & configuring it on BMC

Steps:
Enable UseDomainName dhcp property.
curl -k -H "X-Auth-Token: $bmc_token" -X PATCH -D patch.txt -d '{"DHCPv4" : {"UseDomainName":true}}' https://$bmc/redfish/v1/Managers/bmc/EthernetInterfaces/eth1

Check whether property is set or no using following command:
curl -k -H "X-Auth-Token: $bmc_token" -D get.txt -X GET https://${bmc}/redfish/v1/Managers/bmc/EthernetInterfaces/eth1

Send DHCP request and see if bmc uses domain name offered by DHCP server:

Expectation:
resolv.conf should get updated with line like below:
search something.com

@swe12345 swe12345 changed the title BMC is not extracting Domain Name & configuring it on BMC BMC is not using NTP server sent by DHCP server Jan 5, 2022
@swe12345 swe12345 changed the title BMC is not using NTP server sent by DHCP server BMC is not extracting Domain Name & configuring it on BMC Jan 5, 2022
@swe12345
Copy link
Author

@sunharis

@swe12345
Copy link
Author

@ratagupt

@sunharis
Copy link
Contributor

@ratagupt @wak-google The issue here is that the /etc/resolv.conf is not getting the <something.com> updated as the search keyword value even if the DHCP server sends that value with the DHCP lease. So from the BMC, if you ping a hostname, it does not add the <something.com> to the hostname

PS: The DHCP supplied DNS server IP is updated as expected for nameserver

@sunharis
Copy link
Contributor

System already has the systemd fix systemd/systemd#8174
Any changes needed on networkd ? @wak-google @ratagupt please suggest

@sunharis
Copy link
Contributor

rfrandse pushed a commit to ibm-openbmc/phosphor-networkd that referenced this issue Mar 31, 2022
When the interface is DHCP enabled, domain-search value 119
is not requested by the DHCP client.

This commit adds the UseDomains option to network file
so that when the DNS is enabled, the domain-search option
is requested via DHCP REQUEST, and search list provided by DHCP
server are pulled to the DHCP lease and the resolv.conf

Fixes openbmc#47

Tested by:
  1.Enable DNS option at BMC and check the DHCP REQUEST packet for
    option 119
  2.Verify the list 'option domain-search' at the DHCP server is
    fetched by the DHCP lease file at BMC
  3.Verify the same list is added to the search list at resolv.conf

Signed-off-by: sunharis <sunharis@in.ibm.com>
Change-Id: I2f6ca7236bf3b5e7d3ded9294b8372d95ac50ac6

Co-authored-by: sunharis <sunharis@in.ibm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants