LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 12-15-2006, 12:20 PM   #1
Arrowx7
Member
 
Registered: Jul 2004
Posts: 43

Rep: Reputation: 15
Newbie: Now to configure DNS and gateway


Hello,
I am running Fedora core 5 on my linux box. Usually it detected my network settings, or I would just run dhclient.
However, something went wrong with my router and it's no longer being picked up automatically as DNS and gateway. On my windows machines, I would usually go into TCP/IP settings and configure:
IP: 192.168.2.20 (IP address of my linux box)
Subnet...
Gateway: 192.168.2.2 (IP of my D-link router)
Default DNS server: 192.168.2.2

On my linux box:
I just run
ifconfig eth0 192.168.2.20
to set the IP, not sure how to set up DNS and Gateway

How do I do this in linux, is there a quick command do set these things: specify the gateway and the Default DNS so the internet works?

Thank you very much for your help in advance!!

Best Regards
MK
 
Old 12-15-2006, 12:54 PM   #2
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Linux 11 (Bullseye)
Posts: 3,407

Rep: Reputation: 141Reputation: 141
Login to your router and make sure the DHCP service is still running. Sounds like you may have accidentally shut it down.
 
Old 12-15-2006, 01:10 PM   #3
erik258
LQ Newbie
 
Registered: Jan 2006
Location: Twin Cities, Minnesota, USA
Distribution: Gentoo
Posts: 5

Rep: Reputation: 0
Manual DNS/Gateway configuration.

Your DHCP server is probably just disabled, but I have written up terse instructions for you to follow anyway. It's a good thing to know!

Gateway
if you use route to manage your routing tables like I do, seting a default gateway is easy...
route add default gw 192.168.2.2

DNS
dns is really easy. Edit the file /etc/resolv.conf and add the line
nameserver 192.168.2.2

the routing table will need to be configured each time your computer starts. Fedora should provide a utility for setting the default gateway. /etc/resolv.conf is just a regular file, and will persist until changed by you or by automatic configuration via dhcp.


Good luck.
 
  


Reply

Tags
configure, dns, gateway



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Suse DNS vs free DNS server for Newbie maxsanders Linux - Newbie 1 01-31-2006 04:57 PM
How to configure DNS for a local LAN (at least I think I want DNS) FlyingPenguin128 Linux - Networking 8 12-11-2005 04:15 PM
How to see DNS ,GATEWAY etc.. tkmuthuvel Linux - Networking 1 09-12-2005 02:53 PM
DNS and gateway ThorRune Linux - Hardware 3 08-26-2005 02:19 PM
Gateway and DNS jayakrishnan Linux - Networking 5 07-05-2003 02:01 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 07:48 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration