Select TAP/TUN interface configuration for Thread Control

Document created by Dhvanil Patel on Aug 17, 2017
Version 1Show Document
  • View in full screen mode

The modular gateway supports the TUN interface for tunneling IP packets (Layer 3) over a serial interface to the KWxxx radio module on a gateway.


Starting from the IDEx 1.2.1 release, the modular gateway also includes support for the TAP interface (Layer 2) which is enabled by default. The option for the TUN interface is still available and the user can switch from TAP interface to TUN interface. However, at a time either TAP or TUN interface can be used.


This document describes the steps to switch between a TAP and TUN interface as per the user's requirement.


  1. Boot up the NXP Modular Gateway with stock IDEX1.1 SDK (or above). Please ensure the GTWY is Ethernet or Wi-Fi connected for remote access.
  2. Log in to the gateway serial console.
  3. On the gateway go to the "/etc/init.d" directory.
  4. Use the below command to switch to the TUN interface.
    $ sed -i 's/TAP_TUN_SCRIPT=$TAP_SCRIPT/#TAP_TUN_SCRIPT=$TAP_SCRIPT/g' /etc/init.d/BRDeamons
    $ sed -i 's/#TAP_TUN_SCRIPT=$TUN_SCRIPT/TAP_TUN_SCRIPT=$TUN_SCRIPT/g' /etc/init.d/BRDeamons
  5. Open the "BRDeamons" file using the vi editor and set the configuration as per below to switch between TUN and TAP interface respectively.
    • Configuration for TAP interface (Default configuration).
    • Configuration for TUN interface.
  6. Save the modification in the file and exit from the vi editor.
  7. Reboot the gateway. The gateway will restart with the TAP/TUN virtual interface configured in step 4.