Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Switch DHCP to Static IP
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Rob W
n00b
n00b


Joined: 23 May 2002
Posts: 28

PostPosted: Fri Aug 23, 2002 3:53 am    Post subject: Switch DHCP to Static IP Reply with quote

I have a stable gentoo 1.1a, running KDE3.01, with a tulip-compatible NIC, which has worked perfectly under dhcp with a switch/router acting as the dhcp server. I need to change to static IP for my small network (4 machines). Here's what I've done so far:

1) have modified my hosts file to reflect the new static IPs
2) followed the Gentoo Install instructs for static config. This includes running /sbin/ifconfig and /sbin/route add (apparently successful) for the nic and the gw (in the latter case)
3) confirmed /etc/resolv.conf was still appropriate
4) tried to remove dhcp using rc-update, but no such module as dhcp,dhcpd, or dhcpcd exists.
5) After doing all that, in KDE, the Control Center|Information|Network Interfaces shows the NIC with both the correct static IP and lo address assigned. But there's no Modify or Add or Edit button. I can ping the other machines on the LAN and also can ping the router/switch. But there's no web access with either Konq or Mozilla.
6)One final interesting thing: rc-update add eth0 default yielded "/etc/init.d/eth0 not found, aborting". Can someone clue me in?

I also did a google search, and searched these forums, and got 2840 hits. Way too many to wade through.

As it stands, it looks like I need to disable the dhcp/dhcpd/dhcpcd module (Whatever it is) at boot time. AND initialize the nic and add static config of the NIC at boot.

Does KDE have a configurator for the network interface? I can't find it anywhere, if it exists. It would be incredibly helpful. Since I can't connect anymore, emerging another app from gentoo.org is not possible.

I think I'm way off the track here somewhere.

Thanks,
Rob W.
Back to top
View user's profile Send private message
rac
Bodhisattva
Bodhisattva


Joined: 30 May 2002
Posts: 6553
Location: Japanifornia

PostPosted: Fri Aug 23, 2002 3:58 am    Post subject: Reply with quote

I can't speak for KDE, but the file you want to concentrate on is /etc/conf.d/net. Set up the "iface_eth0=" line, and the "gateway=" line at the bottom, and then:
Code:
# /etc/init.d/net.eth0 stop
# /etc/init.d/net.eth0 start
(or a reboot), and you should be set. Let us know if that doesn't work or you need more clarification.

Edit: Moving to Networking & Security, as initial install said to be completed.
_________________
For every higher wall, there is a taller ladder
Back to top
View user's profile Send private message
Rob W
n00b
n00b


Joined: 23 May 2002
Posts: 28

PostPosted: Sat Aug 24, 2002 12:39 am    Post subject: Success! Reply with quote

Many thanks to rac; I'm back on the LAN and the web on my gentoo box. With your instructs it was a three-minute fix. Bingo!

We live for these moments of small victories, don't we?

Rob W.
Back to top
View user's profile Send private message
Nuage
n00b
n00b


Joined: 04 Sep 2003
Posts: 39

PostPosted: Sat Apr 17, 2004 3:28 pm    Post subject: Reply with quote

This failed for me, because /etc/init.d/net.eth0 start always reset my manual configuration of ifconfig and route.
Then I edited /etc/conf.d/net which is used by /etc/init.d/net.eth0. And now it works!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum