LinuxQuestions.org
Help answer threads with 0 replies.
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
 
LinkBack Search this Thread
Old 03-27-2005, 05:09 PM   #1
basq3
LQ Newbie
 
Registered: Mar 2005
Location: baton rouge
Distribution: fedora 3
Posts: 21

Rep: Reputation: 15
Question switching from dhcp to static lost internet


im using fedora 3 with a nic and a cable modem. I can ping the IP from both the box and from another box. the ip shows behind the modem on the network.

dhcp worked but when i switched to a static ip/gateway I lost the internet.

I also had edited my host.conf file - if anyone has a sugguestion for what's in that file please.

Code:
[root@br ~]# ifconfig eth0

eth0   Link encap:Ethernet  HWaddr xx:xx:xx:xx:xx:xx
          inet addr:xx.xxx.xxx.10  Bcast:xx.xxx.xxx.15  Mask:255.xxx.xxx.xxx
          inet6 addr: xxxx::xxx:xxxx:xxxx:xxxx/xx Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:15757 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3028 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:1039265 (1014.9 KiB)  TX bytes:620958 (606.4 KiB)
          Interrupt:185 Base address:0xa000
why would it broadcast at .15 instead of .10 like the ip?

when i ping a host:

[root@br ~]# ping www.yahoo.com
ping: unknown host www.yahoo.com

when i ping an ip: it freezes and i have to ctrl c to get it to unfreeze.

[root@br ~]# ping xx.xxx.xxx.xxx
PING xx.xxx.xxx.xxx (xx.xxx.xxx.xxx) 56(84) bytes of data.

--- xx.xxx.xxx.xxx ping statistics ---
7 packets transmitted, 0 received, 100% packet loss, time 5999ms

any help is appreciated
 
Old 03-27-2005, 05:12 PM   #2
Thoreau
Senior Member
 
Registered: May 2003
Location: /var/log/cabin
Distribution: All
Posts: 1,167

Rep: Reputation: 45
I suggest you stop packeting yourself and add your gateway to your ipsettings and DNS to your /etc/resolv.conf.
 
Old 03-27-2005, 05:32 PM   #3
basq3
LQ Newbie
 
Registered: Mar 2005
Location: baton rouge
Distribution: fedora 3
Posts: 21

Original Poster
Rep: Reputation: 15
examples? im not to familiar with those files thx!!!
 
Old 03-27-2005, 05:37 PM   #4
Thoreau
Senior Member
 
Registered: May 2003
Location: /var/log/cabin
Distribution: All
Posts: 1,167

Rep: Reputation: 45
/etc/resolv.conf

nameserver xxx.xxx.xxx.xxx(ip of your DNS aka router IP)

Gateway is is the router IP as well(the route out). You configure that in the same place you configure your static IP(control panel?)
 
Old 03-27-2005, 07:57 PM   #5
basq3
LQ Newbie
 
Registered: Mar 2005
Location: baton rouge
Distribution: fedora 3
Posts: 21

Original Poster
Rep: Reputation: 15
i was hoping to get exactly what goes into the host.conf and the resolv.conf as im away from the machine so i have to use the vi and the consol.

could you provide an actual example doesnt have to be real #'s. thx again.
 
Old 03-27-2005, 10:53 PM   #6
Thoreau
Senior Member
 
Registered: May 2003
Location: /var/log/cabin
Distribution: All
Posts: 1,167

Rep: Reputation: 45
That was an actual eample. /etc/hosts has nothing to do with it. I think you should hire a $150/hr consultant to help you.
 
Old 03-28-2005, 06:47 PM   #7
mcd
Member
 
Registered: Aug 2003
Location: Boulder, CO
Distribution: Slackware, RHEL, CentOS
Posts: 825

Rep: Reputation: 33
if you check your /etc/resolv.conf file you'll see it's just a list of nameservers. should be something like

nameserver 4.7.8.38
nameserver 192.168.1.1


your router probably acts as a caching nameserver, so you can put it in there if you want. otherwise, use your ISP's nameserver. note that if you use dhcp (and maybe sometimes if you don't) resolv.conf can be overwritten.


as for setting your default gateway, in fedora i *believe* you set it in /etc/sysconfig/ifcfg-eth0, or something like that. wherever your static ip settings are...where did you configure that? there should be a line like

Gateway=""

and you want to put in

Gateway="192.168.1.1"

or whatever your router's ip address is. you can also do this with the command


route add default gateway 192.168.1.1


but it won't be permanent.

Last edited by mcd; 03-28-2005 at 06:49 PM.
 
Old 03-29-2005, 09:34 AM   #8
basq3
LQ Newbie
 
Registered: Mar 2005
Location: baton rouge
Distribution: fedora 3
Posts: 21

Original Poster
Rep: Reputation: 15
i was able to setup the ip, gateway, primary and secondary dns all through the gui on eth0.

ill try to edit the resolv.conf which do i need to put in without the router(getting it this week)?

my ip?
the gateway?
both dns servers?

thanks for clarifying the structure of the resovl.conf

can you provide an example of the host.conf file since i hosed mine?

sorry to be bothering so much but i have no examples to go off of. im new to linux but not new to computers.
 
Old 03-29-2005, 09:44 AM   #9
basq3
LQ Newbie
 
Registered: Mar 2005
Location: baton rouge
Distribution: fedora 3
Posts: 21

Original Poster
Rep: Reputation: 15
nice tutorial with examples!!!! thx!!!!!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help switching from Static IP to DHCP on Redhat Linux 9 asilentmurmur Linux - Networking 8 08-16-2005 08:08 PM
Using DHCP with a static IP ninmonkeys Linux - Networking 9 11-30-2004 07:32 AM
FC2 Overriding static if in favor of dhcp system set for static pkraus109 Linux - Networking 8 09-21-2004 11:13 AM
DHCP or Static Culbert Linux - Networking 1 03-14-2003 07:42 PM
Switching from DHCP to static IP class-a Linux - Networking 0 09-19-2001 03:38 AM


All times are GMT -5. The time now is 08:59 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration