From owner-freebsd-questions@FreeBSD.ORG Thu Feb 12 21:08:55 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B16AF1065670 for ; Thu, 12 Feb 2009 21:08:55 +0000 (UTC) (envelope-from tajudd@gmail.com) Received: from wf-out-1314.google.com (wf-out-1314.google.com [209.85.200.168]) by mx1.freebsd.org (Postfix) with ESMTP id 806088FC08 for ; Thu, 12 Feb 2009 21:08:55 +0000 (UTC) (envelope-from tajudd@gmail.com) Received: by wf-out-1314.google.com with SMTP id 27so836876wfd.7 for ; Thu, 12 Feb 2009 13:08:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=TcSwuW0u/IkDqsz6kAQsF5WFZ7A2RMNYl8nuJFKCync=; b=pGpqWs8aSRxjZmD9KoiKrL3emSYoeaFeld8+vSyUB9LagMzsyxbq6cq9HdrSyCki7f mwtisnkmV+fTCkQjXXFYcr7gifVqcU5ZqC2oVWCOl5cCLZsB/Nx5rmPTcdph3sr3nDix RwUfPmF6DRSKQV7ArN2Z4BuZV3p0ghYJyPHT4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=WVxxZO1s5fSMxiXqHaVhdTdUTF87Qlqk3G84OgNp/SRSm0p9AwNW0HxkCDqHGjlWI7 XIUh4siKx6/+O5Kuy6ltFTqgKxQJ0gq4wo1+2gBuU0jbYFgG7FjLvQRGvEfQLfb3aNfW sACTNyne8zdqan0lghNqvpj25MHpO7DCXnA3M= Received: by 10.114.94.12 with SMTP id r12mr554735wab.156.1234472934934; Thu, 12 Feb 2009 13:08:54 -0800 (PST) Received: from ?192.168.4.44? (c-68-35-57-46.hsd1.nm.comcast.net [68.35.57.46]) by mx.google.com with ESMTPS id z15sm710644pod.14.2009.02.12.13.08.53 (version=SSLv3 cipher=RC4-MD5); Thu, 12 Feb 2009 13:08:54 -0800 (PST) Message-ID: <49948FC5.3070008@gmail.com> Date: Thu, 12 Feb 2009 14:08:21 -0700 From: Tim Judd User-Agent: Thunderbird 2.0.0.19 (Windows/20081209) MIME-Version: 1.0 To: Nikolaj Thygesen References: <49947FC4.4000400@diamondbox.dk> In-Reply-To: <49947FC4.4000400@diamondbox.dk> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: FreeBSD Questions Subject: Re: Assigning static ip address X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Feb 2009 21:08:56 -0000 Nikolaj Thygesen wrote: > Hi list, > > I've been experimenting and googling for hours w/ no luck. All I > want to do is run dhcp and then replace the ip address of the > interface with a new static ip afterwards. I've been looking at the > /etc/dhclient.conf man pages, but they don't seem to help. I can do it > from rc.conf like: > > ifconfig_em0="inet 1.2.3.4" > > but then I loose all the other dhcp parameters like dns and stuff. Is > it really that hard??? > > thanks - Nikolaj Your rc.conf line is incomplete. Even if that line was complete, your route would be missing Your /etc/resolv.conf gets rewritten by dhclient every time it renews the IP. Given your rc.conf statement is incomplete, is why you lose 100% connectivity. Basic networking on a LAN (meaning: NO INTERNET) is IP address and subnet basic networking ON the internet needs a router in addition to the above full internet working needs DNS server in addition to the above. You don't even hit the Basic w/out Internet. Please either give details from rc.conf, or read it's manpage so we can point you to the manpage again. --Tim