Date: Mon, 29 Sep 1997 08:44:59 -0500 (CDT) From: "Paul T. Root" <proot@horton.iaces.com> To: brunell@uwplatt.edu (Matt Brunell) Cc: questions@FreeBSD.ORG Subject: Re: DHCP client Message-ID: <199709291344.IAA26849@horton.iaces.com> In-Reply-To: <342DBD3D.313E@uwplatt.edu> from Matt Brunell at "Sep 27, 97 09:13:17 pm"
next in thread | previous in thread | raw e-mail | index | archive | help
In a previous message, Matt Brunell said: > Hello, > I am trying to configure the network on FreeBSD 2.2.2-RELEASE but the > network I'm on is a dhcp network. Anyway, I've got my EtherExpress 16 > card recognized by the kernel, but even with the gateway and DNS servers > named, I get the message 'network is unreachable'. I _think_ I need a > dhcp client package or a port. I've read a bit a documentation and it > says a bit about wide and isc dhcp servers that also support client > stuff, but I'm confused about what exactly to do. I've also seen people > referring to bootp, but nobody says what bootp is exactly. Help. > Thanks in advance > --Matt 1) Install the wide-dhcp from packages. 2) 2) Rebuild kernel to add the berkeley packet filter (if needed) options bpfilter 4 Then there are a couple of different ways to get it started. 3a) Put dhcpc.sh in /usr/local/etc/rc.d: #!/bin/sh # Change to your interface interface=ix0 killproc() { pid=`ps -ax |egrep $1 |sed -e 's/^ *//' -e 's/ .*//'` [ "$pid" != "" ] && kill $pid } case "$1" in 'start') # Make sure the interface is configured ifconfig $interface >/dev/null # ensure that client exists if [ $? -eq 0 -f /usr/local/sbin/dhcpc ]; then # -d start in debug mode (seems to work better # -r update resolv.conf /usr/local/sbin/dhcpc -dr $interface echo -n ' dhcpc' fi ;; 'stop') killproc dhcpc ;; *) echo "Usage: $0 start|stop" ;; esac 3b) Or use the rc.network method, buy putting your interface in rc.conf, blank: network_interfaces="ix0 lo0" ifconfig_lo0="inet 127.0.0.1" ifconfig_ix0= and then create a start_if.ix0 file in /etc (Probably about the same as the start portion of the above script). 3b is probably the better choice, since it brings up the interface much sooner in the boot process. Paul. --- All in the golden afternoon While little hands make vain pretence Full leisurely we glide; Our wanderings to guide. For both our oars, with little skill, By little arms are plied, --Lewis Caroll
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199709291344.IAA26849>