ifconfig sets up ipv6 address automatically? - Slackware

This is a discussion on ifconfig sets up ipv6 address automatically? - Slackware ; Hi. I'm running Linux 2.6.23.14 with Slackware 12.0 and have had my first exposure to ipv6. It seems that ifconfig (from net-tools 1.60) will automatically assign an ipv6 address to my ethernet interface when I configure it for an ipv4 ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: ifconfig sets up ipv6 address automatically?

  1. ifconfig sets up ipv6 address automatically?

    Hi. I'm running Linux 2.6.23.14 with Slackware 12.0 and have had
    my first exposure to ipv6. It seems that ifconfig (from net-tools
    1.60) will automatically assign an ipv6 address to my ethernet
    interface when I configure it for an ipv4 address, whether I want
    one or not. I.e. the command:

    ifconfig eth0 inet 192.168.1.10 up

    will cause both the ipv4 address and also an ipv6 address to
    materialise on eth0.

    This was a problem for me, as I have a Java application which sets
    the QoS/ToS bits on outgoing packets, and there's a bug (#4792724)
    with Java wherein it can't set those bits for ipv4 packets on an
    ipv4/ipv6 system.

    If I do an

    ifconfig eth0 del /

    to delete the ipv6 address then the Java application works as it
    used to, stuck squarely back in ipv4 land.

    My question is - how can I stop ifconfig from setting up an ipv6
    address *automatically*? I can't see any obvious 'do not set up ipv6
    by default' option in its man page. I thought my specifying 'inet'
    explicitly when I 'up' it, as per my example command above,
    would stop it from adding the ipv6 address ... but it doesn't. So
    my startup scripts have to be a bit less elegant and run ifconfig
    a second time to delete the ipv6 address once it's added the ipv4
    address. I would have hoped there was a way to stop ifconfig from
    doing its ipv6 thing.

    I guess I could just stop my ipv6 module from being loaded, chop
    things off at its roots by making the system a pure ipv4 machine.
    I just thought there would have been a way to tell ipconfig not
    to create the ipv6 address automatically if ipv6 was loaded/available.

    While I'm here ... can someone point me to the facility that does
    all the 'automatic' loading of the modules I see with 'lsmod'
    right after I boot my Slackware system, like ipv6? I know
    /etc/rc.d/rc.modules loads *some* ... /etc/modprobe.d/blacklist
    says that the 'hotplug' scripts do it. My Slackware 11.0 system
    had an /etc/hotplug directory, but that's not there in Slackware 12.0?

    Thanks,


    Brad

  2. Re: ifconfig sets up ipv6 address automatically?

    Brad wrote:
    >
    > My question is - how can I stop ifconfig from setting up an ipv6
    > address *automatically*?


    Create some file in /etc/modprobe.d with the following contents:
    alias net-pf-10 off # ipv6

    The name of the file doesn't matter as all files in /etc/modprobe.d
    will be examined by modprobe.

    Regards,

    Kees.

    --
    Kees theunissen.

  3. Re: ifconfig sets up ipv6 address automatically?

    On Feb 29, 4:31 am, Brad wrote:
    > Hi. I'm running Linux 2.6.23.14 with Slackware 12.0 and have had
    > my first exposure to ipv6. It seems that ifconfig (from net-tools
    > 1.60) will automatically assign an ipv6 address to my ethernet
    > interface when I configure it for an ipv4 address, whether I want
    > one or not. I.e. the command:
    >
    > ifconfig eth0 inet 192.168.1.10 up
    >
    > will cause both the ipv4 address and also an ipv6 address to
    > materialise on eth0.
    >
    > This was a problem for me, as I have a Java application which sets
    > the QoS/ToS bits on outgoing packets, and there's a bug (#4792724)
    > with Java wherein it can't set those bits for ipv4 packets on an
    > ipv4/ipv6 system.
    >
    > If I do an
    >
    > ifconfig eth0 del /
    >
    > to delete the ipv6 address then the Java application works as it
    > used to, stuck squarely back in ipv4 land.
    >
    > My question is - how can I stop ifconfig from setting up an ipv6
    > address *automatically*? I can't see any obvious 'do not set up ipv6
    > by default' option in its man page. I thought my specifying 'inet'
    > explicitly when I 'up' it, as per my example command above,
    > would stop it from adding the ipv6 address ... but it doesn't. So
    > my startup scripts have to be a bit less elegant and run ifconfig
    > a second time to delete the ipv6 address once it's added the ipv4
    > address. I would have hoped there was a way to stop ifconfig from
    > doing its ipv6 thing.
    >
    > I guess I could just stop my ipv6 module from being loaded, chop
    > things off at its roots by making the system a pure ipv4 machine.
    > I just thought there would have been a way to tell ipconfig not
    > to create the ipv6 address automatically if ipv6 was loaded/available.
    >
    > While I'm here ... can someone point me to the facility that does
    > all the 'automatic' loading of the modules I see with 'lsmod'
    > right after I boot my Slackware system, like ipv6? I know
    > /etc/rc.d/rc.modules loads *some* ... /etc/modprobe.d/blacklist
    > says that the 'hotplug' scripts do it. My Slackware 11.0 system
    > had an /etc/hotplug directory, but that's not there in Slackware 12.0?
    >
    > Thanks,
    >
    > Brad


    Besides,
    $ sudo echo "blacklist ipv6" >> /etc/modprobe.d/blacklist
    is also effective, if ipv6 is as an module in your kernel.

  4. Re: ifconfig sets up ipv6 address automatically?

    Cherife Li wrote:

    > Besides,
    > $ sudo echo "blacklist ipv6" >> /etc/modprobe.d/blacklist
    > is also effective, if ipv6 is as an module in your kernel.


    That's probably more elegant than 'alias net-pf-10 off',
    thanks!


    Brad

+ Reply to Thread