Hello,
I have been struggling to get teaming of two tun interfaces working
on Fedora19.
I have an F19 KVM test server on the LAN with interfaces tun2 and tun3
installed to which the tun2 and tun3 on my F9 workstation can connect
and ping no problem (using openvpn)
If this is not the correct place to ask about my issue, then do please
tell me where I should ask.
I did try #teamdev on freenode first but it was quiet.
I installed the relevant packages:
libteam and teamd
It is quite possible that I am failing to understand and doing
something wrong but,
>From what I can tell, the problem seems to be when I attempt to add
the tun interface to the team.
Example1
If I do it manually by following along with the video tutorial on the
http://libteam.org/ frontpage
https://www.youtube.com/watch?v=-q95SqEhyl4
I get:
[colin@localhost ovpn_c_tests]$ sudo ip tuntap add dev tun2 mode tun user colin
You have new mail in /var/spool/mail/colin
[colin@localhost ovpn_c_tests]$ sudo ip tuntap add dev tun3 mode tun user colin
[colin@localhost ovpn_c_tests]$ sudo teamdctl -v myteam0 port add tun2
libteamdctl: cli_usock_process_msg: usock: Error message received: "PortAddFail"
libteamdctl: cli_usock_process_msg: usock: Error message content:
"Failed to add port."
command call failed (Invalid argument)
[colin@localhost ovpn_c_tests]$ sudo teamdctl -v myteam0 port add tun3
libteamdctl: cli_usock_process_msg: usock: Error message received: "PortAddFail"
libteamdctl: cli_usock_process_msg: usock: Error message content:
"Failed to add port."
command call failed (Invalid argument)
and /var/log/messages shows:
Nov 27 21:01:36 localhost NetworkManager[500]: <warn>
/sys/devices/virtual/net/tun2: couldn't determine device driver;
ignoring...
Nov 27 21:01:48 localhost NetworkManager[500]: <warn>
/sys/devices/virtual/net/tun3: couldn't determine device driver;
ignoring...
Nov 27 21:01:59 localhost kernel: [45321.240404] myteam0: Device tun2
failed to enter team mode
Nov 27 21:01:59 localhost kernel: [45321.240418] myteam0: Device tun2
failed to enter team mode
Nov 27 21:01:59 localhost kernel: [45321.240439] myteam0: Device tun2
failed to enter team mode
Nov 27 21:01:59 localhost kernel: [45321.240444] myteam0: Device tun2
failed to enter team mode
Nov 27 21:01:59 localhost teamd_myteam0[2921]: tun2: Failed to add port.
Nov 27 21:02:09 localhost kernel: [45332.009787] myteam0: Device tun3
failed to enter team mode
Nov 27 21:02:09 localhost kernel: [45332.009801] myteam0: Device tun3
failed to enter team mode
Nov 27 21:02:09 localhost kernel: [45332.009822] myteam0: Device tun3
failed to enter team mode
Nov 27 21:02:09 localhost kernel: [45332.009827] myteam0: Device tun3
failed to enter team mode
Nov 27 21:02:09 localhost teamd_myteam0[2921]: tun3: Failed to add port.
-------------------------------------------------------------
Example2
I slightly changed the names in a copy of the configuration file from
https://github.com/jpirko/libteam/blob/master/HOWTO.BASICS
{
"device": "team7",
"runner": {"name": "activebackup"},
"link_watch": {"name": "ethtool"},
"ports": {
"tun2": {
"prio": -10,
"sticky": true
},
"tun3": {
"prio": 100
}
}
}
and saved it as team7.json
[colin@localhost ovpn_c_tests]$ sudo teamd --config-file team7.json --debug
[sudo] password for colin:
Using team device "team7".
Using PID file "/var/run/teamd/team7.pid"
Using config file "/home/colin/configs/ovpn_c_tests/team7.json"
Added loop callback: daemon, 0xd763c0
Added loop callback: libteam_events, 0xd763c0
Added loop callback: workq, 0xd763c0
Using team runner "activebackup".
Using hwaddr_policy "same_all".
Failed to set "notify_peers_count". Kernel probably does not support
this option yet.
Failed to set "mcast_rejoin_count". Kernel probably does not support
this option yet.
usock: Using sockpath "/var/run/teamd/team7.sock"
Added loop callback: usock, 0xd763c0
tun2: Adding port (found ifindex "21").
tun3: Adding port (found ifindex "22").
1.8 successfully started.
<ifinfo_list>
23: team7: 26:f6:35:04:38:1f: 0
</ifinfo_list>
<ifinfo_list>
23: team7: 26:f6:35:04:38:1f: 0
</ifinfo_list>
<port_list>
*21: tun2: down 0Mbit HD
</port_list>
tun2: Port original hardware address has different length (0) than
team device has (6).
Loop callback failed with: Invalid argument
Failed loop callback: libteam_events, 0xd763c0
<ifinfo_list>
23: team7: 26:f6:35:04:38:1f: 0
21: tun2: f: 23
</ifinfo_list>
<port_list>
*22: tun3: down 0Mbit HD
21: tun2: down 0Mbit HD
</port_list>
tun3: Port original hardware address has different length (0) than
team device has (6).
Loop callback failed with: Invalid argument
Failed loop callback: libteam_events, 0xd763c0
<port_list>
22: tun3: down 0Mbit HD
*21: tun2: up 10Mbit FD
</port_list>
tun3: Port original hardware address has different length (0) than
team device has (6).
Loop callback failed with: Invalid argument
Failed loop callback: libteam_events, 0xd763c0
<port_list>
*22: tun3: up 10Mbit FD
21: tun2: up 10Mbit FD
</port_list>
tun3: Port original hardware address has different length (0) than
team device has (6).
Loop callback failed with: Invalid argument
Failed loop callback: libteam_events, 0xd763c0
and this produces in /var/log/messages
Nov 27 21:29:19 localhost kernel: [46962.471411] team7: Mode changed
to "activebackup"
Nov 27 21:29:19 localhost kernel: [46962.472419] IPv6:
ADDRCONF(NETDEV_UP): tun2: link is not ready
Nov 27 21:29:19 localhost kernel: [46962.472722] team7: Port device tun2 added
Nov 27 21:29:19 localhost kernel: [46962.473165] IPv6:
ADDRCONF(NETDEV_UP): tun3: link is not ready
Nov 27 21:29:19 localhost kernel: [46962.473508] team7: Port device tun3 added
Nov 27 21:29:19 localhost NetworkManager[500]: <warn>
/sys/devices/virtual/net/team7: couldn't determine device driver;
ignoring...
Example 3
--------------------------------------------------------------
When I ran it again with added '-d'
[colin@localhost ovpn_c_tests]$ sudo teamd --config-file team7.json --debug -d
[sudo] password for colin:
Using team device "team7".
Using PID file "/var/run/teamd/team7.pid"
Using config file "/home/colin/configs/ovpn_c_tests/team7.json"
/var/log/messages
Nov 27 21:45:37 localhost kernel: [47941.647586] (unregistered
net_device): Port device tun2 removed
Nov 27 21:45:37 localhost kernel: [47941.648614] (unregistered
net_device): Port device tun3 removed
Nov 27 21:45:49 localhost kernel: [47953.922989] team7: Mode changed
to "activebackup"
Nov 27 21:45:49 localhost kernel: [47953.923756] IPv6:
ADDRCONF(NETDEV_UP): tun2: link is not ready
Nov 27 21:45:49 localhost kernel: [47953.923964] team7: Port device tun2 added
Nov 27 21:45:49 localhost kernel: [47953.924192] IPv6:
ADDRCONF(NETDEV_UP): tun3: link is not ready
Nov 27 21:45:49 localhost kernel: [47953.924260] team7: Port device tun3 added
Nov 27 21:45:49 localhost teamd_team7[8061]: Failed to set
"notify_peers_count". Kernel probably does not support this option
yet.
Nov 27 21:45:49 localhost teamd_team7[8061]: Failed to set
"mcast_rejoin_count". Kernel probably does not support this option
yet.
Nov 27 21:45:49 localhost teamd_team7[8061]: 1.8 successfully started.
Nov 27 21:45:49 localhost NetworkManager[500]: <warn>
/sys/devices/virtual/net/team7: couldn't determine device driver;
ignoring...
Nov 27 21:45:49 localhost teamd_team7[8061]: tun2: Port original
hardware address has different length (0) than team device has (6).
Nov 27 21:45:49 localhost teamd_team7[8061]: Loop callback failed
with: Invalid argument
Nov 27 21:45:49 localhost teamd_team7[8061]: tun3: Port original
hardware address has different length (0) than team device has (6).
Nov 27 21:45:49 localhost teamd_team7[8061]: Loop callback failed
with: Invalid argument
server kernel-PAE-3.11.9-200.fc19.i686.rpm
client
[root@localhost yum]# uname -a
Linux localhost.localdomain 3.11.9-200.fc19.x86_64 #1 SMP Wed Nov 20
21:22:24 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
[root@localhost yum]# yum info teamd.x86_64
Loaded plugins: langpacks, refresh-packagekit
Installed Packages
Name : teamd
Arch : x86_64
Version : 1.8
Release : 1.fc19
Size : 240 k
Repo : installed
If it would help I can easily run tests and capture logs etc upon request.
Thanks
Colin