[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how to restart network without rebooting

On 27/02/2002, Darren Reed <avalon_(_at_)_coombs_(_dot_)_anu_(_dot_)_edu_(_dot_)_au> wrote Cc misc_(_at_)_openbsd_(_dot_)_org:
> Uh, that's not a good idea.
> Just re-running /etc/netstart will not undo the previous configuration.

Basically yes..

> Unless you want to undo everything that netstart did in the first place,
> by hand, you are better of just rebooting the box.

Why by hand? :}

Quick hack:
for if in `ifconfig -a | awk -F: '/UP/ {print $1}'` ; do
	ifconfig $if down
	ifconfig $if delete
route -n flush
arp -ad

This is not bullet proof, and in several occasions (hello wim ;) )
I have seen, that it is not working. Especially in the case I 
have in mind (was on 18C3) the new network setting was not
really working til the machine was not only rebooted, but
also powered down for some seconds.
Usual error condition: incomplete arp entries for
whatever host you've tried to ping.

Wim, this have been fxp(4) cards, or? Dunno if this is
specific to this cards or not.

Just as a reminder, if ARP fails, and you *think* everything
you have done is ok, just power the box down once.

I dont know, those funky x86 mainboards seem to not properly
reset their PCI configurations w/o power-loss. A 'warm' reboot
is not always enough.

Philipp Buehler, aka fips | sysfive.com GmbH | BOfH | NUCH | <double-p> 

#1: Break the clue barrier!
#2: Already had buzzword confuseritis ?