This shows you the differences between two versions of the page.
Next revision | Previous revisionNext revisionBoth sides next revision | ||
fuss:openwrt [2017/02/22 18:30] – external edit 127.0.0.1 | fuss:openwrt [2019/03/01 18:35] – [Fixing Terminal Compatibility Issues with Cygwin] office | ||
---|---|---|---|
Line 16: | Line 16: | ||
ipkg-build -o root -g root soft | ipkg-build -o root -g root soft | ||
</ | </ | ||
+ | |||
+ | ====== Create TAP Interface on Boot ====== | ||
+ | |||
+ | OpenWrt scripts can add a TAP interface to a bridge on boot, however tap interfaces are usually created on demand rather than persisting across reboots. To make sure that the TAP interface is brought up on boot, create a script at ''/ | ||
+ | <code bash> | ||
+ | #!/bin/sh / | ||
+ | |||
+ | START=30 | ||
+ | SERVICE_USE_PID=0 | ||
+ | |||
+ | TAP=`ifconfig -a | grep tap0 | wc -l | ||
+ | |||
+ | start() { | ||
+ | if [ $TAP -eq 0 ]; then | ||
+ | ip tuntap add mode tap tap0 | ||
+ | fi | ||
+ | } | ||
+ | |||
+ | stop() { | ||
+ | if [ $TAP -eq 1 ]; then | ||
+ | ip tuntap del mode tap tap0 | ||
+ | fi | ||
+ | } | ||
+ | </ | ||
+ | and possibly change '' | ||
+ | |||
+ | In order to activate the script, issue: | ||
+ | <code bash> | ||
+ | / | ||
+ | </ | ||
+ | |||
+ | The interface should now be created on reboot. | ||
+ | |||
+ | Once TAP interfaces are created the MAC address is randomly generated such that unless you are sending a DHCP client ID, the interface will be difficult to track. To set a permanent MAC address for the TAP interface, edit ''/ | ||
+ | |||
+ | For example, the snippet: | ||
+ | < | ||
+ | config interface ' | ||
+ | option ifname ' | ||
+ | option proto ' | ||
+ | option macaddr ' | ||
+ | </ | ||
+ | |||
+ | configures a TAP interface '' | ||
+ | |||
+ | The configuration combined with the script above work perfectly well together: the script takes care to create the interface and the OpenWrt network configuration will set the MAC address when the interface is brought up. | ||
+ | |||
+ | ====== Fixing Terminal Compatibility Issues with Cygwin ====== | ||
+ | |||
+ | If you access OpenWrt from a cygwin shell, you will notice that running ncurses-based programs (for instance, '' | ||
+ | |||
+ | To resolve the issue, the '' | ||
+ | |||
+ | ====== Making Samba Bind to Interfaces ====== | ||
+ | |||
+ | On OpenWrt version '' | ||
+ | < | ||
+ | interfaces = |INTERFACES| | ||
+ | </ | ||
+ | |||
+ | unfortunately, | ||
+ | |||
+ | Seeing that the interfaces to listen on cannot be configured via LuCi, removing the '' |