The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Special Forums > IP Networking
Google UNIX.COM


IP Networking Questions involving TCP/IP, Routers, Hubs, Network protocols, etc go here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
how to configure VIM ? zedex UNIX for Dummies Questions & Answers 1 12-24-2007 03:47 AM
How to configure NIS in sun 10 rjay.com SUN Solaris 4 12-18-2006 08:37 PM
configure ssh Geraldine UNIX for Advanced & Expert Users 4 03-15-2004 08:07 PM
How to configure DNS q30 UNIX for Advanced & Expert Users 6 06-03-2002 12:31 AM
IP configure Orange UNIX for Dummies Questions & Answers 2 07-26-2001 05:21 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-02-2001
Registered User
 

Join Date: Apr 2001
Posts: 36
Question

I am running Solaris 2.6 Server on a Sparc 10 and I was wondering how I can manually specify a DNS server to resolve hostnames. Any help will be greatly appreciated.
And also I have created a file in the /etc dir named defaultrouter and added th IP address of my router, but when I ping another computer on a seperate network it replies with something like "network unreachable from gateway X.X.X.X " where "X.X.X.X" is the IP address of my Unix machine...not the router. I was wondering if there is a command that will allow me to view all of my network settings such as IP Address, Default Gatway, DNS Servers, etc....
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 05-02-2001
PxT's Avatar
PxT PxT is offline
Registered User
 

Join Date: Oct 2000
Location: Sacramento, CA
Posts: 909
Put a line in /etc/resolv.conf like this:

nameserver X.X.X.X

(put in your nameserver's IP address instead of X's)


You may specify more than one "nameserver" line in the resolv.conf file.

You might have to restart networking to get your /etc/defaultrouter file read in. Alternately, use the "route" command to add a default gateway. Something like:

route add default gw X.X.X.X


"netstat -r" will show your routes. "ifconfig" will show your IP address.

[Edited by PxT on 05-07-2001 at 11:02 AM]
Reply With Quote
  #3 (permalink)  
Old 05-04-2001
Registered User
 

Join Date: Apr 2001
Posts: 36
I created the resolv.conf file in the /etc/ directory and added the line:
nameserver x.x.x.x

but I still cannot get any name resolution. I can access public websites via IP address, but not hostname.....weird!
Reply With Quote
  #4 (permalink)  
Old 05-05-2001
Neo's Avatar
Neo Neo is offline
Administrator
 

Join Date: Sep 2000
Location: Asia Pacific
Posts: 4,301
Question

Did you add the name of your local hostname to the /etc/hosts file?
Reply With Quote
  #5 (permalink)  
Old 05-07-2001
PxT's Avatar
PxT PxT is offline
Registered User
 

Join Date: Oct 2000
Location: Sacramento, CA
Posts: 909
Quote:
I created the resolv.conf file in the /etc/ directory and added the line: nameserver x.x.x.x
You did replace the x's with the IP address of your nameserver, right? The line should look something like:

nameserver 192.168.0.1

replace the IP with that of your DNS server.
Reply With Quote
  #6 (permalink)  
Old 05-07-2001
Neo's Avatar
Neo Neo is offline
Administrator
 

Join Date: Sep 2000
Location: Asia Pacific
Posts: 4,301
You also need the name of your domain in the resolv.conf file:

Code:
domain     yourdomain.com
Reply With Quote
  #7 (permalink)  
Old 05-07-2001
Registered User
 

Join Date: Apr 2001
Posts: 36
my resolv.conf look's like this:

nameserver 10.10.10.1

my host file looks like this:

10.10.10.1 nameserver

This computer is not part of a domain.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Tags
solaris

Thread Tools
Display Modes




All times are GMT -7. The time now is 01:12 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0