fixing fabric forwarding for radius
Change-Id: Iaa994602f49e1df875d382ce5733c6f115f5e923
Showing
1 changed file
with
20 additions
and
13 deletions
| ... | @@ -82,6 +82,8 @@ public class CordFabricManager implements FabricService { | ... | @@ -82,6 +82,8 @@ public class CordFabricManager implements FabricService { |
| 82 | new ConnectPoint(fabricDeviceId, PortNumber.portNumber(2)); | 82 | new ConnectPoint(fabricDeviceId, PortNumber.portNumber(2)); |
| 83 | private ConnectPoint oltControllerConnectPoint = | 83 | private ConnectPoint oltControllerConnectPoint = |
| 84 | new ConnectPoint(fabricDeviceId, PortNumber.portNumber(1)); | 84 | new ConnectPoint(fabricDeviceId, PortNumber.portNumber(1)); |
| 85 | + private ConnectPoint radiusConnectPoint = | ||
| 86 | + new ConnectPoint(fabricDeviceId, PortNumber.portNumber(5)); | ||
| 85 | 87 | ||
| 86 | private final Multimap<VlanId, ConnectPoint> vlans = HashMultimap.create(); | 88 | private final Multimap<VlanId, ConnectPoint> vlans = HashMultimap.create(); |
| 87 | 89 | ||
| ... | @@ -112,16 +114,16 @@ public class CordFabricManager implements FabricService { | ... | @@ -112,16 +114,16 @@ public class CordFabricManager implements FabricService { |
| 112 | .matchTcpSrc(openflowPort) | 114 | .matchTcpSrc(openflowPort) |
| 113 | .build(); | 115 | .build(); |
| 114 | 116 | ||
| 115 | - TrafficSelector toControllerRadius = DefaultTrafficSelector.builder() | 117 | + TrafficSelector toRadius = DefaultTrafficSelector.builder() |
| 116 | .matchEthType(Ethernet.TYPE_IPV4) | 118 | .matchEthType(Ethernet.TYPE_IPV4) |
| 117 | .matchInPort(oltConnectPoint.port()) | 119 | .matchInPort(oltConnectPoint.port()) |
| 118 | .matchIPProtocol(IPv4.PROTOCOL_UDP) | 120 | .matchIPProtocol(IPv4.PROTOCOL_UDP) |
| 119 | .matchUdpDst(radiusPort) | 121 | .matchUdpDst(radiusPort) |
| 120 | .build(); | 122 | .build(); |
| 121 | 123 | ||
| 122 | - TrafficSelector fromControllerRadius = DefaultTrafficSelector.builder() | 124 | + TrafficSelector fromRadius = DefaultTrafficSelector.builder() |
| 123 | .matchEthType(Ethernet.TYPE_IPV4) | 125 | .matchEthType(Ethernet.TYPE_IPV4) |
| 124 | - .matchInPort(oltControllerConnectPoint.port()) | 126 | + .matchInPort(radiusConnectPoint.port()) |
| 125 | .matchIPProtocol(IPv4.PROTOCOL_UDP) | 127 | .matchIPProtocol(IPv4.PROTOCOL_UDP) |
| 126 | .matchUdpDst(radiusPort) | 128 | .matchUdpDst(radiusPort) |
| 127 | .build(); | 129 | .build(); |
| ... | @@ -131,10 +133,15 @@ public class CordFabricManager implements FabricService { | ... | @@ -131,10 +133,15 @@ public class CordFabricManager implements FabricService { |
| 131 | .setOutput(oltControllerConnectPoint.port()) | 133 | .setOutput(oltControllerConnectPoint.port()) |
| 132 | .build(); | 134 | .build(); |
| 133 | 135 | ||
| 134 | - TrafficTreatment forwardFromController = DefaultTrafficTreatment.builder() | 136 | + TrafficTreatment forwardToOLT = DefaultTrafficTreatment.builder() |
| 135 | .setOutput(oltConnectPoint.port()) | 137 | .setOutput(oltConnectPoint.port()) |
| 136 | .build(); | 138 | .build(); |
| 137 | 139 | ||
| 140 | + TrafficTreatment forwardToRadius = DefaultTrafficTreatment.builder() | ||
| 141 | + .setOutput(radiusConnectPoint.port()) | ||
| 142 | + .build(); | ||
| 143 | + | ||
| 144 | + | ||
| 138 | ForwardingObjective ofToController = DefaultForwardingObjective.builder() | 145 | ForwardingObjective ofToController = DefaultForwardingObjective.builder() |
| 139 | .fromApp(appId) | 146 | .fromApp(appId) |
| 140 | .makePermanent() | 147 | .makePermanent() |
| ... | @@ -150,31 +157,31 @@ public class CordFabricManager implements FabricService { | ... | @@ -150,31 +157,31 @@ public class CordFabricManager implements FabricService { |
| 150 | .withFlag(ForwardingObjective.Flag.VERSATILE) | 157 | .withFlag(ForwardingObjective.Flag.VERSATILE) |
| 151 | .withPriority(PRIORITY) | 158 | .withPriority(PRIORITY) |
| 152 | .withSelector(fromControllerOF) | 159 | .withSelector(fromControllerOF) |
| 153 | - .withTreatment(forwardFromController) | 160 | + .withTreatment(forwardToOLT) |
| 154 | .add(); | 161 | .add(); |
| 155 | 162 | ||
| 156 | - ForwardingObjective radiusToController = DefaultForwardingObjective.builder() | 163 | + ForwardingObjective gotoRadius = DefaultForwardingObjective.builder() |
| 157 | .fromApp(appId) | 164 | .fromApp(appId) |
| 158 | .makePermanent() | 165 | .makePermanent() |
| 159 | .withFlag(ForwardingObjective.Flag.VERSATILE) | 166 | .withFlag(ForwardingObjective.Flag.VERSATILE) |
| 160 | .withPriority(PRIORITY) | 167 | .withPriority(PRIORITY) |
| 161 | - .withSelector(toControllerRadius) | 168 | + .withSelector(toRadius) |
| 162 | - .withTreatment(forwardToController) | 169 | + .withTreatment(forwardToRadius) |
| 163 | .add(); | 170 | .add(); |
| 164 | 171 | ||
| 165 | - ForwardingObjective radiusFromController = DefaultForwardingObjective.builder() | 172 | + ForwardingObjective cameFromRadius = DefaultForwardingObjective.builder() |
| 166 | .fromApp(appId) | 173 | .fromApp(appId) |
| 167 | .makePermanent() | 174 | .makePermanent() |
| 168 | .withFlag(ForwardingObjective.Flag.VERSATILE) | 175 | .withFlag(ForwardingObjective.Flag.VERSATILE) |
| 169 | .withPriority(PRIORITY) | 176 | .withPriority(PRIORITY) |
| 170 | - .withSelector(fromControllerRadius) | 177 | + .withSelector(fromRadius) |
| 171 | - .withTreatment(forwardFromController) | 178 | + .withTreatment(forwardToOLT) |
| 172 | .add(); | 179 | .add(); |
| 173 | 180 | ||
| 174 | flowObjectiveService.forward(fabricDeviceId, ofToController); | 181 | flowObjectiveService.forward(fabricDeviceId, ofToController); |
| 175 | flowObjectiveService.forward(fabricDeviceId, ofFromController); | 182 | flowObjectiveService.forward(fabricDeviceId, ofFromController); |
| 176 | - flowObjectiveService.forward(fabricDeviceId, radiusToController); | 183 | + flowObjectiveService.forward(fabricDeviceId, gotoRadius); |
| 177 | - flowObjectiveService.forward(fabricDeviceId, radiusFromController); | 184 | + flowObjectiveService.forward(fabricDeviceId, cameFromRadius); |
| 178 | } | 185 | } |
| 179 | 186 | ||
| 180 | @Override | 187 | @Override | ... | ... |
-
Please register or login to post a comment