Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid sending LLDP packets to certain ports #68

Open
italovalcy opened this issue Nov 8, 2022 · 3 comments
Open

Avoid sending LLDP packets to certain ports #68

italovalcy opened this issue Nov 8, 2022 · 3 comments
Labels
enhancement New feature or request epic_of_lldp_flows_per_interface of_lldp flows per interface

Comments

@italovalcy
Copy link

Testing Kytos with a Noviflow switch which have a BFD logical port returns the following error:

2022-11-07 16:03:59,491 - INFO [kytos.napps.kytos/of_core] (MainThread) Modified Interface('novi_lport1002', 1002, Switch('00:00:00:00:00:00:00:02')) 00:00:00:00:00:00:00:02:1002
2022-11-07 16:04:00,914 - ERROR [kytos.napps.kytos/of_core] (MainThread) OFPT_ERROR: type ErrorType.OFPET_BAD_ACTION, error code 4, from switch 00:00:00:00:00:00:00:02, xid 2997175759/0xb2a545cf

This happens because Noviflow logicalport of the type BFD does not support PacketOut (quoting the Noviflow docs: It is NOT possible to MATCH on BFD Logical ports, nor is it possible to output to a BFD Logical port - NF200157). On the other hand, there is no easy way to identify this type of port:

  • we cannot avoid sending LLDP to all logicalports, because LAG ports would benefit from it
  • PORT_DESC does not provide means to identify BFD logicalports (which does not support match and output) - i.e., the port_desc with a logical port comes with incorrect supported capabilities (NO_RECV = False; NO_FWD = False; NO_PACKET_IN=False)
  • speed is not safe to use in order to ignore those ports, because LAG logicalports also comes with wrong speed

One possible solution would be to handle this when it happens and avoid sending future LLDP on ports that returned BAD_ACTION (should we stop sending until the operator clears that port? test from time to time to resume normal operation?). Maybe a lightweight blueprint to cover this point.

@italovalcy italovalcy added the enhancement New feature or request label Nov 8, 2022
@italovalcy
Copy link
Author

Observation 1: To clarify, this typically happens when you enable all the ports on the switch (usually when running kytos with -E). If the admin selectively disables ports like this, the message will not happen.

Observation 2: despite de log message being quite annoying and raising attention to something that is unnecessary, no side effects were observed (no degradation to the system other than sending unnecessary packet-out and unnecessary log messages).

Observation 3: it is possible to work around this by explicitly setting the corresponding interface as of_lldp=False.

@italovalcy
Copy link
Author

@jab1982 has suggested that of_lldp should listen to those events (of_errors) and log a new message saying that the port does not support LLDP, asking for action from the network operator (e.g., disabling LLDP on Kytos)

@viniarck viniarck added the future_release Planned for the next release label Nov 14, 2022
@viniarck viniarck added epic_of_lldp_flows_per_interface of_lldp flows per interface and removed future_release Planned for the next release labels Feb 28, 2024
@viniarck
Copy link
Member

I'll st this under the epic_of_lldp_flows_per_interface for visibility and since it's related.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request epic_of_lldp_flows_per_interface of_lldp flows per interface
Projects
None yet
Development

No branches or pull requests

2 participants