IPv6 setup script ... doesn't work!!

Mario Hoerich lists at MHoerich.de
Wed Mar 9 17:02:31 PST 2005


# Fafa Diliha Romanova:
>#     ifconfig gif create

Try uncommenting this (by removing the '#').

>      gifconfig gif0 inet 213.187.181.70 213.121.24.85

Looks like a typo, this is probably just ifconfig.


>      route add -inet6 default fe80::%gif0

The shell will mangle this.  Quote it, like 'fe80::%gif0'. 


>      ifconfig fxp0 inet6 2001:618:400:6ad9:: prefixlen 64

Replace every occurence of fxp0 with your ethernet NIC (i.e. xl0).


>      sysctl ?w net.inet6.ip6.forwarding=1
              ^^
Another typo, this is supposed to be -w. 


>      echo "IPv6 activation complete!" ||
>      { echo "IPv6 activation failed!" 1>&2; exit 1; }
>      ;;

Eh? So if echo on stdout fails, we're moving to stderr?
What am I missing here?

I'd guess the actual intent was more like

    /usr/sbin/rtadvd fxp0
    if [ $? = "0" ]; then
        echo "IPv6 activated."
    else
        echo "IPv6 activation failed." 1>&2
        exit 1
    fi
    
 
>      gifconfig gif0 delete
>      echo "IPv6 deactivation complete!" ||
>      { echo "IPv6 deactivation failed!" 1>&2; exit 1; }
>      ;;

More junk code.

 
>   echo "Usage: $0 {start|stop|restart}"

    echo "Usage: `basename $0` {start|stop|restart}"  1>&2 

 
> Where did I go wrong?

You didn't.  The script is rotten.

Regards,
Mario


More information about the freebsd-questions mailing list