http://blog.csdn.net/u010363749/article/details/17755585
Openstack中OVS實作GRE網絡的GRE資料包分析
分類: openstack cloud 2014-01-02 14:19 496人閱讀 評論(0) 收藏 舉報 openstack gre GRE資料包分析
1. GRE協定封裝了原始的ethereal資料包,并在標頭加上了8個位元組的GRE header,Tunnel兩端的路由裝置會對GRE包進行封包和解包,在我們的openstack解決方案中,由OVS進行封包和解包工作

2. GRE資料包抓取方法
1/. launch tcpdump on network node
[[email protected] ~]# tcpdump -i eth0 'proto gre' -n
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes
13:44:37.834041 IP 135.251.218.247 > 135.251.218.249: GREv0, key=0x1, length 110: IP 10.5.5.2 > 10.5.5.1: ICMP echo request, id 12339, seq 48, length 64
13:44:37.834101 IP 135.251.218.249 > 135.251.218.247: GREv0, key=0x1, length 110: IP 10.5.5.1 > 10.5.5.2: ICMP echo reply, id 12339, seq 48, length 64
13:44:37.834722 IP 135.251.218.247 > 135.251.218.249: GREv0, key=0x1, length 174: IP 10.5.5.2.ssh > 10.0.0.9.39707: Flags [P.], seq 43897986:43898082, ack 2815899572, win 106, options [nop,nop,TS val 1088018784 ecr 1220705304], length 96
13:44:37.834766 IP 135.251.218.249 > 135.251.218.247: GREv0, key=0x1, length 78: IP 10.0.0.9.39707 > 10.5.5.2.ssh: Flags [.], ack 96, win 501, options [nop,nop,TS val 1220706287 ecr 1088018784], length 0
2/. launch ping on compute vm instance, ping vroute ip
[[email protected] ~]# ping 10.5.5.1
PING 10.5.5.1 (10.5.5.1) 56(84) bytes of data.
64 bytes from 10.5.5.1: icmp_seq=1 ttl=64 time=0.661 ms
64 bytes from 10.5.5.1: icmp_seq=2 ttl=64 time=0.732 ms
64 bytes from 10.5.5.1: icmp_seq=3 ttl=64 time=0.635 ms
3. Analysis GRE packages by wireshark