[vpp-dev] control plane

2018-03-11 Thread Gulakh
Hi,
I want to know how can I use FRR as control plane with VPP as data plane??

I have searched and found a plugin named Router_Plugin from VPPSB project.
As the project stated and I tested it, It seems that this plugin only
supports OSPF as routing protocol, but I need support for ISIS, BGP and etc.

Is there any alternative to router_plugin to use as glue between
FRR(control plane) and VPP(data plane) with support of ISIS, BGP and etc??

If not, How can I develop it myself?? any idea??

Thanks in advance


[vpp-dev] router plugin ISIS

2018-04-30 Thread Gulakh
Hi,
i want to extend router plugin code to support is-is, i.e., sending is-is
packets up to the control plane!

First, i registered ISIS in tap inject, by adding the following line:
ip4_register_protocol (IP_PROTOCOL_ISIS, im->tx_node_index);
 in tap_inject_enable (void) function located at
vppsb/router/router/tap_inject.c file!

However, the problem remained unsolved.
Is there a special issue related to is-is that i should know?
Anyone can help me?

Regards,
Gulakh


[vpp-dev] nat

2018-05-07 Thread Gulakh
Hi,
I have used linux iptables for NAT, but now I want VPP nat.

could you please give me some examples corresponding to the iptables one on
how to use VPP nat?

e.g.  iptables rule :  ,vpp rule: yy

thanks


[vpp-dev] tcp connection

2018-06-17 Thread Gulakh
Hi,
I am having a problem when LDP attempts to setup a session.
According to Wikipedia's LDP page
, LDP first
exchanges packets on UDP and then start a session by setting up TCP
connection.

UDP packets from control plane to data plane are sent, but the TCP
connection is not set up.

Here is what show trace shows:
==
UDP
==
Packet 8

00:10:18:346891: dpdk-input
  GigabitEthernet13/0/0 rx queue 0
  buffer 0x6468: current data 14, length 70, free-list 0, clone-count 0,
totlen-nifb 0, trace 0x7
 ext-hdr-valid
 l4-cksum-computed l4-cksum-correct l2-hdr-offset 0
l3-hdr-offset 14
  PKT MBUF: port 0, nb_segs 1, pkt_len 84
buf_len 2176, data_len 84, ol_flags 0x0, data_off 128, phys_addr
0x3fd91a80
packet_type 0x10 l2_len 0 l3_len 0 outer_l2_len 0 outer_l3_len 0
Packet Types
  RTE_PTYPE_L3_IPV4 (0x0010) IPv4 packet without extension headers
  IP4: 00:0c:29:3a:39:d7 -> 01:00:5e:00:00:02
  UDP: 192.168.1.1 -> 224.0.0.2
tos 0xc0, ttl 1, length 70, checksum 0xc20e
fragment id 0x152d, flags DONT_FRAGMENT
  UDP: 646 -> 646
length 50, checksum 0x245a
00:10:18:346913: ip4-input
  UDP: 192.168.1.1 -> 224.0.0.2
tos 0xc0, ttl 1, length 70, checksum 0xc20e
fragment id 0x152d, flags DONT_FRAGMENT
  UDP: 646 -> 646
length 50, checksum 0x245a
00:10:18:346925: ip4-mfib-forward-lookup
  fib 0 entry 6
00:10:18:346931: ip4-mfib-forward-rpf
  entry 6 itf -1 flags





TCP


Packet 12

00:10:21:474191: dpdk-input
  GigabitEthernet13/0/0 rx queue 0
  buffer 0x6441: current data 14, length 60, free-list 0, clone-count 0,
totlen-nifb 0, trace 0xb
 ext-hdr-valid
 l4-cksum-computed l4-cksum-correct l2-hdr-offset 0
l3-hdr-offset 14
  PKT MBUF: port 0, nb_segs 1, pkt_len 74
buf_len 2176, data_len 74, ol_flags 0x0, data_off 128, phys_addr
0x3fd910c0
packet_type 0x10 l2_len 0 l3_len 0 outer_l2_len 0 outer_l3_len 0
Packet Types
  RTE_PTYPE_L3_IPV4 (0x0010) IPv4 packet without extension headers
  IP4: 00:0c:29:3a:39:d7 -> 00:0c:29:d6:93:93
  TCP: 1.1.1.1 -> 2.2.2.2
tos 0xc0, ttl 255, length 60, checksum 0x74f6
fragment id 0x, flags DONT_FRAGMENT
  TCP: 646 -> 57413
seq. 0xbb729c35 ack 0x6382b56c
flags 0x12 SYN ACK, tcp header: 40 bytes
window 28960, checksum 0x5590
00:10:21:474204: ip4-input
  TCP: 1.1.1.1 -> 2.2.2.2
tos 0xc0, ttl 255, length 60, checksum 0x74f6
fragment id 0x, flags DONT_FRAGMENT
  TCP: 646 -> 57413
seq. 0xbb729c35 ack 0x6382b56c
flags 0x12 SYN ACK, tcp header: 40 bytes
window 28960, checksum 0x5590
00:10:21:474216: ip4-lookup
  fib 0 dpo-idx 0 flow hash: 0x
  TCP: 1.1.1.1 -> 2.2.2.2
tos 0xc0, ttl 255, length 60, checksum 0x74f6
fragment id 0x, flags DONT_FRAGMENT
  TCP: 646 -> 57413
seq. 0xbb729c35 ack 0x6382b56c
flags 0x12 SYN ACK, tcp header: 40 bytes
window 28960, checksum 0x5590
00:10:21:474231: ip4-drop
TCP: 1.1.1.1 -> 2.2.2.2
  tos 0xc0, ttl 255, length 60, checksum 0x74f6
  fragment id 0x, flags DONT_FRAGMENT
TCP: 646 -> 57413
  seq. 0xbb729c35 ack 0x6382b56c
  flags 0x12 SYN ACK, tcp header: 40 bytes
  window 28960, checksum 0x5590
00:10:21:474233: error-drop
  ip4-input: valid ip4 packets


what is the problem??

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#9632): https://lists.fd.io/g/vpp-dev/message/9632
Mute This Topic: https://lists.fd.io/mt/22394233/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [vpp-dev] tcp connection

2018-06-17 Thread Gulakh
My VPP commit number : d05b926dc2971552edca2ad510fb7437698c4aad

My VPPSB commit number : 042a782c530ceb58507d697726e68ad7fe4fe023

On Sun, Jun 17, 2018 at 5:41 PM, Holoo Gulakh  wrote:

> Hi,
> I am having a problem when LDP attempts to setup a session.
> According to Wikipedia's LDP page
> <https://en.wikipedia.org/wiki/Label_Distribution_Protocol>, LDP first
> exchanges packets on UDP and then start a session by setting up TCP
> connection.
>
> UDP packets from control plane to data plane are sent, but the TCP
> connection is not set up.
>
> Here is what show trace shows:
> ==
> UDP
> ==
> Packet 8
>
> 00:10:18:346891: dpdk-input
>   GigabitEthernet13/0/0 rx queue 0
>   buffer 0x6468: current data 14, length 70, free-list 0, clone-count 0,
> totlen-nifb 0, trace 0x7
>  ext-hdr-valid
>  l4-cksum-computed l4-cksum-correct l2-hdr-offset 0
> l3-hdr-offset 14
>   PKT MBUF: port 0, nb_segs 1, pkt_len 84
> buf_len 2176, data_len 84, ol_flags 0x0, data_off 128, phys_addr
> 0x3fd91a80
> packet_type 0x10 l2_len 0 l3_len 0 outer_l2_len 0 outer_l3_len 0
> Packet Types
>   RTE_PTYPE_L3_IPV4 (0x0010) IPv4 packet without extension headers
>   IP4: 00:0c:29:3a:39:d7 -> 01:00:5e:00:00:02
>   UDP: 192.168.1.1 -> 224.0.0.2
> tos 0xc0, ttl 1, length 70, checksum 0xc20e
> fragment id 0x152d, flags DONT_FRAGMENT
>   UDP: 646 -> 646
> length 50, checksum 0x245a
> 00:10:18:346913: ip4-input
>   UDP: 192.168.1.1 -> 224.0.0.2
> tos 0xc0, ttl 1, length 70, checksum 0xc20e
> fragment id 0x152d, flags DONT_FRAGMENT
>   UDP: 646 -> 646
> length 50, checksum 0x245a
> 00:10:18:346925: ip4-mfib-forward-lookup
>   fib 0 entry 6
> 00:10:18:346931: ip4-mfib-forward-rpf
>   entry 6 itf -1 flags
>
>
>
>
> 
> TCP
> 
>
> Packet 12
>
> 00:10:21:474191: dpdk-input
>   GigabitEthernet13/0/0 rx queue 0
>   buffer 0x6441: current data 14, length 60, free-list 0, clone-count 0,
> totlen-nifb 0, trace 0xb
>  ext-hdr-valid
>  l4-cksum-computed l4-cksum-correct l2-hdr-offset 0
> l3-hdr-offset 14
>   PKT MBUF: port 0, nb_segs 1, pkt_len 74
> buf_len 2176, data_len 74, ol_flags 0x0, data_off 128, phys_addr
> 0x3fd910c0
> packet_type 0x10 l2_len 0 l3_len 0 outer_l2_len 0 outer_l3_len 0
> Packet Types
>   RTE_PTYPE_L3_IPV4 (0x0010) IPv4 packet without extension headers
>   IP4: 00:0c:29:3a:39:d7 -> 00:0c:29:d6:93:93
>   TCP: 1.1.1.1 -> 2.2.2.2
> tos 0xc0, ttl 255, length 60, checksum 0x74f6
> fragment id 0x, flags DONT_FRAGMENT
>   TCP: 646 -> 57413
> seq. 0xbb729c35 ack 0x6382b56c
> flags 0x12 SYN ACK, tcp header: 40 bytes
> window 28960, checksum 0x5590
> 00:10:21:474204: ip4-input
>   TCP: 1.1.1.1 -> 2.2.2.2
> tos 0xc0, ttl 255, length 60, checksum 0x74f6
> fragment id 0x, flags DONT_FRAGMENT
>   TCP: 646 -> 57413
> seq. 0xbb729c35 ack 0x6382b56c
> flags 0x12 SYN ACK, tcp header: 40 bytes
> window 28960, checksum 0x5590
> 00:10:21:474216: ip4-lookup
>   fib 0 dpo-idx 0 flow hash: 0x
>   TCP: 1.1.1.1 -> 2.2.2.2
> tos 0xc0, ttl 255, length 60, checksum 0x74f6
> fragment id 0x, flags DONT_FRAGMENT
>   TCP: 646 -> 57413
> seq. 0xbb729c35 ack 0x6382b56c
> flags 0x12 SYN ACK, tcp header: 40 bytes
> window 28960, checksum 0x5590
> 00:10:21:474231: ip4-drop
> TCP: 1.1.1.1 -> 2.2.2.2
>   tos 0xc0, ttl 255, length 60, checksum 0x74f6
>   fragment id 0x, flags DONT_FRAGMENT
> TCP: 646 -> 57413
>   seq. 0xbb729c35 ack 0x6382b56c
>   flags 0x12 SYN ACK, tcp header: 40 bytes
>   window 28960, checksum 0x5590
> 00:10:21:474233: error-drop
>   ip4-input: valid ip4 packets
>
>
> what is the problem??
>

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#9633): https://lists.fd.io/g/vpp-dev/message/9633
Mute This Topic: https://lists.fd.io/mt/22394233/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[vpp-dev] mpls tunnel

2018-06-20 Thread Gulakh
Hi,
My topology is:

  *R1 (192.168.1.1/24 )*
<-->* R2 (192.168.1.2/24 )*

and *R1 loopback interface* has IP address of *1.1.1.1/32
*

==
I have configured VPP's mpls tunnel as follow:
*set interface ip address GigabitEthernet13/0/0 192.168.1.2/24
*
*mpls tunnel l2-only via 1.1.1.1 ip4-lookup-in-table 0
out-labels 33*

To make it possible to find 1.1.1.1, I inserted a route in ip fib as follow:
  * ip route add 1.1.1.1/32  via 192.168.1.1
GigabitEthernet13/0/0*

What I see in "show mpls tunnel" is as follow:











*[@0] mpls_tunnel0: sw_if_index:4 hw_if_index:4 flags:L2, via:
path-list:[22] locks:1 flags:shared, uPRF-list:20 len:1 itfs:[2, ]
path:[22] pl-index:22 ip4 weight=1 pref=0 recursive:via 192.168.1.1
in fib:0 via-fib:17 via-dpo:[dpo-load-balance:20]Extensions:
path:22 mpls-flags:[no-ip-tll-decr] labels:[[33 pipe ttl:0
exp:0]] forwarding: ethernet [@1]: dpo-load-balance: [proto:ethernet
index:22 buckets:1 uRPF:-1 to:[0:0]][0] [@0]: dpo-drop ethernet*

==
In another scenario, I have used following configurations:
*set interface ip address GigabitEthernet13/0/0 192.168.1.2/24
*
*mpls tunnel l2-only via 1.1.1.1 GigabitEthernet13/0/0
out-labels 33*

What I see in "show mpls tunnel" is as follow:

[











*@0] mpls_tunnel0: sw_if_index:4 hw_if_index:4 flags:L2, via:
path-list:[23] locks:1 flags:shared, uPRF-list:19 len:1 itfs:[2, ]
path:[23] pl-index:23 ip4 weight=1 pref=0 attached-nexthop:
oper-flags:resolved,1.1.1.1 GigabitEthernet13/0/0  [@0]:
arp-ipv4: via 1.1.1.1 GigabitEthernet13/0/0Extensions: path:23
mpls-flags:[no-ip-tll-decr] labels:[[33 pipe ttl:0 exp:0]] forwarding:
ethernet [@1]: dpo-load-balance: [proto:ethernet index:23 buckets:1 uRPF:-1
to:[0:0]][0] [@2]: mpls-label[0]:[33:64:0:eos][@1]: arp-mpls:
via 1.1.1.1 GigabitEthernet13/0/0*


==
My Question:
Q: Why does not VPP resolve IP address of 1.1.1.1 in the first
configuration (As the "show mpls tunnel" in first scenario shows, It has
not been resolved)?? I expect to do so since I have added a route for
1.1.1.1 in IP fib.

Thanks

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#9656): https://lists.fd.io/g/vpp-dev/message/9656
Mute This Topic: https://lists.fd.io/mt/22449276/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [vpp-dev] tcp connection

2018-06-20 Thread Gulakh
I found the problem.
I was using the loopback interface of linux as loopback of VPP which is not
correct, since it is not recognized in VPP. So packet are dropped in
ip4-lookup node.
I thought that it is the problem in tcp because I was sending tcp SYN
without VPP's awareness of this sending.
But altogether it is not the problem of tcp.

On Sun, Jun 17, 2018 at 6:15 PM, Damjan Marion  wrote:

>
> are you aware that vpp doesn’t do LDP?
> VPP is dataplame, and expect that external control plane is present and
> takes care for programming mpls fib.
>
> —
> Damjan
>
> On 17 Jun 2018, at 15:11, Gulakh  wrote:
>
> Hi,
> I am having a problem when LDP attempts to setup a session.
> According to Wikipedia's LDP page
> <https://en.wikipedia.org/wiki/Label_Distribution_Protocol>, LDP first
> exchanges packets on UDP and then start a session by setting up TCP
> connection.
>
> UDP packets from control plane to data plane are sent, but the TCP
> connection is not set up.
>
> Here is what show trace shows:
> ==
> UDP
> ==
> Packet 8
>
> 00:10:18:346891: dpdk-input
>   GigabitEthernet13/0/0 rx queue 0
>   buffer 0x6468: current data 14, length 70, free-list 0, clone-count 0,
> totlen-nifb 0, trace 0x7
>  ext-hdr-valid
>  l4-cksum-computed l4-cksum-correct l2-hdr-offset 0
> l3-hdr-offset 14
>   PKT MBUF: port 0, nb_segs 1, pkt_len 84
> buf_len 2176, data_len 84, ol_flags 0x0, data_off 128, phys_addr
> 0x3fd91a80
> packet_type 0x10 l2_len 0 l3_len 0 outer_l2_len 0 outer_l3_len 0
> Packet Types
>   RTE_PTYPE_L3_IPV4 (0x0010) IPv4 packet without extension headers
>   IP4: 00:0c:29:3a:39:d7 -> 01:00:5e:00:00:02
>   UDP: 192.168.1.1 -> 224.0.0.2
> tos 0xc0, ttl 1, length 70, checksum 0xc20e
> fragment id 0x152d, flags DONT_FRAGMENT
>   UDP: 646 -> 646
> length 50, checksum 0x245a
> 00:10:18:346913: ip4-input
>   UDP: 192.168.1.1 -> 224.0.0.2
> tos 0xc0, ttl 1, length 70, checksum 0xc20e
> fragment id 0x152d, flags DONT_FRAGMENT
>   UDP: 646 -> 646
> length 50, checksum 0x245a
> 00:10:18:346925: ip4-mfib-forward-lookup
>   fib 0 entry 6
> 00:10:18:346931: ip4-mfib-forward-rpf
>   entry 6 itf -1 flags
>
>
>
>
> 
> TCP
> 
>
> Packet 12
>
> 00:10:21:474191: dpdk-input
>   GigabitEthernet13/0/0 rx queue 0
>   buffer 0x6441: current data 14, length 60, free-list 0, clone-count 0,
> totlen-nifb 0, trace 0xb
>  ext-hdr-valid
>  l4-cksum-computed l4-cksum-correct l2-hdr-offset 0
> l3-hdr-offset 14
>   PKT MBUF: port 0, nb_segs 1, pkt_len 74
> buf_len 2176, data_len 74, ol_flags 0x0, data_off 128, phys_addr
> 0x3fd910c0
> packet_type 0x10 l2_len 0 l3_len 0 outer_l2_len 0 outer_l3_len 0
> Packet Types
>   RTE_PTYPE_L3_IPV4 (0x0010) IPv4 packet without extension headers
>   IP4: 00:0c:29:3a:39:d7 -> 00:0c:29:d6:93:93
>   TCP: 1.1.1.1 -> 2.2.2.2
> tos 0xc0, ttl 255, length 60, checksum 0x74f6
> fragment id 0x, flags DONT_FRAGMENT
>   TCP: 646 -> 57413
> seq. 0xbb729c35 ack 0x6382b56c
> flags 0x12 SYN ACK, tcp header: 40 bytes
> window 28960, checksum 0x5590
> 00:10:21:474204: ip4-input
>   TCP: 1.1.1.1 -> 2.2.2.2
> tos 0xc0, ttl 255, length 60, checksum 0x74f6
> fragment id 0x, flags DONT_FRAGMENT
>   TCP: 646 -> 57413
> seq. 0xbb729c35 ack 0x6382b56c
> flags 0x12 SYN ACK, tcp header: 40 bytes
> window 28960, checksum 0x5590
> 00:10:21:474216: ip4-lookup
>   fib 0 dpo-idx 0 flow hash: 0x
>   TCP: 1.1.1.1 -> 2.2.2.2
> tos 0xc0, ttl 255, length 60, checksum 0x74f6
> fragment id 0x, flags DONT_FRAGMENT
>   TCP: 646 -> 57413
> seq. 0xbb729c35 ack 0x6382b56c
> flags 0x12 SYN ACK, tcp header: 40 bytes
> window 28960, checksum 0x5590
> 00:10:21:474231: ip4-drop
> TCP: 1.1.1.1 -> 2.2.2.2
>   tos 0xc0, ttl 255, length 60, checksum 0x74f6
>   fragment id 0x, flags DONT_FRAGMENT
> TCP: 646 -> 57413
>   seq. 0xbb729c35 ack 0x6382b56c
>   flags 0x12 SYN ACK, tcp header: 40 bytes
>   window 28960, checksum 0x5590
> 00:10:21:474233: error-drop
>   ip4-input: valid ip4 packets
>
>
> what is the problem??
> 
>
>

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#9657): https://lists.fd.io/g/vpp-dev/message/9657
Mute This Topic: https://lists.fd.io/mt/22394233/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [vpp-dev] mpls tunnel

2018-06-21 Thread Gulakh
Hi,
It is not a valid solution.(at least "show mpls tunnel" says that)

Here is the new configuration and result:
  * mpls tunnel l2-only via 1.1.1.1 out-labels 33*
*   ip route add 1.1.1.1/32 <http://1.1.1.1/32> via 192.168.1.1
GigabitEthernet13/0/0*

result:
I expect to see something like the result of second scenario above:
===
[











*@0] mpls_tunnel0: sw_if_index:4 hw_if_index:4 flags:L2, via:
path-list:[23] locks:1 flags:shared, uPRF-list:19 len:1 itfs:[2, ]
path:[23] pl-index:23 ip4 weight=1 pref=0 attached-nexthop:
oper-flags:resolved,1.1.1.1 GigabitEthernet13/0/0  [@0]:
arp-ipv4: via 1.1.1.1 GigabitEthernet13/0/0Extensions: path:23
mpls-flags:[no-ip-tll-decr] labels:[[33 pipe ttl:0 exp:0]] forwarding:
ethernet [@1]: dpo-load-balance: [proto:ethernet index:23 buckets:1 uRPF:-1
to:[0:0]][0] [@2]: mpls-label[0]:[33:64:0:eos][@1]: arp-mpls:
via 1.1.1.1 GigabitEthernet13/0/0*


But the result is as follow:
===










*[@0] mpls_tunnel0: sw_if_index:4 hw_if_index:4 flags:L2, via:
path-list:[23] locks:1 flags:shared, uPRF-list:19 len:1 itfs:[2, ]
path:[23] pl-index:23 ip4 weight=1 pref=0 recursive:via 1.1.1.1 in
fib:0 via-fib:17 via-dpo:[dpo-load-balance:20]Extensions: path:23
mpls-flags:[no-ip-tll-decr] labels:[[33 pipe ttl:0 exp:0]] forwarding:
ethernet [@1]: dpo-load-balance: [proto:ethernet index:23 buckets:1 uRPF:-1
to:[0:0]][0] [@0]: dpo-drop ethernet*


If I use the following command for the route to 1.1.1.1:
 *ip route add 1.1.1.1/32 <http://1.1.1.1/32> via 192.168.1.1
GigabitEthernet13/0/0  out-labels 50*

the result is:
===













*[@0] mpls_tunnel0: sw_if_index:4 hw_if_index:4 flags:L2, via:
path-list:[23] locks:1 flags:shared, uPRF-list:19 len:1 itfs:[2, ]
path:[23] pl-index:23 ip4 weight=1 pref=0 recursive:
oper-flags:resolved,via 1.1.1.1 in fib:0 via-fib:17
via-dpo:[dpo-load-balance:20]Extensions: path:23
mpls-flags:[no-ip-tll-decr] labels:[[33 pipe ttl:0 exp:0]] forwarding:
ethernet [@1]: dpo-load-balance: [proto:ethernet index:23 buckets:1 uRPF:-1
to:[0:0]][0] [@2]: mpls-label[0]:[33:64:0:eos][@1]:
dpo-load-balance: [proto:mpls index:21 buckets:1 uRPF:22 to:[0:0]
via:[1:64]][0] [@6]:
mpls-label[1]:[50:64:0:neos][@2]: mpls via 192.168.1.1
GigabitEthernet13/0/0: mtu:9000 000c293a39d7000c29d693938847*
Which is correct in my scenario.

How can I use the defined route for 1.1.1.1 in IP fib as the route for mpls
tunnel to get to 1.1.1.1 (in both case with mpls label--which I provided--
and without mpls label)??

Thanks.

On Thu, Jun 21, 2018 at 4:46 AM, Neale Ranns (nranns) 
wrote:

> Hi,
>
>
>
> This:
>
>   XXX via *via 1.1.1.1 ip4-lookup-in-table 0 out-labels 33*
>
> is not a valid path.
>
>
>
> If you want packets to follow the same path as for 1.1.1.1 (i.e. the path
> is recursive via 1.1.1.1, and you’ll need a route in the fib for 1.1.1.1)
> and have label 33 imposed, do:
>
>   XXX via *via 1.1.1.1 out-labels 33*
>
> If the 1.1.1.1 you want to recurse via is not in the default table, then
> do:
>
> XXX via *via 1.1.1.1 next-hop-table Y out-labels 33*
>
>
>
> If (e.g. post a label pop) you want to use the exposed IP4 header to do a
> IP4 lookup then do:
>
>   XXX via *via ip4-lookup-in-table 0*
>
>
>
> This*:*
>
> *  XXX via 1.1.1.1 GigabitEthernet13/0/0 out-labels 33*
>
> Is not a recursive path. It will resolve via the adjacency for 1.1.1.1 on
> GigE13/0/0 and thus will attempt to ARP for 1.1.1.1 out of that interface.
> Since 1.1.1.1 is not an address on that interface’s configured subnet, this
> won’t work, unless the peer is running proxy ARP, which we all know is evil.
>
>
>
> /neale
>
>
>
> *From: * on behalf of Gulakh 
> *Date: *Wednesday, 20 June 2018 at 22:32
> *To: *"vpp-dev@lists.fd.io" 
> *Subject: *[vpp-dev] mpls tunnel
>
>
>
> Hi,
>
> My topology is:
>
>
>
>   *R1 (192.168.1.1/24 <http://192.168.1.1/24>)*
> <-->* R2 (192.168.1.2/24 <http://192.168.1.2/24>)*
>
>
>
> and *R1 loopback interface* has IP address of *1.1.1.1/32
> <http://1.1.1.1/32>*
>
>
>
> ==
>
> I have configured VPP's mpls tunnel as follow:
>
> *set interface ip address GigabitEthernet13/0/0
> 192.168.1.2/24 <http://192.168.1.2/24>*
>
> *mpls tunnel l2-only via 1.1.1.1 ip4-lookup-in-table 0
> out-labels 33*
>
>
>
> To make it possible to find 1.1.1.1, I inserted a route in ip fib as
> follow:
>
>   * ip route add 1.1.1.1/32 <http://1.1.1.1/32> via 192.168.1.1
> GigabitEthernet13/0/0*
>
&g

[vpp-dev] arp request

2018-06-25 Thread Gulakh
Hi,
I have configured VPP to have VPLS base on this link
 somehow.
Now at the first time, a computer in the first LAN send an ARP request to
find the MAC address of the other computer in the second LAN.

By capturing received packets in the second computer, I can see that ARP
requests are received but ARP reply is not sent on response.
By statically setting MAC address in the ARP table of both computers, the
problem is fixed.

Q:Why is not ARP reply sent automatically? How can I fix it??

Thanks

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#9690): https://lists.fd.io/g/vpp-dev/message/9690
Mute This Topic: https://lists.fd.io/mt/22676139/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [vpp-dev] How to use VPP API?

2018-06-26 Thread Gulakh
Hi Jeff,
Here is a sample code for python API.

On Tue, Jun 26, 2018 at 4:39 AM, Jeff Bushman  wrote:

> Is there any documentation, examples or discussion of how to use the VPP
> API Modules beyond the short documentation here?
> https://docs.fd.io/vpp/18.07/vapi_doc.html
> _._,_._,_
> --
> Links:
>
> You receive all messages sent to this group.
>
> View/Reply Online (#9700)  | Reply
> To Sender
> 
> | Reply To Group
> 
> | Mute This Topic  | New Topic
> 
>
> Your Subscription  | Contact
> Group Owner  | Unsubscribe
>  [holoogul...@gmail.com]
> _._,_._,_
>
>
#Be nam _e_ khoda

#Program Description:
#This program adds a new routing entry to IP FIB using VPP API

from __future__ import print_function

#Needed for adding entry to FIB
#import socket
import inspect

import os
import fnmatch
import vpp_papi
from vpp_papi import VPP

vpp_json_dir = '/usr/share/vpp/api/'

jsonfiles = []
for root, dirnames, filenames in os.walk(vpp_json_dir):
for filename in fnmatch.filter(filenames, '*.api.json'):
jsonfiles.append(os.path.join(vpp_json_dir, filename))

if not jsonfiles:
print('Error: no json api files found')
exit(-1)

vpp = VPP(jsonfiles)
#print(dir(vpp))

r = vpp.connect("test_papi")
print(r)
#print(vpp.status())
#for entry in vpp.ip_fib_dump():
#   print(entry.address)
#print(dir(vpp))
#print(vpp.api)



print("##")
print(" Before  ")
print("##")
fib = vpp.ip_fib_dump()
print(fib)

#
#   add entry to fib#
#
r = vpp.ip_add_del_route(is_add=1, dst_address="\x01\x01\x01\x01", 
dst_address_length=32, next_hop_address="\x02\x02\x02\x02")
print(r)

#print("Be nam _e_ khoda\n")
#print(vpp.ip_address_dump.__doc__)
#print("\n\nArguments : \n")
#inspect.getargspec(vpp.ip_address_dump)

print("#")
print(" After   ")
print("#")

fib = vpp.ip_fib_dump()
print(fib)


exit(vpp.disconnect())
#Be nam _e_ khoda

#Program Description:
#This program adds a new mpls entry to IP FIB using VPP API


from __future__ import print_function

#Needed for adding entry to FIB
#import socket
import inspect

import os
import fnmatch
import vpp_papi
from vpp_papi import VPP

vpp_json_dir = '/usr/share/vpp/api/'

jsonfiles = []
for root, dirnames, filenames in os.walk(vpp_json_dir):
for filename in fnmatch.filter(filenames, '*.api.json'):
jsonfiles.append(os.path.join(vpp_json_dir, filename))

if not jsonfiles:
print('Error: no json api files found')
exit(-1)

vpp = VPP(jsonfiles)
#print(dir(vpp))

r = vpp.connect("test_papi")
print(r)


print("##")
print(" Before  ")
print("##")

#IP Fib
fib = vpp.ip_fib_dump()
print(fib)


#
#   add entry to fib#
#
#In This API next_hop_weight must have a value, otherwise the entry added to IP 
FIB does not have MPLS label

r = vpp.ip_add_del_route(is_add=0, is_ipv6=0, next_hop_weight=1, 
is_multipath=1, dst_address="\x0a\x00\x14\x02", dst_address_length=32, 
next_hop_sw_if_index=2, next_hop_n_out_labels=1, next_hop_out_label_stack=[78])



print("#")
print(" After   ")
print("#")

#IP Fib
fib = vpp.ip_fib_dump()
print(fib)


exit(vpp.disconnect())
#Be nam _e_ khoda

#Program Description:
#This program adds a new mpls entry to MPLS FIB using VPP API

from __future__ import print_function

#Needed for adding entry to FIB
#import socket
import inspect

import os
import fnmatch
import vpp_papi
from vpp_papi import VPP

vpp_json_dir = '/usr/share/vpp/api/'

jsonfiles = []
for root, dirnames, filenames in os.walk(vpp_json_dir):
for filename in fnmatch.filter(filenames, '*.api.json'):
jsonfiles.append(os.path.join(vpp_json_dir, filename))

if not jsonfiles:
print('Error: no json api files found')
exit(-1)

vpp = VPP(jsonfiles)
#print(dir(vpp))

r = vpp.connect("test_papi")
print(r)
#print(vpp.status())

print("##")
print(" Before  ")
print("##")

#MPLS Fib
fib = vpp.mpls_fib_dump()
print(fib)

vpp.mpls_route_add_del(mr_is_add=1, mr_label=37, mr_eos=1

Re: [vpp-dev] arp request

2018-06-28 Thread Gulakh
Hi,
The problem fixed but I don't know how. maybe it was a configuration
problem or something else.

Just to aware you that it was not a problem to take care of

On Mon, Jun 25, 2018 at 6:56 PM, Holoo Gulakh  wrote:

> Hi,
> I have configured VPP to have VPLS base on this link
> <https://lists.fd.io/g/vpp-dev/topic/18122864#9123> somehow.
> Now at the first time, a computer in the first LAN send an ARP request to
> find the MAC address of the other computer in the second LAN.
>
> By capturing received packets in the second computer, I can see that ARP
> requests are received but ARP reply is not sent on response.
> By statically setting MAC address in the ARP table of both computers, the
> problem is fixed.
>
> Q:Why is not ARP reply sent automatically? How can I fix it??
>
> Thanks
>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#9732): https://lists.fd.io/g/vpp-dev/message/9732
Mute This Topic: https://lists.fd.io/mt/22676139/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


[vpp-dev] DPDK and VPP Relationship

2018-07-11 Thread Gulakh
Hi,
I have a question about DPDK and VPP.
As far as I know, DPDK has some NIC drivers developed for some types of
NICs. These drivers are Linux device drivers that are installed as kernel
module e.g. uio_pci_generic and ixgbe (yes?).

In Linux , kernel modules have the as privilege as the Linux kernel. So
DPDK NIC drivers run in kernel space (yes?)

When a packet comes in, It is first received by DPDK drivers in kernel
mode. As VPP runs in user space, there must be a context switch to deliver
packet to VPP.
Now if VPP decides that the packet should be forwarded to some next hop,
then the packet must have another context switch from user space to kernel
space, meaning that to forward a packet which is not destined to us, we
have to tolerate two context switch that is not necessary.

I guess (because I have seen an L3 forwarding sample in DPDK sample
programs but I did not dive into it to see what it did)  that DPDK has a
FIB by which it can decide what to do with the received packet without the
need of context switch(all done in kernel space).

I summary:
I think that we have 3 ways to handle a received packet:

1- Send it from DPDK to VPP and tolerate two context switch
  *Question:* if that is the case, Why do we need to tolerate 2
context switch that is not necessary?

2- Have a FIB in DPDK and forward the received packet directly in kernel
space
 *Question:* if that is the case, How does VPP show this packet in
its show trace because VPP is unaware of this packet?

3- Another solution that I do not know 
  *Question:* Please tell me the procedure

Thanks
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#9822): https://lists.fd.io/g/vpp-dev/message/9822
Mute This Topic: https://lists.fd.io/mt/23244323/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


[vpp-dev] L3VPN in VPP

2018-07-28 Thread Gulakh
Hi,
I have setup a *VPLS *scenario successfully and now I want to setup a *L3VPN
*scenario in VPP (L3VPN topology is in attachment).

My configuration for VPLS is some how like this link

.

As far as I searched Internet, L3VPN has a *VPN Label* that I think is
somehow like *PW Label* in VPLS with difference that *VPN Label is used to
select VRF* and *PW Label is used to select mpls tunnel *(hence bridge).

===
*Part1:*
I guess I should configure the *source PE* as follow:

 *In VPLS: mpls tunnel add l2-only via  out-labels
*
*   ip route add  via  out-labels
*


*In L3VPN: CMD1 ??? (insert in customer VRF)*
* ip route add  via  out-labels
 (insert in GLOBAL VRF)*

I don't know what command I should use for CMD1 ... This command must add
VPN-LABEL which is selected base on the customer's VRF to the packet and
then lookup the GLOBAL VRF to push the MPLS Label. just like VPLS that the
mpls tunnel first adds a PW Label and then in the destination IP
resolution, MPLS Label is added to packet.

*Question1:* Am I right about the configurations in the source PE?


*Part2:*
I guess I should configure the *target PE* as follow:

 *In VPLS: mpls local-label add eos  via l2-input-on
*

* In L3VPN: mpls local-label add eos  via
ip4-lookup-in-table   (insert in GLOBAL VRF) *

*Question2:* Am I right about the configurations in the target PE?

=
*Part3:*
In order to fill customer's VRF, I should use control plane's RouteTarget
(RT) to select the VRF ID and then use below command to fill the VRF:

  *ip route add  via   table
*

*Question3:* Am I right?

thanks in advance
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#9963): https://lists.fd.io/g/vpp-dev/message/9963
Mute This Topic: https://lists.fd.io/mt/23840657/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [vpp-dev] L3VPN in VPP

2018-07-31 Thread Gulakh
Hi,
In order to have both VPLS and L3VPN works *concurrently *in a PE router, I
guess that I should do the following things:

1- Regardless of the type of service that whether it's *VPLS *,*L3VPN *or
*none*(e.g. a simple connectivity) , the core of the network works the
same, that is I should Insert everything about the core of the network in
the Global VRF i.e. *IP FIB 0* and *MPLS FIB 0 in VPP*.

The above step is done before even providing any services.

2- *For the PW-Label of VPLS*, the task is delivered to the mpls tunnel to
put the PW-Label on the Packet (i.e. *mpls tunnel add l2-only 
out-labels*) then to resolve the PE-TARGET IP address the
resolution is done by checking the Global VRF which contains information
about the core and at that stage the MPLS label is added to packet.

   *For the VPN-Label of the L3VPN* the task of putting it on the packet is
delivered to the VRF associated with the incoming Interface (i.e.* #* *ip
route add   table  via  out-labels
*) and then to resolve the NEXT-HOP IP address, Global VRF must
be checked since the routing information about the core is stored in the
Global VRF (i.e. IP FIB 0 and MPLS FIB 0 in VPP)
but the problem is that the route store in the customer's VRF must use
Global VRF in order to resolve its NEXT-HOP.
Searching VPP Doc, I confronted with a parameter that I can use to select
which VRF to use to resolve the next hop.
so the *#* command must be modified by (*ip route add  table
 via   next-hop-table  out-labels
*) and then during the resolution of the PE-TARGET IP address
the MPLS Labels is added to the packet.

*Question*: Am I right??

Excuse me for my questions ... most of the materials found in Internet are
about Cisco commands to run the service and they give my little insights on
what to do with lower level configurations.
Thanks in advance

On Mon, Jul 30, 2018 at 1:31 PM, Neale Ranns (nranns) 
wrote:

> Hi,
>
>
>
> Answers inline marked [nr]
>
>
>
> /neale
>
>
>
> *From: * on behalf of Gulakh 
> *Date: *Saturday, 28 July 2018 at 13:45
> *To: *"vpp-dev@lists.fd.io" 
> *Subject: *[vpp-dev] L3VPN in VPP
>
>
>
> Hi,
>
> I have setup a *VPLS *scenario successfully and now I want to setup a *L3VPN
> *scenario in VPP (L3VPN topology is in attachment).
>
>
>
> My configuration for VPLS is some how like this link
> <https://lists.fd.io/g/vpp-dev/topic/vpls_dev_in_vpp_1/18091281?p=,,,20,0,0,0::recentpostdate%2Fsticky,,,20,2,0,18091281>
> .
>
>
>
> As far as I searched Internet, L3VPN has a *VPN Label* that I think is
> somehow like *PW Label* in VPLS with difference that *VPN Label is used
> to select VRF* and *PW Label is used to select mpls tunnel *(hence
> bridge).
>
>
>
> [nr] other label allocation schemes are available J
>
>
>
> ===
>
> *Part1:*
>
> I guess I should configure the *source PE* as follow:
>
>
>
>  *In VPLS: mpls tunnel add l2-only via  out-labels
> *
>
> *   ip route add  via  out-labels
> *
>
>
>
>  *In L3VPN: CMD1 ??? (insert in customer VRF)*
>
> * ip route add  via  out-labels
>  (insert in GLOBAL VRF)*
>
>
>
> I don't know what command I should use for CMD1 ... This command must add
> VPN-LABEL which is selected base on the customer's VRF to the packet and
> then lookup the GLOBAL VRF to push the MPLS Label. just like VPLS that the
> mpls tunnel first adds a PW Label and then in the destination IP
> resolution, MPLS Label is added to packet.
>
>
>
> *Question1:* Am I right about the configurations in the source PE?
>
>
>
>
>
> [nr] ip route table   via  out-labels
> 
>
>
>
> you could use PREFIX=0.0.0.0/0 or many more specifics
>
>
>
> and your route to the PE-TARGET would be better as a non-recursive route
> (i.e. if it is learned via e.g. OSPF and this is not an inter-AS option C)
> otherwise you’ll need another labelled route for the next-hop
>
>
>
> non-recursive means specify the next-hop and interface.
>
>
>
>
>
> 
>
> *Part2:*
>
> I guess I should configure the *target PE* as follow:
>
>
>
>  *In VPLS: mpls local-label add eos  via l2-input-on
> *
>
>
>
> * In L3VPN: mpls local-label add eos  via
> ip4-lookup-in-table   (insert in GLOBAL VRF) *
>
>
>
> *Question2:* Am I right about the configurations in the target PE?
>
>
>
> [nr] Yes. The mpls label is added to the MPLS global table, i.e. there’s
> no ‘insert in global-VRF’, since the instruction associated with the label
> is to lookup the exposed IP destination address in the customer’s VRF/
>
>
>
> ==

[vpp-dev] L3VPN in VPP

2018-07-31 Thread Gulakh
It seems that the Next hop IP resolution does not work correctly:
Here is my Configuration:

# *set interface state GigabitEthernet4/0/0 up*
# *set interface state GigabitEthernet4/0/1 up*

#* ip table add 1   *(create Customer VRF)

# *set interface ip table GigabitEthernet 4/0/0 1*  (Customer VRF)

# *set interface ip address GigabitEthernet4/0/0 192.168.12.2/24
<http://192.168.12.2/24>*  (Toward Customer)
# *set interface ip address GigabitEthernet4/0/1 192.168.23.2/24
<http://192.168.23.2/24>*  (Toward Core)

*** Now I want to add one of Customer's route into its VRF:
# *ip route add 5.5.5.5/32 <http://5.5.5.5/32> table 1 via 192.168.23.3
next-hop-table 0 out-labels 40*

in which :* 5.5.5.5/32 <http://5.5.5.5/32>* is the Customer's another site
in somewhere else
  * table 1* is the customer's VRF
   *192.168.23.3* is the next hop which is in the core -> be
resolved by Global VRF
   *next-hop-table 0* is the Global VRF to resolve 192.168.23.3
   *out-labels 40 *is the VPN Label


Now When I see the VRF 1 ("*show ip fib table 1*"), here is the output for
5.5.5.5/32

ipv4-VRF:1, fib_index:1, flow hash:[src dst sport dport proto ]
locks:[src:CLI:2, ]
..
...

192.168.12.0/24
  unicast-ip4-chain
  [@0]: dpo-load-balance: [proto:ip4 index:14 buckets:1 uRPF:13 to:[0:0]]
[0] [@4]: ipv4-glean: GigabitEthernet4/0/0: mtu:9000
a0369f23aa780806





*5.5.5.5/32 <http://5.5.5.5/32>  unicast-ip4-chain  [@0]: dpo-load-balance:
[proto:ip4 index:24 buckets:1 uRPF:25 to:[0:0]][0] [@0]: dpo-drop ip4*


Here is the VRF 0:

ipv4-VRF:0, fib_index:0, flow hash:[src dst sport dport proto ]
locks:[src:plugin-hi:2, src:default-route:1, ]
..
...

192.168.23.0/24
  unicast-ip4-chain
  [@0]: dpo-load-balance: [proto:ip4 index:18 buckets:1 uRPF:19 to:[0:0]]
[0] [@4]: ipv4-glean: GigabitEthernet4/0/1: mtu:9000
a0369f23aa7a0806


Question: why does it say Drop?? I expect to see something that shows
next-hop is resolved in VRF 0.

On Tue, Jul 31, 2018 at 4:18 PM, Neale Ranns (nranns) 
wrote:

>
>
> Hi,
>
>
>
> You are correct on all points.
>
>
>
> regards
>
> /neale
>
>
>
> *From: *Holoo Gulakh 
> *Date: *Tuesday, 31 July 2018 at 12:19
> *To: *"Neale Ranns (nranns)" , "vpp-dev@lists.fd.io" <
> vpp-dev@lists.fd.io>
> *Subject: *Re: [vpp-dev] L3VPN in VPP
>
>
>
> Hi,
>
> In order to have both VPLS and L3VPN works *concurrently * in a PE
> router, I guess that I should do the following things:
>
>
>
> 1- Regardless of the type of service that whether it's *VPLS *,*L3VPN *or
> *none*(e.g. a simple connectivity) , the core of the network works the
> same, that is I should Insert everything about the core of the network in
> the Global VRF i.e. *IP FIB 0* and *MPLS FIB 0 in VPP*.
>
>
>
> The above step is done before even providing any services.
>
>
>
> 2- *For the PW-Label of VPLS*, the task is delivered to the mpls tunnel
> to put the PW-Label on the Packet (i.e. *mpls tunnel add l2-only
>  out-labels*) then to resolve the PE-TARGET IP
> address the resolution is done by checking the Global VRF which contains
> information about the core and at that stage the MPLS label is added to
> packet.
>
>
>
>*For the VPN-Label of the L3VPN* the task of putting it on the packet
> is delivered to the VRF associated with the incoming Interface (i.e. *#* *ip
> route add   table  via  out-labels
> *) and then to resolve the NEXT-HOP IP address, Global VRF
> must be checked since the routing information about the core is stored in
> the Global VRF (i.e. IP FIB 0 and MPLS FIB 0 in VPP)
>
> but the problem is that the route store in the customer's VRF must use
> Global VRF in order to resolve its NEXT-HOP.
>
> Searching VPP Doc, I confronted with a parameter that I can use to select
> which VRF to use to resolve the next hop.
>
> so the *#* command must be modified by (*ip route add  table
>  via   next-hop-table  out-labels
> *) and then during the resolution of the PE-TARGET IP address
> the MPLS Labels is added to the packet.
>
>
>
> *Question*: Am I right??
>
>
>
> Excuse me for my questions ... most of the materials found in Internet are
> about Cisco commands to run the service and they give my little insights on
> what to do with lower level configurations.
>
> Thanks in advance
>
>
>
> On Mon, Jul 30, 2018 at 1:31 PM, Neale Ranns (nranns) 
> wrote:
>
> Hi,
>
>
>
> Answers inline marked [nr]
>
>
>
> /neale
>
>
>
> *From: * on behalf of Gulakh 
> *Date: *Saturday

Re: [SUSPICIOUS] [vpp-dev] L3VPN in VPP

2018-08-01 Thread Gulakh
Yes, that's right, the problem fixed. I should have inserted this rule : "*ip
route add 192.168.23.3/32 <http://192.168.23.3/32> via
TenGigabitEthernet4/0/1 out-labels 50*"

But why doesn't work if I don't have a MPLS label for 192.168.23.3/32 ?
suppose that the Core of the network is pure IP, no MPLS. I know that in
L3VPN we need a MPLS enabled core but for the sake of IP resolution in
another FIB, why does it need a second label i.e. MPLS label??

On Tue, Jul 31, 2018 at 5:54 PM, Neale Ranns (nranns) 
wrote:

> Hi,
>
>
>
> Please show me:
>
>   sh ip fib index 1 5.5.5.5/32
>
> and
>
>   sh ip fib index 0 192.168.23.3/32
>
>
>
> I suspect you are missing an out-label on the latter.
>
>
>
> /neale
>
>
>
> *From: * on behalf of Gulakh 
> *Date: *Tuesday, 31 July 2018 at 14:53
> *To: *"vpp-dev@lists.fd.io" 
> *Subject: *[SUSPICIOUS] [vpp-dev] L3VPN in VPP
>
>
>
> It seems that the Next hop IP resolution does not work correctly:
>
> Here is my Configuration:
>
>
>
> # *set interface state GigabitEthernet4/0/0 up*
>
> # *set interface state GigabitEthernet4/0/1 up*
>
>
>
> #* ip table add 1   *(create Customer VRF)
>
>
>
> # *set interface ip table GigabitEthernet 4/0/0 1*  (Customer VRF)
>
>
>
> # *set interface ip address GigabitEthernet4/0/0 192.168.12.2/24
> <http://secure-web.cisco.com/1NGkJ8d9Xk8OKKghhdRpaN8lGN-75ZxRF1V7k7mtDnx1r3LpGmLHUdWKb9yppBbQeSwTupbV9HjWYrAzuZbNQ0LzjB2b2NixRZPlR-o2UB6u_KzSPfkqFvP-MA6PgJRF4hC5-50M2IE1MnmoFVltbgWPxwDabtmiPrEWMuOu7uW_MmnpuCU9GY3UHyWaeUM66FbfL-NCqkO3PHHyzJTZv8D4bOUVn9pRU8EBaPipH0BKKjlb2jDZS10k7wKRaSoLFb4GWuwuihvdfaZUCMMAp3dURk14uSPMKq2GgAYFSjQBOQpD8zFGzvzbVGV4WqzoU/http%3A%2F%2F192.168.12.2%2F24>*
>   (Toward Customer)
>
> # *set interface ip address GigabitEthernet4/0/1 192.168.23.2/24
> <http://secure-web.cisco.com/1c9gWpQLuBWxg_mjltoJB1OuIXMBIYNAUmT3ypthWFTFrN0WVkRLVQIGszDfppFffHnwnJYaabxo7oVx74p2Q5Mtnhkv_tEzEFsCK7cdJa9zcYfqn-wQLoVjvEd7GAhwKMISUy4tUY4f2EjfV6llLDoc04h10x48MymdokJMupjtLklcqPm2uKCEhdVLD2BWEd3fkbulksRbNYnm4VRfnjZhi_8mWRpSSVA-8oKMuUEAF71AQ_naB1cZkdHRlAq7DvH7xTTLmB8Y7x2JeryXyd9zn7g5rghLjC3anDS9qiSz3qSHlQJgf9f0YoYX0fuSJ/http%3A%2F%2F192.168.23.2%2F24>*
>   (Toward Core)
>
>
>
> *** Now I want to add one of Customer's route into its VRF:
>
> # *ip route add 5.5.5.5/32
> <http://secure-web.cisco.com/1q3AHC9RQ8OoZnfGkloIfJ7szfWyz-oY0Yi89FFEComrheEohuXnnjdNnLL5i50chvn5ZtVrayd7LWig7iEVKQtYNCHxeq435H95988Q_ZEeZjK5r9UOdJqlnnzGBvdWBZxPl7dl1YUwzGIkwuR1TdDZOKpTsDadCis-111m6P0lUqAfkmu98nRp1oVtE_74JaZHI5RggBiFwS_jj7nD1HlJvvebRgtfwtwIvGgAYUMQ-eJnwmQHKgSuOnEXkkKnjJrKrz3aC_fG29Q7TFEmlcIn_BJB7JJYi3pEdshEdW7aM8JS7IaQy7FDOwLsUO2uL/http%3A%2F%2F5.5.5.5%2F32>
> table 1 via 192.168.23.3 next-hop-table 0 out-labels 40*
>
>
>
> in which :* 5.5.5.5/32
> <http://secure-web.cisco.com/1q3AHC9RQ8OoZnfGkloIfJ7szfWyz-oY0Yi89FFEComrheEohuXnnjdNnLL5i50chvn5ZtVrayd7LWig7iEVKQtYNCHxeq435H95988Q_ZEeZjK5r9UOdJqlnnzGBvdWBZxPl7dl1YUwzGIkwuR1TdDZOKpTsDadCis-111m6P0lUqAfkmu98nRp1oVtE_74JaZHI5RggBiFwS_jj7nD1HlJvvebRgtfwtwIvGgAYUMQ-eJnwmQHKgSuOnEXkkKnjJrKrz3aC_fG29Q7TFEmlcIn_BJB7JJYi3pEdshEdW7aM8JS7IaQy7FDOwLsUO2uL/http%3A%2F%2F5.5.5.5%2F32>*
> is the Customer's another site in somewhere else
>
>   * table 1* is the customer's VRF
>
>*192.168.23.3* is the next hop which is in the core -> be
> resolved by Global VRF
>
>*next-hop-table 0* is the Global VRF to resolve
> 192.168.23.3
>
>*out-labels 40 *is the VPN Label
>
>
>
>
>
> Now When I see the VRF 1 ("*show ip fib table 1*"), here is the output
> for 5.5.5.5/32
> <http://secure-web.cisco.com/1q3AHC9RQ8OoZnfGkloIfJ7szfWyz-oY0Yi89FFEComrheEohuXnnjdNnLL5i50chvn5ZtVrayd7LWig7iEVKQtYNCHxeq435H95988Q_ZEeZjK5r9UOdJqlnnzGBvdWBZxPl7dl1YUwzGIkwuR1TdDZOKpTsDadCis-111m6P0lUqAfkmu98nRp1oVtE_74JaZHI5RggBiFwS_jj7nD1HlJvvebRgtfwtwIvGgAYUMQ-eJnwmQHKgSuOnEXkkKnjJrKrz3aC_fG29Q7TFEmlcIn_BJB7JJYi3pEdshEdW7aM8JS7IaQy7FDOwLsUO2uL/http%3A%2F%2F5.5.5.5%2F32>
>
>
>
> ipv4-VRF:1, fib_index:1, flow hash:[src dst sport dport proto ]
> locks:[src:CLI:2, ]
>
> ..
>
> ...
>
> 
>
> 192.168.12.0/24
> <http://secure-web.cisco.com/1kOpJ87zBACw-JxP47PEbLVa87SOKFiH3hbciO_Q9HwQG8cu5OOLdcyV7epyGLFQg58-zSwnr46vONGBlMZnIROQq67peBwn6pBqFmjHb9tZEB_fUy9ZqlNwrja_U0Yi-HaL4hA8t9bGnbk4UJpdfcMBNqNa8RXk-74poA0wp9sRsn8YfkhhcmahDUquvC7RTM5xgYoYtYAIx3pPtI6HDpKArWevaNbqKXu23hhrOt7kN5rL4q8LBoXGq2DQu7-v45GEMQ4fvcFlVaw-sAtFV0Xv-k1RSvM670VXdTR9GM79VGTgsSZRoSGORY9QTSsjK/http%3A%2F%2F192.168.12.0%2F

[vpp-dev] Traffic generator

2018-08-08 Thread Gulakh
Hi,
I have setup a VPLS scenario in VPP and now I want to test its performance
to see whether it is able to handle customer traffics of 10G/s. i.e.
customer is generating 10 G/s traffic
I found a dpdk-based traffic generator here
but I
couldn't run it.

*My Question* is that how can I generate 10G/s traffic by software??

Could you please help me with any link, tutorials and etc.

Thanks
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#10064): https://lists.fd.io/g/vpp-dev/message/10064
Mute This Topic: https://lists.fd.io/mt/24229782/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [vpp-dev] Traffic generator

2018-08-10 Thread Gulakh
By "I couldn't run it", I don't mean that dpdk-pktgen has some issue, I
mean that It was a little complicated that I couldn't run it by a few
attempts.
It's not my focus so I preferred to try a simpler solution that is capable
to generating 10 G/s Traffic.

If you have any useful link, tutorial or something else that can help me to
install and run dpdk-pktgen to get 10 G/s traffic, I would be appreciate to
have it.

Thanks

On Wed, Aug 8, 2018 at 10:59 PM, Rami Rosen  wrote:

> Hi,
> > I found a dpdk-based traffic generator here but I couldn't run it.
>
> I am working with dpdk-pktgen, without issues.
>
> What do you mean by "couldn't run it"?
> Can you please post the
> full command line you tried and the full log on console afterwards ?
> Also - which version of dpdk-pktgen did you try ?
>
> Regards,
> Rami Rosen
>
> On 8 August 2018 at 16:07, Gulakh  wrote:
> > Hi,
> > I have setup a VPLS scenario in VPP and now I want to test its
> performance
> > to see whether it is able to handle customer traffics of 10G/s. i.e.
> > customer is generating 10 G/s traffic
> > I found a dpdk-based traffic generator here but I couldn't run it.
> >
> > My Question is that how can I generate 10G/s traffic by software??
> >
> > Could you please help me with any link, tutorials and etc.
> >
> > Thanks
> >
> > -=-=-=-=-=-=-=-=-=-=-=-
> > Links: You receive all messages sent to this group.
> >
> > View/Reply Online (#10064): https://lists.fd.io/g/vpp-dev/message/10064
> > Mute This Topic: https://lists.fd.io/mt/24229782/675773
> > Group Owner: vpp-dev+ow...@lists.fd.io
> > Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [roszenr...@gmail.com]
> > -=-=-=-=-=-=-=-=-=-=-=-
> >
>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#10101): https://lists.fd.io/g/vpp-dev/message/10101
Mute This Topic: https://lists.fd.io/mt/24229782/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [vpp-dev] Traffic generator

2018-08-12 Thread Gulakh
I decided to use Trex for generating packet.
I could not find any information about how to setup a client-server
scenario in Trex.

My scenario is that I have to device each of which has eight port. Each
port of first device is connected to the corresponding port of the second
device.

Now I want to run a Trex server on the first device, a Trex client on the
second device that is generating packet at the rate of 1G/s per port that
altogether 8 G/s
is sent  from client to server. the server is responsible of responsing to
clients requests.

How can I do that in Trex??

Thanks


On Sat, Aug 11, 2018 at 6:30 PM, Wiles, Keith  wrote:

>
>
> > On Aug 11, 2018, at 12:09 AM, Gulakh  wrote:
> >
> > By "I couldn't run it", I don't mean that dpdk-pktgen has some issue, I
> mean that It was a little complicated that I couldn't run it by a few
> attempts.
> > It's not my focus so I preferred to try a simpler solution that is
> capable to generating 10 G/s Traffic.
> >
> > If you have any useful link, tutorial or something else that can help me
> to install and run dpdk-pktgen to get 10 G/s traffic, I would be appreciate
> to have it.
> >
> > Thanks
>
> I guess I could be a bit biased here :-), but I think pktgen-dpdk is
> fairly simple to use.
>
> If you provide the setup and command line you used for pktgen-dpdk I can
> will try to help.
>
> >
> > On Wed, Aug 8, 2018 at 10:59 PM, Rami Rosen 
> wrote:
> > Hi,
> > > I found a dpdk-based traffic generator here but I couldn't run it.
> >
> > I am working with dpdk-pktgen, without issues.
> >
> > What do you mean by "couldn't run it"?
> > Can you please post the
> > full command line you tried and the full log on console afterwards ?
> > Also - which version of dpdk-pktgen did you try ?
> >
> > Regards,
> > Rami Rosen
> >
> > On 8 August 2018 at 16:07, Gulakh  wrote:
> > > Hi,
> > > I have setup a VPLS scenario in VPP and now I want to test its
> performance
> > > to see whether it is able to handle customer traffics of 10G/s. i.e.
> > > customer is generating 10 G/s traffic
> > > I found a dpdk-based traffic generator here but I couldn't run it.
> > >
> > > My Question is that how can I generate 10G/s traffic by software??
> > >
> > > Could you please help me with any link, tutorials and etc.
> > >
> > > Thanks
> > >
> > > -=-=-=-=-=-=-=-=-=-=-=-
> > > Links: You receive all messages sent to this group.
> > >
> > > View/Reply Online (#10064): https://lists.fd.io/g/vpp-dev/
> message/10064
> > > Mute This Topic: https://lists.fd.io/mt/24229782/675773
> > > Group Owner: vpp-dev+ow...@lists.fd.io
> > > Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [
> roszenr...@gmail.com]
> > > -=-=-=-=-=-=-=-=-=-=-=-
> > >
> >
> > -=-=-=-=-=-=-=-=-=-=-=-
> > Links: You receive all messages sent to this group.
> >
> > View/Reply Online (#10101): https://lists.fd.io/g/vpp-dev/message/10101
> > Mute This Topic: https://lists.fd.io/mt/24229782/675169
> > Group Owner: vpp-dev+ow...@lists.fd.io
> > Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [keith.wi...@intel.com
> ]
> > -=-=-=-=-=-=-=-=-=-=-=-
>
> Regards,
> Keith
>
>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#10105): https://lists.fd.io/g/vpp-dev/message/10105
Mute This Topic: https://lists.fd.io/mt/24229782/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


[vpp-dev] interface traffic rate

2018-08-13 Thread Gulakh
Hi,
Is there any way in  VPP to get statistics about the traffic rate passing
through an interface??

Thanks
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#10113): https://lists.fd.io/g/vpp-dev/message/10113
Mute This Topic: https://lists.fd.io/mt/24501442/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


[vpp-dev] dpdk binding interface

2018-02-13 Thread Gulakh
Hi,
I want to use the python code accompanying with dpdk code to bind/unbind an
interface to dpdk drivers.
In virtualbox, I have no problem binding/unbinding interfaces to
uio_pci_generic driver
But in vmware, I can't bind an interface to dpdk.
How should I do that??

Thanks in advance


[vpp-dev] mpls delete

2018-02-17 Thread Gulakh
Hi,
I want to delete the whole entry of an specific local label.
for example:

1) mpls local-label 80 via 4.4.4.4 out-labels 90
2) mpls local-label 80 via 4.4.4.5 out-labels 90

3) show mpls fib

80:neos/21 fib:0 index:13 locks:2
  src:CLI refs:1 src-flags:added,active,
path-list:[18] locks:2 flags:shared, uPRF-list:13 len:0 itfs:[]
  path:[19] pl-index:18 ip4 weight=1 pref=0 recursive:
via 4.4.4.4 in fib:0 via-fib:14 via-dpo:[dpo-load-balance:16]
  path:[18] pl-index:18 ip4 weight=1 pref=0 recursive:
via 4.4.4.5 in fib:0 via-fib:15 via-dpo:[dpo-load-balance:18]
Extensions:
 path:19 labels:90
 path:18 labels:90
==

Now I want to delete the whole entry for local-label 80 with a one command,
Something like * wildcard.

Does VPP support that?
If so, How can I do that?

thanks in advance


[vpp-dev] vpp rspan

2018-02-19 Thread Gulakh
Hi
I'm wondering if VPP supports RSPAN. I've found the documentation about
SPAN (port mirroring) but nothing about RemoteSPAN. I would appreciate if
you could help.
thnks


[vpp-dev] router_plugin

2018-02-25 Thread Gulakh
Hi,

I'm using VPP as data plane  with router plugin installed and FRR as
control plane.
I set a new static ip route and check that it is inserted in both linux
kernel and vpp (sh ip fib)
but then I delete this route by FRR and check that this route is deleted
from kernel and FRR but it is still in VPP.


to add it:
FRR:
   >> ip route 1.2.3.4/32 4.4.4.4 label 70
VPP:
   >> show ip fib  (it shows the new route)

then to delete it:
FRR:
   >> no ip route 1.2.3.4/32 4.4.4.4 label 70
VPP:
   >> show ip fib  (the added route is still there!!!)


Questions:

Q1) Is it a bug?? if not, why is n't it deleted??

Q2) it seems that router plugin does not support mpls, because label 70 is
not shown in IP fib. is it so?

Thanks


Re: [vpp-dev] router_plugin

2018-03-02 Thread Gulakh
Hi
Yes, I'm using router-plugin from VPPSB.

Of course, the problem was found:

Here is the problem:
   *** In files mapper.c and tap_inject_netlink.c, there are functions
to add new route to the IP FIB.
These functions are "ip4_add_del_route_next_hop() for VPP 16"
and "fib_table_entry_path_add for VPP 18"
The problem is that for version 16, one can specify add/del by
setting parameter is_del of the ip4_add_del_route_next_hop()
But in version 18, there are two different versions of function
one for add and one for delete, namely: fib_table_entry_path_add() and
fib_table_entry_path_remove()

Here is the Solution:
  In the original code only fib_table_entry_path_add() is called so
we can only add new route. To fix the problem, I change it this way:

  if(is_del){
fib_table_entry_path_remove(0, &prefix, FIB_SOURCE_API,
prefix.fp_proto,
&nh, sw_if_index, 0,
0 /* weight */,
FIB_ROUTE_PATH_FLAG_NONE);
}
else{
fib_table_entry_path_add(0, &prefix, FIB_SOURCE_API,
 FIB_ENTRY_FLAG_NONE, prefix.fp_proto,
 &nh, sw_if_index, 0,
 0 /* weight */, NULL,
 FIB_ROUTE_PATH_FLAG_NONE);
}

then I build the code again and test it to see add and delete works
perfectly.



On Mon, Feb 26, 2018 at 3:28 PM, Ray Kinsella  wrote:

> Hi Gulakh,
>
> Are you using the router plugin from the VPPSB?
>
> Ray K
>
> On 25/02/2018 11:36, Gulakh wrote:
>
>> Hi,
>>
>> I'm using VPP as data plane  with router plugin installed and FRR as
>> control plane.
>> I set a new static ip route and check that it is inserted in both linux
>> kernel and vpp (sh ip fib)
>> but then I delete this route by FRR and check that this route is deleted
>> from kernel and FRR but it is still in VPP.
>>
>> 
>> to add it:
>> FRR:
>> >> ip route 1.2.3.4/32 <http://1.2.3.4/32> 4.4.4.4 label 70
>> VPP:
>> >> show ip fib  (it shows the new route)
>>
>> then to delete it:
>> FRR:
>> >> no ip route 1.2.3.4/32 <http://1.2.3.4/32> 4.4.4.4 label
>> 70
>> VPP:
>> >> show ip fib  (the added route is still
>> there!!!)
>>
>> 
>> Questions:
>>
>> Q1) Is it a bug?? if not, why is n't it deleted??
>>
>> Q2) it seems that router plugin does not support mpls, because label 70
>> is not shown in IP fib. is it so?
>>
>> Thanks
>> 
>>
>


[vpp-dev] router_plugin

2018-03-04 Thread Gulakh
Hi,
I am using vppsb router plugin with vpp. there is a problem when I use
tap-inject.
The problem is that after I enable tap-inject and set interfaces' and taps'
IP address, I want to make taps' state up but at this point vpp crashes and
everything rolls back to its first state (No tap, No IP address, ...)

Q1) What is the problem??

Q2) I have heard that VPP and VPPSB are not compatible in some versions ...
To which versions Should checkout both source code so that they can work
correctly??

Thanks in advance


[vpp-dev] Limit on number of interfaces

2021-01-26 Thread Gulakh
Hi all
I installed vpp on a server with 58 nics, then, i specified 54 of them in
startup.conf in dpdk section. However, only first 32 interfaces are shown
in "show interfaces"

whats the problem
Thanks

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



[vpp-dev] Minimum dependencies to install own vpp debs

2022-01-15 Thread Gulakh
Hello all

I successfully built and installed my customized vpp (based on 18.10) on
VM1.
Now i want to install it on VM2 that is a fresh Ubuntu-18.04-server
So i copied build-root/*.deb from VM1 into VM2 and run "sudo dpkg -i *.deb"
that raises some errors:
---
.
.
.
dpkg: dependency problems prevent configuration of vpp-api-python:
 vpp-api-python depends on python-cffi-backend-api-min (<= 9729); however:
  Package python-cffi-backend-api-min is not installed.
 vpp-api-python depends on python-cffi-backend-api-max (>= 9729); however:
  Package python-cffi-backend-api-max is not installed.
 vpp-api-python depends on python-enum34; however:
  Package python-enum34 is not installed.

dpkg: dependency problems prevent configuration of vpp-plugins:
 vpp-plugins depends on libmbedcrypto1 (>= 2.7); however:
  Package libmbedcrypto1 is not installed.
 vpp-plugins depends on libmbedtls10 (>= 2.0); however:
  Package libmbedtls10 is not installed.
 vpp-plugins depends on libmbedx509-0 (>= 2.0); however:
  Package libmbedx509-0 is not installed.
---
The above errors can be solved easily by:

sudo apt install python-all python-enum34  python-cffi-backend
libmbedcrypto1 libmbedtls10 libmbedx509-0
and then, .deb packages are installed without error!

Now, can i have peace of mind that my vpp's all functionalities will work
correctly? In other word, Is it likely to see missbehaving, crash or low
performance because i did not run "make install-dep" on VM2?

Thanks in advance
Mostafa Salari

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



[vpp-dev] Minimal efforts to run vpp on new VM

2022-01-15 Thread Gulakh
Hi all

Suppose that i have virtual machine VM1 that i installed my own vpp version
on it, and i have another machine (with same OS) called VM2 that has an
older version of my customized code. I want to update vpp of VM2 from VM1!
Is any way other than (Uninstalling vpp of VM2 by vpp-config, then, copying
.deb files, then, dpkg -i *.deb)? Can i just copy some specific files
(executables, config files ... ) from VM1 into VM2 and have updated version
of vpp service working properly in VM2?

Regards

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



[vpp-dev] vpp building problem

2017-11-01 Thread Holoo Gulakh
Hi all
i'm trying to install vpp from source on Ubuntu 16.04 server (without
virtualization). I obeyed the following this link:

https://wiki.fd.io/view/VPP/Pulling,_Building,_Running,_Hacking_and_Pushing_VPP_Code#Pulling_anonymously_.28https.29

So i did as such:
sudo -s
cd /

git clone https://gerrit.fd.io/r/vpp

cd vpp/
make install-dep
make bootstrap
make build

reboot

after boot:
sudo -s
service vpp start

But i got:
* Failed to start vpp.service: Unit vpp.service not found.*

What should i do?

Thanks.
___
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

[vpp-dev] WHERE IS libpneum.so ???

2017-11-02 Thread Holoo Gulakh
Hi
I am installing VPP Python API
Here https://wiki.fd.io/view/VPP/Python_API
there is a command :

export LD_LIBRARY_PATH=`find $VPP -name "libpneum.so" -exec dirname {}
\; | grep python | head -n 1`

but there is no libpneum.so in $VPP and anywhere else :(

Please help
___
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

[vpp-dev] make test

2017-11-03 Thread Holoo Gulakh
Hi
I want to know is there any *make <...>* command to make just one special
test (for example test bmpls) instead of using *make test*, because this
command makes all tests.

Best regards
Holoo
___
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

[vpp-dev] some error in < make test TEST=test_papi >

2017-11-03 Thread Holoo Gulakh
Hi
I have got some errors when i use *make test TEST=test_api*, while all
other *tests are ok:*

==
PAPI Message parsing Test Case
==
test_add_new_compound_type_with_array (test_papi.TestPAPIMessageParsing) *ERROR
*[ temp dir used by test case:
/tmp/vpp-unittest-TestPAPIMessageParsing-220SU8 ]
12:26:58,185 [Errno 17] File exists
test_add_new_types (test_papi.TestPAPIMessageParsing)*ERROR
*[ temp dir used by test case:
/tmp/vpp-unittest-TestPAPIMessageParsing-220SU8 ]
test_add_two_new_types (test_papi.TestPAPIMessageParsing)OK
12:26:59,861 [Errno 17] File exists
test_adding_new_message_object (test_papi.TestPAPIMessageParsing)*ERROR
*[ temp dir used by test case:
/tmp/vpp-unittest-TestPAPIMessageParsing-220SU8 ]
12:27:00,791 [Errno 17] File exists
test_adding_new_message_object_with_array
(test_papi.TestPAPIMessageParsing)ERROR [ temp dir used by test case:
/tmp/vpp-unittest-TestPAPIMessageParsing-220SU8 ]
test_argument_name (test_papi.TestPAPIMessageParsing)OK
test_array_count_not_previous (test_papi.TestPAPIMessageParsing) OK
12:27:03,517 [Errno 17] File exists
test_message_to_bytes (test_papi.TestPAPIMessageParsing) *ERROR
*[ temp dir used by test case:
/tmp/vpp-unittest-TestPAPIMessageParsing-220SU8 ]
test_nested_array_type (test_papi.TestPAPIMessageParsing)OK
test_old_vla_array (test_papi.TestPAPIMessageParsing)OK
12:27:06,557 [Errno 17] File exists
test_old_vla_array_compound (test_papi.TestPAPIMessageParsing)   *ERROR
*[ temp dir used by test case:
/tmp/vpp-unittest-TestPAPIMessageParsing-220SU8 ]
test_old_vla_array_not_last_member (test_papi.TestPAPIMessageParsing)OK
test_old_vla_array_u32 (test_papi.TestPAPIMessageParsing)OK
test_simple_array (test_papi.TestPAPIMessageParsing) OK
==
could help me to solve this errors?

Best regards
Holoo
___
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

[vpp-dev] Return NIC back to linux

2017-11-20 Thread Holoo Gulakh
Hi
I bound 2 NICs to vpp in /etc/vpp/startup.conf file in dpdk{} block!
Now, how can i return NIC handling from vpp to Linux?

Regards
___
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

[vpp-dev] Must vpp be installled at root ?

2017-11-23 Thread Holoo Gulakh
Hi,
Does it differ that where we "git clone" then make vpp?
Should it be at root (/) ?
___
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

[vpp-dev] Why vagrant?

2017-11-23 Thread Holoo Gulakh
Hi
What would occur if i download vpp on a regular VM (e.g. ubuntu 1604 on
vmware or vbox) and install it, without using special Vagrantfile on
vpp/extra/vagrant?
___
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

[vpp-dev] vpp api test

2017-11-26 Thread Holoo Gulakh
Hello
I am working on VPP and now need to use its API to communicate with it.
I want to know how I can use its API?? Is there any example in source code
or any where else? (if yes, how should I use it?)
thanks in advance
___
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

[vpp-dev] VPP API

2017-11-27 Thread Holoo Gulakh
Here in this link (https://wiki.fd.io/view/VPP/Code_Walkthrough_VoDs),
there is a video (Code Walkthrough VoD: Chapter 4 | VPP API
) in which the lecturer is
using a program named (vpe_api_test).
Now I just need a program like that (preferably in C) so that I can
understand how it works and then later go deeper and use those wiki pages
about APIs.
could you please help me with such program

thanks in advance
___
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

[vpp-dev] vpp start fails

2017-11-27 Thread Holoo Gulakh
Hi
I am trying to run the example here (https://wiki.fd.io/view/VPP/Python_API)
to test VPP API usage.
after entering command (make run) vpp fails to start and indicate an error
saying "min heap allocation failure!"
using command "sudo service vpp status" shows that vpp service is dead.
How to fix this error??
___
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

[vpp-dev] Papi usage example

2017-11-28 Thread Holoo Gulakh
Hi,
I want to do the following vpp command with python api:
ip route add table 1 1.2.3.4/24 10.0.0.2 GigabitEthernet2/0/1 weight 7"
So, how can i know the name and where to find the definition of the
corresponding api?
Thanks
___
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

Re: [vpp-dev] Papi usage example

2017-11-29 Thread Holoo Gulakh
As far as I understand, VPP class defined in vpp_papi.py opens json files
and iterate over it, extracting messages and makes functions which are
dynamicallt added to our object that has been created earlier from VPP
class.
some functions like "ip_fib_dump" do not need any argument which is
logicall.
but some functions like "ip_add_del_route" must have some input arguments.
Calling this function like this " ip_add_del_route("1.2.3.4", 32,
"6.7.8.9") " in which arguments are dest_address, dest_address_length and
next_hop_address respectively, gives me Error indicating that this function
does not get any input argument.
My question is that: How should i send input argument to API(in this
example ip_add_del_route)??

On Tue, Nov 28, 2017 at 4:45 PM, Ole Troan  wrote:

> Holoo,
>
> > I want to do the following vpp command with python api:
> > ip route add table 1 1.2.3.4/24 10.0.0.2 GigabitEthernet2/0/1 weight 7"
> > So, how can i know the name and where to find the definition of the
> corresponding api?
>
> ip_add_del_route in src/vnet/ip/ip.api.
>
> Best regards,
> Ole
>
>
___
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

[vpp-dev] VPP high level working flowchart

2017-12-03 Thread Holoo Gulakh
Hi,
According to my researches around VPP and its workflow, I have prepared a
flowchart showing VPP's workflow.

This flowchart says that all ingress packet to interfaces handled by VPP
are sent to VPP without Linux network stack intervention. afterward based
on the packet type/destination one of the flows goes on.

Is this flowchart describing VPP's workflow correctly?? (it might be
helpful if you add more details to it if it's correct OR otherwise correct
it if it's wrong)

thanks in advace
___
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

[vpp-dev] vpp api

2017-12-12 Thread Holoo Gulakh
Hi,
In order to use VPP API in python, I use this command

"sudo –E
LD_LIBRARY_PATH=/vpp/build-root/install-vpp_debug-native/vpp/lib64/libvppapiclient.so
python testAPI.py"

As you can see in the above command, I should link libvppapiclient.so to my
code
*** My question is that "where is the source code for libvppapiclient.so??"
I want to inspect source code to see what and how it works ***

thanks in advance
___
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

Re: [vpp-dev] vpp api

2017-12-12 Thread Holoo Gulakh
here there is a test code (test.c)
I compile it with following command:
   gcc client.c test.c -o test -I /usr/include/vpp_plugins
-lvlibmemoryclient -lsvm -lvppinfra -lvlib -lvatplugin -lpthread -lm -lrt
-ldl -lcrypto
and then run it
sudo ./test
but it stops and does not response > so I press ctrl+c to kill it
again when I run it, it gives an error indicating
   "vl_client_connect:230: memclnt_create_reply timeout
Connect failed: -1"

what is wrong with it?? how should I run the test code??
I think the test code is trying to use C API to get the VPP version. Am I
right??

On Tue, Dec 12, 2017 at 1:25 PM, Klement Sekera -X (ksekera - PANTHEON
TECHNOLOGIES at Cisco)  wrote:

> Hi, it's in
>
> src/vpp-api/client
>
> Regards,
> Kement
>
> > -Original Message-
> > From: vpp-dev-boun...@lists.fd.io [mailto:vpp-dev-boun...@lists.fd.io]
> On
> > Behalf Of Holoo Gulakh
> > Sent: Tuesday, December 12, 2017 10:49 AM
> > To: vpp-dev@lists.fd.io
> > Subject: [vpp-dev] vpp api
> >
> > Hi,
> >
> > In order to use VPP API in python, I use this command
> >
> > "sudo –E LD_LIBRARY_PATH=/vpp/build-root/install-vpp_debug-
> > native/vpp/lib64/libvppapiclient.so python testAPI.py"
> >
> > As you can see in the above command, I should link libvppapiclient.so to
> my
> > code
> >
> > *** My question is that "where is the source code for
> libvppapiclient.so??"
> > I want to inspect source code to see what and how it works ***
> >
> > thanks in advance
>
>
___
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

[vpp-dev] mpls API

2017-12-17 Thread Holoo Gulakh
Hi,
I want to add an entry to mpls fib.
How can I do that??? What are essential parameters??

thanks in advance
___
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

[vpp-dev] ip routing by mpls

2017-12-19 Thread Holoo Gulakh
Hi,
I used the following command to enter an entry into IP FIB so that I can
route incoming packets by their mpls label:

   " vppctl ip route add 5.6.7.8/32 via 10.10.10.10
GigabitEthernet0/9/0 out-label 46 "

Now IP FIB has a new entry like this:

5.6.7.8/32
  unicast-ip4-chain
  [@0]: dpo-load-balance: [proto:ip4 index:25 buckets:1 uRPF:26 to:[0:0]]
[0] [@10]: mpls-label:[0]:[46:255:0:eos]
[@1]: arp-mpls: via 10.10.10.10 GigabitEthernet0/9/0

===
My Question:
===
I am trying to add an entry to IP FIB using API:

" r = vpp.ip_add_del_route(is_add=1, is_ipv6=0, is_multipath=1,
dst_address="\x01\x02\x03\x04", dst_address_length=32,
next_hop_sw_if_index=2, next_hop_n_out_labels=1,
next_hop_out_label_stack=[78] "

I expect to get an entry like the one I got by CLI containing mpls label,
but what I get is:
1.2.3.4/32
  unicast-ip4-chain
  [@0]: dpo-load-balance: [proto:ip4 index:24 buckets:1 uRPF:25 to:[0:0]]
[0] [@3]: arp-ipv4: via 1.2.3.4 GigabitEthernet0/9/0

This entry does not have any mpls label. What is wrong with my API?

thanks in advance
___
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

[vpp-dev] VPP Design Documents

2017-12-19 Thread Holoo Gulakh
Hi,
I want to analyze and understand VPP code, but as you know getting insight
into how things are implemented from the source code is difficult.

Can I have VPP design documents (software engineering) to understand:
+how project is structured and divided in multiple parts??
+how different parts communicate each other??
+how to make change in some part of code??
and so on

I need more details than what provided in wiki and readme files.

thanks in advance
___
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

Re: [vpp-dev] ip routing by mpls

2017-12-19 Thread Holoo Gulakh
Hi,
It works by adding next_hop_weight.
thanks

On Tue, Dec 19, 2017 at 6:15 PM, Neale Ranns (nranns) 
wrote:

> Hi Holoo,
>
>
>
> I think you need to add weight=1 to the arg list.
>
> If that doesn’t work, can you show me;
>
> sh ip fib 1.2.3.4/32
>
>
>
> Thanks,
>
> neale
>
>
>
> *From: * on behalf of Holoo Gulakh <
> holoogul...@gmail.com>
> *Date: *Tuesday, 19 December 2017 at 13:39
> *To: *"vpp-dev@lists.fd.io" 
> *Subject: *[vpp-dev] ip routing by mpls
>
>
>
> Hi,
>
> I used the following command to enter an entry into IP FIB so that I can
> route incoming packets by their mpls label:
>
>
>
>" vppctl ip route add 5.6.7.8/32 via 10.10.10.10
> GigabitEthernet0/9/0 out-label 46 "
>
>
>
> Now IP FIB has a new entry like this:
>
>
>
> 5.6.7.8/32
>   unicast-ip4-chain
>   [@0]: dpo-load-balance: [proto:ip4 index:25 buckets:1 uRPF:26 to:[0:0]]
> [0] [@10]: mpls-label:[0]:[46:255:0:eos]
> [@1]: arp-mpls: via 10.10.10.10 GigabitEthernet0/9/0
>
>
>
> ===
>
> My Question:
>
> ===
>
> I am trying to add an entry to IP FIB using API:
>
>
>
> " r = vpp.ip_add_del_route(is_add=1, is_ipv6=0, is_multipath=1,
> dst_address="\x01\x02\x03\x04", dst_address_length=32,
> next_hop_sw_if_index=2, next_hop_n_out_labels=1,
> next_hop_out_label_stack=[78] "
>
> I expect to get an entry like the one I got by CLI containing mpls label,
> but what I get is:
> 1.2.3.4/32
>   unicast-ip4-chain
>   [@0]: dpo-load-balance: [proto:ip4 index:24 buckets:1 uRPF:25 to:[0:0]]
> [0] [@3]: arp-ipv4: via 1.2.3.4 GigabitEthernet0/9/0
>
> This entry does not have any mpls label. What is wrong with my API?
>
> thanks in advance
>
>
___
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

[vpp-dev] get mpls info from kernel

2017-12-24 Thread Holoo Gulakh
Hi,
I want to make a program that reads mpls information from a mpls-enabled
linux kernel and then uses VPP API to configure VPP mpls fib.

I can use iproute2 to configure kernel mpls fib, but it is CLI command.
for iproute2, I use below link:

http://www.samrussell.nz/2015/12/mpls-testbed-on-ubuntu-linux-with.html
I have read somewhere that I can use NETLINK sockets to get routing
information from kernel but what about mpls information.

In a sentence, my question is that how can I get mpls inforamtion from
kernel??



another question is that
After I do this task, I want to add this capability to router-plugin(vppsb)
so that it can add this mpls info to VPP (meaning that get mpls info from
kernel and add to vpp mpls fib)  just as it does for IP fib (in this link
=>https://github.com/FRRouting/frr/wiki/Alternate-forwarding-planes:-VPP
)
as far as I know vppsb router-plugin does not support mpls related task

Is it a good solution?? if not, what is a good alternative??
___
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

Re: [vpp-dev] get mpls info from kernel

2017-12-25 Thread Holoo Gulakh
we can use iproute2 python library to have network information such as
interface names, mpls table(of course in mpls-enabled linux kernel), ip
table and so on
here is the link for library:
   https://pypi.python.org/pypi/pyroute2

On Sun, Dec 24, 2017 at 2:47 PM, Holoo Gulakh  wrote:

> Hi,
> I want to make a program that reads mpls information from a mpls-enabled
> linux kernel and then uses VPP API to configure VPP mpls fib.
>
> I can use iproute2 to configure kernel mpls fib, but it is CLI command.
> for iproute2, I use below link:
>http://www.samrussell.nz/2015/12/mpls-testbed-on-ubuntu-
> linux-with.html
> I have read somewhere that I can use NETLINK sockets to get routing
> information from kernel but what about mpls information.
>
> In a sentence, my question is that how can I get mpls inforamtion from
> kernel??
>
>
> 
> another question is that
> After I do this task, I want to add this capability to
> router-plugin(vppsb) so that it can add this mpls info to VPP (meaning that
> get mpls info from kernel and add to vpp mpls fib)  just as it does for IP
> fib (in this link =>https://github.com/FRRouting/
> frr/wiki/Alternate-forwarding-planes:-VPP)
> as far as I know vppsb router-plugin does not support mpls related task
>
> Is it a good solution?? if not, what is a good alternative??
>
___
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

[vpp-dev] mpls routing

2017-12-26 Thread Holoo Gulakh
Hi,

I want to test a scenario in which I have two host and a VPP router.

host1(10.0.10.2)<-->(10.0.10.1)(Gb4/0/0)VPP(Gbb/0/0)(10.0.20.1)<-->(10.0.20.2)host2

host1 and host2 are two mpls-enabled ubuntu server.

Goal: To ping host1 from host2 using mpls label
=
VPP version: 18.01
ubuntu server : 16.04

In this scenario host2 should put a label 400 on packet and then VPP router
should pop the label and then send it to host1.

I enter below command in host2:
  ip route add 10.0.10.2/32 encap mpls 400 via inet 10.0.20.1

and I enter below command in VPP router:
  mpls table add 0
  set int mpls GigabitEthernet4/0/0 enable
  set int mpls GigabitEthernetb/0/0 enable
  mpls local-label 400 via 10.0.10.1 GigabitEthernet4/0/0


What happens:
===
host2 sends out packet with label 400 and VPP router gets it. but host1
does not get any packet.
I guess something wrong happen in VPP..

** What is wrong with my configuration??
** How should I configure hosts and VPP??
please help me with other scenarios that use:
1-mpls pop  2- mpls push   3- mpls swap

thanks in advance
___
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

[vpp-dev] packet capture

2018-01-09 Thread Holoo Gulakh
Hi,
In a typical scenario, we usually use wireshark or tcpdump to capture
input/output packets from interfaces and we can use filters to filter them
base on different criteria such as protocol.
My question is that : when VPP handles one interface, then this interface
is out of kernel's control so we can't capture those packets using
wireshark or tcpdump.

===
What is an alternative in VPP for wireshark or tcpdump??
===

I read somewhere that there is a command named "trace" in VPP.
Is it correct?? if so, how to use it?? how to filter packets?? what is the
representation format of packets?? how to filter them base on network stack
layers??
I want to use this tool for debugging my scenarios which uses VPP as
dataplane.
___
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

Re: [vpp-dev] packet capture

2018-01-09 Thread Holoo Gulakh
there are labels like dpdk-input, ip4-input-no-checksum,
ip4-icmp-echo-request and so on.
As you know wireshark shows a single entry containing all information about
a packet OR in other words wireshark captures packet at the physical layer.

=
Q1: Which of these labels in VPP act like wireshark??
Q2: How to filter packets base on that label?? I want just one entry per
packet containing all packet's info
=

On Tue, Jan 9, 2018 at 2:41 PM, Mohsin Kazmi (sykazmi) 
wrote:

> Hello Holoo,
>
>
> You can find examples of traces in VPP Uses Cases.
>
>
> Specific to VPP packet tracing, please check the following link:
>
>
> https://wiki.fd.io/view/VPP/Command-line_Interface_(CLI)_
> Guide#packet_tracer
>
>
> Apart from that, debug CLI list down the commands:
>
>
> vpp# trace ?
>   trace addTrace given number of packets
>   trace filter filter trace output - include
> NODE COUNT | exclude NODE COUNT | none
>   trace frame-queuetrace frame-queue (on|off)
> vpp#
>
> I hope that it will help.
>
> -br
> Mohsin
>
>
> --
> *From:* vpp-dev-boun...@lists.fd.io  on
> behalf of Holoo Gulakh 
> *Sent:* Tuesday, January 9, 2018 11:58 AM
> *To:* vpp-dev@lists.fd.io
> *Subject:* [vpp-dev] packet capture
>
> Hi,
> In a typical scenario, we usually use wireshark or tcpdump to capture
> input/output packets from interfaces and we can use filters to filter them
> base on different criteria such as protocol.
> My question is that : when VPP handles one interface, then this interface
> is out of kernel's control so we can't capture those packets using
> wireshark or tcpdump.
>
> ===
> What is an alternative in VPP for wireshark or tcpdump??
> ===
>
> I read somewhere that there is a command named "trace" in VPP.
> Is it correct?? if so, how to use it?? how to filter packets?? what is the
> representation format of packets?? how to filter them base on network stack
> layers??
> I want to use this tool for debugging my scenarios which uses VPP as
> dataplane.
>
___
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev