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

arp doesn't work when ip4 classifier configured with fib 2.0

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Medium Medium
    • 17.01
    • None
    • None
    • None

      Configuring ip4 classifier adds table entry to fib for interface. Vpp then fails to reply to incoming ARP.
      It used to work with old version. Not sure whether its bug or I need to configure something differently.

      DBGvpp# classify table mask l3 ip4 src
      DBGvpp# sh classify tables
      TableIdx Sessions NextTbl NextNode
      0 0 -1 -1
      Heap: 1 objects, 64 of 2k used, 48 free, 0 reclaimed, 1k overhead, 2044k capacity
      nbuckets 2, skip 1 match 1
      mask 00000000000000000000ffffffff0000
      DBGvpp# classify session hit-next node li-hit-ip4 table-index 0 match l3 ip4 src 192.168.1.14
      DBGvpp# sh classify tables
      TableIdx Sessions NextTbl NextNode
      0 1 -1 -1
      Heap: 3 objects, 176 of 2k used, 72 free, 0 reclaimed, 1k overhead, 2044k capacity
      nbuckets 2, skip 1 match 1
      mask 00000000000000000000ffffffff0000
      DBGvpp# set ip classify intfc GigabitEthernet0/10/0 table-index 0
      DBGvpp# set interface ip address GigabitEthernet0/10/0 192.168.1.13/24
      DBGvpp# set interface state GigabitEthernet0/10/0 up
      DBGvpp# set interface ip address GigabitEthernet0/11/0 192.168.2.13/24
      DBGvpp# set interface state GigabitEthernet0/11/0 up
      DBGvpp# show interface address
      GigabitEthernet0/10/0 (up):
      192.168.1.13/24
      GigabitEthernet0/11/0 (up):
      192.168.2.13/24
      GigabitEthernet0/9/0 (dn):
      GigabitEthernet0/a/0 (dn):
      local0 (dn):
      DBGvpp# sh ip fib
      ipv4-VRF:0, fib_index 0, flow hash: src dst sport dport proto
      0.0.0.0/0
      unicast-ip4-chain
      [@0]: dpo-load-balance: [index:0 buckets:1 locks:1 to:[0:0]]
      [0] [@0]: dpo-drop
      0.0.0.0/32
      unicast-ip4-chain
      [@0]: dpo-load-balance: [index:1 buckets:1 locks:1 to:[0:0]]
      [0] [@0]: dpo-drop
      192.168.1.0/24
      unicast-ip4-chain
      [@0]: dpo-load-balance: [index:12 buckets:1 locks:1 to:[0:0]]
      [0] [@4]: glean: GigabitEthernet0/10/0
      192.168.1.13/32
      unicast-ip4-chain
      [@0]: dpo-load-balance: [index:13 buckets:1 locks:1 to:[0:0]]
      [0] [@11]: classify:[0]:table:0
      192.168.2.0/24
      unicast-ip4-chain
      [@0]: dpo-load-balance: [index:14 buckets:1 locks:1 to:[0:0]]
      [0] [@4]: glean: GigabitEthernet0/11/0
      192.168.2.13/32
      unicast-ip4-chain
      [@0]: dpo-load-balance: [index:15 buckets:1 locks:1 to:[0:0]]
      [0] [@2]: dpo-receive: 192.168.2.13 on GigabitEthernet0/11/0
      224.0.0.0/8
      unicast-ip4-chain
      [@0]: dpo-load-balance: [index:3 buckets:1 locks:1 to:[0:0]]
      [0] [@0]: dpo-drop
      240.0.0.0/8
      unicast-ip4-chain
      [@0]: dpo-load-balance: [index:2 buckets:1 locks:1 to:[0:0]]
      [0] [@0]: dpo-drop
      255.255.255.255/32
      unicast-ip4-chain
      [@0]: dpo-load-balance: [index:4 buckets:1 locks:1 to:[0:0]]
      [0] [@0]: dpo-drop
      DBGvpp# trace add dpdk-input 1000
      DBGvpp# sh trace
      ------------------- Start of thread 0 vpp_main -------------------
      No packets in trace buffer

      ping 192.168.1.13 (from other device with local ip 192.168.1.14)

      Packet 1/3

      00:00:14:141068: dpdk-input
      GigabitEthernet0/10/0 rx queue 0
      buffer 0x4e03: current data 0, length 60, free-list 0, totlen-nifb 0, trace 0x0
      PKT MBUF: port 2, nb_segs 1, pkt_len 60
      buf_len 2176, data_len 60, ol_flags 0x0, data_off 128, phys_addr 0x10e38100
      packet_type 0x0
      ARP: 08:00:27:f9:c7:19 -> ff:ff:ff:ff:ff:ff
      request, type ethernet/IP4, address size 6/4
      08:00:27:f9:c7:19/192.168.1.14 -> 00:00:00:00:00:00/192.168.1.13
      00:00:14:141132: ethernet-input
      ARP: 08:00:27:f9:c7:19 -> ff:ff:ff:ff:ff:ff
      00:00:14:141169: arp-input
      request, type ethernet/IP4, address size 6/4
      08:00:27:f9:c7:19/192.168.1.14 -> 00:00:00:00:00:00/192.168.1.13
      00:00:14:141391:* error-drop
      arp-input: IP4 destination address not local to subnet*

      code in vnet/vnet/Ethernet/arp.c:916

      fib_index0 = ip4_fib_table_get_index_for_sw_if_index (sw_if_index0);
      if (~0 == fib_index0)

      { error0 = ETHERNET_ARP_ERROR_interface_no_table; goto drop2; }

      dst_fei = ip4_fib_table_lookup (ip4_fib_get (fib_index0),
      &arp0->ip4_over_ethernet[1].ip4,
      32);
      dst_flags = fib_entry_get_flags (dst_fei);

      conn_sw_if_index0 = fib_entry_get_resolving_interface (dst_fei);

      clib_warning(">> ip %U, flags: %x, fib_node_idx %u (%U), out-if %u",
      format_ip4_address, &arp0->ip4_over_ethernet[1].ip4,
      dst_flags,
      dst_fei, format_fib_entry, dst_fei, FIB_ENTRY_FORMAT_DETAIL,
      conn_sw_if_index0);

      if (!(FIB_ENTRY_FLAG_CONNECTED & dst_flags))

      { *error0 = ETHERNET_ARP_ERROR_l3_dst_address_not_local*; goto drop1; }

      Dumps this:

      Sep 30 08:34:34 dut1 vnet[24925]: arp_input:934: >> ip 192.168.1.13, flags: 0, fib_node_idx 12 (192.168.1.13/32 fib:0 index:12 locks:3#012 src:classify refs:1 #012 index:12
      locks:2 proto:ipv4 index:12 pl-index:12 ipv4 weight=1 exclusive: oper-flags:resolved,#012 [@0]: classify:[0]:table:0#012#012 src:interface cover:-1 refs:1 flags:co
      nnected,local,#012 index:13 locks:1 proto:ipv4 index:13 pl-index:13 ipv4 weight=1 attached-nexthop: oper-flags:resolved,#012 192.168.1.13 GigabitEthernet0/10/0#01
      2 [@0]: arp-ipv4: via 192.168.1.13 GigabitEthernet0/10/0#012#012 forwarding: unicast-ip4-chain#012 [@0]: dpo-load-balance: [index:13 buckets:1 locks:1 to:[0:0]]#012
      [0] [@11]: classify:[0]:table:0#012), out-if 4294967295

            nranns Neale Ranns
            mazavods marek zavodsky
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: