• Welcome to Hurricane Electric's IPv6 Tunnel Broker Forums.

How to create a local tunel from one to other mashine

Started by arkadietz, November 02, 2010, 10:59:45 AM

Previous topic - Next topic

arkadietz

for example i have a freebsd and centos

This is my configartion
My freebsd: http://www51.zippyshare.com/v/99269890/file.html
My Linux: http://www51.zippyshare.com/v/53057398/file.html

I want to create a tunel between this mashines 'cause now the ping is too high ( mashines are in same place )

[root@shadow (~)]: ping6 ipv6.host-bg.net
PING6(56=40+8+8 bytes) 2001:470:26:210::3 --> 2001:470:1f0a:12ac::2
16 bytes from 2001:470:1f0a:12ac::2, icmp_seq=0 hlim=64 time=46.521 ms
16 bytes from 2001:470:1f0a:12ac::2, icmp_seq=1 hlim=64 time=46.984 ms
16 bytes from 2001:470:1f0a:12ac::2, icmp_seq=2 hlim=64 time=45.822 ms
16 bytes from 2001:470:1f0a:12ac::2, icmp_seq=3 hlim=64 time=46.076 ms

This is ping from freebsd to centos

FreeBSD ifconfig -a
[root@shadow (~)]: ifconfig -a
fxp0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=2008<VLAN_MTU,WOL_MAGIC>
        ether 00:50:8b:50:7d:42
        inet6 fe80::250:8bff:fe50:7d42%fxp0 prefixlen 64 scopeid 0x1
        nd6 options=3<PERFORMNUD,ACCEPT_RTADV>
        media: Ethernet autoselect (100baseTX <full-duplex>)
        status: active
plip0: flags=8851<UP,POINTOPOINT,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
ipfw0: flags=8801<UP,SIMPLEX,MULTICAST> metric 0 mtu 65536
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
        options=3<RXCSUM,TXCSUM>
        inet 127.0.0.1 netmask 0xff000000
        inet6 ::1 prefixlen 128
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x4
        nd6 options=3<PERFORMNUD,ACCEPT_RTADV>
gif0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> metric 0 mtu 1280
        tunnel inet 78.159.142.222 --> 216.66.80.98
        inet6 fe80::250:8bff:fe50:7d42%gif0 prefixlen 64 scopeid 0x5
        inet6 2001:470:26:210::3 prefixlen 64
        inet6 2001:470:26:210::4 prefixlen 64
        inet6 2001:470:26:210::5 prefixlen 64
        inet6 2001:470:26:210::6 prefixlen 64
        inet6 2001:470:26:210::7 prefixlen 64
        inet6 2001:470:26:210::8 prefixlen 64
        inet6 2001:470:26:210::9 prefixlen 64
        inet6 2001:470:26:210::10 prefixlen 64
        inet6 2001:470:26:210::11 prefixlen 64
        inet6 2001:470:26:210::12 prefixlen 64
        inet6 2001:470:26:210::13 prefixlen 64
        inet6 2001:470:26:210::14 prefixlen 64
        inet6 2001:470:26:210::15 prefixlen 64
        inet6 2001:470:26:210::16 prefixlen 64
        inet6 2001:470:26:210::17 prefixlen 64
        inet6 2001:470:26:210::18 prefixlen 64
        inet6 2001:470:26:210::19 prefixlen 64
        inet6 2001:470:26:210::20 prefixlen 64
        inet6 2001:470:26:210::21 prefixlen 64
        inet6 2001:470:26:210::22 prefixlen 64
        inet6 2001:470:26:210::23 prefixlen 64
        inet6 2001:470:26:210::24 prefixlen 64
        inet6 2001:470:26:210::25 prefixlen 64
        inet6 2001:470:26:210::26 prefixlen 64
        inet6 2001:470:26:210::27 prefixlen 64
        inet6 2001:470:26:210::28 prefixlen 64
        inet6 2001:470:26:210::29 prefixlen 64
        inet6 2001:470:26:210::30 prefixlen 64
        inet6 2001:470:26:210::31 prefixlen 64
        inet6 2001:470:26:210::32 prefixlen 64
        inet6 2001:470:26:210::33 prefixlen 64
        inet6 2001:470:26:210::34 prefixlen 64
        inet6 2001:470:26:210::35 prefixlen 64
        inet6 2001:470:26:210::36 prefixlen 64
        inet6 2001:470:26:210::37 prefixlen 64
        inet6 2001:470:26:210::38 prefixlen 64
        inet6 2001:470:26:210::39 prefixlen 64
        inet6 2001:470:26:210::40 prefixlen 64
        inet6 2001:470:26:210::41 prefixlen 64
        inet6 2001:470:26:210::42 prefixlen 64
        inet6 2001:470:26:210::43 prefixlen 64
        inet6 2001:470:26:210::44 prefixlen 64
        inet6 2001:470:26:210::45 prefixlen 64
        inet6 2001:470:26:210::46 prefixlen 64
        inet6 2001:470:26:210::47 prefixlen 64
        inet6 2001:470:26:210::48 prefixlen 64
        inet6 2001:470:26:210::49 prefixlen 64
        inet6 2001:470:26:210::50 prefixlen 64
        inet6 2001:470:26:210::51 prefixlen 64
        inet6 2001:470:26:210::52 prefixlen 64
        inet6 2001:470:26:210::53 prefixlen 64
        inet6 2001:470:26:210::54 prefixlen 64
        inet6 2001:470:26:210::55 prefixlen 64
        inet6 2001:470:26:210::56 prefixlen 64
        inet6 2001:470:26:210::57 prefixlen 64
        inet6 2001:470:26:210::58 prefixlen 64
        inet6 2001:470:26:210::59 prefixlen 64
        inet6 2001:470:26:210::60 prefixlen 64
        inet6 2001:470:26:210::61 prefixlen 64
        inet6 2001:470:26:210::62 prefixlen 64
        inet6 2001:470:26:210::63 prefixlen 64
        inet6 2001:470:26:210::64 prefixlen 64
        inet6 2001:470:26:210::65 prefixlen 64
        inet6 2001:470:26:210::66 prefixlen 64
        inet6 2001:470:26:210::67 prefixlen 64
        inet6 2001:470:26:210::68 prefixlen 64
        inet6 2001:470:26:210::69 prefixlen 64
        inet6 2001:470:26:210::70 prefixlen 64
        inet6 2001:470:26:210::71 prefixlen 64
        inet6 2001:470:26:210::72 prefixlen 64
        inet6 2001:470:26:210::73 prefixlen 64
        inet6 2001:470:26:210::74 prefixlen 64
        inet6 2001:470:26:210::75 prefixlen 64
        inet6 2001:470:26:210::76 prefixlen 64
        inet6 2001:470:26:210::77 prefixlen 64
        inet6 2001:470:26:210::78 prefixlen 64
        inet6 2001:470:26:210::79 prefixlen 64
        inet6 2001:470:26:210::80 prefixlen 64
        inet6 2001:470:26:210::81 prefixlen 64
        inet6 2001:470:26:210::82 prefixlen 64
        inet6 2001:470:26:210::83 prefixlen 64
        inet6 2001:470:26:210::84 prefixlen 64
        inet6 2001:470:26:210::85 prefixlen 64
        inet6 2001:470:26:210::86 prefixlen 64
        inet6 2001:470:26:210::87 prefixlen 64
        inet6 2001:470:26:210::88 prefixlen 64
        inet6 2001:470:26:210::89 prefixlen 64
        inet6 2001:470:26:210::90 prefixlen 64
        inet6 2001:470:26:210::91 prefixlen 64
        inet6 2001:470:26:210::92 prefixlen 64
        inet6 2001:470:26:210::93 prefixlen 64
        inet6 2001:470:26:210::94 prefixlen 64
        inet6 2001:470:26:210::95 prefixlen 64
        inet6 2001:470:26:210::96 prefixlen 64
        inet6 2001:470:26:210::97 prefixlen 64
        inet6 2001:470:26:210::98 prefixlen 64
        inet6 2001:470:26:210::99 prefixlen 64
        inet6 2001:470:26:210::100 prefixlen 64
        inet6 2001:470:25:210::2 --> 2001:470:25:210::1 prefixlen 128
        nd6 options=3<PERFORMNUD,ACCEPT_RTADV>
        options=1<ACCEPT_REV_ETHIP_VER>
tun0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> metric 0 mtu 1492
        options=80000<LINKSTATE>
        inet 78.159.142.222 --> 10.0.0.1 netmask 0xffffff00
        Opened by PID 690
gif1: flags=8010<POINTOPOINT,MULTICAST> metric 0 mtu 1280
        inet6 fe80::250:8bff:fe50:7d42%gif1 prefixlen 64 scopeid 0x7
        inet6 2001:470:1f0a:9bd::4 --> 2001:470:1f0a:9bd::3 prefixlen 128
        nd6 options=3<PERFORMNUD,ACCEPT_RTADV>
        options=1<ACCEPT_REV_ETHIP_VER>
                                                                                                                                                                                 [root@shadow (~)]:
CentOS ifconfig -a
root@Aphrodite:~# ifconfig -a
eth0      Link encap:Ethernet  HWaddr FF:FF:FF:FF:FF:FF
          inet6 addr: fe80::fdff:ffff:feff:ffff/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:218103795 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
          Interrupt:201 Base address:0x8000

eth1      Link encap:Ethernet  HWaddr 00:0C:6E:33:C7:69
          inet6 addr: fec0::c:20c:6eff:fe33:c769/64 Scope:Site
          inet6 addr: 2002:55c4:9fd2:c:20c:6eff:fe33:c769/64 Scope:Global
          inet6 addr: fe80::20c:6eff:fe33:c769/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:30379951 errors:0 dropped:0 overruns:0 frame:0
          TX packets:24786633 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:621010844 (592.2 MiB)  TX bytes:2871208682 (2.6 GiB)
          Interrupt:185

eth2      Link encap:Ethernet  HWaddr 00:26:54:0C:75:4D
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1 errors:0 dropped:0 overruns:0 carrier:1
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 b)  TX bytes:60 (60.0 b)
          Interrupt:177 Base address:0xa000

he-ipv6   Link encap:IPv6-in-IPv4
          inet6 addr: 2001:470:9d08::11/48 Scope:Global
          inet6 addr: 2001:470:9d08::10/48 Scope:Global
          inet6 addr: 2001:470:9d08::1/48 Scope:Global
          inet6 addr: 2001:470:9d08::20/48 Scope:Global
          inet6 addr: 2001:470:9d08::13/48 Scope:Global
          inet6 addr: 2001:470:9d08::2/48 Scope:Global
          inet6 addr: 2001:470:1f0a:12ac::2/64 Scope:Global
          inet6 addr: 2001:470:9d08::12/48 Scope:Global
          inet6 addr: 2001:470:9d08::3/48 Scope:Global
          inet6 addr: 2001:470:9d08::15/48 Scope:Global
          inet6 addr: 2001:470:9d08::4/48 Scope:Global
          inet6 addr: 2001:470:9d08::14/48 Scope:Global
          inet6 addr: 2001:470:9d08::5/48 Scope:Global
          inet6 addr: 2001:470:9d08::17/48 Scope:Global
          inet6 addr: 2001:470:9d08::6/48 Scope:Global
          inet6 addr: 2001:470:9d08::16/48 Scope:Global
          inet6 addr: 2001:470:9d08::7/48 Scope:Global
          inet6 addr: 2001:470:9d08::19/48 Scope:Global
          inet6 addr: 2001:470:9d08::8/48 Scope:Global
          inet6 addr: 2001:470:9d08::18/48 Scope:Global
          inet6 addr: 2001:470:9d08::9/48 Scope:Global
          inet6 addr: fe80::4e9f:8e9f/128 Scope:Link
          UP POINTOPOINT RUNNING NOARP  MTU:1472  Metric:1
          RX packets:2291975 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2315599 errors:349 dropped:0 overruns:0 carrier:349
          collisions:0 txqueuelen:0
          RX bytes:343596609 (327.6 MiB)  TX bytes:238287105 (227.2 MiB)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:28765428 errors:0 dropped:0 overruns:0 frame:0
          TX packets:28765428 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:2615365246 (2.4 GiB)  TX bytes:2615365246 (2.4 GiB)

ppp0      Link encap:Point-to-Point Protocol
          inet addr:78.159.142.159  P-t-P:10.0.0.1  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1492  Metric:1
          RX packets:15137494 errors:0 dropped:0 overruns:0 frame:0
          TX packets:14748621 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3
          RX bytes:1872996323 (1.7 GiB)  TX bytes:1464613934 (1.3 GiB)

sit0      Link encap:IPv6-in-IPv4
          NOARP  MTU:1480  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

root@Aphrodite:~#

broquea

What kind of tunnel did you want to create? 6in6? Your linux box only shows 6in4 tunnel interfaces, and your freebsd machine shows no v4 on the gif interface. You'll need to consult documentation (probably online, use google) for configuring 6in6 on both platforms properly.

arkadietz

i want to make a local tunel ipv6 to ipv6

This is ipv4

[root@shadow (~)]: ping 78.159.142.159
PING 78.159.142.159 (78.159.142.159): 56 data bytes
64 bytes from 78.159.142.159: icmp_seq=0 ttl=63 time=13.507 ms
64 bytes from 78.159.142.159: icmp_seq=1 ttl=63 time=13.201 ms
64 bytes from 78.159.142.159: icmp_seq=2 ttl=63 time=13.258 ms
64 bytes from 78.159.142.159: icmp_seq=3 ttl=63 time=13.290 ms
^C
--- 78.159.142.159 ping statistics ---
4 packets transmitted, 4 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 13.201/13.314/13.507/0.116 ms
                                                                                                                                                                                 [root@shadow (~)]:
Where is 100 ms ping where is 10 ?

lukec

Also be aware that your /64 prefixes are not sequential...but I guess you already know that.
Regards
lukec

jimb

If you want to connect two boxes separated by an IPv4 network, just use 6in4 or GRE.

If both boxes have their own separate tunnels to HE, just route their /64s to each other over a separate 6in4 tunnel.  If only one has a tunnel to HE, get a routed /48 and assign a subnet to the other machine, and route that space to it over a 6in4 tunnel.

Pretty simple.

arkadietz

All is up just watch. Above mashines have a tunel to HE. After some minutes my friends told me theese tunels is not good, and i would be think about a 6to4. So, i want to know that is right my method for ipv6 or not. Than how i must to do it right way..

FreeBSD:

# FreeBSD IPv6 Network Configuration
ipv6_enable="YES" : Turn on IPv6 networking support.

# IPv6 Tunnel Client
gif_interfaces="gif0"
gifconfig_gif0="78.159.142.222 216.66.80.98"
ipv6_ifconfig_gif0="2001:470:25:210::2 2001:470:25:210::1 prefixlen 128"
ipv6_defaultrouter="2001:470:25:210::1"

# IPv6 Gateway
ipv6_config_nfe0="2001:470:26:210::1 prefixlen 64"
ipv6_gateway_enable="YES"
rtadvd_enable="YES"
rtadvd_interfaces="fxp0"

Is it right this or not ? ( if not what i must change )

If u must to it with 6to4 how it should be? ( the right script )