Subject: kern/9395: IP address cannot be changed with "ifconfig"
To: None <gnats-bugs@gnats.netbsd.org>
From: Matthias Scheler <tron@lyssa.zhadum.de>
List: netbsd-bugs
Date: 02/11/2000 16:33:38
>Number:         9395
>Category:       kern
>Synopsis:       IP address cannot be changed with "ifconfig"
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people (Kernel Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Feb 11 16:33:00 2000
>Last-Modified:
>Originator:     Matthias Scheler
>Organization:
Matthias Scheler                            http://www.sighardstrasse.de/~tron/
>Release:        <NetBSD-current source date>
>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.

>Audit-Trail:
>Unformatted: