Date: Tue, 29 Mar 2011 11:19:49 -0700 From: Jason Helfman <jhelfman@e-e.com> To: Nerius Landys <nlandys@gmail.com> Cc: FreeBSD Mailing List <freebsd-questions@freebsd.org> Subject: Re: Using "/etc/rc.d/netif start" Message-ID: <20110329181949.GH15983@eggman.experts-exchange.com> In-Reply-To: <AANLkTi=W8RpLUyz%2BFbfNJmFm%2BbDd-T8go%2BowO3iOUMA0@mail.gmail.com> References: <AANLkTi=W8RpLUyz%2BFbfNJmFm%2BbDd-T8go%2BowO3iOUMA0@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Mar 29, 2011 at 10:40:19AM -0700, Nerius Landys thus spake: >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? In my experience, I've found it best to restart 'routing,' as well. /etc/rc.d/routing restart -jgh -- Jason Helfman System Administrator experts-exchange.com http://www.experts-exchange.com/M_4830110.html E4AD 7CF1 1396 27F6 79DD 4342 5E92 AD66 8C8C FBA5
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110329181949.GH15983>