Skip to main content
Version: 3.28 (latest)

Host network configuration

Big picture

The VPP-Host connection is a bit particular in the sense that the address of the primary interface is shared by both VPP and Linux. Let's say the primary interface (uplink interface on the diagram below) is called enp216s0f1 and configured with an address.

This address must also be the one the api-server will be listening on, as the first address of the uplink (a.k.a main interface for the host).

Network architecture

When VPP starts

  • It grabs the primary interface with the chosen driver, either placing it in a dedicated network namespace, or removing it entirely as a Linux netdev depending on the driver. In any case, the interface disappears from the host's root network namespace.

  • It configures it in VPP with the same configuration (addresses, routes) it had in Linux. So issuing show int addr in VPP will give something like

    vpp# sh int addr
    avf-0/d8/a/0 (up):
  • It creates a tap interface between VPP and the host

  • This tap interface is given the same name and MAC address as the original interface in the host's root network namespace

  • This interface is also reconfigured with all the addresses and routes that the host had configured on the original interface

    ip addr show enp216s0f1
    3: enp216s0f1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 52:54:00:40:46:8e brd ff:ff:ff:ff:ff:ff
    inet brd scope global eth1
    valid_lft forever preferred_lft forever

    ip route
    default via dev enp216s0f1 proto dhcp src metric 100
    ${SERVICE_CIDR} via dev enp216s0f1 proto static mtu 1440
    ${POD_CIDR} via dev enp216s0f1 proto static mtu 1440 dev enp216s0f1 proto kernel scope link src

    The new tap interface (named enp216s0f1 in this example) is also configured with routes towards the Kubernetes service CIDR and the pod CIDR, so that the Linux host can reach the workloads through VPP. These routes use a reduced MTU to accommodate for encapsulations.

  • In VPP you will find it with the name tap0. It is configured unnumbered, as a child of the primary interface avf-0/d8/a/0.

    vpp# sh int addr
    tun0 (up):
    unnumbered, use avf-0/d8/a/0
  • It is also registered as the default punt path. This means that all the traffic that would be dropped by VPP (which includes the traffic to the VPP address that is not handled by VPP itself, but not the tunnel traffic which is decapsulated/decrypted by VPP) will be passed to this interface, so the Linux host will receive and process it.

    vpp# sh ip punt redirect
    rx local0 via:
    path-list:[31] locks:1 flags:no-uRPF, uPRF-list:24 len:1 itfs:[2, ]
    path:[41] pl-index:31 ip4 weight=1 pref=0 attached-nexthop: oper-flags:resolved, tap0
    [@0]: ipv4 via tap0: mtu:1500 next:6 flags:[features ] 52540040468e02ca11c0fd100800
    [@1]: ipv4 via tap0: mtu:1500 next:6 flags:[features ] 52540040468e02ca11c0fd100800

    For the v6 configuration:

    vpp# sh ip6 punt redirect

A packet destined to the host arrives on the uplink, let's say it has src=,dst=

  • VPP receives it, sees that the destination address is the one configured on its interface
  • As it doesn't have specific handling configured for this packet, it looks up the punt path, and sends it into tap0
  • Linux receives it on the tap interface which is configured with and so processes it normally

The reply is now emitted by the host with src=,dst=

  • Linux looks up the route for, forwards it into the tap interface
  • VPP receives it on the interface tap0
  • It looks up in the fib, finds a route on the uplink interface (configured with
  • The packet is sent on the uplink

Packet flow - pod talking to the api-server

Let's say the api server lives on Node A.

If a pod on Node B wants to talk to the api-server on Node A, the packet flow will be the same as described above.

  • In Node B, standard routing happens (sh ip fib <someip> will give details on this node)
  • When reaching Node A, we're in the same situation as previously

If a pod on Node A wants to talk to the api-server on Node A, let's say the packet is src=,dst= with being the pod address, then:

  • Things happen exactly the same way as if the packet was coming from the uplink
  • This time packets come into vpp through tunN corresponding to the pod interface, and is then punted to tap0 towards the host
  • The return traffic from the host is received by VPP on tap0, and is routed directly to the pod on tunN