Discussion:
Issues with agr interface?
Havard Eidnes
2014-04-04 15:25:29 UTC
Permalink
Hi,

I just tried to use agr(4) for the first time on NetBSD, on a
host running NetBSD 1.6.3. It's coupled to a pair of Juniper
stacked switches upstream. Ifconfig on the host does not show
flags=<COLLECTING,DISTRIBUTING> for one of the interfaces:

agr0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
capabilities=3f00<IP4CSUM_Rx,IP4CSUM_Tx,TCP4CSUM_Rx,TCP4CSUM_Tx,UDP4CSUM_Rx,UDP4CSUM_Tx>
enabled=0
agrport: bnx1, flags=0x3<COLLECTING,DISTRIBUTING>
agrport: bnx0, flags=0x0>
address: 00:1a:64:94:71:ce
...

(the "address" of agr0 is the address of bnx1, bnx0's address
ends in "cc".)

The Juniper switch says:

xx-sw2> show lacp interfaces ae4
Aggregated interface: ae4
LACP state: Role Exp Def Dist Col Syn Aggr Timeout Activity
ge-0/0/0 Actor No No No No No Yes Fast Active
ge-0/0/0 Partner No No No No Yes Yes Slow Active
ge-1/0/0 Actor No No Yes Yes Yes Yes Fast Active
ge-1/0/0 Partner No No Yes Yes Yes Yes Slow Active
LACP protocol: Receive State Transmit State Mux State
ge-0/0/0 Current Slow periodic Detached
ge-1/0/0 Current Slow periodic Collecting distributing

{master:2}
xx-sw2>

Any clues to why the second link doesn't want to go active?
Both agrport interfaces are of course operationally "up".

I see outgoing frames on bnx0 which look like this:

15:16:08.495432 00:1a:64:94:71:cc (oui Unknown) > 01:80:c2:00:00:02 (oui Unknown), ethertype Slow Protocols (0x8809), length 124: LACPv1, length 110
Actor Information TLV (0x01), length 20
System 00:1a:64:94:71:cc (oui Unknown), System Priority 32768, Key 144, Port 1, Port Priority 32768
State Flags [Activity, Aggregation, Synchronization]
0x0000: 8000 001a 6494 71cc 0090 8000 0001 0d00
0x0010: 0000
Partner Information TLV (0x02), length 20
System 4c:96:14:ea:d2:60 (oui Unknown), System Priority 127, Key 5, Port 9, Port Priority 127
State Flags [Activity, Timeout, Aggregation]
0x0000: 007f 4c96 14ea d260 0005 007f 0009 0700
0x0010: 0000
Collector Information TLV (0x03), length 16
Max Delay 0
0x0000: 0000 0000 0000 0000 0000 0000 0000
Terminator TLV (0x00), length 0 (=52)
0x0000: 0000 0000 0000 0000 0000 0000 0000 0000
0x0010: 0000 0000 0000 0000 0000 0000 0000 0000
0x0020: 0000 0000 0000 0000 0000 0000 0000 0000
0x0030: 0000

and incoming

17:20:42.207200 4c:96:14:ea:d2:67 (oui Unknown) > 01:80:c2:00:00:02 (oui Unknown), ethertype Slow Protocols (0x8809), length 124: LACPv1, length 110
Actor Information TLV (0x01), length 20
System 4c:96:14:ea:d2:60 (oui Unknown), System Priority 127, Key 5, Port 9, Port Priority 127
State Flags [Activity, Timeout, Aggregation]
0x0000: 007f 4c96 14ea d260 0005 007f 0009 0700
0x0010: 0000
Partner Information TLV (0x02), length 20
System 00:1a:64:94:71:cc (oui Unknown), System Priority 32768, Key 130, Port 1, Port Priority 32768
State Flags [Activity, Aggregation, Synchronization, Collecting, Distributing]
0x0000: 8000 001a 6494 71cc 0082 8000 0001 3d00
0x0010: 0000
Collector Information TLV (0x03), length 16
Max Delay 0
0x0000: 0000 0000 0000 0000 0000 0000 0000
Terminator TLV (0x00), length 0 (=52)
0x0000: 0000 0000 0000 0000 0000 0000 0000 0000
0x0010: 0000 0000 0000 0000 0000 0000 0000 0000
0x0020: 0000 0000 0000 0000 0000 0000 0000 0000
0x0030: 0000

On bnx1 I see outgoing:

17:15:39.410278 00:1a:64:94:71:ce (oui Unknown) > 01:80:c2:00:00:02 (oui Unknown
), ethertype Slow Protocols (0x8809), length 124: LACPv1, length 110
Actor Information TLV (0x01), length 20
System 00:1a:64:94:71:ce (oui Unknown), System Priority 32768, Key 144
, Port 2, Port Priority 32768
State Flags [Activity, Aggregation, Synchronization, Collecting, Distr
ibuting]
0x0000: 8000 001a 6494 71ce 0090 8000 0002 3d00
0x0010: 0000
Partner Information TLV (0x02), length 20
System 4c:96:14:ea:d2:60 (oui Unknown), System Priority 127, Key 5, Port 10, Port Priority 127
State Flags [Activity, Timeout, Aggregation, Synchronization, Collecting, Distributing]
0x0000: 007f 4c96 14ea d260 0005 007f 000a 3f00
0x0010: 0000
Collector Information TLV (0x03), length 16
Max Delay 0
0x0000: 0000 0000 0000 0000 0000 0000 0000
Terminator TLV (0x00), length 0 (=52)
0x0000: 0000 0000 0000 0000 0000 0000 0000 0000
0x0010: 0000 0000 0000 0000 0000 0000 0000 0000
0x0020: 0000 0000 0000 0000 0000 0000 0000 0000
0x0030: 0000

and incoming

17:15:40.429185 4c:96:14:ea:d2:67 (oui Unknown) > 01:80:c2:00:00:02 (oui Unknown), ethertype Slow Protocols (0x8809), length 124: LACPv1, length 110
Actor Information TLV (0x01), length 20
System 4c:96:14:ea:d2:60 (oui Unknown), System Priority 127, Key 5, Port 10, Port Priority 127
State Flags [Activity, Timeout, Aggregation, Synchronization, Collecting, Distributing]
0x0000: 007f 4c96 14ea d260 0005 007f 000a 3f00
0x0010: 0000
Partner Information TLV (0x02), length 20
System 00:1a:64:94:71:ce (oui Unknown), System Priority 32768, Key 144, Port 2, Port Priority 32768
State Flags [Activity, Aggregation, Synchronization, Collecting, Distributing]
0x0000: 8000 001a 6494 71ce 0090 8000 0002 3d00
0x0010: 0000
Collector Information TLV (0x03), length 16
Max Delay 0
0x0000: 0000 0000 0000 0000 0000 0000 0000
Terminator TLV (0x00), length 0 (=52)
0x0000: 0000 0000 0000 0000 0000 0000 0000 0000
0x0010: 0000 0000 0000 0000 0000 0000 0000 0000
0x0020: 0000 0000 0000 0000 0000 0000 0000 0000
0x0030: 0000

The output packet on bnx0 seems to have a different address
embedded than on bnx1 -- is that the problem? The Juniper box
uses the same value in the two announcements it sends.

I know too little about the 802.3ad protocol to tell...

Regards,

- Håvard
Thor Lancelot Simon
2014-04-04 22:46:03 UTC
Permalink
Post by Havard Eidnes
Hi,
I just tried to use agr(4) for the first time on NetBSD, on a
host running NetBSD 1.6.3. It's coupled to a pair of Juniper
stacked switches upstream. Ifconfig on the host does not show
You've got bnx under agr. I don't think bnx can set its MAC address
to match that of the other members of the agr, which will cause trouble.
The changes to do so are probably quite simple, however.

Thor
Havard Eidnes
2014-04-06 09:37:07 UTC
Permalink
Post by Thor Lancelot Simon
Post by Havard Eidnes
I just tried to use agr(4) for the first time on NetBSD, on a
host running NetBSD 1.6.3. It's coupled to a pair of Juniper
stacked switches upstream. Ifconfig on the host does not show
You've got bnx under agr. I don't think bnx can set its MAC
address to match that of the other members of the agr, which
will cause trouble. The changes to do so are probably quite
simple, however.
Hm, so the MAC address of each member should be set to the MAC
address on the agr interface (which seems to be initialized to
the MAC address of one of the members -- the first?)?

Do you happen to know if any of the other BSDs can do agr+bnx? I
see this kind of construct in the *_init() functions both in
FreeBSD and OpenBSD drivers have -- OpenBSD:

4765: /* Load our MAC address. */
4766: bcopy(sc->arpcom.ac_enaddr, sc->eaddr, ETHER_ADDR_LEN);
4767: bnx_set_mac_addr(sc);

and FreeBSD:

7147 /* Load our MAC address. */
7148 bcopy(IF_LLADDR(sc->bce_ifp), sc->eaddr, ETHER_ADDR_LEN);
7149 bce_set_mac_addr(sc);

something our driver doesn't have. However, I don't know if that
would change anything... How does agr indicate "the address" to
be used by the members of an aggregate?

Regards,

- Håvard
Thor Lancelot Simon
2014-04-06 15:36:44 UTC
Permalink
Post by Havard Eidnes
Post by Thor Lancelot Simon
Post by Havard Eidnes
I just tried to use agr(4) for the first time on NetBSD, on a
host running NetBSD 1.6.3. It's coupled to a pair of Juniper
stacked switches upstream. Ifconfig on the host does not show
You've got bnx under agr. I don't think bnx can set its MAC
address to match that of the other members of the agr, which
will cause trouble. The changes to do so are probably quite
simple, however.
Hm, so the MAC address of each member should be set to the MAC
address on the agr interface (which seems to be initialized to
the MAC address of one of the members -- the first?)?
Yes, the first. And none of this will work if the 2nd...nth interfaces
have any network-layer addresses assigned, which means before joining
them to the agr you'll need to remove the automatically assigned IPv6
link-local address.

Are you really using NetBSD 1.6.3, as you say above, or is it a typo
for 6.1.3? In NetBSD 6 the infrastructure for resetting the interface
MAC addresses is already there and you can just look at a driver like
'wm' to see how it works. In NetBSD 1.6, though...

Thor
Havard Eidnes
2014-04-06 16:16:31 UTC
Permalink
Post by Thor Lancelot Simon
Post by Havard Eidnes
Hm, so the MAC address of each member should be set to the MAC
address on the agr interface (which seems to be initialized to
the MAC address of one of the members -- the first?)?
Yes, the first. And none of this will work if the 2nd...nth interfaces
have any network-layer addresses assigned, which means before joining
them to the agr you'll need to remove the automatically assigned IPv6
link-local address.
Are you really using NetBSD 1.6.3, as you say above, or is it a typo
for 6.1.3? In NetBSD 6 the infrastructure for resetting the interface
MAC addresses is already there and you can just look at a driver like
'wm' to see how it works. In NetBSD 1.6, though...
Sorry, silly typo on my part. It's 6.1.3.

I'm certainly known for having some old hardware, but it's quite
a while ago since I last ran 1.6.3 :)

Regards,

- Håvard
Havard Eidnes
2014-04-06 16:22:08 UTC
Permalink
Post by Thor Lancelot Simon
Post by Havard Eidnes
Hm, so the MAC address of each member should be set to the MAC
address on the agr interface (which seems to be initialized to
the MAC address of one of the members -- the first?)?
Yes, the first. And none of this will work if the 2nd...nth interfaces
have any network-layer addresses assigned, which means before joining
them to the agr you'll need to remove the automatically assigned IPv6
link-local address.
Yes, I did read the agr(4) man page before trying this :)

My /etc/ifconfig.agr0 contained

agrport bnx1
agrport bnx0
n.n.n.n netmask 0xffffff00

and as far as I can see if I left bnx1 alone at bootup, it didn't
get any IPv6 local address either.

Regards,

- Håvard
Manuel Bouyer
2014-04-07 20:35:01 UTC
Permalink
This post might be inappropriate. Click to display it.
Loading...