Я пытаюсь соединить два приемника в Кудже с внешним сервером ONOS. Для этого я определил два туннеля tunslip6:
$ sudo ./tunslip6 -a 127.0.0.2 -p 60002 fd00::1/64
slip connected to ``127.0.0.2:60002''
opened tun device ``/dev/tun1''
ifconfig tun1 inet `hostname` mtu 1500 up
ifconfig tun1 add fd00::1/64
ifconfig tun1 add fe80::0:0:0:1/64
ifconfig tun1
tun1: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST> mtu 1500
inet 127.0.1.1 netmask 255.255.255.255 destination 127.0.1.1
inet6 fe80::1 prefixlen 64 scopeid 0x20<link>
inet6 fd00::1 prefixlen 64 scopeid 0x0<global>
inet6 fe80::dec7:5561:5810:214a prefixlen 64 scopeid 0x20<link>
unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 txqueuelen 500 (UNSPEC)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
И другой туннель создается:
$ sudo ./tunslip6 -a 127.0.0.1 -p 60001 fd00::1/64
slip connected to ``127.0.0.1:60001''
opened tun device ``/dev/tun0''
ifconfig tun0 inet `hostname` mtu 1500 up
ifconfig tun0 add fd00::1/64
ifconfig tun0 add fe80::0:0:0:1/64
ifconfig tun0
tun0: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST> mtu 1500
inet 127.0.1.1 netmask 255.255.255.255 destination 127.0.1.1
inet6 fe80::1 prefixlen 64 scopeid 0x20<link>
inet6 fd00::1 prefixlen 64 scopeid 0x0<global>
inet6 fe80::4e25:161f:f6a3:ae1c prefixlen 64 scopeid 0x20<link>
unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 txqueuelen 500 (UNSPEC)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
Как вы можете видеть, туннели используют разные IP-направления обратной связи иразные порты. Кажется, что туннели созданы правильно.
После этого я запускаю прослушивание ONOS-сервера в порту 9999 и два приемника в Cooja. Эти частички пытаются соединиться TCP-соединением с сервером ONOS через каждый туннель. Но один из них не может завершить настройку TCP-соединения, как вы можете видеть в выводе команды netstat:
$ netstat -ap |grep 9999
(No todos los procesos pueden ser identificados, no hay información de propiedad del proceso
no se mostrarán, necesita ser superusuario para verlos todos.)
tcp6 0 0 [::]:9999 [::]:* LISTEN 4302/java
tcp6 0 0 pelijes:9999 fd00::212:7402:2:2:1025 SYN_RECV -
tcp6 0 0 pelijes:9999 fd00::212:7401:1:1:1025 ESTABLISHED 4302/java
Анализ захватов wireshark по каждому туннелю проскальзывания, который мы можем видеть как первый сегмент настройки TCP из fd00:: 212: 7402: 2: 2/1025 до fd00 :: 1/9999 отправляется по tun1 (первый кадр трассы tun1), но ответ отправляется по tun0 (первый кадр трассы tun0). Таким образом, ответ не приходит к месту назначения. Кто-нибудь знает, почему для запроса и ответа используются разные туннели? Почему система назначает неправильный туннель для ответа сегмента TCP?
Любые предложения приветствуются.
Следы следов проволочной акулы из каждого туннеля:
**
- След проволочной акулы от tun0:
**
No. Time Source Destination Protocol Length Info
1 0.000000000 fd00::1 fd00::212:7402:2:202 TCP 64 9999 → 1025 [SYN, ACK] Seq=0 Ack=1 Win=28800 Len=0 MSS=1440
Frame 1: 64 bytes on wire (512 bits), 64 bytes captured (512 bits) on interface 0
Raw packet data
Internet Protocol Version 6, Src: fd00::1, Dst: fd00::212:7402:2:202
0110 .... = Version: 6
.... 0000 0000 .... .... .... .... .... = Traffic Class: 0x00 (DSCP: CS0, ECN: Not-ECT)
.... .... .... 1100 1101 1011 1001 0011 = Flow Label: 0xcdb93
Payload Length: 24
Next Header: TCP (6)
Hop Limit: 64
Source: fd00::1
Destination: fd00::212:7402:2:202
Transmission Control Protocol, Src Port: 9999, Dst Port: 1025, Seq: 0, Ack: 1, Len: 0
No. Time Source Destination Protocol Length Info
2 0.145446512 fd00::212:7401:1:101 fd00::1 TCP 64 1025 → 9999 [SYN] Seq=0 Win=48 Len=0 MSS=48
Frame 2: 64 bytes on wire (512 bits), 64 bytes captured (512 bits) on interface 0
Raw packet data
Internet Protocol Version 6, Src: fd00::212:7401:1:101, Dst: fd00::1
0110 .... = Version: 6
.... 0000 0000 .... .... .... .... .... = Traffic Class: 0x00 (DSCP: CS0, ECN: Not-ECT)
.... .... .... 0000 0000 0000 0000 0000 = Flow Label: 0x00000
Payload Length: 24
Next Header: TCP (6)
Hop Limit: 64
Source: fd00::212:7401:1:101
Destination: fd00::1
Transmission Control Protocol, Src Port: 1025, Dst Port: 9999, Seq: 0, Len: 0
No. Time Source Destination Protocol Length Info
3 0.145469882 fd00::1 fd00::212:7401:1:101 TCP 64 9999 → 1025 [SYN, ACK] Seq=0 Ack=1 Win=28800 Len=0 MSS=1440
Frame 3: 64 bytes on wire (512 bits), 64 bytes captured (512 bits) on interface 0
Raw packet data
Internet Protocol Version 6, Src: fd00::1, Dst: fd00::212:7401:1:101
0110 .... = Version: 6
.... 0000 0000 .... .... .... .... .... = Traffic Class: 0x00 (DSCP: CS0, ECN: Not-ECT)
.... .... .... 1110 0101 1111 1001 1100 = Flow Label: 0xe5f9c
Payload Length: 24
Next Header: TCP (6)
Hop Limit: 64
Source: fd00::1
Destination: fd00::212:7401:1:101
Transmission Control Protocol, Src Port: 9999, Dst Port: 1025, Seq: 0, Ack: 1, Len: 0
No. Time Source Destination Protocol Length Info
4 0.203630253 fd00::212:7401:1:101 fd00::1 TCP 60 1025 → 9999 [ACK] Seq=1 Ack=1 Win=48 Len=0
Frame 4: 60 bytes on wire (480 bits), 60 bytes captured (480 bits) on interface 0
Raw packet data
Internet Protocol Version 6, Src: fd00::212:7401:1:101, Dst: fd00::1
0110 .... = Version: 6
.... 0000 0000 .... .... .... .... .... = Traffic Class: 0x00 (DSCP: CS0, ECN: Not-ECT)
.... .... .... 0000 0000 0000 0000 0000 = Flow Label: 0x00000
Payload Length: 20
Next Header: TCP (6)
Hop Limit: 64
Source: fd00::212:7401:1:101
Destination: fd00::1
Transmission Control Protocol, Src Port: 1025, Dst Port: 9999, Seq: 1, Ack: 1, Len: 0
No. Time Source Destination Protocol Length Info
5 0.520493425 fd00::212:7401:1:101 fd00::1 TCP 98 1025 → 9999 [PSH, ACK] Seq=1 Ack=1 Win=48 Len=38
Frame 5: 98 bytes on wire (784 bits), 98 bytes captured (784 bits) on interface 0
Raw packet data
Internet Protocol Version 6, Src: fd00::212:7401:1:101, Dst: fd00::1
0110 .... = Version: 6
.... 0000 0000 .... .... .... .... .... = Traffic Class: 0x00 (DSCP: CS0, ECN: Not-ECT)
.... .... .... 0000 0000 0000 0000 0000 = Flow Label: 0x00000
Payload Length: 58
Next Header: TCP (6)
Hop Limit: 64
Source: fd00::212:7401:1:101
Destination: fd00::1
Transmission Control Protocol, Src Port: 1025, Dst Port: 9999, Seq: 1, Ack: 1, Len: 38
Data (38 bytes)
0000 01 26 01 01 01 01 07 64 01 01 00 00 00 00 00 00 .&.....d........
0010 00 12 00 00 00 00 00 12 00 00 00 00 00 00 00 01 ................
0020 7f 00 00 05 0f 27 .....'
No. Time Source Destination Protocol Length Info
6 0.520512014 fd00::1 fd00::212:7401:1:101 TCP 60 9999 → 1025 [ACK] Seq=1 Ack=39 Win=28762 Len=0
Frame 6: 60 bytes on wire (480 bits), 60 bytes captured (480 bits) on interface 0
Raw packet data
Internet Protocol Version 6, Src: fd00::1, Dst: fd00::212:7401:1:101
0110 .... = Version: 6
.... 0000 0000 .... .... .... .... .... = Traffic Class: 0x00 (DSCP: CS0, ECN: Not-ECT)
.... .... .... 1110 0101 1111 1001 1100 = Flow Label: 0xe5f9c
Payload Length: 20
Next Header: TCP (6)
Hop Limit: 64
Source: fd00::1
Destination: fd00::212:7401:1:101
Transmission Control Protocol, Src Port: 9999, Dst Port: 1025, Seq: 1, Ack: 39, Len: 0
No. Time Source Destination Protocol Length Info
7 1.003487493 fd00::1 fd00::212:7402:2:202 TCP 64 [TCP Retransmission] 9999 → 1025 [SYN, ACK] Seq=0 Ack=1 Win=28800 Len=0 MSS=1440
Frame 7: 64 bytes on wire (512 bits), 64 bytes captured (512 bits) on interface 0
Raw packet data
Internet Protocol Version 6, Src: fd00::1, Dst: fd00::212:7402:2:202
0110 .... = Version: 6
.... 0000 0000 .... .... .... .... .... = Traffic Class: 0x00 (DSCP: CS0, ECN: Not-ECT)
.... .... .... 1000 0100 0011 1110 0101 = Flow Label: 0x843e5
Payload Length: 24
Next Header: TCP (6)
Hop Limit: 64
Source: fd00::1
Destination: fd00::212:7402:2:202
Transmission Control Protocol, Src Port: 9999, Dst Port: 1025, Seq: 0, Ack: 1, Len: 0
No. Time Source Destination Protocol Length Info
8 2.015538466 fd00::1 fd00::212:7402:2:202 TCP 64 [TCP Retransmission] 9999 → 1025 [SYN, ACK] Seq=0 Ack=1 Win=28800 Len=0 MSS=1440
Frame 8: 64 bytes on wire (512 bits), 64 bytes captured (512 bits) on interface 0
Raw packet data
Internet Protocol Version 6, Src: fd00::1, Dst: fd00::212:7402:2:202
0110 .... = Version: 6
.... 0000 0000 .... .... .... .... .... = Traffic Class: 0x00 (DSCP: CS0, ECN: Not-ECT)
.... .... .... 1111 1011 0110 0110 0101 = Flow Label: 0xfb665
Payload Length: 24
Next Header: TCP (6)
Hop Limit: 64
Source: fd00::1
Destination: fd00::212:7402:2:202
Transmission Control Protocol, Src Port: 9999, Dst Port: 1025, Seq: 0, Ack: 1, Len: 0
No. Time Source Destination Protocol Length Info
9 3.004050179 fd00::1 fd00::212:7402:2:202 TCP 64 [TCP Retransmission] 9999 → 1025 [SYN, ACK] Seq=0 Ack=1 Win=28800 Len=0 MSS=1440
Frame 9: 64 bytes on wire (512 bits), 64 bytes captured (512 bits) on interface 0
Raw packet data
Internet Protocol Version 6, Src: fd00::1, Dst: fd00::212:7402:2:202
0110 .... = Version: 6
.... 0000 0000 .... .... .... .... .... = Traffic Class: 0x00 (DSCP: CS0, ECN: Not-ECT)
.... .... .... 0011 1100 0111 0000 0100 = Flow Label: 0x3c704
Payload Length: 24
Next Header: TCP (6)
Hop Limit: 64
Source: fd00::1
Destination: fd00::212:7402:2:202
Transmission Control Protocol, Src Port: 9999, Dst Port: 1025, Seq: 0, Ack: 1, Len: 0
No. Time Source Destination Protocol Length Info
10 5.023515885 fd00::1 fd00::212:7402:2:202 TCP 64 [TCP Retransmission] 9999 → 1025 [SYN, ACK] Seq=0 Ack=1 Win=28800 Len=0 MSS=1440
Frame 10: 64 bytes on wire (512 bits), 64 bytes captured (512 bits) on interface 0
Raw packet data
Internet Protocol Version 6, Src: fd00::1, Dst: fd00::212:7402:2:202
0110 .... = Version: 6
.... 0000 0000 .... .... .... .... .... = Traffic Class: 0x00 (DSCP: CS0, ECN: Not-ECT)
.... .... .... 0001 1111 0001 1001 1111 = Flow Label: 0x1f19f
Payload Length: 24
Next Header: TCP (6)
Hop Limit: 64
Source: fd00::1
Destination: fd00::212:7402:2:202
Transmission Control Protocol, Src Port: 9999, Dst Port: 1025, Seq: 0, Ack: 1, Len: 0
No. Time Source Destination Protocol Length Info
11 6.505408192 fd00::1 fd00::212:7402:2:202 TCP 64 [TCP Retransmission] 9999 → 1025 [SYN, ACK] Seq=0 Ack=1 Win=28800 Len=0 MSS=1440
Frame 11: 64 bytes on wire (512 bits), 64 bytes captured (512 bits) on interface 0
Raw packet data
Internet Protocol Version 6, Src: fd00::1, Dst: fd00::212:7402:2:202
0110 .... = Version: 6
.... 0000 0000 .... .... .... .... .... = Traffic Class: 0x00 (DSCP: CS0, ECN: Not-ECT)
.... .... .... 0100 1000 1001 0010 1100 = Flow Label: 0x4892c
Payload Length: 24
Next Header: TCP (6)
Hop Limit: 64
Source: fd00::1
Destination: fd00::212:7402:2:202
Transmission Control Protocol, Src Port: 9999, Dst Port: 1025, Seq: 0, Ack: 1, Len: 0
No. Time Source Destination Protocol Length Info
12 10.519913532 fd00::212:7401:1:101 fd00::1 TCP 73 1025 → 9999 [PSH, ACK] Seq=39 Ack=1 Win=48 Len=13
Frame 12: 73 bytes on wire (584 bits), 73 bytes captured (584 bits) on interface 0
Raw packet data
Internet Protocol Version 6, Src: fd00::212:7401:1:101, Dst: fd00::1
0110 .... = Version: 6
.... 0000 0000 .... .... .... .... .... = Traffic Class: 0x00 (DSCP: CS0, ECN: Not-ECT)
.... .... .... 0000 0000 0000 0000 0000 = Flow Label: 0x00000
Payload Length: 33
Next Header: TCP (6)
Hop Limit: 64
Source: fd00::212:7401:1:101
Destination: fd00::1
Transmission Control Protocol, Src Port: 1025, Dst Port: 9999, Seq: 39, Ack: 1, Len: 13
Data (13 bytes)
0000 01 0d 01 01 01 01 02 63 01 01 00 ff 00 .......c.....
No. Time Source Destination Protocol Length Info
13 10.519926264 fd00::1 fd00::212:7401:1:101 TCP 60 9999 → 1025 [ACK] Seq=1 Ack=52 Win=28749 Len=0
Frame 13: 60 bytes on wire (480 bits), 60 bytes captured (480 bits) on interface 0
Raw packet data
Internet Protocol Version 6, Src: fd00::1, Dst: fd00::212:7401:1:101
0110 .... = Version: 6
.... 0000 0000 .... .... .... .... .... = Traffic Class: 0x00 (DSCP: CS0, ECN: Not-ECT)
.... .... .... 1110 0101 1111 1001 1100 = Flow Label: 0xe5f9c
Payload Length: 20
Next Header: TCP (6)
Hop Limit: 64
Source: fd00::1
Destination: fd00::212:7401:1:101
Transmission Control Protocol, Src Port: 9999, Dst Port: 1025, Seq: 1, Ack: 52, Len: 0
No. Time Source Destination Protocol Length Info
14 10.719538315 fd00::1 fd00::212:7402:2:202 TCP 64 [TCP Retransmission] 9999 → 1025 [SYN, ACK] Seq=0 Ack=1 Win=28800 Len=0 MSS=1440
Frame 14: 64 bytes on wire (512 bits), 64 bytes captured (512 bits) on interface 0
Raw packet data
Internet Protocol Version 6, Src: fd00::1, Dst: fd00::212:7402:2:202
0110 .... = Version: 6
.... 0000 0000 .... .... .... .... .... = Traffic Class: 0x00 (DSCP: CS0, ECN: Not-ECT)
.... .... .... 1001 0011 1011 0101 0001 = Flow Label: 0x93b51
Payload Length: 24
Next Header: TCP (6)
Hop Limit: 64
Source: fd00::1
Destination: fd00::212:7402:2:202
Transmission Control Protocol, Src Port: 9999, Dst Port: 1025, Seq: 0, Ack: 1, Len: 0
No. Time Source Destination Protocol Length Info
15 11.417398557 fd00::1 fd00::212:7401:1:101 TCP 60 9999 → 1025 [FIN, ACK] Seq=1 Ack=52 Win=28749 Len=0
Frame 15: 60 bytes on wire (480 bits), 60 bytes captured (480 bits) on interface 0
Raw packet data
Internet Protocol Version 6, Src: fd00::1, Dst: fd00::212:7401:1:101
0110 .... = Version: 6
.... 0000 0000 .... .... .... .... .... = Traffic Class: 0x00 (DSCP: CS0, ECN: Not-ECT)
.... .... .... 1110 0101 1111 1001 1100 = Flow Label: 0xe5f9c
Payload Length: 20
Next Header: TCP (6)
Hop Limit: 64
Source: fd00::1
Destination: fd00::212:7401:1:101
Transmission Control Protocol, Src Port: 9999, Dst Port: 1025, Seq: 1, Ack: 52, Len: 0
No. Time Source Destination Protocol Length Info
16 11.442518451 fd00::212:7401:1:101 fd00::1 TCP 60 1025 → 9999 [FIN, ACK] Seq=52 Ack=2 Win=48 Len=0
Frame 16: 60 bytes on wire (480 bits), 60 bytes captured (480 bits) on interface 0
Raw packet data
Internet Protocol Version 6, Src: fd00::212:7401:1:101, Dst: fd00::1
0110 .... = Version: 6
.... 0000 0000 .... .... .... .... .... = Traffic Class: 0x00 (DSCP: CS0, ECN: Not-ECT)
.... .... .... 0000 0000 0000 0000 0000 = Flow Label: 0x00000
Payload Length: 20
Next Header: TCP (6)
Hop Limit: 64
Source: fd00::212:7401:1:101
Destination: fd00::1
Transmission Control Protocol, Src Port: 1025, Dst Port: 9999, Seq: 52, Ack: 2, Len: 0
No. Time Source Destination Protocol Length Info
17 11.442539810 fd00::1 fd00::212:7401:1:101 TCP 60 9999 → 1025 [ACK] Seq=2 Ack=53 Win=28748 Len=0
Frame 17: 60 bytes on wire (480 bits), 60 bytes captured (480 bits) on interface 0
Raw packet data
Internet Protocol Version 6, Src: fd00::1, Dst: fd00::212:7401:1:101
0110 .... = Version: 6
.... 0000 0000 .... .... .... .... .... = Traffic Class: 0x00 (DSCP: CS0, ECN: Not-ECT)
.... .... .... 1110 0101 1111 1001 1100 = Flow Label: 0xe5f9c
Payload Length: 20
Next Header: TCP (6)
Hop Limit: 64
Source: fd00::1
Destination: fd00::212:7401:1:101
Transmission Control Protocol, Src Port: 9999, Dst Port: 1025, Seq: 2, Ack: 53, Len: 0
No. Time Source Destination Protocol Length Info
18 13.004541366 fd00::1 fd00::212:7402:2:202 TCP 60 9999 → 1025 [RST, ACK] Seq=357758784 Ack=1 Win=0 Len=0
Frame 18: 60 bytes on wire (480 bits), 60 bytes captured (480 bits) on interface 0
Raw packet data
Internet Protocol Version 6, Src: fd00::1, Dst: fd00::212:7402:2:202
0110 .... = Version: 6
.... 0000 0000 .... .... .... .... .... = Traffic Class: 0x00 (DSCP: CS0, ECN: Not-ECT)
.... .... .... 0000 1001 0010 1011 1110 = Flow Label: 0x092be
Payload Length: 20
Next Header: TCP (6)
Hop Limit: 64
Source: fd00::1
Destination: fd00::212:7402:2:202
Transmission Control Protocol, Src Port: 9999, Dst Port: 1025, Seq: 357758784, Ack: 1, Len: 0
**
- Трассировка жгута проводов от tun1:
**
No. Time Source Destination Protocol Length Info
1 0.000000000 fd00::212:7402:2:202 fd00::1 TCP 64 1025 → 9999 [SYN] Seq=0 Win=48 Len=0 MSS=48
Frame 1: 64 bytes on wire (512 bits), 64 bytes captured (512 bits) on interface 0
Raw packet data
Internet Protocol Version 6, Src: fd00::212:7402:2:202, Dst: fd00::1
Transmission Control Protocol, Src Port: 1025, Dst Port: 9999, Seq: 0, Len: 0
No. Time Source Destination Protocol Length Info
2 1.003498195 fd00::212:7402:2:202 fd00::1 TCP 64 [TCP Retransmission] 1025 → 9999 [SYN] Seq=0 Win=48 Len=0 MSS=48
Frame 2: 64 bytes on wire (512 bits), 64 bytes captured (512 bits) on interface 0
Raw packet data
Internet Protocol Version 6, Src: fd00::212:7402:2:202, Dst: fd00::1
Transmission Control Protocol, Src Port: 1025, Dst Port: 9999, Seq: 0, Len: 0
No. Time Source Destination Protocol Length Info
3 3.004059275 fd00::212:7402:2:202 fd00::1 TCP 64 [TCP Retransmission] 1025 → 9999 [SYN] Seq=0 Win=48 Len=0 MSS=48
Frame 3: 64 bytes on wire (512 bits), 64 bytes captured (512 bits) on interface 0
Raw packet data
Internet Protocol Version 6, Src: fd00::212:7402:2:202, Dst: fd00::1
Transmission Control Protocol, Src Port: 1025, Dst Port: 9999, Seq: 0, Len: 0
No. Time Source Destination Protocol Length Info
4 6.505412905 fd00::212:7402:2:202 fd00::1 TCP 64 [TCP Retransmission] 1025 → 9999 [SYN] Seq=0 Win=48 Len=0 MSS=48
Frame 4: 64 bytes on wire (512 bits), 64 bytes captured (512 bits) on interface 0
Raw packet data
Internet Protocol Version 6, Src: fd00::212:7402:2:202, Dst: fd00::1
Transmission Control Protocol, Src Port: 1025, Dst Port: 9999, Seq: 0, Len: 0
No. Time Source Destination Protocol Length Info
5 13.004545046 fd00::212:7402:2:202 fd00::1 TCP 64 [TCP Retransmission] 1025 → 9999 [SYN] Seq=0 Win=48 Len=0 MSS=48
Frame 5: 64 bytes on wire (512 bits), 64 bytes captured (512 bits) on interface 0
Raw packet data
Internet Protocol Version 6, Src: fd00::212:7402:2:202, Dst: fd00::1
Transmission Control Protocol, Src Port: 1025, Dst Port: 9999, Seq: 0, Len: 0