Cisco VPP vxlan tunnel

原文地址:https://blog.csdn.net/u010827484/article/details/81813655

拓扑环境

目的: 使用vxlan隧道连接两个主机,实现每个主机的内部网络可以通过vxlan隧道进行通信。

拓扑环境

host1内部运行vpp和一个网络命名空间APP1。网络命令空间APP1模拟host1端的内部网络,里面有一个网络接口veth_vpp1,这个接口与vpp之间使用veth方式连接,当vpp里面的host-APP1接口收到数据包后就会发送到网络命名空间的veth_vpp1接口。host1的vpp启动一个接口GigabitEthernet0/9/0用于和对端的vpp连接网络通道,vxlan隧道就是使用这个接口传输数据。host2是一样的环境,host1和host2之间使用桥接模式联网。

接口IP地址:
- host1:

GigabitEthernet0/9/0:1.1.1.1/24

vxlan-tunnel0:src:1.1.1.1 dst:1.1.1.2

host-APP1:可以不用配置

veth_vpp1:2.2.2.1/24

  • host2:

GigabitEthernet0/9/0:1.1.1.2/24

vxlan-tunnel0:src:1.1.1.2 dst:1.1.1.1

host-APP2:可以不用配置

veth_vpp2:2.2.2.2/24

配置host1:

配置host1网络命名空间

vagrant@classifier1:~$ sudo ip netns add APP1   #创建命名空间APP1
vagrant@classifier1:~$ sudo ip link add name veth_app1 type veth peer name APP1     #创建veth接口对(APP1与veth_app1是成对的veth接口)
vagrant@classifier1:~$ sudo ip link set dev APP1 up     #使能APP1接口
vagrant@classifier1:~$ sudo ip link set dev veth_app1 up netns APP1     #添加veth_app1接口到APP1命名空间
vagrant@classifier1:~$ sudo ip netns exec APP1 \        #配置APP1命名空间的接口
> bash -c "
> ip link set dev lo up 
> ip addr add 2.2.2.1/24 dev veth_app1
> "
vagrant@classifier1:~$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 08:00:27:d8:18:42 brd ff:ff:ff:ff:ff:ff
    inet 10.0.2.15/24 brd 10.0.2.255 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::a00:27ff:fed8:1842/64 scope link 
       valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 08:00:27:4c:60:10 brd ff:ff:ff:ff:ff:ff
    inet 192.168.60.10/24 brd 192.168.60.255 scope global eth1
       valid_lft forever preferred_lft forever
    inet6 fe80::a00:27ff:fe4c:6010/64 scope link 
       valid_lft forever preferred_lft forever
15: APP1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether ea:22:8c:69:ba:7f brd ff:ff:ff:ff:ff:ff
    inet6 fe80::e822:8cff:fe69:ba7f/64 scope link 
       valid_lft forever preferred_lft forever
vagrant@classifier1:~$ sudo ip netns exec APP1 ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
16: veth_app1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 8e:21:fc:da:86:7f brd ff:ff:ff:ff:ff:ff
    inet 2.2.2.1/24 scope global veth_app1
       valid_lft forever preferred_lft forever
    inet6 fe80::8c21:fcff:feda:867f/64 scope link 
       valid_lft forever preferred_lft forever
vagrant@classifier1:~$ 

配置host1 vpp:

vagrant@classifier1:~$ vppctl show int
              Name               Idx       State          Counter          Count     
GigabitEthernet0/9/0              1        down      
local0                            0        down      
vagrant@classifier1:~$ vppctl set int state GigabitEthernet0/9/0 up     #使能GigabitEthernet0/9/0接口
vagrant@classifier1:~$ vppctl set int ip addr GigabitEthernet0/9/0 1.1.1.1/24       #设置GigabitEthernet0/9/0接口IP地址
vagrant@classifier1:~$ vppctl create vxlan tunnel src 1.1.1.1 dst 1.1.1.2 vni 10        #创建vxlan隧道,sec填本地GigabitEthernet0/9/0接口地址,dst填对端GigabitEthernet0/9/0接口地址
vxlan_tunnel0
vagrant@classifier1:~$ vppctl set int l2 bridge vxlan_tunnel0 1     #添加vxlan隧道到1号桥
vagrant@classifier1:~$ vppctl set int state vxlan_tunnel0 up        #使能vxlan隧道
vagrant@classifier1:~$ vppctl create host-interface name APP1       #创建host接口,host-APP1相当于宿主机的APP1接口,这样在vpp里面host-APP1接口的数据都回到APP1命名空间的veth_app1接口
host-APP1
vagrant@classifier1:~$ vppctl set int state host-APP1 up        #使能host_APP1接口
vagrant@classifier1:~$ vppctl set int l2 bridge host-APP1 1     #添加host-APP1接口到1号桥
vagrant@classifier1:~$ vppctl show int
              Name               Idx       State          Counter          Count     
GigabitEthernet0/9/0              1         up       rx packets                     2
                                                     rx bytes                     120
                                                     tx packets                     1
                                                     tx bytes                      42
                                                     drops                          2
host-APP1                         3         up       
local0                            0        down      
vxlan_tunnel0                     2         up       
vagrant@classifier1:~$ vppctl show int addr
GigabitEthernet0/9/0 (up):
  1.1.1.1/24
host-APP1 (up):
  l2 bridge bd_id 1 shg 0
local0 (dn):
vxlan_tunnel0 (up):
  l2 bridge bd_id 1 shg 0
vagrant@classifier1:~$ vppctl show vxlan tunnel
[0] src 1.1.1.1 dst 1.1.1.2 vni 10 sw_if_index 2 encap_fib_index 0 fib_entry_index 13 decap_next l2
vagrant@classifier1:~$ vppctl show bridge 1 detail
  ID   Index   Learning   U-Forwrd   UU-Flood   Flooding   ARP-Term     BVI-Intf   
  1      1        on         on         on         on         off          N/A     

           Interface           Index  SHG  BVI  TxFlood        VLAN-Tag-Rewrite       
           host-APP1             3     0    -      *                 none             
         vxlan_tunnel0           2     0    -      *                 none             
vagrant@classifier1:~$ 

配置host2:

vagrant@classifier2:~$ sudo ip netns add APP2
vagrant@classifier2:~$ sudo ip link add name veth_app2 type veth peer name APP2
vagrant@classifier2:~$ sudo ip link set dev APP2 up
vagrant@classifier2:~$ sudo ip link set dev veth_app2 up netns APP2 
vagrant@classifier2:~$ sudo ip netns exec APP2 \
> bash -c "
> ip link set dev lo up 
> ip addr add 2.2.2.2/24 dev veth_app2
> "
vagrant@classifier2:~$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 08:00:27:d8:18:42 brd ff:ff:ff:ff:ff:ff
    inet 10.0.2.15/24 brd 10.0.2.255 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::a00:27ff:fed8:1842/64 scope link 
       valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 08:00:27:4c:60:60 brd ff:ff:ff:ff:ff:ff
    inet 192.168.60.60/24 brd 192.168.60.255 scope global eth1
       valid_lft forever preferred_lft forever
    inet6 fe80::a00:27ff:fe4c:6060/64 scope link 
       valid_lft forever preferred_lft forever
5: veth-br: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 2e:a0:f9:13:d7:d3 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::2ca0:f9ff:fe13:d7d3/64 scope link 
       valid_lft forever preferred_lft forever
11: APP2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether e2:6c:95:d5:e0:87 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::e06c:95ff:fed5:e087/64 scope link 
       valid_lft forever preferred_lft forever
vagrant@classifier2:~$ sudo ip netns exec APP2 ip a 
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
12: veth_app2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether b6:5c:a2:b9:47:c8 brd ff:ff:ff:ff:ff:ff
    inet 2.2.2.2/24 scope global veth_app2
       valid_lft forever preferred_lft forever
    inet6 fe80::b45c:a2ff:feb9:47c8/64 scope link 
       valid_lft forever preferred_lft forever
vagrant@classifier2:~$ vppctl show int 
              Name               Idx       State          Counter          Count     
GigabitEthernet0/9/0              1        down      
local0                            0        down      
vagrant@classifier2:~$ vppctl set int state GigabitEthernet0/9/0 up
vagrant@classifier2:~$ vppctl set int ip addr GigabitEthernet0/9/0 1.1.1.2/24
vagrant@classifier2:~$ vppctl create vxlan tunnel src 1.1.1.2 dst 1.1.1.1 vni 10  
vxlan_tunnel0
vagrant@classifier2:~$ vppctl set int l2 bridge vxlan_tunnel0 1
vagrant@classifier2:~$ vppctl set int state vxlan_tunnel0 up
vagrant@classifier2:~$ vppctl create host-interface name APP2
host-APP2
vagrant@classifier2:~$ vppctl set int state host-APP2 up
vagrant@classifier2:~$ vppctl set int l2 bridge host-APP2 1
vagrant@classifier2:~$ vppctl show int 
              Name               Idx       State          Counter          Count     
GigabitEthernet0/9/0              1         up       rx packets                     2
                                                     rx bytes                     120
                                                     tx packets                     1
                                                     tx bytes                      42
                                                     drops                          2
host-APP2                         3         up       
local0                            0        down      
vxlan_tunnel0                     2         up       
vagrant@classifier2:~$ vppctl show int addr 
GigabitEthernet0/9/0 (up):
  1.1.1.2/24
host-APP2 (up):
  l2 bridge bd_id 1 shg 0
local0 (dn):
vxlan_tunnel0 (up):
  l2 bridge bd_id 1 shg 0
vagrant@classifier2:~$ vppctl show vxlan tunnel 
[0] src 1.1.1.2 dst 1.1.1.1 vni 10 sw_if_index 2 encap_fib_index 0 fib_entry_index 13 decap_next l2
vagrant@classifier2:~$ vppctl show bridge 1 detail
  ID   Index   Learning   U-Forwrd   UU-Flood   Flooding   ARP-Term     BVI-Intf   
  1      1        on         on         on         on         off          N/A     

           Interface           Index  SHG  BVI  TxFlood        VLAN-Tag-Rewrite       
           host-APP2             3     0    -      *                 none             
         vxlan_tunnel0           2     0    -      *                 none             
vagrant@classifier2:~$ 

host1 APP1命名空间ping host2 APP2命名空间:

vagrant@classifier1:~$ sudo ip netns exec APP1 ping 2.2.2.2
PING 2.2.2.2 (2.2.2.2) 56(84) bytes of data.
64 bytes from 2.2.2.2: icmp_seq=1 ttl=64 time=0.622 ms
64 bytes from 2.2.2.2: icmp_seq=2 ttl=64 time=0.417 ms
64 bytes from 2.2.2.2: icmp_seq=3 ttl=64 time=0.410 ms
64 bytes from 2.2.2.2: icmp_seq=4 ttl=64 time=0.398 ms
64 bytes from 2.2.2.2: icmp_seq=5 ttl=64 time=0.388 ms

host2抓包验证:

vagrant@classifier2:~$ vppctl clear trace 
vagrant@classifier2:~$ vppctl trace add dpdk-input 5
vagrant@classifier2:~$ vppctl show trace 
------------------- Start of thread 0 vpp_main -------------------
Packet 1

00:04:15:400275: dpdk-input
  GigabitEthernet0/9/0 rx queue 0
  buffer 0x9b67: current data 14, length 134, free-list 0, totlen-nifb 0, trace 0x0
  PKT MBUF: port 0, nb_segs 1, pkt_len 148
    buf_len 2176, data_len 148, ol_flags 0x0, data_off 128, phys_addr 0x852330c0
    packet_type 0x0
  IP4: 08:00:27:4c:70:10 -> 08:00:27:4c:70:60
  UDP: 1.1.1.1 -> 1.1.1.2
    tos 0x00, ttl 253, length 134, checksum 0xb962
    fragment id 0x0000
  UDP: 28760 -> 4789
    length 114, checksum 0x0000
00:04:15:400324: ip4-input
  UDP: 1.1.1.1 -> 1.1.1.2
    tos 0x00, ttl 253, length 134, checksum 0xb962
    fragment id 0x0000
  UDP: 28760 -> 4789
    length 114, checksum 0x0000
00:04:15:400348: ip4-lookup
  fib 0 dpo-idx 5 flow hash: 0x00000000
  UDP: 1.1.1.1 -> 1.1.1.2
    tos 0x00, ttl 253, length 134, checksum 0xb962
    fragment id 0x0000
  UDP: 28760 -> 4789
    length 114, checksum 0x0000
00:04:15:400355: ip4-local
    UDP: 1.1.1.1 -> 1.1.1.2
      tos 0x00, ttl 253, length 134, checksum 0xb962
      fragment id 0x0000
    UDP: 28760 -> 4789
      length 114, checksum 0x0000
00:04:15:400359: ip4-udp-lookup
  UDP: src-port 28760 dst-port 4789
00:04:15:400364: vxlan4-input
  VXLAN decap from vxlan_tunnel0 vni 10 next 1 error 0
00:04:15:400369: l2-input
  l2-input: sw_if_index 2 dst b6:5c:a2:b9:47:c8 src 8e:21:fc:da:86:7f
00:04:15:400385: l2-learn
  l2-learn: sw_if_index 2 dst b6:5c:a2:b9:47:c8 src 8e:21:fc:da:86:7f bd_index 1
00:04:15:400394: l2-fwd
  l2-fwd:   sw_if_index 2 dst b6:5c:a2:b9:47:c8 src 8e:21:fc:da:86:7f bd_index 1
00:04:15:400397: l2-output
  l2-output: sw_if_index 3 dst b6:5c:a2:b9:47:c8 src 8e:21:fc:da:86:7f
00:04:15:400402: host-APP2-output
  host-APP2
  IP4: 8e:21:fc:da:86:7f -> b6:5c:a2:b9:47:c8
  ICMP: 2.2.2.1 -> 2.2.2.2
    tos 0x00, ttl 64, length 84, checksum 0x3841
    fragment id 0xfa61, flags DONT_FRAGMENT
  ICMP echo_request checksum 0xfff6

Packet 2

00:04:16:399562: dpdk-input
  GigabitEthernet0/9/0 rx queue 0
  buffer 0x9b40: current data 14, length 134, free-list 0, totlen-nifb 0, trace 0x1
  PKT MBUF: port 0, nb_segs 1, pkt_len 148
    buf_len 2176, data_len 148, ol_flags 0x0, data_off 128, phys_addr 0x85232700
    packet_type 0x0
  IP4: 08:00:27:4c:70:10 -> 08:00:27:4c:70:60
  UDP: 1.1.1.1 -> 1.1.1.2
    tos 0x00, ttl 253, length 134, checksum 0xb962
    fragment id 0x0000
  UDP: 28760 -> 4789
    length 114, checksum 0x0000
00:04:16:399596: ip4-input
  UDP: 1.1.1.1 -> 1.1.1.2
    tos 0x00, ttl 253, length 134, checksum 0xb962
    fragment id 0x0000
  UDP: 28760 -> 4789
    length 114, checksum 0x0000
00:04:16:399611: ip4-lookup
  fib 0 dpo-idx 5 flow hash: 0x00000000
  UDP: 1.1.1.1 -> 1.1.1.2
    tos 0x00, ttl 253, length 134, checksum 0xb962
    fragment id 0x0000
  UDP: 28760 -> 4789
    length 114, checksum 0x0000
00:04:16:399614: ip4-local
    UDP: 1.1.1.1 -> 1.1.1.2
      tos 0x00, ttl 253, length 134, checksum 0xb962
      fragment id 0x0000
    UDP: 28760 -> 4789
      length 114, checksum 0x0000
00:04:16:399617: ip4-udp-lookup
  UDP: src-port 28760 dst-port 4789
00:04:16:399619: vxlan4-input
  VXLAN decap from vxlan_tunnel0 vni 10 next 1 error 0
00:04:16:399622: l2-input
  l2-input: sw_if_index 2 dst b6:5c:a2:b9:47:c8 src 8e:21:fc:da:86:7f
00:04:16:399635: l2-learn
  l2-learn: sw_if_index 2 dst b6:5c:a2:b9:47:c8 src 8e:21:fc:da:86:7f bd_index 1
00:04:16:399640: l2-fwd
  l2-fwd:   sw_if_index 2 dst b6:5c:a2:b9:47:c8 src 8e:21:fc:da:86:7f bd_index 1
00:04:16:399643: l2-output
  l2-output: sw_if_index 3 dst b6:5c:a2:b9:47:c8 src 8e:21:fc:da:86:7f
00:04:16:399646: host-APP2-output
  host-APP2
  IP4: 8e:21:fc:da:86:7f -> b6:5c:a2:b9:47:c8
  ICMP: 2.2.2.1 -> 2.2.2.2
    tos 0x00, ttl 64, length 84, checksum 0x378e
    fragment id 0xfb14, flags DONT_FRAGMENT
  ICMP echo_request checksum 0xe2f9

Packet 3

00:04:17:398536: dpdk-input
  GigabitEthernet0/9/0 rx queue 0
  buffer 0x9b19: current data 14, length 134, free-list 0, totlen-nifb 0, trace 0x2
  PKT MBUF: port 0, nb_segs 1, pkt_len 148
    buf_len 2176, data_len 148, ol_flags 0x0, data_off 128, phys_addr 0x85231d40
    packet_type 0x0
  IP4: 08:00:27:4c:70:10 -> 08:00:27:4c:70:60
  UDP: 1.1.1.1 -> 1.1.1.2
    tos 0x00, ttl 253, length 134, checksum 0xb962
    fragment id 0x0000
  UDP: 28760 -> 4789
    length 114, checksum 0x0000
00:04:17:398566: ip4-input
  UDP: 1.1.1.1 -> 1.1.1.2
    tos 0x00, ttl 253, length 134, checksum 0xb962
    fragment id 0x0000
  UDP: 28760 -> 4789
    length 114, checksum 0x0000
00:04:17:398584: ip4-lookup
  fib 0 dpo-idx 5 flow hash: 0x00000000
  UDP: 1.1.1.1 -> 1.1.1.2
    tos 0x00, ttl 253, length 134, checksum 0xb962
    fragment id 0x0000
  UDP: 28760 -> 4789
    length 114, checksum 0x0000
00:04:17:398587: ip4-local
    UDP: 1.1.1.1 -> 1.1.1.2
      tos 0x00, ttl 253, length 134, checksum 0xb962
      fragment id 0x0000
    UDP: 28760 -> 4789
      length 114, checksum 0x0000
00:04:17:398591: ip4-udp-lookup
  UDP: src-port 28760 dst-port 4789
00:04:17:398594: vxlan4-input
  VXLAN decap from vxlan_tunnel0 vni 10 next 1 error 0
00:04:17:398597: l2-input
  l2-input: sw_if_index 2 dst b6:5c:a2:b9:47:c8 src 8e:21:fc:da:86:7f
00:04:17:398608: l2-learn
  l2-learn: sw_if_index 2 dst b6:5c:a2:b9:47:c8 src 8e:21:fc:da:86:7f bd_index 1
00:04:17:398613: l2-fwd
  l2-fwd:   sw_if_index 2 dst b6:5c:a2:b9:47:c8 src 8e:21:fc:da:86:7f bd_index 1
00:04:17:398616: l2-output
  l2-output: sw_if_index 3 dst b6:5c:a2:b9:47:c8 src 8e:21:fc:da:86:7f
00:04:17:398619: host-APP2-output
  host-APP2
  IP4: 8e:21:fc:da:86:7f -> b6:5c:a2:b9:47:c8
  ICMP: 2.2.2.1 -> 2.2.2.2
    tos 0x00, ttl 64, length 84, checksum 0x3756
    fragment id 0xfb4c, flags DONT_FRAGMENT
  ICMP echo_request checksum 0x17fb

Packet 4

00:04:18:398807: dpdk-input
  GigabitEthernet0/9/0 rx queue 0
  buffer 0x9af2: current data 14, length 134, free-list 0, totlen-nifb 0, trace 0x3
  PKT MBUF: port 0, nb_segs 1, pkt_len 148
    buf_len 2176, data_len 148, ol_flags 0x0, data_off 128, phys_addr 0x85231380
    packet_type 0x0
  IP4: 08:00:27:4c:70:10 -> 08:00:27:4c:70:60
  UDP: 1.1.1.1 -> 1.1.1.2
    tos 0x00, ttl 253, length 134, checksum 0xb962
    fragment id 0x0000
  UDP: 28760 -> 4789
    length 114, checksum 0x0000
00:04:18:398842: ip4-input
  UDP: 1.1.1.1 -> 1.1.1.2
    tos 0x00, ttl 253, length 134, checksum 0xb962
    fragment id 0x0000
  UDP: 28760 -> 4789
    length 114, checksum 0x0000
00:04:18:398854: ip4-lookup
  fib 0 dpo-idx 5 flow hash: 0x00000000
  UDP: 1.1.1.1 -> 1.1.1.2
    tos 0x00, ttl 253, length 134, checksum 0xb962
    fragment id 0x0000
  UDP: 28760 -> 4789
    length 114, checksum 0x0000
00:04:18:398857: ip4-local
    UDP: 1.1.1.1 -> 1.1.1.2
      tos 0x00, ttl 253, length 134, checksum 0xb962
      fragment id 0x0000
    UDP: 28760 -> 4789
      length 114, checksum 0x0000
00:04:18:398859: ip4-udp-lookup
  UDP: src-port 28760 dst-port 4789
00:04:18:398861: vxlan4-input
  VXLAN decap from vxlan_tunnel0 vni 10 next 1 error 0
00:04:18:398865: l2-input
  l2-input: sw_if_index 2 dst b6:5c:a2:b9:47:c8 src 8e:21:fc:da:86:7f
00:04:18:398881: l2-learn
  l2-learn: sw_if_index 2 dst b6:5c:a2:b9:47:c8 src 8e:21:fc:da:86:7f bd_index 1
00:04:18:398886: l2-fwd
  l2-fwd:   sw_if_index 2 dst b6:5c:a2:b9:47:c8 src 8e:21:fc:da:86:7f bd_index 1
00:04:18:398889: l2-output
  l2-output: sw_if_index 3 dst b6:5c:a2:b9:47:c8 src 8e:21:fc:da:86:7f
00:04:18:398891: host-APP2-output
  host-APP2
  IP4: 8e:21:fc:da:86:7f -> b6:5c:a2:b9:47:c8
  ICMP: 2.2.2.1 -> 2.2.2.2
    tos 0x00, ttl 64, length 84, checksum 0x3723
    fragment id 0xfb7f, flags DONT_FRAGMENT
  ICMP echo_request checksum 0x10fa

Packet 5

00:04:19:398974: dpdk-input
  GigabitEthernet0/9/0 rx queue 0
  buffer 0x9acb: current data 14, length 134, free-list 0, totlen-nifb 0, trace 0x4
  PKT MBUF: port 0, nb_segs 1, pkt_len 148
    buf_len 2176, data_len 148, ol_flags 0x0, data_off 128, phys_addr 0x852309c0
    packet_type 0x0
  IP4: 08:00:27:4c:70:10 -> 08:00:27:4c:70:60
  UDP: 1.1.1.1 -> 1.1.1.2
    tos 0x00, ttl 253, length 134, checksum 0xb962
    fragment id 0x0000
  UDP: 28760 -> 4789
    length 114, checksum 0x0000
00:04:19:399000: ip4-input
  UDP: 1.1.1.1 -> 1.1.1.2
    tos 0x00, ttl 253, length 134, checksum 0xb962
    fragment id 0x0000
  UDP: 28760 -> 4789
    length 114, checksum 0x0000
00:04:19:399014: ip4-lookup
  fib 0 dpo-idx 5 flow hash: 0x00000000
  UDP: 1.1.1.1 -> 1.1.1.2
    tos 0x00, ttl 253, length 134, checksum 0xb962
    fragment id 0x0000
  UDP: 28760 -> 4789
    length 114, checksum 0x0000
00:04:19:399017: ip4-local
    UDP: 1.1.1.1 -> 1.1.1.2
      tos 0x00, ttl 253, length 134, checksum 0xb962
      fragment id 0x0000
    UDP: 28760 -> 4789
      length 114, checksum 0x0000
00:04:19:399019: ip4-udp-lookup
  UDP: src-port 28760 dst-port 4789
00:04:19:399023: vxlan4-input
  VXLAN decap from vxlan_tunnel0 vni 10 next 1 error 0
00:04:19:399026: l2-input
  l2-input: sw_if_index 2 dst b6:5c:a2:b9:47:c8 src 8e:21:fc:da:86:7f
00:04:19:399038: l2-learn
  l2-learn: sw_if_index 2 dst b6:5c:a2:b9:47:c8 src 8e:21:fc:da:86:7f bd_index 1
00:04:19:399042: l2-fwd
  l2-fwd:   sw_if_index 2 dst b6:5c:a2:b9:47:c8 src 8e:21:fc:da:86:7f bd_index 1
00:04:19:399045: l2-output
  l2-output: sw_if_index 3 dst b6:5c:a2:b9:47:c8 src 8e:21:fc:da:86:7f
00:04:19:399047: host-APP2-output
  host-APP2
  IP4: 8e:21:fc:da:86:7f -> b6:5c:a2:b9:47:c8
  ICMP: 2.2.2.1 -> 2.2.2.2
    tos 0x00, ttl 64, length 84, checksum 0x362c
    fragment id 0xfc76, flags DONT_FRAGMENT
  ICMP echo_request checksum 0xdf9

vagrant@classifier2:~$ 
  • 2
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值