I had a problem with my new Ethernet card, the problem was that "It was NOT working" and I was so tired and sick of it. So I made a way around, rather then looking for a driver(make a module in X-NIX systems) I manually "up" the interface at boot time alone with few changes in /etc/network/interfaces with making the ip of Ethernet card static. Then everything was fine except for two things:
1. I can ping any ip or I can access any ip but the name was not being resolved.
2. The network was not shown connected in network manager of ubuntu.
For the solution of (1), I needed a DNS server. Now since the network was not shown at network manager so I could not put DNS. I thought of setting the DNS at terminal.
I COULD NOT FIND such a command but what I found can be done in most of the systems:
Following is what I did to put DNS in Ubuntu with out network manager:
1. Open /etc/resolv.conf in your favorite editor (I like gedit in GUI and vi in command line)
2. simply put the following two lines
nameserver 208.76.50.50
nameserver 8.8.8.8
You can put any DNS but I lilke 208.76.50.50 because youtube.com is blocked in my country and by putting this as DNS allows me to access the youtube.com ;)
3. Save and exit
4. You do not even have to restart the networking.
5. Ping the google.com
You can check if DNS is working by issuing the following set of commands :
$ host google.com
$ dig google.com
$ ping google.com
$ nslookup your-domain.com
1. I can ping any ip or I can access any ip but the name was not being resolved.
2. The network was not shown connected in network manager of ubuntu.
For the solution of (1), I needed a DNS server. Now since the network was not shown at network manager so I could not put DNS. I thought of setting the DNS at terminal.
I COULD NOT FIND such a command but what I found can be done in most of the systems:
Following is what I did to put DNS in Ubuntu with out network manager:
1. Open /etc/resolv.conf in your favorite editor (I like gedit in GUI and vi in command line)
2. simply put the following two lines
nameserver 208.76.50.50
nameserver 8.8.8.8
You can put any DNS but I lilke 208.76.50.50 because youtube.com is blocked in my country and by putting this as DNS allows me to access the youtube.com ;)
3. Save and exit
4. You do not even have to restart the networking.
5. Ping the google.com
You can check if DNS is working by issuing the following set of commands :
$ host google.com
$ dig google.com
$ ping google.com
$ nslookup your-domain.com
No comments:
Post a Comment