Could someone help me, please? I'm having a problem with TP-Link C7 router with OpenWrt version 18.06.1.
I am trying to setup a gretap tunnel to forward all traffic from a spcefic interface wlan0 through this tunnel to remote endpoint.I configured it based on
and bridged it with wlan0 interface. There is routing in place to forward bridged traffic to wan interface. gretap interface comes up and the client connected to wlan0 interface, able to reach internet. The problem is, I do not see any GRE encapsulation header in any of the messages for e.g. ICMP. So I do not think tunnel is being used at all.
Explicitly adding a wireless interface to a bridge, without naming that interface uniquely in /etc/config/wireless and creating it in /etc/config/network may not work as expected. Typically one specifies the bridge in /etc/config/networkwithout the wireless component(s), then refers to that interface in /etc/config/wireless.
config zone
option name lan
list network 'lan'
option input ACCEPT
option output ACCEPT
option forward ACCEPT
route:
root@OpenWrt:/etc/config# ip route show
default via 192.168.231.254 dev eth0.2 proto static src 192.168.230.25
192.168.1.0/24 dev br-lan proto kernel scope link src 192.168.1.1
192.168.230.0/23 dev eth0.2 proto kernel scope link src 192.168.230.25
My end goal is to send IoT device's traffic through tunnel. I am able to assign devices to different VLANs with help of Radius server. But again, I am not able to forward that traffic through gretap tunnel. That is why, I am trying to test above mentioned simple configuration.
Can you please let me know what configuration changes I should do so that traffic from wlan1 will use gretap tunnel.
All Traffic Tunnel
Clients (Wlan1) <-----------------> Router 1<------------------------------------------------------>IoT server
192.168.3.1 192.168.230.25 (traffic sourced wlan1 uses tunnel) 192.168.230.91
So there is an IoT server as mentioned above, which can be reached without tunnel via underlined network. I need all traffic sourced from wlan1 to use Tunnel route. Traffic sourced other than wlan1, should not use tunnel.
I tried using GRE layer 3 tunnel, but I could define route based on destination (like if traffic is meant for x.x.x.x then use dev gre route) and that works fine. But I could not create any route based on it's source (like if traffic source is wlan1, then use gre tunnel route).
So I turned to gretap (layer 2 tunnel) as we can bridge interface with gretap interface and can use tunnel to send traffic. But again, I am missing something or may be not understanding the clear picture at all.
Thanks arjuniet. I do not have my setup with me now. But I will try the same tomorrow. If you can let me know your config meanwhile, that will be great.
So it's not clear to me why you want to layer 2 tunnel. A layer 2 tunnel extends a broadcast network, so it's useful if you're sending multicast stream or other lan protocols to multiple devices. But it seems you are just sending packets to a single device, I don't get the use case. Why not just route?