หน้าแรก / Network / Openflow flow entries (1)

 

openflow-entries_1

Mininet เป็น tools ที่ใช้ในการ simulate openflow  บน openvswitch  บทความนี้เป็นตัวอย่างการ config  openflow โดย

policy by port , policy mac address match, policy Modify Qos __ DSCP <policy  Http

Mininet create topology

ทดสอบ add flow action normal.

*** Ping: testing ping reachability
h1 -> h2
h2 -> h1
*** Results: 0% dropped (2/2 received)

Policy By Port.

Allow   traffic from port1 to port2 and port 2 to port1

mininet> h1 ping -c2 h2
mininet> h2 ping -c2 h1

NXST_FLOW reply (xid=0×4):
cookie=0×0, duration=96.183s, table=0, n_packets=4, n_bytes=280, idle_age=75, priority=500,in_port=1 actions=output:2
cookie=0×0, duration=90.419s, table=0, n_packets=4, n_bytes=280, idle_age=75, priority=500,in_port=2 actions=output:1

hight  number priority,  hight priority

mininet> h1 ping -c1 h2

PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
— 10.0.0.2 ping statistics —
1 packets transmitted, 0 received, +1 errors, 100% packet loss, time 0ms

mininet> sh ovs-ofctl dump-flows s1

NXST_FLOW reply (xid=0×4):
cookie=0×0, duration=519.223s, table=0, n_packets=4, n_bytes=280, idle_age=498, priority=500,in_port=1 actions=output:2
cookie=0×0, duration=513.459s, table=0, n_packets=4, n_bytes=280, idle_age=498, priority=500,in_port=2 actions=output:1
cookie=0×0, duration=1.676s, table=0, n_packets=0, n_bytes=0, idle_age=1, actions=drop

Policy Layer 2 Mac Address Matching

dl_type :  Ethernet type  (0×806) ใน ethernet header บ่งบอก type  ARP

nw_proto:  Arp header  Opcode   arp request
nw_proto:  <for arp packet is opcodes>
When arp or dl_type=0×0806 is specified, matches the lower 8 bits of the ARP opcode. ARP opcodes greater than 255 are treated as 0. < arp header >

Ref.  http://openvswitch.org/cgi-bin/ovsman.cgi?page=utilities%2Fovs-ofctl.8  ( openflow doc)

ex-arp

ตาราง Ethernet frame

ether

arp-header

 

IP-Header-Diagram

Encapsulation  Packet Link

Policy   Modify QOS __  DSCP

Policy  HTTP

*NOTE  dl_type (layer 2 ethernet type ip ), nw_proto = ( ip header protocol: 6 is TCP )

Ref. http://www.youtube.com/channel/UCEoaojfEY_6L5TWWjIn9t9Q    <Openflow flow entries on Open vSwitch(OVS)>
Ref. http://en.wikipedia.org/wiki/EtherType                                                               ; EtherType
Ref. http://www.networksorcery.com/enp/protocol/arp.htm                              ; ARP HEADER

 
 
 

Add a comment

required

required

optional