Hi Neale,

I tried different configs in several tables – sorry for confusion 😉

Your suggestion to use ‘via host-Vpp2Host.4093’ doesn’t work properly. Only if 
I ping via table 4093 before I do the ping via table 1, it is working as 
expected. Else, if I ping via table 1 on a freshly configured VPP, it’s failing.

I do have the following config:
set interface state NCIC-1-v1 up
create host-interface name Vpp2Host
set interface state host-Vpp2Host up

ip table add 4093
create sub-interfaces host-Vpp2Host 4093
set interface state host-Vpp2Host.4093 up
set interface ip table host-Vpp2Host.4093 4093
set interface ip address host-Vpp2Host.4093 198.19.255.249/29

ip table add 1
create sub-interfaces NCIC-1-v1 1
set interface state NCIC-1-v1.1 up
set interface ip table NCIC-1-v1.1 1
set interface ip address NCIC-1-v1.1 10.10.203.3/29
ip route add 198.19.255.248/29 table 1 via host-Vpp2Host.4093

Right after configuring VPP, I see the following :
# vppctl show ip fib 198.19.255.253 table 4093
ipv4-VRF:4093, fib_index:1, flow hash:[src dst sport dport proto flowlabel ] 
epoch:0 flags:none locks:[CLI:2, ]
198.19.255.248/29 fib:1 index:12 locks:2
  interface refs:1 entry-flags:connected,attached, 
src-flags:added,contributing,active, cover:-1
    path-list:[21] locks:2 uPRF-list:13 len:1 itfs:[3, ]
      path:[23] pl-index:21 ip4 weight=1 pref=0 attached:  oper-flags:resolved, 
cfg-flags:glean,
         host-Vpp2Host.4093

forwarding:   unicast-ip4-chain
  [@0]: dpo-load-balance: [proto:ip4 index:13 buckets:1 uRPF:13 to:[0:0]]
    [0] [@4]: ipv4-glean: [src:198.19.255.248/29] host-Vpp2Host.4093: mtu:9000 
next:1 flags:[] ffffffffffff02fe67f3126c81000ffd0806
# vppctl show ip fib 198.19.255.253 table 1
ipv4-VRF:1, fib_index:2, flow hash:[src dst sport dport proto flowlabel ] 
epoch:0 flags:none locks:[CLI:2, adjacency:1, ]
198.19.255.248/29 fib:2 index:25 locks:2
  CLI refs:1 entry-flags:attached,import, src-flags:added,contributing,active,
    path-list:[34] locks:2 flags:shared, uPRF-list:28 len:1 itfs:[3, ]
      path:[38] pl-index:34 ip4 weight=1 pref=0 attached:  oper-flags:resolved,
         host-Vpp2Host.4093

forwarding:   unicast-ip4-chain
  [@0]: dpo-load-balance: [proto:ip4 index:26 buckets:1 uRPF:28 to:[0:0]]
    [0] [@4]: ipv4-glean: [src:0.0.0.0/0] host-Vpp2Host.4093: mtu:9000 next:1 
flags:[] ffffffffffff02fe67f3126c81000ffd0806

At this point ‘vppctl ping 198.19.255.253 table-id 1’ doesn’t work. If I run 
‘vppctl ping 198.19.255.253 table-id 4093’, the FIBs look differently:
# vppctl show ip fib 198.19.255.253 table 4093
ipv4-VRF:4093, fib_index:1, flow hash:[src dst sport dport proto flowlabel ] 
epoch:0 flags:none locks:[CLI:2, adjacency:1, ]
198.19.255.253/32 fib:1 index:29 locks:3
  adjacency refs:1 entry-flags:attached, src-flags:added,contributing,active, 
cover:12
    path-list:[39] locks:2 uPRF-list:33 len:1 itfs:[3, ]
      path:[43] pl-index:39 ip4 weight=1 pref=0 attached-nexthop:  
oper-flags:resolved,
        198.19.255.253 host-Vpp2Host.4093
      [@0]: ipv4 via 198.19.255.253 host-Vpp2Host.4093: mtu:9000 next:4 
flags:[] 2aa47cd24fb802fe67f3126c81000ffd0800
    Extensions:
     path:43 adj-flags:[refines-cover]
forwarding:   unicast-ip4-chain
  [@0]: dpo-load-balance: [proto:ip4 index:30 buckets:1 uRPF:33 to:[4:384]]
    [0] [@5]: ipv4 via 198.19.255.253 host-Vpp2Host.4093: mtu:9000 next:4 
flags:[] 2aa47cd24fb802fe67f3126c81000ffd0800
# vppctl show ip fib 198.19.255.253 table 1
ipv4-VRF:1, fib_index:2, flow hash:[src dst sport dport proto flowlabel ] 
epoch:0 flags:none locks:[CLI:2, adjacency:1, ]
198.19.255.253/32 fib:2 index:30 locks:2
  attached_export refs:1 entry-flags:attached,exclusive, 
src-flags:added,contributing,active,
    path-list:[40] locks:2 flags:exclusive, uPRF-list:34 len:1 itfs:[3, ]
      path:[44] pl-index:40 ip4 weight=1 pref=0 exclusive:  
oper-flags:resolved, cfg-flags:exclusive,
        [@5]: ipv4 via 198.19.255.253 host-Vpp2Host.4093: mtu:9000 next:4 
flags:[] 2aa47cd24fb802fe67f3126c81000ffd0800

forwarding:   unicast-ip4-chain
  [@0]: dpo-load-balance: [proto:ip4 index:31 buckets:1 uRPF:34 to:[5:480]]
    [0] [@5]: ipv4 via 198.19.255.253 host-Vpp2Host.4093: mtu:9000 next:4 
flags:[] 2aa47cd24fb802fe67f3126c81000ffd0800

Now the ‘vppctl ping 198.19.255.253 table-id 1’ is working fine.

I guess, that ARP handling is not working correctly. Any suggestions on what to 
do next?

BR/Mechthild




From: vpp-dev@lists.fd.io <vpp-dev@lists.fd.io> On Behalf Of Neale Ranns via 
lists.fd.io
Sent: Friday, 2 July 2021 11:18
To: Mechthild Buescher <mechthild.buesc...@ericsson.com>; Benoit Ganne (bganne) 
<bga...@cisco.com>; vpp-dev@lists.fd.io
Subject: Re: [vpp-dev] next-hop-table between two FIB tables results in punt 
and 'unknown ip protocol'



From: Mechthild Buescher 
<mechthild.buesc...@ericsson.com<mailto:mechthild.buesc...@ericsson.com>>
Date: Thursday, 1 July 2021 at 14:51
To: Neale Ranns <ne...@graphiant.com<mailto:ne...@graphiant.com>>, Benoit Ganne 
(bganne) <bga...@cisco.com<mailto:bga...@cisco.com>>, 
vpp-dev@lists.fd.io<mailto:vpp-dev@lists.fd.io> 
<vpp-dev@lists.fd.io<mailto:vpp-dev@lists.fd.io>>
Subject: RE: [vpp-dev] next-hop-table between two FIB tables results in punt 
and 'unknown ip protocol'
Hi all,

I still don’t have success. This is the configuration I tried:
set interface state NCIC-1-v1 up

create host-interface name Vpp2Host
set interface state host-Vpp2Host up


ip table add 4093
create sub-interfaces host-Vpp2Host 4093
set interface state host-Vpp2Host.4093 up
set interface ip table host-Vpp2Host.4093 4093
set interface ip address host-Vpp2Host.4093 198.19.255.249/29

ip table add 1
create sub-interfaces NCIC-1-v1 1
set interface state NCIC-1-v1.1 up
set interface ip table NCIC-1-v1.1 1

did you miss giving the interface an address here…

ip route add 198.19.255.248/29 table 1 via 0.0.0.0 next-hop-table 4093

this …

ip table add 2
create sub-interfaces NCIC-1-v1 2
set interface state NCIC-1-v1.2 up
set interface ip table NCIC-1-v1.2 2
set interface ip address NCIC-1-v1.2 10.10.203.19/29
ip route add 198.19.255.248/29 table 2 via 198.19.255.249 next-hop-table 4093

this …

ip table add 3
create sub-interfaces NCIC-1-v1 3
set interface state NCIC-1-v1.3 up
set interface ip table NCIC-1-v1.3 3
set interface ip address NCIC-1-v1.3 10.10.203.19/29
ip route add 198.19.255.248/29 table 3 via 198.19.255.249 ip4-look-in-table 4093

and this are all different. Are you hedging your bets 😊

This is how I tried the config:
vppctl ping 198.19.255.253 table-id 4093
116 bytes from 198.19.255.253: icmp_seq=2 ttl=64 time=9.2805 ms
vppctl ping 198.19.255.253 table-id 1
Failed: no egress interface
vppctl ping vppctl sh int addr
Ext-0 (dn):
NCIC-1-v1 (up):
NCIC-1-v1.1 (up):
NCIC-1-v1.2 (up):
  L3 10.10.203.19/29 ip4 table-id 2 fib-idx 3
NCIC-1-v1.3 (up):
  L3 10.10.203.19/29 ip4 table-id 3 fib-idx 4
NCIC-1-v2 (dn):
Radio-0 (dn):
host-Vpp2Host (up):
host-Vpp2Host.4093 (up):
  L3 198.19.255.249/29 ip4 table-id 4093 fib-idx 1
local0 (dn):table-id 2
Statistics: 5 sent, 0 received, 100% packet loss
vppctl ping 198.19.255.253 table-id 3
Failed: no egress interface

The ping code uses the FIB to find egress interface. To do this it does a 
lookup on the destination address and then asks of the resulting FIB entry to 
get a resolving interface. A FIB entry that requires a second lookup cannot 
return a resolving interface. Two options, try ‘ping X source <ITF>’ to give 
ping the interface you want used, or add the routes the right way.
  ip route add 198.19.255.248/29 table 3 via host-Vpp2Host.4093

/neale


This is what I see in vpp:
vppctl sh int addr
Ext-0 (dn):
NCIC-1-v1 (up):
NCIC-1-v1.1 (up):
NCIC-1-v1.2 (up):
  L3 10.10.203.19/29 ip4 table-id 2 fib-idx 3
NCIC-1-v1.3 (up):
  L3 10.10.203.19/29 ip4 table-id 3 fib-idx 4
NCIC-1-v2 (dn):
Radio-0 (dn):
host-Vpp2Host (up):
host-Vpp2Host.4093 (up):
  L3 198.19.255.249/29 ip4 table-id 4093 fib-idx 1
local0 (dn):

vppctl sh ip fib 198.19.255.253
ipv4-VRF:0, fib_index:0, flow hash:[src dst sport dport proto flowlabel ] 
epoch:0 flags:none locks:[default-route:1, ]
0.0.0.0/0 fib:0 index:0 locks:2
  default-route refs:1 entry-flags:drop, src-flags:added,contributing,active,
    path-list:[0] locks:2 flags:drop, uPRF-list:0 len:0 itfs:[]
      path:[0] pl-index:0 ip4 weight=1 pref=0 special:  cfg-flags:drop,
        [@0]: dpo-drop ip4

forwarding:   unicast-ip4-chain
  [@0]: dpo-load-balance: [proto:ip4 index:1 buckets:1 uRPF:0 to:[0:0]]
    [0] [@0]: dpo-drop ip4
ipv4-VRF:4093, fib_index:1, flow hash:[src dst sport dport proto flowlabel ] 
epoch:0 flags:none locks:[CLI:2, adjacency:1, recursive-resolution:2, ]
198.19.255.253/32 fib:1 index:41 locks:2
  adjacency refs:1 entry-flags:attached, src-flags:added,contributing,active, 
cover:12
    path-list:[54] locks:2 uPRF-list:46 len:1 itfs:[6, ]
      path:[60] pl-index:54 ip4 weight=1 pref=0 attached-nexthop:  
oper-flags:resolved,
        198.19.255.253 host-Vpp2Host.4093
      [@0]: ipv4 via 198.19.255.253 host-Vpp2Host.4093: mtu:9000 next:3 
flags:[] a215f39524f302fe349f8c8a81000ffd0800
    Extensions:
     path:60 adj-flags:[refines-cover]
forwarding:   unicast-ip4-chain
  [@0]: dpo-load-balance: [proto:ip4 index:42 buckets:1 uRPF:46 to:[6:576]]
    [0] [@5]: ipv4 via 198.19.255.253 host-Vpp2Host.4093: mtu:9000 next:3 
flags:[] a215f39524f302fe349f8c8a81000ffd0800
ipv4-VRF:1, fib_index:2, flow hash:[src dst sport dport proto flowlabel ] 
epoch:0 flags:none locks:[CLI:2, ]
198.19.255.248/29 fib:2 index:21 locks:2
  CLI refs:1 src-flags:added,contributing,active,
    path-list:[31] locks:2 flags:shared, uPRF-list:23 len:0 itfs:[]
      path:[33] pl-index:31 ip4 weight=1 pref=0 deag:  oper-flags:resolved,
         fib-index:1

forwarding:   unicast-ip4-chain
  [@0]: dpo-load-balance: [proto:ip4 index:22 buckets:1 uRPF:23 to:[0:0]]
    [0] [@11]: dst-address,unicast lookup in ipv4-VRF:4093
ipv4-VRF:2, fib_index:3, flow hash:[src dst sport dport proto flowlabel ] 
epoch:0 flags:none locks:[CLI:2, ]
198.19.255.248/29 fib:3 index:31 locks:2
  CLI refs:1 src-flags:added,contributing,active,
    path-list:[42] locks:2 flags:shared, uPRF-list:34 len:0 itfs:[]
      path:[46] pl-index:42 ip4 weight=1 pref=0 recursive:  oper-flags:resolved,
        via 198.19.255.249 in fib:1 via-fib:15 via-dpo:[dpo-load-balance:16]

forwarding:   unicast-ip4-chain
  [@0]: dpo-load-balance: [proto:ip4 index:32 buckets:1 uRPF:34 to:[5:480]]
    [0] [@12]: dpo-load-balance: [proto:ip4 index:16 buckets:1 uRPF:18 
to:[6:576] via:[5:480]]
          [0] [@2]: dpo-receive: 198.19.255.249 on host-Vpp2Host.4093
ipv4-VRF:3, fib_index:4, flow hash:[src dst sport dport proto flowlabel ] 
epoch:0 flags:none locks:[CLI:2, ]
0.0.0.0/0 fib:4 index:32 locks:2
  default-route refs:1 entry-flags:drop, src-flags:added,contributing,active,
    path-list:[44] locks:2 flags:drop, uPRF-list:36 len:0 itfs:[]
      path:[48] pl-index:44 ip4 weight=1 pref=0 special:  cfg-flags:drop,
        [@0]: dpo-drop ip4

forwarding:   unicast-ip4-chain
  [@0]: dpo-load-balance: [proto:ip4 index:33 buckets:1 uRPF:36 to:[0:0]]
    [0] [@0]: dpo-drop ip4

Do you have any ideas?

BR/Mechthild

From: Neale Ranns <ne...@graphiant.com<mailto:ne...@graphiant.com>>
Sent: Thursday, 1 July 2021 11:42
To: Benoit Ganne (bganne) <bga...@cisco.com<mailto:bga...@cisco.com>>; 
Mechthild Buescher 
<mechthild.buesc...@ericsson.com<mailto:mechthild.buesc...@ericsson.com>>; 
vpp-dev@lists.fd.io<mailto:vpp-dev@lists.fd.io>
Subject: Re: [vpp-dev] next-hop-table between two FIB tables results in punt 
and 'unknown ip protocol'




From: Benoit Ganne (bganne) <bga...@cisco.com<mailto:bga...@cisco.com>>
Date: Thursday, 1 July 2021 at 11:35
To: Neale Ranns <ne...@graphiant.com<mailto:ne...@graphiant.com>>, Mechthild 
Buescher 
<mechthild.buesc...@ericsson.com<mailto:mechthild.buesc...@ericsson.com>>, 
vpp-dev@lists.fd.io<mailto:vpp-dev@lists.fd.io> 
<vpp-dev@lists.fd.io<mailto:vpp-dev@lists.fd.io>>
Subject: RE: [vpp-dev] next-hop-table between two FIB tables results in punt 
and 'unknown ip protocol'
>> As 198.19.255.249 is the IP of host-Vpp2Host.4093, VPP interprets it as
>> you want to deliver the packet locally instead of forwarding it. Try
>> changing it to:
>> ip route add 198.19.255.248/29 table 1 via 0.0.0.0 next-hop-table 4093

> 0.0.0.0/32 in any table is a drop. One cannot specify a route to be
> recursive via another network, i.e. via 0.0.0.0/0, VPP doesn't support
> that.

I do not disagree with the rest of your comment, however this worked for me 
though - maybe because of some odd cli behavior?

probably 😊


vpp# create packet-generator interface pg0
vpp# create packet-generator interface pg1
vpp# set int ip addr pg0 192.168.1.1/24
vpp# set int st pg0 up
vpp# ip table add 4093
vpp# set int st pg1 up
vpp# set int ip table pg1 4093
vpp# set int ip address pg1 198.19.255.249/29
vpp# ip neigh pg1 198.19.255.253 1.2.3 static
vpp# ip route add 198.19.255.248/29 via 0.0.0.0 next-hop-table 4093
vpp# sh ip fib 198.19.255.253 table 0
ipv4-VRF:0, fib_index:0, flow hash:[src dst sport dport proto flowlabel ] 
epoch:0 flags:none locks:[default-route:1, ]
198.19.255.248/29 fib:0 index:21 locks:2
  CLI refs:1 src-flags:added,contributing,active,
    path-list:[29] locks:2 flags:shared, uPRF-list:27 len:0 itfs:[]
      path:[33] pl-index:29 ip4 weight=1 pref=0 deag:  oper-flags:resolved,
         fib-index:1

 forwarding:   unicast-ip4-chain
  [@0]: dpo-load-balance: [proto:ip4 index:23 buckets:1 uRPF:27 to:[1:100]]
    [0] [@12]: dst-address,unicast lookup in ipv4-VRF:4093

this is a lookup-DPO.

Looks like the CLI interprets ‘via 0.0.0.0 next-hop-table 4093’ and ‘via 
ip4-look-in-table 4093’ as the same thing.

/neale



And tracing seems to give the expected result:
00:00:02:247022: pg-input
  stream x, 100 bytes, sw_if_index 1
  current data 0, length 100, buffer-pool 0, ref-count 1, trace handle 0x0
  UDP: 192.168.1.2 -> 198.19.255.253
    tos 0x00, ttl 64, length 100, checksum 0xf2cd dscp CS0 ecn NON_ECN
    fragment id 0x0000
  UDP: 4321 -> 1234
    length 72, checksum 0x7deb
00:00:02:247055: ip4-input
  UDP: 192.168.1.2 -> 198.19.255.253
    tos 0x00, ttl 64, length 100, checksum 0xf2cd dscp CS0 ecn NON_ECN
    fragment id 0x0000
  UDP: 4321 -> 1234
    length 72, checksum 0x7deb
00:00:02:247079: ip4-lookup
  fib 0 dpo-idx 0 flow hash: 0x00000000
  UDP: 192.168.1.2 -> 198.19.255.253
    tos 0x00, ttl 64, length 100, checksum 0xf2cd dscp CS0 ecn NON_ECN
    fragment id 0x0000
  UDP: 4321 -> 1234
    length 72, checksum 0x7deb
00:00:02:247088: lookup-ip4-dst
     fib-index:1 addr:198.19.255.253 load-balance:22
00:00:02:247092: ip4-rewrite
  tx_sw_if_index 2 dpo-idx 4 : ipv4 via 198.19.255.253 pg1: mtu:9000 next:3 
flags:[] 00010002000302fe257345030800 flow hash: 0x00000000
  00000000: 00010002000302fe25734503080045000064000000003f11f3cdc0a80102c613
  00000020: fffd10e104d200487deb000102030405060708090a0b0c0d0e0f1011
00:00:02:247099: pg1-output
  pg1
  IP4: 02:fe:25:73:45:03 -> 00:01:00:02:00:03
  UDP: 192.168.1.2 -> 198.19.255.253
    tos 0x00, ttl 63, length 100, checksum 0xf3cd dscp CS0 ecn NON_ECN
    fragment id 0x0000
  UDP: 4321 -> 1234
    length 72, checksum 0x7deb
00:00:02:247106: pg1-tx
    buffer 0x9ffd4: current data -14, length 114, buffer-pool 0, ref-count 1, 
trace handle 0x0
                    loop-counter 1
  IP4: 02:fe:25:73:45:03 -> 00:01:00:02:00:03
  UDP: 192.168.1.2 -> 198.19.255.253
    tos 0x00, ttl 63, length 100, checksum 0xf3cd dscp CS0 ecn NON_ECN
    fragment id 0x0000
  UDP: 4321 -> 1234
    length 72, checksum 0x7deb

ben
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#19706): https://lists.fd.io/g/vpp-dev/message/19706
Mute This Topic: https://lists.fd.io/mt/83895986/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to