ifconfig and route problem.

Ruslan Ermilov ru at FreeBSD.org
Wed Feb 25 05:42:37 PST 2004


On Tue, Feb 24, 2004 at 12:47:34PM +0000, DrumFire wrote:
> Hi,
> 
> this is my configuration:
> 
> rl0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
>         options=8<VLAN_MTU>
>         inet 192.168.100.1 netmask 0xffffff00 broadcast 192.168.100.255
>         ether 00:30:84:9e:9d:26
>         media: Ethernet autoselect (100baseTX <full-duplex>)
>         status: active
> 
> and this is my default route 
> 
> default            192.168.100.254      UGS         0        0    rl0
> 
> If I write something of this:
> 
> # ifconfig rl0 $ip (where ip can be also 192.168.100.1), my default
> route is deleted, cut off server for my net.
> 
The reason why this is done is because each route has a pointer to
one of the interface's address, and when this adress gets deleted,
we invalidate the entry too.  Not doing this caused us many problems
before.  You can see this linkage by using the following command:

	route -vn get default

> There's a way to avoid ifconfig delete my default route when I modify 
> a ipaddress?
> 
Unfortunately not, because there's no such operation like modifying
an IP address -- you essentially remove one address and replace it
with a new one (there's no such thing like SIOCCIFADDR).


Cheers,
-- 
Ruslan Ermilov
FreeBSD committer
ru at FreeBSD.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-net/attachments/20040225/05322d1f/attachment.bin


More information about the freebsd-net mailing list