Hello,
Dear Murphy
I am trying to insert a rule in openflow switch with the down instructions, the
problem is in the L3 IP addresses are not inserted in the flow table. I need to
insert them to use them in another function
the IPs are insereted but they aren't show up when we execute the flow stat
request.
msg =
of.ofp_flow_mod()
msg.idle_timeout =
100
msg.hard_timeout =
130
msg.match.dl_dst = packet.src
msg.match.nw_dst =
packet.next.protodst # I need to use L3 IP to be used in another function
msg.match.nw_src =
packet.next.protosrc
msg.match.dl_src =
packet.dst
msg.actions.append(of.ofp_action_output(port = event.port))
event.connection.send(msg)
These are the output from executing the above code; the L3 IP is there BUT when
we retreive them from flow stats request are not show up.
log.info("Installing
%s.%i -> %s.%i AND %s.%i -> %s.%i" %
(packet.next.protodst, dst_port, packet.next.protosrc,
event.ofp.in_port,
packet.next.protodst, event.ofp.in_port, packet.next.protosrc,
dst_port))
INFO:sw:Installing 10.0.0.1.1 -> 10.0.0.3.4 AND
10.0.0.1.4 -> 10.0.0.3.1
log.info("FlowStatsReceived from %s: %s", dpidToStr(event.connection.dpid),
stats)
These are the output when we tried to retrive them
INFO:sw:FlowStatsReceived from 00-00-00-00-00-01:
[{'packet_count': 3, 'hard_timeout': 130, 'byte_count': 174, 'duration_sec': 4,
'actions': [{'max_len': 0, 'type': 'OFPAT_OUTPUT', 'port': 1}],
'duration_nsec': 654000000, 'priority': 32768, 'idle_timeout': 100, 'cookie':
0, 'table_id': 0, 'match': {}}]
we got Nnne when we print them
print "Match
Destination %s" % f.match.nw_dst
print "Match
Destination %s" % f.match.nw_src
Match Destination None
Match Destination None
Best regards,
Eng Amer Alghadhban
COE
SANS-GCFW
CEH, SCNP, CCNA