[IPv6-wien] Hilfe bzgl. 6in4 zu oe1xrmw2

Stefan Schultheis (home) (spam-protected)
Fri Sep 21 13:41:07 CEST 2012


Hallo die Runde6,

habe heute mit Joe und Gottfried mehrmals telefoniert (danke an die beiden).

Ziel war, dass wir ein RB750 (oe1xrmw2) so herrichten, dass es als
Tunnelserver für 6in4 Tunnel herhält. Joe hätte es dann in die Crypta
gestellt und wir hätten einen zentralen Tunnelpunkt und könnten IPv6 bis in
Internet fahren.

Das funktioniert auch schon FAST!

Folgendes habe ich gemacht:
 1) opkg install 6in4 ip6tables kmod-ip6tables
 2) Interface in /etc/config/network dazufügen:
---
config interface '6in4'
    option proto 6in4
    option ipaddr '193.238.156.35'
    option ip6addr '2a02:60:3:9fd5::6/128'
    option peeraddr '193.238.156.21'
---
 3) Firewall anpassen (Protokoll 41 zulassen & Interface in die Zone
dazufügen):
---
config rule
    option target 'ACCEPT'
    option name '6in4 crypta Stefan'
    option src '0xFF'
    option proto '41'
    option family 'ipv4'

config zone
    option name '0xFF'
    option output 'ACCEPT'
    option forward 'ACCEPT'
    option masq '1'
    option input 'ACCEPT'
    option network 'air0 wan 6in4'    # <- hier das neue Interface rein!
---
 4) OLSRd auf 6and4 stellen.

Mit diesen Schritten schaut's total super aus, ABER:
Das sit0-Interface bleibt down und wird offenbar nicht richtig
initialisiert (hätte sonst auch eine andere MTU):
(spam-protected):/etc/config# ifconfig sit0 up
(spam-protected):/etc/config# ifconfig sit0
sit0      Link encap:IPv6-in-IPv4
          inet6 addr: ::193.238.156.35/96 Scope:Compat
          inet6 addr: ::192.168.1.250/96 Scope:Compat
          inet6 addr: ::127.0.0.1/96 Scope:Unknown
          UP RUNNING NOARP  MTU:1480  Metric:1
          RX packets:195 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:15600 (15.2 KiB)  TX bytes:0 (0.0 B)

Wenn man ein TCPdump macht, sieht man die Pakete von meiner Seite (ein
Ubuntu-Rechner):
---
(spam-protected):/etc/config# tcpdump -i sit0
tcpdump: WARNING: sit0: no IPv4 address assigned
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on sit0, link-type RAW (Raw IP), capture size 65535 bytes
13:24:02.408753 IP6 2a02:60:3:9fd5::5.698 > ff02::6d.698: OLSRv6, seq
0xa24c, length 32
13:24:05.718633 IP6 2a02:60:3:9fd5::5.698 > ff02::6d.698: OLSRv6, seq
0xa24d, length 32
13:24:11.056702 IP6 2a02:60:3:9fd5::5.698 > ff02::6d.698: OLSRv6, seq
0xa24e, length 32
^C
3 packets captured
3 packets received by filter
0 packets dropped by kernel
---
Siehe auch beiliegendes File für Wireshark.

Bedeutet für mich, dass der 6in4 Tunnel in eine Richtung schon recht fein
funktioniert. Der OLSRd bindet sich nicht an das sit0-Interface:
---
(spam-protected):/etc/config# netstat -a | grep 698
udp        0      0 OE1XRW2.OZW.wien.funkfeuer.at:698 0.0.0.0:*

udp     2240      0 0.0.0.0:698             0.0.0.0:*

udp        0      0 2a02:60:3:9c23::1:698
:::*
udp        0      0 :::698
:::*
---

Wenn ich nun folgende Zeilen an die /var/etc/olsrd.conf.ipv6 anhänge:
---
Interface "sit0"
{
    Mode "mesh"
}
---
und eine Ipv6-Adresse setze:
---
(spam-protected):/etc/config# ifconfig sit0 add 2a02:60:3:9fd5::6/128
---
und manuell neu starte (nicht über /etc/init.d weil dann würde er die
Konfig in /var/etc überschreiben).

Dann sehe ich im tcpdump, dass der OLSRd sich an das Interface bindet und
Pakete rausschickt:
---
(spam-protected):/tmp/etc# tcpdump -i sit0
tcpdump: WARNING: sit0: no IPv4 address assigned
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on sit0, link-type RAW (Raw IP), capture size 65535 bytes
13:34:39.061624 IP6 2a02:60:3:9fd5::6.698 > ff02::6d.698: OLSRv6, seq
0x7199, length 56
13:34:39.283978 IP6 2a02:60:3:9fd5::5.698 > ff02::6d.698: OLSRv6, seq
0xa2dd, length 32
13:34:42.438045 IP6 2a02:60:3:9fd5::6.698 > ff02::6d.698: OLSRv6, seq
0x719a, length 56
13:34:42.737100 IP6 2a02:60:3:9fd5::5.698 > ff02::6d.698: OLSRv6, seq
0xa2de, length 32
^C
4 packets captured
4 packets received by filter
0 packets dropped by kernel
---

Die Pakete vom Routerboard kommen aber bei meinem Ubuntu nicht an!


Könnt ihr mir helfen, wie ich in OpenWRT das Tunnelinterface richtig
initialisiere, sodass nach einem Reboot die Einstellungen übernommen
werden, die FW damit umgehen kann und auch OLSR das Interface akzeptiert?
Habt ihr da Ideen oder Erfahrungen? Mir überscheiben die OpenWRT-Scripts
immer die relevanten Werte und ich vermute dort das Problem.

Danke,
LgS
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.funkfeuer.at/pipermail/ipv6-wien/attachments/20120921/e140f1b0/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 6in4-oex1-2.pcap
Type: application/octet-stream
Size: 2808 bytes
Desc: not available
URL: <http://lists.funkfeuer.at/pipermail/ipv6-wien/attachments/20120921/e140f1b0/attachment.obj>


More information about the IPv6-wien mailing list