> For the complete documentation index, see [llms.txt](https://docs.cennso.com/components/fpp/latest/llms.txt) (all documentation: [llms.txt](https://docs.cennso.com/llms.txt)). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cennso.com/components/fpp/latest/troubleshooting/connectivity.md).

# Connectivity check

The problem of missing connectivity between nodes and pods may be caused by many different reasons. Follow the steps below to do the basic troubleshooting and identify the issue that occurs in your case. The steps mentioned in this guide should be executed on the Core Cluster.

## FPP Overlay Network dashboard

The FPP 3.0.5 introduces a dedicated [FPP Overlay Network monitoring](https://docs.cennso.com/components/fpp/latest/observability/dashboard-fpp.md#fpp-overlay-network-status) dashboard. If the Uplink monitoring feature is enabled (by setting **spec.enableUplinkMonitoring** to `true` in the `FPPDeployment`), you can use it to view the node-to-node connectivity status.

## Connectivity between nodes

Follow these steps to debug connectivity between two nodes in a Core Cluster.

1. Check which uplink interfaces are present by running this command inside the FPP node pod:

   ```bash
   vppctl -s /run/vppswitch/cli.sock sh int | egrep "bond|uplink" -A 4
   ```

   Output example:

   ```bash
   uplink-bond                       12     up          9000/0/0/0     rx packets               1491251
                                                                       rx bytes               164160913
                                                                       tx packets                412497
                                                                       tx bytes                51458926
                                                                       drops                         38
   --
   uplink0n0                         1      up          9000/0/0/0     rx packets               1491284
                                                                      rx bytes               164164881
                                                                       tx packets                412467
                                                                       tx bytes                51457666
                                                                       drops                         33
   --
   uplink1n0                         2      up          9000/0/0/0     rx packets               8711813
                                                                       rx bytes               523318376
                                                                       drops                    7299541
   ```

2. The above output shows that there are two uplink interfaces and one bond interface `uplink-bond`.
  In this case, the bond interface has the IP address assigned:

   ```bash
   vppctl -s /run/vppswitch/cli.sock show int address | grep -A 1 uplink-bond
   ```

   Output example:

   ```bash
   uplink-bond (up):
      L3 10.35.38.2/24 ip4 table-id 500 fib-idx 1
   ```

3. Check the bond status to see if bond members are active and working fine:

   ```bash
   vppctl -s /run/vppswitch/cli.sock sh bond
   ```

   Output example:

   ```bash
   interface name   sw_if_index  mode          load balance  active members members
   BondEthernet0    12           active-backup active-backup 2              2
   ```

4. To see if the FPP node sees other FPP pods in the cluster, check IP neighbors:

   ```bash
   vppctl -s /run/vppswitch/cli.sock sh ip neighbors
   ```

   Output example:

   ```bash
   Time                       IP                    Flags      Ethernet              Interface
   14.8725               10.30.38.1                  D       0a:91:b0:4d:e9:1e      uplink-bond
   14.8725               10.30.38.3                  D       6e:5b:e8:1b:1a:9a      uplink-bond
   ```

5. Check connectivity by pinging the IP address of the other FPP node:

   ```bash
   vppctl -s /run/vppswitch/cli.sock ping 10.35.38.1 source uplink-bond
   ```

   Output example:

   ```bash
   116 bytes from 10.35.38.1: icmp_seq=1 ttl=64 time=7.1516 ms
   116 bytes from 10.35.38.1: icmp_seq=2 ttl=64 time=.0631 ms
   116 bytes from 10.35.38.1: icmp_seq=3 ttl=64 time=4.1462 ms
   116 bytes from 10.35.38.1: icmp_seq=4 ttl=64 time=7.1187 ms
   116 bytes from 10.35.38.1: icmp_seq=5 ttl=64 time=.0616 ms

   Statistics: 5 sent, 5 received, 0% packet loss
   ```

6. To check if FPP uses the correct VFs, check the MAC address and logs on the FPP pod:

   ```bash
   vppctl -s /run/vppswitch/cli.sock sh hardware | egrep "bond|uplink" -A 10
   ```

   Output example:

   ```bash
   uplink-bond                        8     up   BondEthernet0
     Link speed: unknown
     Ethernet address b2:c8:41:d7:ea:18
   uplink0n0                          1     up   uplink0n0
     Link speed: 10 Gbps
     RX Queues:
       queue thread         mode
       0     vpp_wk_0 (1)   polling
       1     vpp_wk_1 (2)   polling
       2     vpp_wk_2 (3)   polling
       3     vpp_wk_3 (4)   polling
     Ethernet address b2:c8:41:d7:ea:18
     Intel iAVF
       carrier up full duplex max-frame-size 9018
   --
   uplink1n0                          2     up   uplink1n0
     Link speed: 10 Gbps
     RX Queues:
       queue thread         mode
       0     vpp_wk_0 (1)   polling
       1     vpp_wk_1 (2)   polling
       2     vpp_wk_2 (3)   polling
       3     vpp_wk_3 (4)   polling
     Ethernet address b2:c8:41:d7:ea:18
     Intel iAVF
       carrier up full duplex max-frame-size 9018
   ```

   By looking into the [VPP logs](https://docs.cennso.com/components/fpp/latest/troubleshooting/verification.md#check-vpp-logs), you can check the original MAC address of VFs. In the example above, MAC `0E:55:B6:74:D0:EB` and `56:30:19:47:3E:2F` will show the VFs used on the node. Log into the node in the Core Cluster, and run:

   ```bash
   ip l
   ```

   Output example:

   ```bash
   2: eth0: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 9000 qdisc mq master bond0 state UP mode DEFAULT group default qlen 1000
      link/ether 36:8e:c8:1c:8a:35 brd ff:ff:ff:ff:ff:ff
   ...
       vf 15     link/ether 56:30:19:47:3E:2F brd ff:ff:ff:ff:ff:ff, spoof checking off, link-state auto, trust on
   ...
   4: eth2: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 9000 qdisc mq master bond0 state UP mode DEFAULT group default qlen 1000
       link/ether 36:8e:c8:1c:8a:35 brd ff:ff:ff:ff:ff:ff
   ...
     vf 12     link/ether 0E:55:B6:74:D0:EB brd ff:ff:ff:ff:ff:ff, spoof checking off, link-state auto, trust on
   ...
   ```

   VFs on the node should match the SRIOV Network object created while configuring the cluster. In the example above, spoof checking is `off` and trust is `on`.

7. Network traffic can be captured to check where the drops happen. See the [NetCap](https://docs.cennso.com/components/fpp/latest/deployment-guides/netcap-traffic-capturing.md) or  [VPP CLI traffic capturing](https://docs.cennso.com/components/fpp/latest/troubleshooting/traffic-capture.md) document for more information.

## Connectivity between pods

Follow these steps to debug connectivity between two pods.

1. If you are using FPP-CNI, check which network, defined in the Network Attachment Definition (NAD), the pod uses:

   ```yaml
   apiVersion: v1
   kind: Pod
   metadata:
     annotations:
       k8s.v1.cni.cncf.io/network-status: |-
         [{
         ...
         }]
       k8s.v1.cni.cncf.io/networks: nettest
   ```

2. Search for this NAD to see its Container Network Interface (CNI) definition. The **networkName** or **vni** parameter indicates
  the FPPNetwork that is used and thus must be verified on the FPP pod.

   ```yaml
   spec:
     config: |-
       {
         "cniVersion": "0.3.0",
         "ipam": {
           "addresses": [
             {
               "address": "2001:db8:1::1/64"
             },
             {
               "address": "10.100.0.1/24"
             }
           ],
           "type": "static"
         },
         "mtu": 1500,
         "name": "net",
         "type": "fpp-cni",
         "vni": 20,
         "networkName": "test-net",
         "vppIfaceType": "tap"
       }
   ```

   If there is no **vni** in the NAD, check the FPPNetwork object from **networkName**. See the example:

   ```yaml
   apiVersion: fpp-manager.cennso.com/v1alpha1
   kind: FPPNetwork
   metadata:
     name: test-net
   spec:
     id: 20
     type: vxlan
   ```

3. If you are using CLI-Less interface creation, check the VPPInterface object connected to the FPP instance.

   You can grab it using the **fpp-manager.cennso.com/plumbing-instance** label, as follows:

   ```bash
   kubectl get vppinterfaces.fpp-manager.cennso.com -l fpp-manager.cennso.com/plumbing-instance={FPP_INSTANCE_NAME} -A
   ```

   The sample output of the VPPInterface object:

   ```yaml
   apiVersion: fpp-manager.cennso.com/v1alpha1
   kind: VPPInterface
   metadata:
     name: srv
     namespace: fpp-sample
     labels:
       fpp-manager.cennso.com/plumbing-instance: vpp-webserver
   spec:
     ifName: srv
     mtu: 9000
     attachToNetwork: mynet
     ips:
     - 10.0.0.1/24
     memif:
       role: slave
   ```

   **spec.attachToNetwork** contains the FPPNetwork name. Use this name to check which VXLAN ID it uses for the next debugging steps.

4. Check if the corresponding VXLAN tunnels are configured. On the FPP node pod, run this command to see if tunnels are created between FPP pods:

   ```bash
   vppctl -s /run/vppswitch/cli.sock sh vxlan tunnel | grep "vni 20"
   ```

   Output example:

   ```bash
   [19] instance 19 src 10.30.38.3 dst 10.30.38.4 src_port 4789 dst_port 4789 vni 20 fib-idx 1 sw-if-idx 22 encap-dpo-idx 2
   [35] instance 35 src 10.30.38.3 dst 10.30.38.1 src_port 4789 dst_port 4789 vni 20 fib-idx 1 sw-if-idx 40 encap-dpo-idx 4
   ```

   The above output shows that there are two tunnels ([19] and [35]) to two different nodes in the cluster. Run the same command on the other FPP pod to see if the tunnel is created in both directions. This is an example of an output from the other pod:

   ```bash
   vppctl -s /run/vppswitch/cli.sock sh vxlan tunnel | grep "vni 20"
   ```

   Output example:

   ```bash
   [14] instance 14 src 10.30.38.4 dst 10.30.38.3 src_port 4789 dst_port 4789 vni 20 fib-idx 1 sw-if-idx 17 encap-dpo-idx 2
   [37] instance 37 src 10.30.38.4 dst 10.30.38.1 src_port 4789 dst_port 4789 vni 20 fib-idx 1 sw-if-idx 41 encap-dpo-idx 5
   ```

   If the VXLAN tunnels do not exist, there's no connectivity between the nodes. See the [debugging connectivity between nodes](#connectivity-between-nodes) section for further analysis.
