0

Ok.. a bit new to ubuntu.. but not linux.

Seems very simple. I need to ping my FQDN of host (VM) and get response back with its routable IP. I know my DNS forward and reverse IP lookup resolves via external system tests.. so this is a local host issue

used desktop GUI and it input DNS servers.. and created entries:

#

root@icpdemo01:/etc/network# cat interfaces

iface lo inet loopback
auto lo

auto ens160
iface ens160
        address 172.20.15.242
        netmask 255.255.255.0
        network 172.20.15.0
        broadcast 172.20.15.255
        gateway 172.20.15.1

dns-nameservers 172.20.12.100 172.20.13.100 8.8.8.8

#

root@icpdemo01:/etc/network# ping icpdemo01.ibm.aessatl.arrow.com

PING icpdemo01.ibm.aessatl.arrow.com (127.0.1.1) 56(84) bytes of data.
64 bytes from icpdemo01.ibm.aessatl.arrow.com (127.0.1.1): icmp_seq=1 ttl=64 time=0.052 ms
^C
--- icpdemo01.ibm.aessatl.arrow.com ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.052/0.052/0.052/0.000 ms

???? Uh.. not correct...

Google around...put entry in /etc/hosts (then move to top.. both fail)

#

vi /etc/hosts

172.20.15.252 icpdemo01.ibm.aessatl.arrow.com icpdemo01
127.0.0.1       localhost
127.0.1.1       icpdemo01.ibm.aessatl.arrow.com icpdemo01

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
#

check /etc/resolv.conf because it should just.. work sudo vi /etc/resolv.conf

# This file is managed by man:systemd-resolved(8). Do not edit.
#
# This is a dynamic resolv.conf file for connecting local clients to the
# internal DNS stub resolver of systemd-resolved. This file lists all
# configured search domains.
#
# Run "systemd-resolve --status" to see details about the uplink DNS servers
# currently in use.
#
# Third party programs must not access this file directly, but only through the
# symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a different way,
# replace this symlink by a static file or a different symlink.
#
# See man:systemd-resolved.service(8) for details about the supported modes of
# operation for /etc/resolv.conf.
#nameserver 127.0.0.53
nameserver 172.20.12.100
nameserver 172.20.13.100
#

Still failing to figure out its IP..

seems like

1) Their should not be three places that it checks for DNS server.. 2) It should work.

Hoping this is simple "well.. this is how Ubuntu does name resolution in X order.. and here is fix..."

Thanks,

PS: reason for this is docker fails if it cannot detect container FQDN resolution on installation...

#

TASK [check : Validating DNS server] ***************************************************************************************************************************************************************************

TASK [check : Checking Hostname is resolvable] ***************************************************************************************************************************************************************** changed: [172.20.15.252]

TASK [check : Validating Hostname is resolvable] *************************************************************************************************************************************************************** fatal: [172.20.15.252]: FAILED! => {"changed": false, "msg": "Please configure your hostname to resolve to an externally reachable IP"}

NO MORE HOSTS LEFT *********************************************************************************************************************************************************************************************

NO MORE HOSTS LEFT *********************************************************************************************************************************************************************************************

PLAY RECAP ***************************************************************************************************************************************************************************************************** 172.20.15.252 : ok=26 changed=11 unreachable=0 failed=1

Playbook run took 0 days, 0 hours, 2 minutes, 41 seconds

administrator@icpdemo01:/opt/ibm-cloud-private-ce-2.1.0.3/cluster$

#
0

Where do I start?

Remove this from /etc/network/interfaces...

auto ens160
iface ens160
        address 172.20.15.242
        netmask 255.255.255.0
        network 172.20.15.0
        broadcast 172.20.15.255
        gateway 172.20.15.1

dns-nameservers 172.20.12.100 172.20.13.100 8.8.8.8

you ask it to auto config, then you specify a static address. Your dns servers are not appearing in /etc/resolv.conf. Set your DNS in the "Wired Connection" profile via the GUI.

Remove this from /etc/hosts...

172.20.15.252 icpdemo01.ibm.aessatl.arrow.com icpdemo01

here you specify an address of .252, where earlier you tried to set it to .242. Remove this line.

Change:

127.0.1.1       icpdemo01.ibm.aessatl.arrow.com icpdemo01

to:

127.0.1.1

Regarding /etc/resolv.conf...

#nameserver 127.0.0.53
nameserver 172.20.12.100
nameserver 172.20.13.100

you obviously manually edited this file. Do NOT manually edit this file! Any manual changes made here don't last! Uncomment the first line, remove the last two lines, and let dnsmasq and/or systemd-resolved manage this file.

Regarding dnsmasq and systemd-resolved...

Do a ps auxc | grep -i dns and ps auxc | grep -i resolv and look for dnsmasq and systemd-resolved, and if both are running, you need to disable the DNS part of systemd-resolved by editing /etc/systemd/resolved.conf and...

change:

#DNSStubListener=yes

to:

DNSStubListener=no
  • Removed DNS servers from /etc/network/interfacesadministrator@icpdemo01:~$ sudo vi /etc/network/interfaces – penguinpages Oct 20 '18 at 17:46
  • Well.. I tried to "use the gui" but the GUI showed no network adapters just VPN and proxy.. so i manually edited the network file to get it on the network. Then updated... now it shows "wired" connections in the GUI.. – penguinpages Oct 20 '18 at 17:56
  • As for DNS...I.. Removed DNS servers from /etc/network/interfaces clear out entries to /etc/resolv/conf seems just auxc is running... – penguinpages Oct 20 '18 at 17:57
  • administrator@icpdemo01:~$ ping icpdemo01.ibm.aessatl.arrow.com PING icpdemo01.ibm.aessatl.arrow.com (127.0.1.1) 56(84) bytes of data. 64 bytes from icpdemo01.ibm.aessatl.arrow.com (127.0.1.1): icmp_seq=1 ttl=64 time=0.046 ms 64 bytes from icpdemo01.ibm.aessatl.arrow.com (127.0.1.1): icmp_seq=2 ttl=64 time=0.053 ms ^C --- icpdemo01.ibm.aessatl.arrow.com ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 1027ms rtt min/avg/max/mdev = 0.046/0.049/0.053/0.007 ms administrator@icpdemo01:~$ – penguinpages Oct 20 '18 at 17:59
  • seems this forum every time aI hit <return> it does not give me a new line but "adds comment" .. so I will try to format this less then ugly.. above changes do not work. Gui setting are simple.. one wired connection.. set to static IP.. with two DNS servers manual set. Not sure why this is so difficult. – penguinpages Oct 20 '18 at 18:02

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.