[c-nsp] GRE tunnel to FreeBSD

Mohacsi Janos mohacsi at niif.hu
Thu Oct 26 03:10:05 EDT 2006




On Thu, 26 Oct 2006, Nick Kraal wrote:

> Perhaps try:
>
> In /etc/rc.conf
>
> # ---Tunnel Interface Configuration---
> gif_interfaces="gif0"
> gifconfig_gif0="<source_IP> <destination_IP>"
> ifconfig_gif0="inet <IP_address>  netmask <dotted_quad>"
>
> Then run /etc/netstart
>
> Should be right and will keep the tunnel up after reboot.

The only problem with the abocv setup: this is not a GRE tunnel. Only a 
simple ip-over-ip tunnel... Usually used to transport IPv6 over IPv4 
transport.

Regards,

Janos Mohacsi
Network Engineer, Research Associate, Head of Network Planning
NIIF/HUNGARNET, HUNGARY
Key 70EF9882: DEC2 C685 1ED4 C95A 145F  4300 6F64 7B00 70EF 9882


>
> -nick/
>
>
> Tuc at T-B-O-H.NET wrote:
>>> On Tue, 24 Oct 2006, Tuc at T-B-O-H.NET wrote:
>>>
>>> TaTBOHN> 	Wondering if anyone had experience with a GRE tunnel to a
>>> TaTBOHN> FreeBSD server.
>>> TaTBOHN>
>>> TaTBOHN> I've set it up on 2 devices on the same subnet. Would this be a problem from
>>> TaTBOHN> the start? I have my FreeBSD at 192.168.3.21 and gre0 looks like :
>>> TaTBOHN>
>>> TaTBOHN> gre0: flags=9051<UP,POINTOPOINT,RUNNING,LINK0,MULTICAST> mtu 1476
>>> TaTBOHN>         tunnel inet 192.168.3.21 --> 192.168.3.149
>>> TaTBOHN>         inet6 fe80::212:3fff:fedd:58b2%gre0 prefixlen 64 scopeid 0x7
>>> TaTBOHN>         inet 192.168.3.21 --> 192.168.3.149 netmask 0xffffffff
>>>
>>> You have incorrect configuration - same ip addresses inside and outside
>>> tunnel.
>>>
>> 	The man page was a little confusing. I saw :
>>
>> EXAMPLES
>>      Configuration example:
>>
>>      Host X-- Host A  ----------------tunnel---------- Cisco D------Host E
>>                \                                          |
>>                 \                                        /
>>                  +------Host B----------Host C----------+
>>
>>      On host A (FreeBSD):
>>
>>            route add default B
>>            ifconfig greN create
>>            ifconfig greN A D netmask 0xffffffff linkX up
>>            ifconfig greN tunnel A D
>>            route add E D
>>
>>      On Host D (Cisco):
>>
>>            Interface TunnelX
>>             ip unnumbered D   ! e.g. address from Ethernet interface
>>             tunnel source D   ! e.g. address from Ethernet interface
>>             tunnel destination A
>>            ip route C <some interface and mask>
>>            ip route A mask C
>>            ip route X mask tunnelX
>>
>>
>> 	So I did :
>>
>> ifconfig gre0 create
>> ifconfig gre0 192.168.3.21 192.168.3.149 netmask 0xffffffff link0 up
>> ifconfig gre0 tunnel 192.168.3.21 192.168.3.149
>>
>> 	Should the last one be the 2 IPs I want to have the tunnel
>> IPs be, like :
>>
>> ifconfig gre0 10.0.1.1 10.0.1.2
>>
>> 	???
>>
>> 			Thanks, Tuc
>> _______________________________________________
>> cisco-nsp mailing list  cisco-nsp at puck.nether.net
>> https://puck.nether.net/mailman/listinfo/cisco-nsp
>> archive at http://puck.nether.net/pipermail/cisco-nsp/
> _______________________________________________
> cisco-nsp mailing list  cisco-nsp at puck.nether.net
> https://puck.nether.net/mailman/listinfo/cisco-nsp
> archive at http://puck.nether.net/pipermail/cisco-nsp/
>


More information about the cisco-nsp mailing list