View previous topic :: View next topic |
Author |
Message |
redwood Guru
Joined: 27 Jan 2006 Posts: 306
|
Posted: Wed Apr 16, 2008 11:38 pm Post subject: dhcpcd + baselayout-2.0 questions |
|
|
I accidentally upgraded to baselayout-2.0 on two of my computers.
I had hardmasked 2.0 on my laptop, but forgot that I was running ~x86 on my
PBX server (services: asterisk, dhcpcd, dnsmasq, tftp)
Now my other computers get a new entry in their routing table
for 169.254.0.0 (which is the default for dhcpcd when something goes wrong)
My network is 192.168.1.0/24, with a LinksysRouter(192.168.1.1) bridged to a DSLModem.
I've disabled dhcpcd on the Router, and moved that service to my PBX server
because I need dhcpcd to also serve ltsp kernels for my thin clients.
========================================================
My PBX server's /etc/conf.d/net
#cat /etc/conf.d/net
config_eth0="192.168.1.254 netmask 255.255.255.0 brd 192.168.1.255"
routes_eth0="default via 192.168.1.1"
# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
127.0.0.0 127.0.0.1 255.0.0.0 UG 0 0 0 lo
0.0.0.0 192.168.1.1 0.0.0.0 UG 5 0 0 eth0
Now the DHCPCD server has an extra gateway 127.0.0.1
========================================================
My XPS client's new routing table:
# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 eth0
And its eth0
# ifconfig eth0
eth0 Link encap:Ethernet HWaddr <snip>
inet addr:192.168.1.99 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: <snip> Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:7589758 errors:0 dropped:0 overruns:0 frame:0
TX packets:8966997 errors:6 dropped:0 overruns:0 carrier:6
collisions:0 txqueuelen:1000
RX bytes:1992694673 (1900.3 Mb) TX bytes:1998180311 (1905.6 Mb)
Interrupt:3 Base address:0x2000
And its /etc/conf.d/net
config_eth0=( "dhcp" )
dhcp_eth0="release nodns nontp"
dns_domain_lo="mytown.net"
routes_eth0=( "default via 192.168.1.1" )
dns_domain_eth0="mytown.net"
dns_servers_eth0="192.168.1.254"
Why is there a route to host 169.254.0.0 ?
# nslookup 169.254.0.0
Server: 192.168.1.254
Address: 192.168.1.254#53
========================================================
I also accidentally upgraded baselayout on my applications/session server
It has a blank /etc/conf.d/net which defaults to "dhcp"
But its routing table is now:
# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.0 0.0.0.0 255.255.255.0 U 3 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 3 0 0 eth0
127.0.0.0 127.0.0.1 255.0.0.0 UG 0 0 0 lo
0.0.0.0 192.168.1.1 0.0.0.0 UG 3 0 0 eth0
Why is there an extra 127.0.0.1 gateway and an extra fake host 169.254.0.0?
========================================================
Is it difficult to downgrade to pre-2.0 baselayout?
If not, how do I fix this routing mess? |
|
Back to top |
|
|
pappy_mcfae Watchman
Joined: 27 Dec 2007 Posts: 5999 Location: Pomona, California.
|
Posted: Thu Apr 17, 2008 8:55 am Post subject: Re: dhcpcd + baselayout-2.0 questions |
|
|
redwood wrote: | Is it difficult to downgrade to pre-2.0 baselayout?
If not, how do I fix this routing mess? |
Yes, it is difficult. However, it is very do-able This system got hit with bl/openrc. That shut down my automatic network setup, and did some other irritating things to this system. Therefore I removed it.
I am going to begin by saying this: doing what I am going to suggest is potentially dangerous to your system, and could reduce it to a smoking pile of ashes.
First off, while the safest option would be to do all of this in a non X console session, I did it under KDE. The only things I had open was konsole and conky.
1) Mask baselayout 2 in your /etc/portage/package.mask file.
2) emerge -C openrc. This is a must as there are file collisions between it and baselayout 1.12.12
3) emerge -av baselayout. You may have to do this a few times. I noticed some of the files were just a bit on the stubborn side.
4) edit /etc/conf.d/hostname, /etc/conf.d/clock /etc/conf.d/net, and any other files that might have been messed with by baselayout 2.
5) Reboot and hope for the best.
If you are like me, this process will take an hour or three. Once I got baselayout-1 back working right, then I had to fix all the things that baselayout-2 stepped on; not the least of which is a custom network configuration setup. That took the longest amount of time. I had to change so much around to get baselayout-2 working, I had to undo everything to get baselayout-1 back in order.
If you really want to get down and dirty, boot with your install disk, chroot, and run emerge -C baselayout. It will snarl at you, and force you to wait fifteen seconds before it's sent to digital heaven, but it will un-emerge itself. Once that is done, immediately reemerge baselayout.
Good luck. You'll need it!
Blessed be!
Pappy
PS, it sure is nice to have my computer back to working the way I want it to work. _________________ This space left intentionally blank, except for these ASCII symbols. |
|
Back to top |
|
|
UberLord Retired Dev
Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
|
Back to top |
|
|
redwood Guru
Joined: 27 Jan 2006 Posts: 306
|
Posted: Thu Apr 17, 2008 6:31 pm Post subject: |
|
|
Thanks for your suggestions.
I've kept baselayout-2.0, but managed to work around some issues.
When I recompiled the packages which installed into /etc/init.d/
tftp-hpa got recompiled and no longer worked through xinetd.
I "solved" the problem by running tftp manually so that my thin clients
could get a kernel.
The other issue is that my firewall rules, created with guarddog, no longer worked,
and blocked ssh, rsync, nfs ... (not refused, just hangs when trying to ssh)
Since I have a firewall on the Linksys router, I don't really need a firewall on my
internal computers since my lan is small and reasonably trusted. So for now I've
just stopped iptables until I get a chance to write new rules which work. |
|
Back to top |
|
|
|
|
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
|
|