1.. _networking_with_host: 2 3Networking with the host system 4############################### 5 6.. toctree:: 7 :maxdepth: 1 8 :hidden: 9 10 native_posix_setup.rst 11 qemu_eth_setup.rst 12 qemu_setup.rst 13 usbnet_setup.rst 14 qemu_user_setup.rst 15 networking_with_multiple_instances.rst 16 qemu_802154_setup.rst 17 armfvp_user_networking_setup.rst 18 19While developing networking software, it is usually necessary to connect and 20exchange data with the host system like a Linux desktop computer. 21Depending on what board is used for development, the following options are 22possible: 23 24* QEMU using SLIP (Serial Line Internet Protocol). 25 26 * Here IP packets are exchanged between Zephyr and the host system via serial 27 port. This is the legacy way of transferring data. It is also quite slow so 28 use it only when necessary. See :ref:`networking_with_qemu` for details. 29 30* QEMU using built-in Ethernet driver. 31 32 * Here IP packets are exchanged between Zephyr and the host system via QEMU's 33 built-in Ethernet driver. Not all QEMU boards support built-in Ethernet so 34 in some cases, you might need to use the SLIP method for host connectivity. 35 See :ref:`networking_with_eth_qemu` for details. 36 37* QEMU using SLIRP (Qemu User Networking). 38 39 * QEMU User Networking is implemented using "slirp", which provides a full TCP/IP 40 stack within QEMU and uses that stack to implement a virtual NAT'd network. As 41 this support is built into QEMU, it can be used with any model and requires no 42 admin privileges on the host machine, unlike TAP. However, it has several 43 limitations including performance which makes it less valuable for practical 44 purposes. See :ref:`networking_with_user_qemu` for details. 45 46* Arm FVP (User Mode Networking). 47 48 * User mode networking emulates a built-in IP router and DHCP server, and 49 routes TCP and UDP traffic between the guest and host. It uses the user mode 50 socket layer of the host to communicate with other hosts. This allows 51 the use of a significant number of IP network services without requiring 52 administrative privileges, or the installation of a separate driver on 53 the host on which the model is running. See :ref:`networking_with_armfvp` 54 for details. 55 56* native_posix board. 57 58 * The Zephyr instance can be executed as a user space process in the host 59 system. This is the most convenient way to debug the Zephyr system as one 60 can attach host debugger directly to the running Zephyr instance. This 61 requires that there is an adaptation driver in Zephyr for interfacing 62 with the host system. An Ethernet driver exists in Zephyr for this purpose. 63 See :ref:`networking_with_native_posix` for details. 64 65* USB device networking. 66 67 * Here, the Zephyr instance is run on a real board and the connectivity to 68 the host system is done via USB. 69 See :ref:`usb_device_networking_setup` for details. 70 71* Connecting multiple Zephyr instances together. 72 73 * If you have multiple Zephyr instances, either QEMU or native_posix ones, 74 and want to create a connection between them, see 75 :ref:`networking_with_multiple_instances` for details. 76 77* Simulating IEEE 802.15.4 network between two QEMUs. 78 79 * Here, two Zephyr instances are running and there is IEEE 802.15.4 link layer 80 run over an UART between them. 81 See :ref:`networking_with_ieee802154_qemu` for details. 82