Fixing fedora 26 update issue on static ip configuration

Error:
Curl error (6): Couldn’t resolve host name for https://mirrors.fedoraproject.org/metalink?repo=updates-released-f26&arch=x86_64 [Could not resolve host: mirrors.fedoraproject.org]

1.Check the ip information

[15:59 root@server /home/cipher]# ifconfig enp9s0
enp9s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.15.15 netmask 255.255.240.0 broadcast 192.168.15.255
inet6 fe80::dd9d:8b32:6a7f:8b2d prefixlen 64 scopeid 0x20<link>
ether 00:1c:23:01:fb:dc txqueuelen 1000 (Ethernet)
RX packets 20574 bytes 1936101 (1.8 MiB)
RX errors 1 dropped 56 overruns 0 frame 0
TX packets 3681 bytes 1500817 (1.4 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 17

2.Ping to the url mirrors.fedoraproject.org

[15:52 root@server /home/cipher]# ping mirrors.fedoraproject.org
ping: mirrors.fedoraproject.org: Name or service not known

3.we can find the issue is with resolvers

[15:52 root@server /home/cipher]# cat /etc/resolv.conf
# Generated by NetworkManager
search sand.box

4.Add nameservers 4.2.2.2 and 8.8.8.8

[15:59 root@server /home/cipher]# cat /etc/resolv.conf
# Generated by NetworkManager
search sand.box
nameserver 4.2.2.2
nameserver 8.8.8.8
[16:04 root@server /home/cipher]# ping mirrors.fedoraproject.org
PING wildcard.fedoraproject.org (152.19.134.142) 56(84) bytes of data.
64 bytes from vm3.fedora.ibiblio.org (152.19.134.142): icmp_seq=1 ttl=41 time=276 ms
64 bytes from vm3.fedora.ibiblio.org (152.19.134.142): icmp_seq=2 ttl=41 time=277 ms

5.Try updating the packages now.

[16:04 root@server /home/cipher]# dnf upgrade -y