Hi Vyshakh,

I’ve not been able to reproduce your issue, neither on 19.01 nor 19.08. here is 
my attempt :
  https://gerrit.fd.io/r/c/vpp/+/23284
the change to UT means that the first packet will hit the incomplete adjacecny, 
generate an ARP request, which is then resolved and the tarffic passes OK.

I see in your pcap file that there are many ARP requests generated. This is 
would expect if nothing is responding.

Regards,
neale

From: <[email protected]> on behalf of "Neale Ranns via Lists.Fd.Io" 
<[email protected]>
Reply to: "Neale Ranns (nranns)" <[email protected]>
Date: Monday 4 November 2019 at 10:27
To: vyshakh krishnan <[email protected]>, "[email protected]" 
<[email protected]>
Cc: "[email protected]" <[email protected]>
Subject: Re: [vpp-dev] VPWS not working when adjacency is not resolved

Hi Vyshakh,

I’ll look into it. Please give me a few days.

/neale


From: <[email protected]> on behalf of vyshakh krishnan 
<[email protected]>
Date: Monday 4 November 2019 at 05:51
To: "[email protected]" <[email protected]>
Subject: [vpp-dev] VPWS not working when adjacency is not resolved

Hi All,

I have been trying to setup VPWS using VPP host and memif interfaces.
Its working fine when the core memif interface (MPLS) adjacency is resolved 
before configuring MPLS and XC. But if the adjacency is not resolved, VPWS is 
not working.
Can anyone please help me on this?
Let me know for any additional informations.

Topology:
**********


host-PE1 (10.10.1.1) <--veth-link-1--> VPP-PE1 (20.1.1.11 + MPLS) <--memif--> 
(MPLS + 20.1.1.21) VPP-PE2 <--veth-link-2--> host-PE2 (10.10.1.2)

Version:

********

vpp# show version
vpp v19.01.3-rc0~9-gbef25c30a~b79 built by root on beaa7e82ebe3 at Thu Jul 18 
14:47:54 UTC 2019
vpp#

Configs:

********

Host-PE1

sudo ip link add name vpp1out type veth peer name vpp1host
sudo ip link set dev vpp1out up
sudo ip link set dev vpp1host up
sudo ip addr add 10.10.1.1/24<http://10.10.1.1/24> dev vpp1host



VPP-PE1

create host-interface name vpp1out

set int state host-vpp1out up

create interface memif id 10 master

set interface state memif0/10 up

set interface ip address memif0/10 20.1.1.11/24<http://20.1.1.11/24>

mpls table add 0

set interface mpls memif0/10 enable

mpls tunnel add l2-only via 20.1.1.21 memif0/10 out-labels 20 out-labels 10
set int state mpls-tunnel0 up

mpls local-label add eos 100 via l2-input-on mpls-tunnel0

mpls local-label add non-eos 200 via mpls-lookup-in-table 0

set interface l2 xconnect host-vpp1out mpls-tunnel0

set interface l2 xconnect mpls-tunnel0 host-vpp1out





VPP-PE2

create host-interface name vpp1out
set int state host-vpp1out up

create interface memif id 10 slave
set interface state memif0/10 up
set interface ip address memif0/10 20.1.1.21/24<http://20.1.1.21/24>

mpls table add 0
set interface mpls memif0/10 enable

mpls tunnel add l2-only via 20.1.1.11 memif0/10 out-labels 200 out-labels 100
set int state mpls-tunnel0 up

mpls local-label add eos 10 via l2-input-on mpls-tunnel0
mpls local-label add non-eos 20 via mpls-lookup-in-table 0

set interface l2 xconnect host-vpp1out mpls-tunnel0
set interface l2 xconnect mpls-tunnel0 host-vpp1out



host-PE2

sudo ip link add name vpp1out type veth peer name vpp1host
sudo ip link set dev vpp1out up
sudo ip link set dev vpp1host up
sudo ip addr add 10.10.1.2/24<http://10.10.1.2/24> dev vpp1host




Working case (When MPLS core adjacency is resolved first):
*********************************************************************

ubuntu@vpp:~/wireshark/build$ sudo ip  addr show vpp1host
3: vpp1host@vpp1out: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue 
state UP group default qlen 1000
    link/ether 6a:44:92:0f:cc:c1 brd ff:ff:ff:ff:ff:ff
    inet 10.10.1.1/24<http://10.10.1.1/24> scope global vpp1host
       valid_lft forever preferred_lft forever
    inet6 fe80::6844:92ff:fe0f:ccc1/64 scope link
       valid_lft forever preferred_lft forever
ubuntu@vpp:~/wireshark/build$
ubuntu@vpp:~/wireshark/build$ sudo ping 10.10.1.2
PING 10.10.1.2 (10.10.1.2) 56(84) bytes of data.
64 bytes from 10.10.1.2<http://10.10.1.2/>: icmp_seq=1 ttl=64 time=27.6 ms
64 bytes from 10.10.1.2<http://10.10.1.2/>: icmp_seq=2 ttl=64 time=29.4 ms
64 bytes from 10.10.1.2<http://10.10.1.2/>: icmp_seq=3 ttl=64 time=20.0 ms
64 bytes from 10.10.1.2<http://10.10.1.2/>: icmp_seq=4 ttl=64 time=18.8 ms
64 bytes from 10.10.1.2<http://10.10.1.2/>: icmp_seq=5 ttl=64 time=20.9 ms
^C
--- 10.10.1.2 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4006ms
rtt min/avg/max/mdev = 18.834/23.394/29.474/4.323 ms




vpp# show ip fib 20.1.1.21
ipv4-VRF:0, fib_index:0, flow hash:[src dst sport dport proto ] 
locks:[src:plugin-hi:2, src:adjacency:1, src:default-route:1, ]
20.1.1.21/32<http://20.1.1.21/32> fib:0 index:11 locks:2
  src:adjacency refs:1 entry-flags:attached, 
src-flags:added,contributing,active, cover:7
    path-list:[14] locks:2 uPRF-list:8 len:1 itfs:[2, ]
      path:[14] pl-index:14 ip4 weight=1 pref=0 attached-nexthop:  
oper-flags:resolved,
        20.1.1.21 memif0/10
      [@0]: ipv4 via 20.1.1.21 memif0/10: mtu:9000 02fe96a61a9c02feffd898e60800
    Extensions:
     path:14 adj-flags:[refines-cover]
 forwarding:   unicast-ip4-chain
  [@0]: dpo-load-balance: [proto:ip4 index:13 buckets:1 uRPF:8 to:[4:384]]
    [0] [@5]: ipv4 via 20.1.1.21 memif0/10: mtu:9000 
02fe96a61a9c02feffd898e60800

vpp# trace add af-packet-input 10
vpp#
vpp# show trace
------------------- Start of thread 0 vpp_main -------------------
Packet 1

00:31:13:093008: af-packet-input
  af_packet: hw_if_index 1 next-index 4
    tpacket2_hdr:
      status 0x20000001 len 98 snaplen 98 mac 66 net 80
      sec 0x5dbd3664 nsec 0x14116dfd vlan 0 vlan_tpid 0
00:31:13:093031: ethernet-input
  IP4: 6a:28:d3:9e:e9:12 -> fe:37:33:b3:41:01
00:31:13:093034: l2-input
  l2-input: sw_if_index 1 dst fe:37:33:b3:41:01 src 6a:28:d3:9e:e9:12
00:31:13:093035: l2-output
  l2-output: sw_if_index 3 dst fe:37:33:b3:41:01 src 6a:28:d3:9e:e9:12 data 08 
00 45 00 00 54 e4 82 40 00 40 01
00:31:13:093037: mpls-tunnel0-output
  mpls-tunnel0
  00000000: fe3733b341016a28d39ee912080045000054e4824000400140100a0a01010a0a
  00000020: 01020800fb7a00fa00016436bd5d000000001623050000000000101112131415
  00000040: 161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132333435
  00000060: 36370000000000000000000000000000000000000000000000000000
00:31:13:093040: mpls-tunnel0-tx
  MPLS: tunnel 0
00:31:13:093040: l2-load-balance
  L2-load-balance: index 22
00:31:13:093041: ethernet-mpls-label-imposition-pipe
    mpls-header:[10:64:0:eos]
00:31:13:093042: mpls-output
  adj-idx 2 : mpls via 20.1.1.21 memif0/10: mtu:9000 
02fe96a61a9c02feffd898e68847 flow hash: 0xc1fc9087
00:31:13:093044: memif0/10-output
  memif0/10
  MPLS: 02:fe:ff:d8:98:e6 -> 02:fe:96:a6:1a:9c
  label 20 exp 0, s 0, ttl 64


Non-Working case (When MPLS core adjacency is not resolved):
*************************************************************************
ubuntu@vpp:~$ sudo ip addr show vpp1host
3: vpp1host@vpp1out: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue 
state UP group default qlen 1000
    link/ether 6a:00:7c:0a:e5:48 brd ff:ff:ff:ff:ff:ff
    inet 10.10.1.1/24<http://10.10.1.1/24> scope global vpp1host
       valid_lft forever preferred_lft forever
    inet6 fe80::6800:7cff:fe0a:e548/64 scope link
       valid_lft forever preferred_lft forever
ubuntu@vpp:~$
ubuntu@vpp:~$ sudo ping 10.10.1.2
PING 10.10.1.2 (10.10.1.2) 56(84) bytes of data.
From 10.10.1.1 icmp_seq=1 Destination Host Unreachable
From 10.10.1.1 icmp_seq=2 Destination Host Unreachable
From 10.10.1.1 icmp_seq=3 Destination Host Unreachable
From 10.10.1.1 icmp_seq=4 Destination Host Unreachable
From 10.10.1.1 icmp_seq=5 Destination Host Unreachable
From 10.10.1.1 icmp_seq=6 Destination Host Unreachable
From 10.10.1.1 icmp_seq=7 Destination Host Unreachable
From 10.10.1.1 icmp_seq=8 Destination Host Unreachable
From 10.10.1.1 icmp_seq=9 Destination Host Unreachable
From 10.10.1.1 icmp_seq=10 Destination Host Unreachable
From 10.10.1.1 icmp_seq=11 Destination Host Unreachable
From 10.10.1.1 icmp_seq=12 Destination Host Unreachable
From 10.10.1.1 icmp_seq=13 Destination Host Unreachable
From 10.10.1.1 icmp_seq=17 Destination Host Unreachable


vpp# show interface
              Name               Idx    State  MTU (L3/IP4/IP6/MPLS)     
Counter          Count
host-vpp1out                      1      up          9000/0/0/0     rx packets  
                  11
                                                                    rx bytes    
                 630
                                                                    drops       
                  11
local0                            0     down          0/0/0/0
memif0/10                         2      up          9000/0/0/0     rx packets  
                   1
                                                                    rx bytes    
                  42
                                                                    tx packets  
                   2
                                                                    tx bytes    
                  84
                                                                    drops       
                   1
                                                                    tx-error    
                   1
mpls-tunnel0                      3      up          9000/0/0/0     tx packets  
                  11
                                                                    tx bytes    
                 630
vpp#
vpp# show interface
              Name               Idx    State  MTU (L3/IP4/IP6/MPLS)     
Counter          Count
host-vpp1out                      1      up          9000/0/0/0     rx packets  
                  16
                                                                    rx bytes    
                 840
                                                                    drops       
                  16
local0                            0     down          0/0/0/0
memif0/10                         2      up          9000/0/0/0     rx packets  
                   1
                                                                    rx bytes    
                  42
                                                                    tx packets  
                   2
                                                                    tx bytes    
                  84
                                                                    drops       
                   1
                                                                    tx-error    
                   1
mpls-tunnel0                      3      up          9000/0/0/0     tx packets  
                  16
                                                                    tx bytes    
                 840

vpp# show ip fib 20.1.1.21
ipv4-VRF:0, fib_index:0, flow hash:[src dst sport dport proto ] 
locks:[src:plugin-hi:2, src:adjacency:1, src:default-route:1, ]
20.1.1.21/32<http://20.1.1.21/32> fib:0 index:19 locks:2
  src:adjacency refs:1 entry-flags:attached, 
src-flags:added,contributing,active, cover:7
    path-list:[24] locks:2 uPRF-list:8 len:1 itfs:[2, ]
      path:[24] pl-index:24 ip4 weight=1 pref=0 attached-nexthop:  
oper-flags:resolved,
        20.1.1.21 memif0/10
      [@0]: arp-ipv4: via 20.1.1.21 memif0/10
    Extensions:
     path:24 adj-flags:[refines-cover]
 forwarding:   unicast-ip4-chain
  [@0]: dpo-load-balance: [proto:ip4 index:21 buckets:1 uRPF:8 to:[0:0]]
    [0] [@3]: arp-ipv4: via 20.1.1.21 memif0/10

vpp# trace add af-packet-input 10
vpp# show trace
------------------- Start of thread 0 vpp_main -------------------
Packet 1

00:05:56:108226: af-packet-input
  af_packet: hw_if_index 1 next-index 4
    tpacket2_hdr:
      status 0x20000001 len 42 snaplen 42 mac 66 net 80
      sec 0x5dbd3b18 nsec 0xe9b2b64 vlan 0 vlan_tpid 0
00:05:56:108237: ethernet-input
  ARP: 6a:00:7c:0a:e5:48 -> ff:ff:ff:ff:ff:ff
00:05:56:108240: l2-input
  l2-input: sw_if_index 1 dst ff:ff:ff:ff:ff:ff src 6a:00:7c:0a:e5:48
00:05:56:108242: l2-output
  l2-output: sw_if_index 3 dst ff:ff:ff:ff:ff:ff src 6a:00:7c:0a:e5:48 data 08 
06 00 01 08 00 06 04 00 01 6a 00
00:05:56:108246: mpls-tunnel0-output
  mpls-tunnel0
  00000000: ffffffffffff6a007c0ae548080600010800060400016a007c0ae5480a0a0101
  00000020: 0000000000000a0a010200000000000000000000000000000000000000000000
  00000040: 0000000000000000000000000000000000000000000000000000000000000000
  00000060: 00000000000000000000000000000000000000000000000000000000
00:05:56:108249: mpls-tunnel0-tx
  MPLS: tunnel 0
00:05:56:108250: l2-load-balance
  L2-load-balance: index 23
00:05:56:108251: ethernet-mpls-label-imposition-pipe
    mpls-header:[10:64:0:eos]
00:05:56:108252: mpls-adj-incomplete
    next:1
00:05:56:108253: ip4-arp
    RESERVED: 255.255.106.0 -> 124.10.229.72
      version 0, header length 0
      tos 0x01, ttl 255, length 16448, checksum 0xffff
      fragment id 0x0000 offset 2560, flags MORE_FRAGMENTSCONGESTION
00:05:56:108256: error-drop
  ip4-arp: ARP requests resolved


vpp# pcap dispatch trace on max 1000 file vppcapture buffer-trace 
af-packet-input 1000
Buffer tracing of 1000 pkts from af-packet-input enabled...
pcap dispatch capture on...
vpp# pcap dispatch trace off
captured 60 pkts...
saved to /tmp/vppcapture...

[attaching the pcap]

Thanks
Vyshakh


--
--Regards

       Vyshakh Krishnan C H
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#14528): https://lists.fd.io/g/vpp-dev/message/14528
Mute This Topic: https://lists.fd.io/mt/41087863/21656
Group Owner: [email protected]
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to