tcpdump vxlan

 

 

root@evpn2 test]# tcpdump   -i vxlan100 -eennvv 
tcpdump: listening on vxlan100, link-type EN10MB (Ethernet), capture size 262144 bytes
11:53:45.567149 00:00:01:02:03:04 > 00:00:01:02:03:05, ethertype IPv4 (0x0800), length 98: (tos 0x0, ttl 63, id 1418, offset 0, flags [DF], proto ICMP (1), length 84)
    2.2.2.2 > 9.9.9.1: ICMP echo request, id 16024, seq 1, length 64
11:53:45.567212 00:00:01:02:03:05 > 00:00:01:02:03:04, ethertype IPv4 (0x0800), length 98: (tos 0x0, ttl 63, id 57044, offset 0, flags [none], proto ICMP (1), length 84)
    9.9.9.1 > 2.2.2.2: ICMP echo reply, id 16024, seq 1, length 64
11:53:46.635278 00:00:01:02:03:04 > 00:00:01:02:03:05, ethertype IPv4 (0x0800), length 98: (tos 0x0, ttl 63, id 1457, offset 0, flags [DF], proto ICMP (1), length 84)
    2.2.2.2 > 9.9.9.1: ICMP echo request, id 16024, seq 2, length 64
11:53:46.635344 00:00:01:02:03:05 > 00:00:01:02:03:04, ethertype IPv4 (0x0800), length 98: (tos 0x0, ttl 63, id 57086, offset 0, flags [none], proto ICMP (1), length 84)
    9.9.9.1 > 2.2.2.2: ICMP echo reply, id 16024, seq 2, length 64
11:53:47.675200 00:00:01:02:03:04 > 00:00:01:02:03:05, ethertype IPv4 (0x0800), length 98: (tos 0x0, ttl 63, id 1561, offset 0, flags [DF], proto ICMP (1), length 84)
    2.2.2.2 > 9.9.9.1: ICMP echo request, id 16024, seq 3, length 64
11:53:47.675262 00:00:01:02:03:05 > 00:00:01:02:03:04, ethertype IPv4 (0x0800), length 98: (tos 0x0, ttl 63, id 57130, offset 0, flags [none], proto ICMP (1), length 84)
    9.9.9.1 > 2.2.2.2: ICMP echo reply, id 16024, seq 3, length 64
11:53:48.715193 00:00:01:02:03:04 > 00:00:01:02:03:05, ethertype IPv4 (0x0800), length 98: (tos 0x0, ttl 63, id 1662, offset 0, flags [DF], proto ICMP (1), length 84)
    2.2.2.2 > 9.9.9.1: ICMP echo request, id 16024, seq 4, length 64
11:53:48.715258 00:00:01:02:03:05 > 00:00:01:02:03:04, ethertype IPv4 (0x0800), length 98: (tos 0x0, ttl 63, id 57203, offset 0, flags [none], proto ICMP (1), length 84)
    9.9.9.1 > 2.2.2.2: ICMP echo reply, id 16024, seq 4, length 64
11:53:49.715707 00:00:01:02:03:04 > 00:00:01:02:03:05, ethertype IPv4 (0x0800), length 98: (tos 0x0, ttl 63, id 1755, offset 0, flags [DF], proto ICMP (1), length 84)
    2.2.2.2 > 9.9.9.1: ICMP echo request, id 16024, seq 5, length 64
11:53:49.715776 00:00:01:02:03:05 > 00:00:01:02:03:04, ethertype IPv4 (0x0800), length 98: (tos 0x0, ttl 63, id 57273, offset 0, flags [none], proto ICMP (1), length 84)
    9.9.9.1 > 2.2.2.2: ICMP echo reply, id 16024, seq 5, length 64

 

没有vxlan头

tcpdump收方向

> netif_receive_skb
> > netif_receive_skb_internal
> > > __netif_receive_skb
> > > > __netif_receive_skb_core
> > > > > list_for_each_entry_rcu(ptype, &ptype_all, list) {

 

tcpdump发方向 :dev_queue_xmit_nit 具体调用关系如下

> dev_hard_start_xmit(struct
> > xmit_one
> >  > dev_queue_xmit_nit
> > > > list_for_each_entry_rcu(ptype, ptype_list, list)
> > > > > skb2->pkt_type = PACKET_OUTGOING

 

0xffffffff815fbfc0 : iptunnel_xmit+0x0/0x1a0 [kernel]

 0xffffffffa02b12b3 : udp_tunnel_xmit_skb+0xe3/0x100 [udp_tunnel]

 0xffffffffa039a253 : vxlan_xmit_one+0x7e3/0xb60 [vxlan]

 0xffffffffa039b81f : vxlan_xmit+0x41f/0xce0 [vxlan]

 0xffffffff8156f8a1 : dev_hard_start_xmit+0x171/0x3b0 [kernel]

 0xffffffff81572656 : __dev_queue_xmit+0x466/0x570 [kernel]

 0xffffffff81572770 : dev_queue_xmit+0x10/0x20 [kernel]

 0xffffffffa03881d4 : ovs_vport_send+0x44/0xb0 [openvswitch]

 0xffffffffa037a300 : do_output.isra.31+0x40/0x150 [openvswitch]

 0xffffffffa037b74d : do_execute_actions+0x73d/0x890 [openvswitch]

 0xffffffffa037b8e1 : ovs_execute_actions+0x41/0x130 [openvswitch]

 0xffffffffa037f445 : ovs_dp_process_packet+0x85/0x110 [openvswitch]

 0xffffffffa0387aac : ovs_vport_receive+0x6c/0xd0 [openvswitch]

 0xffffffffa0388c8e : netdev_frame_hook+0xde/0x160 [openvswitch]

 0xffffffff8156fcc2 : __netif_receive_skb_core+0x1e2/0x800 [kernel]

 0xffffffff815702f8 : __netif_receive_skb+0x18/0x60 [kernel]

 0xffffffff8157159e : process_backlog+0xae/0x170 [kernel]

 0xffffffff81570b20 : net_rx_action+0x170/0x380 [kernel]

 0xffffffff8108f63f : __do_softirq+0xef/0x280 [kernel]

 0xffffffff8169919c : call_softirq+0x1c/0x30 [kernel]

 

 

最精简的vxlan封装解封装过程

https://vcpu.me/vxlan_openvswitch_simple/

posted on 2021-03-10 16:07  tycoon3  阅读(476)  评论(0编辑  收藏  举报

导航