Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 26 May 2010 19:59:54 -0700 (PDT)
From:      Bill Tillman <btillman99@yahoo.com>
To:        freebsd-questions@freebsd.org
Subject:   Diskless Booting Router
Message-ID:  <848683.61901.qm@web36504.mail.mud.yahoo.com>

next in thread | raw e-mail | index | archive | help
Thank to all who replied on my previous request for information about diskless booting. I am now that much closer to my goal of having a totally diskless router. It's working right now but there are still two major bugs I need to work out.
1. When the FreeBSD box which is my diskless router boots it gets an IP address and gateway information from the dhcp server. This dhcp server also server also serves IP addresses to all other machines on my LAN. The problem is when the 2nd NIC which is attached to my cable modem picks up it's IP address from the cable modem the default route is already set and thus it doesn't get set to the modem's IP, thus I can't access anything outside of my LAN. I have manually deleted the default route and then added the correct route and all works well. But of course I need to automate this so it takes care of itself on reboot.
I'm thinking my choices here are to use a group in my dhcpd.conf file which doesn't assign a default router. I'm just wondering if this will work. My other choice would be if there is some flag or switch I could use in my /etc/rc.conf file for the 2md NIC's dhcp. Does dhclient allow the command to force whatever route comes from the cable modem to override the current default route? My last and most painful choice is to write a script which would sleep for a few seconds to wait on everything to settle down and then delete the default route and add a new one. The trouble with this is that occasionally the cable modem route will be different so hard coding into a script will mean that I will always have to be on the lookout for changes.
2. The second bug is that once the router is up and running even though I have built a new custom kernel to allow all by default, when I load my IPFW rules from /etc which is nfs mounted it craps out after the first rule is run and I have to reboot the server. I have temporarily worked around this by copying the set of IPFW rules into a file in the mfs area. When I riun it from there it goes well and then my router is working and in a true diskless manner.
Any advice would be appreciated.


      



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?848683.61901.qm>