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

Re: net-tools future

On Sun, Mar 22, 2009 at 10:55:58AM +0100, Florian Weimer wrote:
> * Wouter Verhelst:
> > On Sat, Mar 21, 2009 at 10:53:55PM +0100, Florian Weimer wrote:
> >> * Bernd Zeimetz:
> >> > Being able to rename an interface without messing with udev is a
> >> > feature, not a bug.
> >> 
> >> I think you can't rename most interfaces after the boot process
> >> anyway.  Or has the kernel been changed and can rename interfaces
> >> which are in use?
> >
> > How on earth does 'network interface is in use' correlate to 'the system
> > is booting'?
> >
> > ip link set <dev> down
> > ip addr flush dev <dev>
> > <rename address>
> Hmm, this did not really work a couple of years ago once there was
> some process using the network interface in a substantial way.

If you do 'ip link set <dev> down' followed by 'ip addr flush dev
<dev>', then every piece of software using the link will get an
immediate ICMP 'network unreachable' back from the kernel (unless the
network is reachable through another interface, of course). This should
deal with such issues.

> I see this has improved (and libpcap runs into an infinite loop, yay).

To be honest, I haven't tried it. I could imagine that using raw sockets
on a NIC would require a bit more work than the above.

In any case, my point was that it's not like you can't make processes
stop using a NIC. Once you've done that, renaming a NIC should pose no

<Lo-lan-do> Home is where you have to wash the dishes.
  -- #debian-devel, Freenode, 2004-09-22

Reply to: