codeblock

2016年4月19日 星期二

Packets received in Ryu controller

- Use ryu as remote controller to listen packet_in event which is usually triggered when a open virtual switch failed to look up an legal entry in the flow table.
- Here are some packet examples sending from ovs:

  • Arp request
ethernet(dst='ff:ff:ff:ff:ff:ff',ethertype=2054,src='00:00:10:00:00:01'), arp(dst_ip='10.0.2.3',dst_mac='00:00:00:00:00:00',hlen=6,hwtype=1,opcode=1,plen=4,proto=2048,src_ip='10.0.0.1',src_mac='00:00:10:00:00:01')

  • ICMP packet
ethernet(dst='00:00:10:00:02:03',ethertype=2048,src='00:00:10:00:00:01'), ipv4(csum=6002,dst='10.0.2.3',flags=2,header_length=5,identification=3380,offset=0,option=None,proto=1,src='10.0.0.1',tos=0,total_length=84,ttl=64,version=4), icmp(code=0,csum=21293,data=echo(data='\x0c\xb6\x15W\x00\x00\x00\x00\x88\x0b\x03\x00\x00\x00\x00\x00\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f !"#$%&\'()*+,-./01234567',id=14566,seq=1),type=8)

  • HTTP packet
ethernet(dst='00:00:10:00:00:01',ethertype=2048,src='00:00:10:00:02:03'), ipv4(csum=48869,dst='10.0.0.1',flags=2,header_length=5,identification=26067,offset=0,option=None,proto=6,src='10.0.2.3',tos=0,total_length=60,ttl=64,version=4), tcp(ack=0,bits=2,csum=14211,dst_port=80,offset=10,option=[TCPOptionMaximumSegmentSize(kind=2,length=4,max_seg_size=1460), TCPOptionSACKPermitted(kind=4,length=2), TCPOptionTimestamps(kind=8,length=10,ts_ecr=0,ts_val=1145901), TCPOptionNoOperation(kind=1,length=1), TCPOptionWindowScale(kind=3,length=3,shift_cnt=9)],seq=1262098942,src_port=42656,urgent=0,window_size=29200)

沒有留言:

張貼留言