From owner-freebsd-questions@FreeBSD.ORG Tue Mar 29 17:40:21 2011 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 C54B9106564A for ; Tue, 29 Mar 2011 17:40:21 +0000 (UTC) (envelope-from nlandys@gmail.com) Received: from mail-gy0-f182.google.com (mail-gy0-f182.google.com [209.85.160.182]) by mx1.freebsd.org (Postfix) with ESMTP id 860B68FC08 for ; Tue, 29 Mar 2011 17:40:20 +0000 (UTC) Received: by gyg13 with SMTP id 13so205191gyg.13 for ; Tue, 29 Mar 2011 10:40:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:date:message-id:subject:from:to :content-type; bh=oV1dx/8gqjmDJKECdcq2Q/KSZxmGfjckPiDnQJhVoM4=; b=OIbGmbQdJ0+Vn19kg1QKGA563ffVk7POft3CNsaExjG7T66rpeCfktaHeTeicEtal4 7sdc/aP6NiV4fgegeoklLCtqLd8daA/+91xwP/TpJWobaVEnR+obyZ1OY04Gv4jDWzb6 CTKaVimecapTmTzCFPWk/zvaYmEqY9xocN4l8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=b8GjCY9CLC6muW7STvnnOyUGBsnw0eDfCtVDo3SqEFjOkxmyYzLULzhjLzxSaAdW2t M1ccQl3fFbjcrs9hq+Xyixduiu6SBZj0eYljz5fRy72JJ0SPazgPcO4jQEaXawH3EJ3J jj4mKXl8XnJVjhigsCMw1cnF5cXZekNNo2b7I= MIME-Version: 1.0 Received: by 10.236.66.44 with SMTP id g32mr94832yhd.137.1301420419671; Tue, 29 Mar 2011 10:40:19 -0700 (PDT) Received: by 10.146.168.8 with HTTP; Tue, 29 Mar 2011 10:40:19 -0700 (PDT) Date: Tue, 29 Mar 2011 10:40:19 -0700 Message-ID: From: Nerius Landys To: FreeBSD Mailing List Content-Type: text/plain; charset=ISO-8859-1 Subject: Using "/etc/rc.d/netif start" 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: Tue, 29 Mar 2011 17:40:21 -0000 First off, I'm on 9.0-CURRENT-i386, but I don't think that will make a difference for purposes of my question. I think the freebsd-current folks are expecting questions that are much harder than this one. I'm trying to use /etc/rc.d/netif to bring down and bring back up all network interfaces, because I'm trying to get the correct entries in /etc/rc.conf for testing some extra network cards. So right now, my /etc/rc.conf looks like this: defaultrouter="192.168.0.254" hostname="elmer.i" ifconfig_em0="inet 192.168.0.6 netmask 255.255.255.0" /etc/resolv.conf looks like this: domain i nameserver 192.168.0.254 I'm basically in a LAN. When I boot up this "elmer.i" machine, everything works well. Then, I do the following two commands: /etc/rc.d/netif stop /etc/rc.d/netif start After these, I'm still able to ping a raw IP LAN address such as 192.168.0.254. However, two problems start occurring: 1. I cannot ping an IP address that is outside of my LAN, e.g. > ping 64.156.192.169 PING 64.156.192.169 (64.156.192.169): 56 data bytes ping: sendto: No route to host 2. DNS (via 192.168.0.254 nameserver) won't work at first, but starts to magically work when I for example enable sshd and log in to elmer from another host on the LAN So the nut of my question is, I think "/etc/rc.d/netif stop" stops some additional things such as packet routing that the corresponding "/etc/rc.d/netif start" command won't start back up. So what is the best way to bring down the network and bring it back up again for purposes of testing /etc/rc.conf syntax?