0

Ubuntu is installed in the VM. To access a remote corporate repository, I need to configure DNS. At this point, if I use the PING command, I will get the following response:

user@ubuntu:~/projects$ ping -c 3 gitlab.companyname.com
PING gitlab.companyname.com (10.0.176.231) 56(84) bytes of data.

--- gitlab.companyname.com ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 2053ms

(The company's real name has been replaced with "companyname")

I tried to change the file /etc/netplan/50-cloud-init.yaml
# This file is generated from information provided by
# the datasource.  Changes to it will not persist across an instance.
# To disable cloud-init's network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
# network: {config: disabled}
network:
    ethernets:
        ens33:
            dhcp4: true
            nameservers:
              addresses:
                - X.X.X.X
    version: 2

Next, I use the sudo netplan apply command to apply the changes

If you use the PING command in the first few seconds, everything will be fine:

user@ubuntu:~/projects$ sudo netplan apply 
user@ubuntu:~/projects$ ping -c 3 gitlab.companyname.com
PING gitlab.companyname.com (10.0.176.231) 56(84) bytes of data.
64 bytes from 10.0.176.231 (10.0.176.231): icmp_seq=1 ttl=62 time=0.877 ms
64 bytes from 10.0.176.231 (10.0.176.231): icmp_seq=2 ttl=62 time=0.723 ms
64 bytes from 10.0.176.231 (10.0.176.231): icmp_seq=3 ttl=62 time=0.778 ms

--- gitlab.companyname.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2015ms
rtt min/avg/max/mdev = 0.723/0.792/0.877/0.071 ms

But the problem is that after about 10 seconds have passed, the connection is lost again:

user@ubuntu:~/projects$ ping -c 3 gitlab.companyname.com
PING gitlab.companyname.com (10.0.176.231) 56(84) bytes of data.

--- gitlab.companyname.com ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 2025ms
Roman
  • 1
  • Uhm, why do you want to change anything in the DNS settings? Your tests show that the name is being resolved. You rather have a firewall or routing problem, no DNS problem. – Gerald Schneider Aug 09 '20 at 11:50
  • "Your tests show that the name is being resolved" - please tell Me, How did you understand this? – Roman Aug 09 '20 at 12:04
  • "Uhm, why do you want to change anything in the DNS settings?" - One of my friends advised me to do this. Unfortunately I don't have any other suggestions – Roman Aug 09 '20 at 12:05
  • 1
    Your DNS settings are correct, because `ping` was able to resolve the name successfully. The problem is somewhere else. – Michael Hampton Aug 09 '20 at 13:07
  • Can you give any suggestions about what I need to do to fix the problem? – Roman Aug 09 '20 at 13:57

0 Answers0