From owner-freebsd-questions Mon Sep 29 06:45:18 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id GAA11077 for questions-outgoing; Mon, 29 Sep 1997 06:45:18 -0700 (PDT) Received: from horton.iaces.com (proot@horton.iaces.com [204.147.87.98]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id GAA11068 for ; Mon, 29 Sep 1997 06:45:13 -0700 (PDT) Received: (from proot@localhost) by horton.iaces.com (8.8.5/8.8.5) id IAA26849; Mon, 29 Sep 1997 08:44:59 -0500 (CDT) From: "Paul T. Root" Message-Id: <199709291344.IAA26849@horton.iaces.com> Subject: Re: DHCP client To: brunell@uwplatt.edu (Matt Brunell) Date: Mon, 29 Sep 1997 08:44:59 -0500 (CDT) Cc: questions@FreeBSD.ORG In-Reply-To: <342DBD3D.313E@uwplatt.edu> from Matt Brunell at "Sep 27, 97 09:13:17 pm" X-Organization: !nterprise Networking Services - ACES X-Phone: (612) 664-3385 X-Fax: (612) 664-4779 X-Page: (800) SKY-PAGE PIN: 537-7270 X-Address: 600 Stinson Blvd, Fl 1S X-Address: Minneapolis, MN 55413 X-Mailer: ELM [version 2.4ME+ PL22 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk 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