OpenBSD Journal

Heads up: ifconfig changes

Contributed by jose on from the new-networking-capabilities dept.

On December 3, Markus Friedl made a kernel and userland change to pseudo-devices for networking. This change adds interface cloning capabilities to the system. Because of this change, you'll need to make sure that you have everything properly updated.

If youre updating the kernel then you need to make sure you have updated:

  • 1) /etc/netstart and /sbin/ifconfig, otherwise gif and other pseudo network interfaces will not get created
  • 2) in order to recompile ifconfig you need to do
               # cd /usr/src && make includes
    
    for /usr/include/sys/sockio.h
If you are upgrading using binary snapshots, then you will want to make sure you upgrade your /etc/netstart script to ensure that networking works correctly.

(Comments are closed)


Comments
  1. Comments
    1. By Christopher () christopher@themanor.net on mailto:christopher@themanor.net

      Allows the pseudo interfaces (gif, tun, etc) to be created at runtime using ifconfig create

      So no more compile-time limits on pseudo interfaces in the kernel! (ie: no more excuses not to use GENERIC :)

      Comments
      1. By gwyllion () on

        So all the "pseudo-device interface 2" will disappear? Nice.

      2. By Brad () brad at comstyle dot com on mailto:brad at comstyle dot com

        The real gain is being able to create/delete interfaces while the OS is running. You did NOT have to recompile a kernel in the past to change most of the pseudo-interfaces. You had to use the UKC or "config -ef" to modify the kernel.

    2. By Alejandro G. Belluscio () baldusi_NOTWORKING@hotmail.com on mailto:baldusi_NOTWORKING@hotmail.com

      Read the man page.
      You can do:

      #ifconfig create vlan0
      #ifconfig destroy vlan0

      Comments
      1. By Anonymous Coward () on

        #ifconfig create vlan0
        #ifconfig destroy vlan0

        COOL!

      2. By Anonymous Coward () on

        you mean....I can destroy all those useless interfaces that show up when I do ifconfig -A and only want to see the nics? NEAT! Can't wait for 3.5 virtual interfaces and CARP...mmmmmmm

        Comments
        1. By Heinz Holtschmit () heinz at bsdcoders . org on http://www.bsdcoders.org/

          why wait ? :- )

          move to -current-

        2. By Dan () on

          CARP at current state can't be used for statefull firewalls

        3. By djm () on

          Better - you don't have to destroy the interfaces, as they will not exist until you explicitly create them.

          This is also really nice for things like vlan interfaces, now you can create more without a reboot.

      3. By ajax () on

        out of curiosity, why make new verbs for this? why not just make it so that (say) assigning an address to a non-existant, clonable interface causes it to be created? (obviously this would only create interfaces that you'd compiled in support for.)

        just a cosmetic complaint, and it may be planned to add this feature. just wondering.

        Comments
        1. By Jason Wright () jason@openbsd.org on mailto:jason@openbsd.org

          Because not all interfaces accept addresses. bridge(4) for example.

  2. By .................................................. () on

    This only for -current and snapshots?

    Comments

Credits

Copyright © - Daniel Hartmeier. All rights reserved. Articles and comments are copyright their respective authors, submission implies license to publish on this web site. Contents of the archive prior to as well as images and HTML templates were copied from the fabulous original deadly.org with Jose's and Jim's kind permission. This journal runs as CGI with httpd(8) on OpenBSD, the source code is BSD licensed. undeadly \Un*dead"ly\, a. Not subject to death; immortal. [Obs.]