Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 8 Feb 2005 22:29:42 -0600
From:      Jay <jay@meangrape.com>
To:        freebsd-questions@freebsd.org
Subject:   Can't delete an interface alias SIOCDIFADDR
Message-ID:  <20050209042942.GI43604@mail.meangrape.com>

next in thread | raw e-mail | index | archive | help

--3U8TY7m7wOx7RL1F
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

I've got a network interface with 3 IP addresses.  I can't delete the
third alias.  Is it possible to delete this alias without taking hte
interface down?

cabernet# ifconfig fxp0
fxp0: flags=3D9843<UP,BROADCAST,RUNNING,SIMPLEX,LINK0,MULTICAST> mtu 1500
        options=3D48<VLAN_MTU,POLLING>
        inet 209.223.7.159 netmask 0xffffffff broadcast 209.223.7.159
        inet 209.223.7.157 netmask 0xffffffc0 broadcast 209.223.7.191
        inet 209.233.7.161 netmask 0xffffffff broadcast 209.233.7.161
        ether 00:06:29:af:d9:ea
        media: Ethernet 100baseTX <full-duplex>
        status: active

cabernet# ifconfig fxp0 delete 209.223.7.161/32
ifconfig: 209.223.7.161/32: bad value
cabernet# ifconfig fxp0 delete 209.223.7.161
ifconfig: ioctl (SIOCDIFADDR): Can't assign requested address
cabernet# ifconfig fxp0 -alias 209.223.7.161
ifconfig: ioctl (SIOCDIFADDR): Can't assign requested address

OK, maybe there's some other reference in the system that I need to
delete like a route or an arp entry.

cabernet# route get 209.223.7.161
   route to: merlot
destination: 209-223-7-128.sub3.oplnk.net
       mask: 255.255.255.192
  interface: fxp0
      flags: <UP,DONE,CLONING>
 recvpipe  sendpipe  ssthresh  rtt,msec    rttvar  hopcount      mtu
expire
       0         0         0         0         0         0      1500
-1667241=20

cabernet# arp -a -i fxp0
209-223-7-129.sub3.oplnk.net (209.223.7.129) at 00:00:0c:fa:2f:68 on
fxp0 [ethernet]
ns1.meangrape.com (209.223.7.157) at 00:06:29:af:d9:ea on fxp0 permanent
[ethernet]
mail.meangrape.com (209.223.7.159) at 00:06:29:af:d9:ea on fxp0
permanent [ethernet]

cabernet# arp -d merlot.meangrape.com
delete: cannot locate merlot.meangrape.com
cabernet# arp -d 209.223.7.161
delete: cannot locate 209.223.7.161
i
cabernet# netstat -nr
Routing tables

Internet:
Destination        Gateway            Flags    Refs      Use  Netif
Expire
default            209.223.7.129      UGS         0  1722778   fxp0
127.0.0.1          127.0.0.1          UH          0   223547    lo0
192.168.0          link#2             UC          0        0    rl1
192.168.0.1        00:50:ba:54:00:ac  UHLW        0        6    lo0
209.223.7.128/26   link#3             UC          0        0   fxp0
209.223.7.129      00:00:0c:fa:2f:68  UHLW        1        0   fxp0
1169
209.223.7.157      00:06:29:af:d9:ea  UHLW        0      650    lo0
209.223.7.158      00:50:ba:43:9e:a4  UHLW        0        4    lo0 =3D>
209.223.7.158/32   link#1             UC          0        0    rl0
209.223.7.159      00:06:29:af:d9:ea  UHLW        0        4    lo0 =3D>
209.223.7.159/32   link#3             UC          0        0   fxp0
209.223.7.160      00:50:ba:43:9e:a4  UHLW        0       24    lo0 =3D>
209.223.7.160/32   link#1             UC          0        0    rl0
209.233.7.161/32   link#3             UC          0        0   fxp0

cabernet# route delete 209.223.7.161/21
route: writing to routing socket: No such process
delete net 209.223.7.161: not in table


--=20
Jay.

--3U8TY7m7wOx7RL1F
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (FreeBSD)

iD8DBQFCCZG2tcZrSsNkJBoRAnfaAJ9VEfa8kTSEYaQpm1etFPSYRK9JgQCfZ+zc
jJpV5KhJRnpBuh8ZoAHLO+0=
=6rIf
-----END PGP SIGNATURE-----

--3U8TY7m7wOx7RL1F--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050209042942.GI43604>