Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I'm setting up a new RHEL 7.0 installation (we're running the trial), but I can't get it to connect to the internet from command line. I'm trying to add these repos, as I currently have 0 installed, but I get curl: (6) Could not resolve host: URL; Unknown error. I just tried to wget a file and it just sits indefinitely. I cannot ping the server from my local network.

ifconfig eth0 results are shown below.

eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
    inet 192.168.201.92  netmask 255.255.255.0  broadcast 192.168.201.255
    inet6 fe80::215::5dff:feca:963e  prefixlen 64  scopeid 0x20<link>
    ether 00:15:5d:ca:96:3e  txqueuelen 1000  (Ethernet)
    RX packets 704958  bytes 80931741 (77.1 MiB)
    RX errors 0  dropped 36906  overruns 0  frame 0
    TX packets 84  bytes 10038 (9.8 KiB)
    TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Per request, here is ip ro. /etc/resolv.conf exists but is blank.

default via 192.168.201.199 dev eth0  proto static  metric 1024
192.168.201.0/24 dev eth0  proto kernel  scope link  src 192.168.201.92

I found a typo in my config file, and I can now wget files. The rpm commands given in the above linked article are still failing with the given error.

share|improve this question
1  
What about ip ro and /etc/resolv.conf? –  Cristian Ciupitu Jul 7 at 14:03
    
Added to the OP. –  Vaindil Jul 7 at 14:07

1 Answer 1

up vote 3 down vote accepted

The file /etc/resolf.conf contains the DNS, without DNS no name resolution

add

nameserver 8.8.8.8

which is the DNS of Google. before that you can try to ping 8.8.8.8to check if it will work.
you should try to find out which DNS are used by your provider though, because using the one of google all the time is not really recommanded

share|improve this answer
    
I now get 404 errors, which I assume means it's actually making the connection now. Thank you, I greatly appreciate it! –  Vaindil Jul 7 at 14:22
    
you should try to find out which DNS are used by your provider though, because using the one of google all the time is not really recommanded –  Kiwy Jul 7 at 14:28

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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