-
Type:
Bug
-
Status: Open (View Workflow)
-
Priority:
Minor
-
Resolution: Unresolved
-
Affects Version/s: 1.12.0, 1.13.0, 1.14.0, 1.15.0, 2.0.0, 2.1.0, 2.2.0, 2.3.0
-
Fix Version/s: None
-
Component/s: None
-
Environment:
ONOS 2.2 in Debian DockerContainer
OpenFlow Switch Mellanox SN2100 with Onyx
-
Epic Link:
While testing our ONOS setup and sending traffic with an traffic generator I discovered, that hosts were created without any incoming ARP messages. DHCP discovery wasn't configured. The code responsible for this is HostLocationProvider.java:
// IPv4: update location only } else if (eth.getEtherType() == Ethernet.TYPE_IPV4) { // Update host location createOrUpdateHost(hid, srcMac, vlan, innerVlan, outerTpid, hloc, null); if (useDhcp) { DHCP dhcp = findDhcp(eth).orElse(null); // DHCP ACK: additionally update IP of DHCP client if (dhcp != null && dhcp.getPacketType().equals(DHCP.MsgType.DHCPACK)) { MacAddress hostMac = MacAddress.valueOf(dhcp.getClientHardwareAddress()); VlanId hostVlan = VlanId.vlanId(eth.getVlanID()); HostId hostId = HostId.hostId(hostMac, hostVlan); updateHostIp(hostId, IpAddress.valueOf(dhcp.getYourIPAddress())); } } } ...
Reason for this is, that a processor cannot register for a
particular type of packets, and the ReactiveForwarding App was subscribing for unknown MAC addresses. Corresponding TODO can be found in PacketService.java:46.
When fixing this locally, the HostLocationProviderTest failed, because this behavior seems to be intended. However, all comments state (HostLocationProvider.java and HostLocationProviderTest.java), that the location is only updated, whereas new Hosts are created.
If this behavior is wanted, then it should at least be configurable the same way ARP and DHCP discovery are.