I have configured my eth0 as below.
auto eth0
iface eth0 inet dhcp
udhcpc_opts -b -x 77:41636B65726D616E6E20636C696E6F20494C4320312E3020534D43 -O bootfile -i eth0
I get the ip and nameserver will come as part of bootfile.
udhcpc: started, v1.36.1
udhcpc: broadcasting discover
[ 8453.998787] fec 30be0000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx
udhcpc: broadcasting discover
udhcpc: broadcasting select for 10.1.19.151, server 10.1.19.2
udhcpc: lease of 10.1.19.151 obtained from 10.1.19.2, lease time 36000
adding dns 10.1.19.2
AS seen above the ip is obtained and dns is set.
But the dns resolution fails with bad address error
# ping managementv6.system.priv
ping: bad address 'managementv6.system.priv'
Other devices not running on imx8 are able to get the DNS resolution.
I have tried disabling ipv6 via /etc/sysctl.conf
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
But it didn't help.
Please help in resolving the problem.
Regards,
Ravi
Hi @raviaital
Why you need ping managementv6.system.priv? Does this domain needs ipv6 address? Can you try to ping other address?
Best Regards
Zhiming
Hi Zhiming_Liu,
ping is just to show the error.
Actually managementv6.system.priv is a server and the device which is pinging gets its configuration from this server. The configuration decides how the device will run there after.
The server doesn't need ipv6. We have several other devices running on 5.10.x of Linux and not using imx8 which are able to get the access. Those devices are able to get the DNS resolved.
In imx8 we are using 5.15.x kernel. Only with this combination we are facing the problem.
Regards,
Ravi
Hi @raviaital
You can try to append nameserver in /etc/resolv.conf to check if it work for you.
Best Regards
Zhiming
Hi
As I mentioned in my first post when the network connection is established we see the following log
adding dns 10.1.19.2
And the same is reflected in /etc/resolv.conf
**************************
##cat /etc/resolv.conf
nameserver 10.1.19.2
search .
**************************
Regards,
Ravi
Hi @raviaital
Can you try to dump some log/error that can trace this issue?
There should be some config issue in rootfs need to be solved, but not sure where.
Best Regards
Zhiming
Hi @raviaital
I have some idea that you can test.
1.Test DNS server
2.Test same behavior on latest BSP L6.6.3
3.Do you have same issue when you don't modify the ethernet interface config?
Best Regards
Zhiming
HI Zhiming,
Thanks for the reply.
1.
# ifup eth0
[ 547.110644] Micrel KSZ8081 or KSZ8091 30be0000.ethernet-1:01: attached PHY driver (mii_bus:phy_addr=30be0000.ethernet-1:01, irq=POLL)
udhcpc: started, v1.36.1
udhcpc: broadcasting discover
[ 550.180973] fec 30be0000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx
udhcpc: broadcasting discover
udhcpc: broadcasting select for 10.1.19.151, server 10.1.19.2
udhcpc: lease of 10.1.19.151 obtained from 10.1.19.2, lease time 36000
adding dns 10.1.19.2
# ping 10.1.19.2
PING 10.1.19.2 (10.1.19.2): 56 data bytes
64 bytes from 10.1.19.2: seq=0 ttl=128 time=2.198 ms
64 bytes from 10.1.19.2: seq=1 ttl=128 time=1.103 ms
64 bytes from 10.1.19.2: seq=2 ttl=128 time=1.079 ms
--- 10.1.19.2 ping statistics ---
4 packets transmitted, 4 packets received, 0% packet loss
round-trip min/avg/max = 1.072/1.363/2.198 ms
# nslookup 10.1.19.2
Server: 10.1.19.2 # eth0
Address: 10.1.19.2:53
2.19.1.10.in-addr.arpa name = managementv6.systevo.priv
2.19.1.10.in-addr.arpa name = DESKTOP-EM4K67K.systevo.priv
# nslookup managementv6.systevo.priv
Server: 10.1.19.2 # eth0
Address: 10.1.19.2:53
Name: managementv6.systevo.priv
Address: 10.1.19.2
** server can't find managementv6.systevo.priv: NOTIMP
# iptables -L -v -n
Chain INPUT (policy ACCEPT 15 packets, 1633 bytes)
pkts bytes target prot opt in out source destination
Chain FORWARD (policy DROP 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
Chain OUTPUT (policy ACCEPT 17 packets, 1264 bytes)
pkts bytes target prot opt in out source destination
# systemctl restart systemd-resolved
# dmesg | grep -i dns
[ 1.295580] Key type dns_resolver registered
# syslog.. there is no syslog in /var/log
# ping managementv6.systevo.priv
ping: bad address 'managementv6.systevo.priv'
2. Latest BSP didn't boot properly. So we have parked it for sometime.
3. I don't know how to revert our changes to eth interface, so I just deleted the /etc/network/interfaces.d/eth0 and restarted. With this change also the problem is still there.
Regards,
Ravi
Hi @raviaital
The nslookup command show that the DNS server can't support some kind of request. You need contact IT to analyze this issue. And you can also check the tcpdump log.
# nslookup 10.1.19.2
Server: 10.1.19.2 # eth0
Address: 10.1.19.2:53
2.19.1.10.in-addr.arpa name = managementv6.systevo.priv
2.19.1.10.in-addr.arpa name = DESKTOP-EM4K67K.systevo.priv
# nslookup managementv6.systevo.priv
Server: 10.1.19.2 # eth0
Address: 10.1.19.2:53
Name: managementv6.systevo.priv
Address: 10.1.19.2
** server can't find managementv6.systevo.priv: NOTIMP
# iptables -L -v -n
Chain INPUT (policy ACCEPT 15 packets, 1633 bytes)
pkts bytes target prot opt in out source destination
Chain FORWARD (policy DROP 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
Chain OUTPUT (policy ACCEPT 17 packets, 1264 bytes)
pkts bytes target prot opt in out source destination
hi @Zhiming_Liu
The problem is resolved. The problem was due to missing config items in systemd, due to which /etc/nsswitch.conf hosts: entry was getting messed up.
After adding the below into config file it got resolved.
+BR2_PACKAGE_SYSTEMD=y
+BR2_PACKAGE_SYSTEMD_RESOLVED=n
Thanks for your time.
Regards,
Ravi