NetBSD Problem Report #9395

Received: (qmail 9926 invoked from network); 12 Feb 2000 00:30:30 -0000
Message-Id: <200002120030.BAA01934@lyssa.zhadum.de>
Date: Sat, 12 Feb 2000 01:30:26 +0100 (CET)
From: Matthias Scheler <tron@lyssa.zhadum.de>
Reply-To: tron@lyssa.zhadum.de
To: gnats-bugs@gnats.netbsd.org
Subject: IP address cannot be changed with "ifconfig"
X-Send-Pr-Version: 3.95

>Number:         9395
>Category:       kern
>Synopsis:       IP address cannot be changed with "ifconfig"
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Feb 11 16:33:00 +0000 2000
>Closed-Date:    Thu Jan 31 08:08:41 +0000 2002
>Last-Modified:  Thu Jan 31 08:09:00 +0000 2002
>Originator:     Matthias Scheler
>Release:        2000/02/10
>Organization:
Matthias Scheler                            http://www.sighardstrasse.de/~tron/
>Environment:
System: NetBSD lyssa.zhadum.de 1.4S NetBSD 1.4S (LYSSA) #0: Thu Feb 10 11:27:13 CET 2000 tron@lyssa.zhadum.de:/src/sys/compile/LYSSA i386

>Description:
During manual configuration of my NIC in single user mode I made typo in
the IP address. Several attempts to correct the IP address with "ifconfig"
failed: an "ifconfig" showed the correct address but TCP/IP didn't work.

At the beginning the network works fine:

tron@lyssa:~#ifconfig tl0
tl0: flags=8863<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        media: Ethernet autoselect (100baseTX)
        status: active
        inet 194.123.44.242 netmask 0xfffffff0 broadcast 194.123.44.255
        inet6 tl0%fe80::208:c7ff:fea4:712f prefixlen 64 scopeid 0x1
tron@lyssa:~#ping -c 2 194.123.44.241
PING colwyn.zhadum.de (194.123.44.241): 56 data bytes
64 bytes from 194.123.44.241: icmp_seq=0 ttl=255 time=0.620 ms
64 bytes from 194.123.44.241: icmp_seq=1 ttl=255 time=0.291 ms

----colwyn.zhadum.de PING Statistics----
2 packets transmitted, 2 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 0.291/0.456/0.620/0.233 ms

Now I change the IP address to another free one:

tron@lyssa:~#ping -c 2 194.123.44.243
PING sandra.zhadum.de (194.123.44.243): 56 data bytes

----sandra.zhadum.de PING Statistics----
2 packets transmitted, 0 packets received, 100.0% packet loss
tron@lyssa:~#ifconfig tl0 inet 194.123.44.243 netmask 255.255.255.240
tron@lyssa:~#ping -c 2 194.123.44.241
PING colwyn.zhadum.de (194.123.44.241): 56 data bytes

----colwyn.zhadum.de PING Statistics----
2 packets transmitted, 0 packets received, 100.0% packet loss

The network is dead now. If I change the IP address back to the original
value "ping" will work again:

tron@lyssa:~#ifconfig tl0 inet 194.123.44.242 netmask 255.255.255.240
tron@lyssa:~#ping -c 2 194.123.44.241
PING colwyn.zhadum.de (194.123.44.241): 56 data bytes
64 bytes from 194.123.44.241: icmp_seq=0 ttl=255 time=0.314 ms
64 bytes from 194.123.44.241: icmp_seq=1 ttl=255 time=0.286 ms

----colwyn.zhadum.de PING Statistics----
2 packets transmitted, 2 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 0.286/0.300/0.314/0.020 ms

>How-To-Repeat:
1.) Boot a system to single user mode.
2.) "ifconfig" the primary network interface with a wrong IP address.
3.) Assign the correct IP address to the interface
4.) Try to "ping" a host.

>Fix:
Sorry, I don't know.

>Release-Note:
>Audit-Trail:

From: Thilo Manske <Thilo.Manske@HEH.Uni-Oldenburg.DE>
To: Matthias Scheler <tron@lyssa.zhadum.de>
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: kern/9395: IP address cannot be changed with "ifconfig"
Date: Sat, 12 Feb 2000 06:49:57 +0100

 On Sat, Feb 12, 2000 at 01:30:26AM +0100, Matthias Scheler wrote:
 > At the beginning the network works fine:
 > 
 > tron@lyssa:~#ifconfig tl0
 > tl0: flags=8863<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST> mtu 1500
 >         media: Ethernet autoselect (100baseTX)
 >         status: active
 >         inet 194.123.44.242 netmask 0xfffffff0 broadcast 194.123.44.255
 >         inet6 tl0%fe80::208:c7ff:fea4:712f prefixlen 64 scopeid 0x1
 > tron@lyssa:~#ping -c 2 194.123.44.241
 > PING colwyn.zhadum.de (194.123.44.241): 56 data bytes
 > 64 bytes from 194.123.44.241: icmp_seq=0 ttl=255 time=0.620 ms
 > 64 bytes from 194.123.44.241: icmp_seq=1 ttl=255 time=0.291 ms
 > 
 > ----colwyn.zhadum.de PING Statistics----
 > 2 packets transmitted, 2 packets received, 0.0% packet loss
 > round-trip min/avg/max/stddev = 0.291/0.456/0.620/0.233 ms
 > 
 > Now I change the IP address to another free one:
 >
 > tron@lyssa:~#ping -c 2 194.123.44.243
 > PING sandra.zhadum.de (194.123.44.243): 56 data bytes
 Maybe you should try
 "arp -d 194.123.44.243"
 (and for every other entry added by this interface as well)

 And if this still doesn't work
 "arp -d <old-ip#-of-nic>"
 as well.

 Or just wait until the entries in the ARP cache are flushed.
 (Maybe some magic is needed in ifconfig to flush the arp cache?)

 Pretty annoying, but it works for me:
 (Not in single user mode BTW)

 # ifconfig epic0 10.2.0.2 netmask 255.255.255.0
 # ping -c 1 -n 10.2.0.1
 PING 10.2.0.1 (10.2.0.1): 56 data bytes
 64 bytes from 10.2.0.1: icmp_seq=0 ttl=255 time=0.524 ms
 [...]
 # ifconfig epic0 10.2.0.3 netmask 255.255.255.0
 # ping -c 1 -n 10.2.0.1
 PING 10.2.0.1 (10.2.0.1): 56 data bytes
 ^C
 [...]
 # arp -d 10.2.0.1
 # ping -c 1 -n 10.2.0.1
 PING 10.2.0.1 (10.2.0.1): 56 data bytes
 64 bytes from 10.2.0.1: icmp_seq=0 ttl=255 time=0.513 ms
 [...]
 -- 
 Dies ist Thilos Unix Signature! Viel Spass damit.

From: Matthias Scheler <tron@zhadum.de>
To: Thilo Manske <Thilo.Manske@HEH.Uni-Oldenburg.DE>
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: kern/9395: IP address cannot be changed with "ifconfig"
Date: Sat, 12 Feb 2000 12:11:28 +0100

 On Sat, Feb 12, 2000 at 06:49:57AM +0100, Thilo Manske wrote:
 > Maybe you should try
 > "arp -d 194.123.44.243"
 > (and for every other entry added by this interface as well)
 > 
 > And if this still doesn't work
 > "arp -d <old-ip#-of-nic>"
 > as well.

 Yes, deleting *all* ARP entries fixes the problem for me, too.

 -- 
 Matthias Scheler                            http://www.sighardstrasse.de/~tron/

From: Manuel Bouyer <bouyer@antioche.lip6.fr>
To: Matthias Scheler <tron@lyssa.zhadum.de>
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: kern/9395: IP address cannot be changed with "ifconfig"
Date: Sun, 13 Feb 2000 18:49:52 +0100

 On Sat, Feb 12, 2000 at 01:30:26AM +0100, Matthias Scheler wrote:
 > [...]
 > 
 > >How-To-Repeat:
 > 1.) Boot a system to single user mode.
 > 2.) "ifconfig" the primary network interface with a wrong IP address.
 > 3.) Assign the correct IP address to the interface
 > 4.) Try to "ping" a host.

 I think you need to delete the one adress before assigning a new one:
 ifconfig xxx aaa.bbb.ccc.ddd delete
 Works for me. Now I'm not sure if ifconfig should automically do this,
 or if the SIOCSIFADDR should fails if the adress already exists.

 --
 Manuel Bouyer <bouyer@antioche.eu.org>
 --

From: Matthias Scheler <tron@zhadum.de>
To: Manuel Bouyer <bouyer@antioche.lip6.fr>
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: kern/9395: IP address cannot be changed with "ifconfig"
Date: Mon, 14 Feb 2000 09:52:51 +0100

 On Sun, Feb 13, 2000 at 06:49:52PM +0100, Manuel Bouyer wrote:
 > I think you need to delete the one adress before assigning a new one:
 > ifconfig xxx aaa.bbb.ccc.ddd delete

 No, that doesn't help. Only Thilo Manske's hint to remove all ARP entries
 works for me.

 	Kind regards

 -- 
 Matthias Scheler                            http://www.sighardstrasse.de/~tron/
State-Changed-From-To: open->closed 
State-Changed-By: itojun 
State-Changed-When: Thu Jan 31 00:08:34 PST 2002 
State-Changed-Why:  
should have gone 

From: itojun@itojun.org (Jun-ichiro itojun Hagino)
To: gnats-bugs@gnats.netbsd.org
Cc:  
Subject: Re: kern/9395
Date: Thu, 31 Jan 2002 17:08:07 +0900 (JST)

 the issue should have gone with recent changes to cloned routes.
 itojun
>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.