Advertisement
Guest User

Untitled

a guest
Dec 17th, 2018
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. if datapath.id==1:
  2. out_port=2
  3. actions=[parser.OFPActionOutput(out_port)]
  4. match=parser.OFPMatch(eth_type=0x0800, ipv4_src="10.0.0.1", ipv4_dst="10.0.0.2")
  5. self.add_flow(datapath, match, actions, DEFAULT_PRIORITY, 1000, 1000)
  6. out_port =1
  7. actions = [parser.OFPActionOutput(out_port)]
  8. match=parser.OFPMatch(eth_type=0x0800, ipv4_src="10.0.0.2", ipv4_dst="10.0.0.1")
  9. self.add_flow(datapath, match, actions, DEFAULT_PRIORITY, 1000, 1000)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement