incorrect behaviour if interface ip address is deleted with ifconfig

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

incorrect behaviour if interface ip address is deleted with ifconfig

Franjo Severinac
Hello OpenBSD team,

I found a strange behaviour of the interface, when the ip address is deleted with "ifconfig pcn0 delete". Here a more detailed describtion:

Environment:
       
        System : OpenBSD 3.9 Generic, OpenBSD 4.0 snapshot (from 07.09)
        Architecture: OpenBSD.i386
        Machine : i386

Describtion: It is possible to send packets to the network without having an ip-address bound to an interface. While the ip address of the interface is deleted, it is possible to communicate to a host, if an static arp entry is made with the mac address of that host.

 

How-To-Repeat:

1. route flush // flush all routes

2. ifconfig pcn0 delete // delete ip address of interface

3. ifconfig pcn0 192.1.2.111 // assign new ip address

4. arp -s 192.1.2.4 00:50:56:57:58:e2 // make static arp entry of host to which should be communicated

5. ifconfig pcn0 delete // delete ip address of interface

6. ping 192.1.2.4 or send anything other to 192.1.2.4

Example:

After ip address is beeing deleted: ifconfig -a

lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 33224
 groups: lo
 inet 127.0.0.1 netmask 0xff000000
 inet6 ::1 prefixlen 128
 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x5
pcn0: flags=8a43<UP,BROADCAST,RUNNING,ALLMULTI,SIMPLEX,MULTICAST> mtu 1500
 lladdr 00:50:56:57:58:cc
 groups: egress
 media: Ethernet autoselect (autoselect)
 inet6 fe80::250:56ff:fe00:cc%pcn0 prefixlen 64 scopeid 0x1
pflog0: flags=0<> mtu 33224
pfsync0: flags=0<> mtu 1460
 groups: carp
enc0: flags=0<> mtu 1536

Route entries: route show -inet

Routing tables

Internet:
Destination Gateway Flags Refs Use Mtu Interface
localhost localhost UH 0 0 33224 lo0
192.1.2.4 00:50:56:57:58:e2 UHLS 0 9 - pcn0

Arp entry: arp -a

? (192.1.2.4) at 00:50:56:57:58:e2 on pcn0 static

ping 192.1.2.4 && tcpdump -Nnei pcn0

09:32:02.699035 0:50:56:57:58:cc 0:50:56:57:58:e2 0800 98: 192.1.2.111 > 192.1.2.4: icmp: echo request
09:32:03.690099 0:50:56:57:58:cc 0:50:56:57:58:e2 0800 98: 192.1.2.111 > 192.1.2.4: icmp: echo request

I hope you can explain this strange behavior. Any answer of this problem is welcome.

Greetings

Franjo Severinac


       
Der WEB.DE SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
*http://smartsurfer.web.de/?mc=100071&distributionid=000000000066* [http://smartsurfer.web.de/?mc=100071&distributionid=000000000066]