PDA

View Full Version : dhcp works but static doesn't



paradigm_shift
07-27-2005, 05:33 AM
i read about /etc/resolv.conf, /etc/hosts, and /etc/rc.d/rc.inet1.conf but what i don't have information about is how do i extract correct information for gateway, netmask ,etc. ifconfig shows correct settings but i'm trying to do it with assumption of dhcp server diabled by router.

paradigm_shift
07-27-2005, 02:31 PM
$ dig linuxquestions.org

; <<>> DiG 9.2.3rc2 <<>> linuxquestions.org
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 45220
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 3, ADDITIONAL: 0

;; QUESTION SECTION:
;linuxquestions.org. IN A

;; ANSWER SECTION:
linuxquestions.org. 3600 IN A 64.179.4.149

;; AUTHORITY SECTION:
linuxquestions.org. 3600 IN NS ns1.linuxquestions.org.
linuxquestions.org. 3600 IN NS ns2.linuxquestions.org.
linuxquestions.org. 3600 IN NS ns1.linuxquestions.net.

;; Query time: 211 msec
;; SERVER: 192.168.1.1#53(192.168.1.1)
;; WHEN: Thu Sep 9 22:57:54 2004
;; MSG SIZE rcvd: 124

this was the output in linuxqustions.org site. is this a correct method to extract dns information? what if i don't have information on gateway address?

UnderScore
07-27-2005, 02:45 PM
The dig command will only display DNS queries.

For gateway info:
netstat -r
or
route

For IP address, netmask, broadcast:
ifconfig -a

paradigm_shift
07-27-2005, 11:46 PM
The dig command will only display DNS queries.

For gateway info:
netstat -r
or
route

For IP address, netmask, broadcast:
ifconfig -athanks underscore for your help. what if i don't have network properly configured beforehand? actually all these refer not neccesarily to ethernet connection but wireless network through router. i get errors saying 'hostname not found' when i try to set gateway by 'ifconfig eth1 gw xxx.xxx.x.1'. i can see access points in iwconfig. now, at this stage i know from experience if i do 'dhcpcd eth1' internet connection is there. but if i try to do it static ip it doesn't seem to work.

paradigm_shift
07-28-2005, 12:41 AM
http://64.233.179.104/search?q=cache:mMgRIFQM894J:www.interprojekt.pl/doc/ras/max800-6000/m8netcfg/maxip.htm+static+ip+%22hostname+not+found%22&hl=en

paradigm_shift
07-28-2005, 01:25 AM
http://64.233.179.104/search?q=cache:1RHpL8efWJIJ:www.chinalinuxpub.com/doc/www.siliconvalleyccie.com/+linux+script+configure+tcp/ip+&hl=en