-
-
Notifications
You must be signed in to change notification settings - Fork 400
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
Improve PI unique packet generation #1945
Improve PI unique packet generation #1945
Conversation
This is very useful to get a unique flow from multiple nodes to one destination. I am working on this and will soon update a patch. |
cmd.Flags().StringVarP(&srcMAC, "src-mac", "", "", "source node MAC") | ||
cmd.Flags().StringVarP(&dstMAC, "dst-mac", "", "", "destination node MAC") | ||
cmd.Flags().Uint16VarP(&srcPort, "src-port", "", 0, "source port for TCP packet") | ||
cmd.Flags().Uint16VarP(&dstPort, "dst-port", "", 0, "destination port for TCP packet") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is these changes needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not really but make command line more consistent, this doesn't break the API
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
Using the mode unique per node we should be able to identify the flows. Let say we take the srcPort of 50000 and we do have 5 source nodes then we know that the source ports will be between 50000 and 50005. We can use the same approach with the ICMP ID |
5034336
to
0d6255b
Compare
run skydive-compile-tests |
add5f43
to
4d1bb77
Compare
run skydive-cdd-overview-tests |
54cbf25
to
cda2062
Compare
run skydive-functional-tests-backend-orientdb |
run skydive-cdd-overview-tests |
run skydive-cdd-overview-tests |
ondemand/client/client.go
Outdated
if nodeID, host, ok := toRegister(nr); ok { | ||
nps[nodeID] = nodeTask{nodeID, host, nr.Resource} | ||
} | ||
/*switch i.(type) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be removed instead of commented ?
return h.applyGremlinExpr(query) | ||
|
||
if nodes := h.applyGremlinExpr(query); len(nodes) > 0 { | ||
for _, i := range nodes { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this be done in applyGremlinExpr ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
applyGremlinExpr is called somewhere else so I would prefer to keep this as it is
9b8e602
to
1ec024c
Compare
cmd.Flags().StringVarP(&packetType, "type", "", "icmp4", "packet type: icmp4, icmp6, tcp4, tcp6, udp4 and udp6") | ||
cmd.Flags().StringVarP(&payload, "payload", "", "", "payload") | ||
cmd.Flags().StringVar(&pcap, "pcap", "", "PCAP file") | ||
cmd.Flags().Uint16VarP(&id, "id", "", 0, "ICMP identification") | ||
cmd.Flags().BoolVarP(&increment, "increment", "", false, "increment ICMP id for each packet") | ||
cmd.Flags().Int64VarP(&incrementPayload, "incrementPayload", "", 0, "increase payload for each packet") | ||
cmd.Flags().StringVarP(&mode, "mode", "", "unique", "specify mode of packet generation, `unique` or `random`") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be nice to check if the specified value is either "unique" or "random"
0b82fa0
to
94d9905
Compare
run skydive-functional-tests-backend-orientdb |
@@ -23,7 +23,7 @@ class PacketInjection(object): | |||
def __init__(self, uuid="", src="", dst="", srcip="", dstip="", srcmac="", | |||
dstmac="", srcport=0, dstport=0, type="icmp4", payload="", | |||
trackingid="", icmpid=0, count=1, interval=0, | |||
increment=False, starttime="", ttl=64): | |||
mode=0, starttime="", ttl=64): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be mode="" now
api/types/types.go
Outdated
if _, ok := allowedTypes[pi.Type]; !ok { | ||
return errors.New("given type is not supported") | ||
} | ||
|
||
if pi.Mode != "" && pi.Mode != "unique" && pi.Mode != "random" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pi.Mode != PIModeUniqPerNode && pi.Mode != PIModeRandom
94d9905
to
c72ebb0
Compare
use the mechanism to generate specific ICMP ID or source Port per node.
c72ebb0
to
24ced98
Compare
run skydive-cdd-overview-tests |
1 similar comment
run skydive-cdd-overview-tests |
This aims to fix generation of unique packet ID when injecting from multiple nodes to one