Uploaded image for project: 'vpp'
  1. vpp
  2. VPP-1970

vpp ping does not work with IPv4 FIB

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Medium Medium
    • 21.01, 21.06
    • 21.01, 21.06
    • None
    • None

      In VPP>=21.01 ping command no longer seems to work with non-neighbor destinations (i.e. destinations which are routed according to the FIB table).

      To reproduce, one may use the VPP CLI and the ip command in the Linux.
      VPP side:

      vpp$ make run
      WARNING: STARTUP_CONF not defined or file doesn't exist.
               Running with minimal startup config:  unix { interactive cli-listen /run/vpp/cli.sock gid 1000 } dpdk { no-pci } 
          _______    _        _   _____  ___ 
       __/ __/ _ \  (_)__    | | / / _ \/ _ \
       _/ _// // / / / _ \   | |/ / ___/ ___/
       /_/ /____(_)_/\___/   |___/_/  /_/    
      
      DBGvpp# create tap 
      tap0
      DBGvpp# set interface state tap0 up
      DBGvpp# set interface ip address tap0 192.168.11.1/24
      DBGvpp# show int addr
      local0 (dn):
      tap0 (up):
        L3 192.168.11.1/24
      DBGvpp# ip route add 192.168.20.0/24 via 192.168.11.2
      DBGvpp# show ip fib
      ipv4-VRF:0, fib_index:0, flow hash:[src dst sport dport proto ] epoch:0 flags:none locks:[recursive-resolution:1, default-route:1, ]
      ...
      192.168.20.0/24
        unicast-ip4-chain
        [@0]: dpo-load-balance: [proto:ip4 index:14 buckets:1 uRPF:14 to:[0:0]]
          [0] [@12]: dpo-load-balance: [proto:ip4 index:13 buckets:1 uRPF:12 to:[0:0]]
                [0] [@3]: arp-ipv4: via 192.168.11.2 tap0
      ...
      

      Linux side:

      linux$ sudo ip addr add 192.168.20.1/24 dev lo
      linux$ sudo ip link set tap0 up
      linux$ sudo ip addr add 192.168.11.2/24 dev tap0
      linux$ ip addr
      ...
      533: tap0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UNKNOWN group default qlen 1000
          link/ether 02:fe:b6:7d:7c:b2 brd ff:ff:ff:ff:ff:ff
          inet 192.168.11.2/24 scope global tap0
             valid_lft forever preferred_lft forever
          inet6 fe80::fe:b6ff:fe7d:7cb2/64 scope link 
             valid_lft forever preferred_lft forever
      ...
      

      Then try to run ping from VPP:

      DBGvpp# ping 192.168.20.1
      Failed: no source address for egress interface
      Failed: no source address for egress interface
      Failed: no source address for egress interface
      Failed: no source address for egress interface
      Failed: no source address for egress interface
      

      In Linux I noticed that only ICMP6 packet arrived, suggesting that ping incorrectly opted for IPv6 instead of IPv4:

      linux$ sudo tcpdump -i tap0
      tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
      listening on tap0, link-type EN10MB (Ethernet), capture size 262144 bytes
      14:49:09.486242 IP6 mlenco-nuc > ip6-allrouters: ICMP6, router solicitation, length 16
      ^C
      1 packet captured
      1 packet received by filter
      0 packets dropped by kernel
      

            JuliusMilan22 Julius Milan
            milanlenco Milan Lenco
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: