One-liner for setting IPv6 address and IPv4 endpoints on gif interface?

Yuri Pankov yuri.pankov at
Sat Jul 5 19:42:45 UTC 2008

On Sat, Jul 05, 2008 at 03:02:35PM -0400, Boris Kochergin wrote:
> Hi, list. I set up an IPv6-over-IPv4 tunnel from Hurricane Electric  
> using a gif(4) interface using the commands:
> ifconfig gif0 tunnel [source IPv4] [destination IPv4]
> ifconfig gif0 inet6 [source IPv6] [destination IPv6] prefixlen 128
> route -n add -inet6 default [destination IPv6]
> I'm wondering whether there's a one-liner for executing the first two  
> commands, or some non-one-liner way of making it happen through  
> /etc/rc.conf. Thanks.
> -Boris

Not sure about one-liner, but that's what I'm using in rc.conf
(Hurricane Electric's tunnel):

gifconfig_gif0="src_ipv4 dst_ipv4"
ipv6_ifconfig_gif0="src_ipv6 dst_ipv6 prefixlen 128"


More information about the freebsd-net mailing list