On Tue, Jan 23, 2007 at 12:05:56AM +0200, Paul Irofti wrote:
> I have changed one of my workstation's IP with:
> 
> $ sudo ifconfig vr0 inet 192.168.1.64
> 
> Afterwards some applications (trn, rtorrent, gaim) acknowledged the
> change and worked on the fly. Others, such as irssi, worked on a random
> basis (i.e. restarting it would lead to connecting or not to the
> servers). Firefox, mutt, snownews, lynx didn't even bother.
> 
> I did modify the /etc/hostname.vr0 and /etc/hosts files before executing
> the command. 
> 
> I couldn't find any solution to this. Is it something I'm missing? I
> felt pretty dumb having to reboot my machine in order to solve this.
> 
> OpenBSD 4.0-current (GENERIC) #810: Tue Jan  9 11:36:49 MST 2007
> [EMAIL PROTECTED]:/usr/src/sys/arch/amd64/compile/GENERIC
> 

Changing the IP address of an interface while running needs some
consideration.

a) check that the interface was correctly configured
b) check your routing table and reenter the routes that depend on vr0
        when you change the IP of an interface the routing table often
        does not realize this change -- trust me you don't want to know
        why.
c) restart all applications which were listening on the old IP address
        bind, ntpd and many other UDP daemons fall in this category.
d) restart all applications with open tcp session that used vr0
        tcp sessions are sticky

A good way to reconfigure your network is to "route -n flush" and
"sh /etc/netstart". This works in many cases and if it fails it is often
the easiest to reboot your system because it is faster then figuring out
what the hell went wrong.

-- 
:wq Claudio

Reply via email to