zephyr/samples/net/virtual
Jukka Rissanen 3c0fe6b04b samples: net: Change samples to support new IPv4 netmask setting API
Make sure that the samples use the new IPv4 netmask setting API.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-03-03 18:58:29 +01:00
..
src samples: net: Change samples to support new IPv4 netmask setting API 2024-03-03 18:58:29 +01:00
CMakeLists.txt cmake: increase minimal required version to 3.20.0 2021-08-20 09:47:34 +02:00
Kconfig samples: net: virtual: Simple app for creating virtual interfaces 2021-03-29 07:40:24 -04:00
prj.conf samples: net: virtual: Simple app for creating virtual interfaces 2021-03-29 07:40:24 -04:00
README.rst samples: net: doc: Use new Sphinx extension to document networking samples 2023-09-19 15:22:59 +01:00
sample.yaml samples, tests: convert string-based twister lists to YAML lists 2023-05-10 09:52:37 +02:00

.. zephyr:code-sample:: virtual-network-interface
   :name: Virtual network interface
   :relevant-api: virtual virtual_mgmt

   Create a sample virtual network interface.

Overview
********

This sample application creates a sample virtual network interface for
demonstrative purposes, it does not do anything useful here.
There are total 4 network interfaces.

Ethernet network interface is providing the real network interface and
all the virtual interfaces are running on top of it.

On top of Ethernet interface there are two virtual network interfaces,
one provides only IPv6 tunnel, and the other only IPv4. These two tunnels
are provided by IPIP tunnel.

The sample provides tunnel interface which runs on top of the IPv6 tunnel.

The source code for this sample application can be found at:
:zephyr_file:`samples/net/virtual`.

Requirements
************

- :ref:`networking_with_host`

Building and Running
********************

The `net-tools`_ project provides a configuration that can be used
to create a sample tunnels in host side.

.. code-block:: console

	net-setup.sh -c zeth-tunnel.conf

Note that the sample application expects that the board provides
an Ethernet network interface. Build the sample application like this:

.. zephyr-app-commands::
   :zephyr-app: samples/net/virtual
   :board: <board to use>
   :goals: build
   :compact:

.. _`net-tools`: https://github.com/zephyrproject-rtos/net-tools