Package org.onosproject.segmentrouting
Class ArpHandler
- java.lang.Object
-
- org.onosproject.segmentrouting.SegmentRoutingNeighbourHandler
-
- org.onosproject.segmentrouting.ArpHandler
-
public class ArpHandler extends SegmentRoutingNeighbourHandler
Handler of ARP packets that responses or forwards ARP packets that are sent to the controller.
-
-
Field Summary
-
Fields inherited from class org.onosproject.segmentrouting.SegmentRoutingNeighbourHandler
config, srManager
-
-
Constructor Summary
Constructors Constructor Description ArpHandler(SegmentRoutingManager srManager)Creates an ArpHandler object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidprocessPacketIn(org.onosproject.net.neighbour.NeighbourMessageContext pkt, org.onosproject.net.host.HostService hostService)Processes incoming ARP packets.voidsendArpRequest(org.onosproject.net.DeviceId deviceId, org.onlab.packet.IpAddress targetAddress, org.onosproject.net.ConnectPoint inPort)Sends an APR request for the target IP address to all ports except in-port.-
Methods inherited from class org.onosproject.segmentrouting.SegmentRoutingNeighbourHandler
flood, flood, getSenderInfo, respondToUnknownHosts, sendResponse
-
-
-
-
Constructor Detail
-
ArpHandler
public ArpHandler(SegmentRoutingManager srManager)
Creates an ArpHandler object.- Parameters:
srManager- SegmentRoutingManager object
-
-
Method Detail
-
processPacketIn
public void processPacketIn(org.onosproject.net.neighbour.NeighbourMessageContext pkt, org.onosproject.net.host.HostService hostService)Processes incoming ARP packets. If it is an ARP request to router itself or known hosts, then it sends ARP response. If it is an ARP request to unknown hosts in its own subnet, then it flood the ARP request to the ports. If it is an ARP response, then set a flow rule for the host and forward any IP packets to the host in the packet buffer to the host.Note: We handles all ARP packet in, even for those ARP packets between hosts in the same subnet. For an ARP packet with broadcast destination MAC, some switches pipelines will send it to the controller due to table miss, other switches will flood the packets directly in the data plane without packet in. We can deal with both cases.
- Parameters:
pkt- incoming ARP packet and context informationhostService- the host service
-
sendArpRequest
public void sendArpRequest(org.onosproject.net.DeviceId deviceId, org.onlab.packet.IpAddress targetAddress, org.onosproject.net.ConnectPoint inPort)Sends an APR request for the target IP address to all ports except in-port.- Parameters:
deviceId- Switch device IDtargetAddress- target IP address for ARPinPort- in-port
-
-