Toggle navigation
Toggle navigation
This project
Loading...
Sign in
홍길동
/
onos
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
alshabib
2015-06-05 14:10:33 -0700
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
0603afb068845ac5bec16dd6fe1568a11c2c1d7c
0603afb0
1 parent
78baf58c
adding inband of ctrl
Change-Id: I9dc389770cb18428d6830ec533452d23c7243768
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
50 additions
and
6 deletions
apps/cordfabric/src/main/java/org/onosproject/cordfabric/CordFabricManager.java
apps/cordfabric/src/main/java/org/onosproject/cordfabric/CordFabricManager.java
View file @
0603afb
...
...
@@ -82,6 +82,8 @@ public class CordFabricManager implements FabricService {
private
short
radiusPort
=
1812
;
private
short
ofPort
=
6633
;
private
DeviceId
fabricDeviceId
=
DeviceId
.
deviceId
(
"of:5e3e486e73000187"
);
private
final
Multimap
<
VlanId
,
ConnectPoint
>
vlans
=
HashMultimap
.
create
();
...
...
@@ -107,26 +109,68 @@ public class CordFabricManager implements FabricService {
}
private
void
setupDefaultFlows
()
{
TrafficSelector
toControllerOF
=
DefaultTrafficSelector
.
builder
()
TrafficSelector
ofInBandMatchUp
=
DefaultTrafficSelector
.
builder
()
.
matchEthType
(
Ethernet
.
TYPE_IPV4
)
.
matchIPProtocol
(
IPv4
.
PROTOCOL_TCP
)
.
matchTcpDst
(
ofPort
)
.
matchInPort
(
PortNumber
.
portNumber
(
6
))
.
build
();
TrafficSelector
ofInBandMatchDown
=
DefaultTrafficSelector
.
builder
()
.
matchEthType
(
Ethernet
.
TYPE_IPV4
)
.
matchIPProtocol
(
IPv4
.
PROTOCOL_TCP
)
.
matchTcpSrc
(
ofPort
)
.
matchInPort
(
PortNumber
.
portNumber
(
5
))
.
build
();
TrafficTreatment
up
=
DefaultTrafficTreatment
.
builder
()
.
setOutput
(
PortNumber
.
portNumber
(
5
))
.
build
();
TrafficTreatment
down
=
DefaultTrafficTreatment
.
builder
()
.
setOutput
(
PortNumber
.
portNumber
(
6
))
.
build
();
TrafficSelector
toRadius
=
DefaultTrafficSelector
.
builder
()
.
matchEthType
(
Ethernet
.
TYPE_IPV4
)
.
matchIPProtocol
(
IPv4
.
PROTOCOL_UDP
)
.
matchUdpDst
(
radiusPort
)
.
build
();
TrafficTreatment
forward
ToController
=
DefaultTrafficTreatment
.
builder
()
TrafficTreatment
punt
ToController
=
DefaultTrafficTreatment
.
builder
()
.
punt
()
.
build
();
ForwardingObjective
ofToController
=
DefaultForwardingObjective
.
builder
()
ForwardingObjective
radiusToController
=
DefaultForwardingObjective
.
builder
()
.
fromApp
(
appId
)
.
makePermanent
()
.
withFlag
(
ForwardingObjective
.
Flag
.
VERSATILE
)
.
withPriority
(
PRIORITY
)
.
withSelector
(
toRadius
)
.
withTreatment
(
puntToController
)
.
add
();
ForwardingObjective
upCtrl
=
DefaultForwardingObjective
.
builder
()
.
fromApp
(
appId
)
.
makePermanent
()
.
withFlag
(
ForwardingObjective
.
Flag
.
VERSATILE
)
.
withPriority
(
PRIORITY
)
.
withSelector
(
ofInBandMatchUp
)
.
withTreatment
(
up
)
.
add
();
ForwardingObjective
downCtrl
=
DefaultForwardingObjective
.
builder
()
.
fromApp
(
appId
)
.
makePermanent
()
.
withFlag
(
ForwardingObjective
.
Flag
.
VERSATILE
)
.
withPriority
(
PRIORITY
)
.
withSelector
(
toControllerOF
)
.
withTreatment
(
forwardToController
)
.
withSelector
(
ofInBandMatchDown
)
.
withTreatment
(
down
)
.
add
();
flowObjectiveService
.
forward
(
fabricDeviceId
,
ofToController
);
flowObjectiveService
.
forward
(
fabricDeviceId
,
upCtrl
);
flowObjectiveService
.
forward
(
fabricDeviceId
,
downCtrl
);
flowObjectiveService
.
forward
(
fabricDeviceId
,
radiusToController
);
}
@Override
...
...
Please
register
or
login
to post a comment