> For the complete documentation index, see [llms.txt](https://docs.cennso.com/components/fpp/1.3/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/1.3/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.

## Connectivity between nodes

Follow these steps to debug connectivity between two nodes.

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

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

  Output example:

  ```console
  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:

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

  Output example:

  ```console
    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:

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

  Output example:

  ```console
  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:

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

  Output example:

  ```console
  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:

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

  Output example:

  ```console
  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:

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

  Output example:

  ```console
  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/1.3/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, and run:

  ```console
  $ ip l
  ```

  Output example:

  ```console
  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:EBbrd 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 [Traffic capturing](https://docs.cennso.com/components/fpp/1.3/troubleshooting/traffic-capture.md#capturing-on-physical-nics)
  document for more information.

## Connectivity between pods

Follow these steps to debug connectivity between two pods.

1. 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 **vni** parameter indicates
  the VXLAN network that is not working 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,
        "vppIfaceType": "tap"
      }
  ```

  Check the VXLAN with `vni: 20` on FPP pods to see if the corresponding VXLAN tunnels are created.

3. On the FPP pod, run this command to see if tunnels are created between FPP pods:

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

  Output example:

  ```console
  [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 ways. This is the example of an output from the other pod:

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

  Output example:

  ```console
  [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.
