Hi,
I am unable to test if my server is up, could I be missing any configs in 
interfaces/ vpp hoststack setup :
I configured vpp1 server with the following commands :

1./auto/home.nas04/skesavan/ *vpp* /build-root/install- *vpp* _debug-native/ 
*vpp* /bin/ *vpp* -c /etc/ *vpp* /startup.conf
2. -bash-4.2$ sudo ./configurevpp1.sh

host-vpp1

host-vpp2

3.cat ./configure vpp1.sh

-bash-4.2$ cat configurevpp1.sh

#!/bin/bash

PATH=$PATH:./build-root/install-vpp_debug-native/vpp/bin/

if [ $USER != "root" ] ; then

echo "Restarting script with sudo..."

sudo $0 ${*}

exit

fi

# delete previous incarnations if they exist

ip link del dev vpp1

ip link del dev vpp2

ip netns del vpp1

ip netns del vpp2

#create namespaces

ip netns add vpp1

ip netns add vpp2

# create and configure 1st veth pair

ip link add name veth_vpp1 type veth peer name vpp1

ip link set dev vpp1 up

ip link set dev veth_vpp1 up netns vpp1

ip netns exec vpp1 \

bash -c "

ip link set dev lo up

ip addr add 172.16.1.2/24 dev veth_vpp1

ip route add 172.16.2.0/24 via 172.16.1.1

"

# create and configure 2st veth pair

ip link add name veth_vpp2 type veth peer name vpp2

ip link set dev vpp2 up

ip link set dev veth_vpp2 up netns vpp2

ip netns exec vpp2 \

bash -c "

ip link set dev lo up

ip addr add 172.16.2.2/24 dev veth_vpp2

ip route add 172.16.1.0/24 via 172.16.2.1

"

vppctl create host-interface name vpp1

vppctl create host-interface name vpp2

vppctl set int state host-vpp1 up

vppctl set int state host-vpp2 up

vppctl set int ip address host-vpp1 172.16.1.1/24

vppctl set int ip address host-vpp2 172.16.2.1/24

vppctl ip route add 172.16.1.0/24 via 172.16.1.1 host-vpp1

vppctl ip route add 172.16.2.0/24 via 172.16.2.1 host-vpp2

4.
DBGvpp# sh int host-vpp1

Name Idx State MTU (L3/IP4/IP6/MPLS) Counter Count

host-vpp1 1 up 9000/0/0/0

DBGvpp# sh int addr

host-vpp1 (up):

L3 122.16.1.1/24

L3 172.16.1.1/24

local0 (dn):

DBGvpp#

on vpp client :

1. -bash-4.2$ sudo 
/auto/home.nas04/skesavan/vpp2/build-root/install-vpp_debug-native/vpp/bin/vppctl
 -s /run/vpp/cli-vpp2.sock show int addr

host-vpp1 (up):

L3 192.16.1.1/24

host-vpp2 (up):

L3 192.16.2.1/24

local0 (dn):

-bash-4.2$ sudo 
/auto/home.nas04/skesavan/vpp2/build-root/install-vpp_debug-native/vpp/bin/vppctl
 -s /run/vpp/cli-vpp2.sock session enable

-bash-4.2$ sudo 
/auto/home.nas04/skesavan/vpp2/build-root/install-vpp_debug-native/vpp/bin/vppctl
 -s /run/vpp/cli-vpp2.sock create host-interface name vpp2

host-vpp2

-bash-4.2$ sudo 
/auto/home.nas04/skesavan/vpp2/build-root/install-vpp_debug-native/vpp/bin/vppctl
 -s /run/vpp/cli-vpp2.sock set int ip address host-vpp2 10.0.0.2/24

-bash-4.2$ sudo 
/auto/home.nas04/skesavan/vpp2/build-root/install-vpp_debug-native/vpp/bin/vppctl
 -s /run/vpp/cli-vpp2.sock set int ip address host-vpp2 172.16.2.1/24

-bash-4.2$ sudo 
/auto/home.nas04/skesavan/vpp2/build-root/install-vpp_debug-native/vpp/bin/vppctl
 -s /run/vpp/cli-vpp2.sock set int state host-vpp2 up

-bash-4.2$ sudo 
/auto/home.nas04/skesavan/vpp2/build-root/install-vpp_debug-native/vpp/bin/vppctl
 -s /run/vpp/cli-vpp2.sock show int addr

host-vpp1 (up):

L3 192.16.1.1/24

host-vpp2 (up):

L3 192.16.2.1/24

L3 10.0.0.2/24

L3 172.16.2.1/24

2. -bash-4.2$ sudo 
/auto/home.nas04/skesavan/vpp2/build-root/install-vpp_debug-native/vpp/bin/vppctl
 -s /run/vpp/cli-vpp2.sock test echo client uri tcp://122.16.1.1/24

test failed

test echo clients: connect returned: -7

what could be missing potentially?
-vpp1 and vpp2 are two centos7 vms:have added strace output for the vpp2 
connect call.

Attachment: strace-connect-vpp2
Description: Binary data

#!/bin/bash




PATH=$PATH:./vpp2/build-root/install-vpp_debug-native/vpp/bin/




if [ $USER != "root" ] ; then

        echo "Restarting script with sudo..."

            sudo $0 ${*}

                exit

                fi




# delete previous incarnations if they exist

ip link del dev vpp1

ip link del dev vpp2

ip netns del vpp1

ip netns del vpp2




#create namespaces

ip netns add vpp1

ip netns add vpp2




# create and configure 1st veth pair

ip link add name veth_vpp1 type veth peer name vpp1

ip link set dev vpp1 up

ip link set dev veth_vpp1 up netns vpp1




ip netns exec vpp1 \

  bash -c "

      ip link set dev lo up

          ip addr add 192.16.1.2/24 dev veth_vpp1

              ip route add 192.16.2.0/24 via 192.16.1.1

              "




# create and configure 2st veth pair

ip link add name veth_vpp2 type veth peer name vpp2

ip link set dev vpp2 up

ip link set dev veth_vpp2 up netns vpp2




ip netns exec vpp2 \

  bash -c "

      ip link set dev lo up

          ip addr add 192.16.2.2/24 dev veth_vpp2

              ip route add 192.16.1.0/24 via 192.16.2.1

              "




              vppctl -s /run/vpp/cli-vpp2.sock create host-interface name vpp1

              vppctl -s /run/vpp/cli-vpp2.sock create host-interface name vpp2

              vppctl -s /run/vpp/cli-vpp2.sock set int state host-vpp1 up

              vppctl -s /run/vpp/cli-vpp2.sock set int state host-vpp2 up

              vppctl -s /run/vpp/cli-vpp2.sock set int ip address host-vpp1 192.16.1.1/24

              vppctl -s /run/vpp/cli-vpp2.sock set int ip address host-vpp2 192.16.2.1/24

              vppctl -s /run/vpp/cli-vpp2.sock ip route add 192.16.1.0/24 via 192.16.1.1 host-vpp1

              vppctl -s /run/vpp/cli-vpp2.sock ip route add 192.16.2.0/24 via 192.16.2.1 host-vpp2

Attachment: startup1.conf
Description: Binary data

Attachment: startup2.conf
Description: Binary data

#!/bin/bash

PATH=$PATH:./build-root/build-vpp-native/vpp/bin/

if [ $USER != "root" ] ; then
    echo "Restarting script with sudo..."
    sudo $0 ${*}
    exit
fi

# delete previous incarnations if they exist
ip link del dev vpp1
ip link del dev vpp2
ip netns del vpp1
ip netns del vpp2

#create namespaces
ip netns add vpp1
ip netns add vpp2

# create and configure 1st veth pair
ip link add name veth_vpp1 type veth peer name vpp1
ip link set dev vpp1 up
ip link set dev veth_vpp1 up netns vpp1

ip netns exec vpp1 \
  bash -c "
    ip link set dev lo up
    ip addr add 172.16.1.2/24 dev veth_vpp1
    ip route add 172.16.2.0/24 via 172.16.1.1
"

# create and configure 2st veth pair
ip link add name veth_vpp2 type veth peer name vpp2
ip link set dev vpp2 up
ip link set dev veth_vpp2 up netns vpp2

ip netns exec vpp2 \
  bash -c "
    ip link set dev lo up
    ip addr add 172.16.2.2/24 dev veth_vpp2
    ip route add 172.16.1.0/24 via 172.16.2.1
"

vppctl create host-interface name vpp1
vppctl create host-interface name vpp2
vppctl set int state host-vpp1 up
vppctl set int state host-vpp2 up
vppctl set int ip address host-vpp1 172.16.1.1/24
vppctl set int ip address host-vpp2 172.16.2.1/24
vppctl ip route add 172.16.1.0/24 via 172.16.1.1 host-vpp1
vppctl ip route add 172.16.2.0/24 via 172.16.2.1 host-vpp2

Attachment: strace-server
Description: Binary data

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

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

Reply via email to