Changes

819 bytes added ,  11:31, 12 April 2023
no edit summary
Line 3: Line 3:  
==Introduction==
 
==Introduction==
 
This article contains instructions on how to do UCI-based configuration for setting up RelayD with IPv4+IPv6 support.
 
This article contains instructions on how to do UCI-based configuration for setting up RelayD with IPv4+IPv6 support.
   
==Tunnelbroker configuration==
 
==Tunnelbroker configuration==
[http://tunnelbroker.net Tunnelbroker.net] is a website operated by Hurricane Electric, a leading provider of internet services and networking solutions. The website provides a service called Hurricane Electric IPv6 Tunnel Broker, which allows users to create an IPv6 tunnel between their network and Hurricane Electric's network. This allows users to connect their devices to the internet using the IPv6 protocol, even if their internet service provider (ISP) does not support IPv6.
+
Tunnelbroker is a website operated by Hurricane Electric, a leading provider of internet services and networking solutions. The website provides a service called Hurricane Electric IPv6 Tunnel Broker, which allows users to create an IPv6 tunnel between their network and Hurricane Electric's network. This allows users to connect their devices to the internet using the IPv6 protocol, even if their internet service provider (ISP) does not support IPv6.
===Login===
+
====Login====
 
----
 
----
 
Go to [http://tunnelbroker.net tunnelbroker.net] and log into your account. If you don't have a registered account then you will need to create one - click '''register'''.
 
Go to [http://tunnelbroker.net tunnelbroker.net] and log into your account. If you don't have a registered account then you will need to create one - click '''register'''.
[[File:Tunnelbroker login.png|border|center|class=tlt-border|1004x1004px]]
+
[[File:Tunnelbroker login v2.png|border|center|class=tlt-border|1022 × 385px]]
   −
===IPv6 to IPv4 tunnel setup===
+
====IPv6 to IPv4 tunnel creation====
Setup IPv6 over IPv4, also known as 6in4 IPv6 transition mechanism
   
----
 
----
 +
Setup IPv6 over IPv4, also known as 6in4 IPv6 transition mechanism. To create a new tunnel:
 +
# Click on '''create regular tunnel''',
 +
# '''Enter''' your '''public IP''' (it will light up green, if the tunnel can be created with this IP),
 +
# '''Select''' the desired '''tunnel server''',
   −
To create a new tunnel, click on '''create regular tunnel''' ('''1'''), then '''enter''' your '''public IP''' (it will light up green, if the tunnel can be created with this IP) ('''2'''), '''select''' the desired '''tunnel server''' ('''3''') and '''create tunnel''' ('''4''').
+
To establish the tunnel, at the bottom of the page, you should see '''Create tunnel'''.
   −
[[File:Create IPv6 Tunnel.png|border|center|class=tlt-border|854x854px]]
+
[[File:Create IPv6 Tunnel v2.png|border|center|class=tlt-border|844 × 688px]]
    
After successful tunnel creation, you will be prompt to tunnel details window.
 
After successful tunnel creation, you will be prompt to tunnel details window.
   −
[[File:IPv6 Tunnel created.png|border|center|class=tlt-border|454x454px]]
+
[[File:IPv6 Tunnel created v2.png|border|center|class=tlt-border|663 × 638px]]
 +
 
 +
To create a a tunnel instance on your RUT router, navigate to '''example configurations''', there, select '''OpenWRT Barrier Breaker'''.
 +
and paste the following '''commands''' '''into''' your '''router CLI'''.
   −
To create a a tunnel instance on your RUT router, '''navigate''' to '''example configurations''' ('''1''') and select '''OpenWRT Barrier Breaker''' ('''2'''). Copy and paste the following commands into your RUT CLI. Do not forget to '''replace''' '''YOUR_TUNNELBORKER_USERNAME''' and '''YOUR_TUNNELBROKER_PASSWORD''' with your '''TunnelBroker account username''' and '''password'''.
+
[[File:Tunnel interface v2.png|border|center|class=tlt-border|661 × 641px]]
   −
[[File:Tunnel interface.png|border|center|class=tlt-border|554x554px]]
+
'''Note''': Do not forget to '''replace''' '''YOUR_TUNNELBORKER_USERNAME''' and '''YOUR_TUNNELBROKER_PASSWORD''' with your '''TunnelBroker account username''' and '''password'''.
   −
In the RUT1 CLI you can see that the new interface has been successfully created.
     −
[[File:Tunnel RUT interface created.png|border|center|class=tlt-border|524x524px]]
+
Use the  <code><span class="highlight" >'''cat /etc/config/network'''</span></code> command in routers CLI to see if the new interface was successfully created.
   −
==Relayd configuration==
+
[[File:Tunnel RUT interface created v2.png|border|center|class=tlt-border|507 × 169px]]
 +
==Router configuration==
 +
===Relayd and interface configuration using UCI===
 +
----
 
Relay is a daemon (computer program that runs as a background process) used to relay and dynamically redirect incoming connections to a target host. Its main purpose in RUTxxx routers is to extend the wireless network. For example, when RUTxxx is in STA Wireless Station mode, it can be used to bridge WAN and LAN interfaces to create a larger Wireless network.
 
Relay is a daemon (computer program that runs as a background process) used to relay and dynamically redirect incoming connections to a target host. Its main purpose in RUTxxx routers is to extend the wireless network. For example, when RUTxxx is in STA Wireless Station mode, it can be used to bridge WAN and LAN interfaces to create a larger Wireless network.
   −
This article provides an extensive configuration example of a basic Relay usage scenario with two RUTxxx devices.
+
[[UCI_command_usage|Unified Configuration Interface (UCI)]] is a small utility written in C (a shell script-wrapper is available as well) and is intended to centralize the whole configuration of a device running on OpenWrt.
===Relayd installation===
+
====Relayd installation====
 
----
 
----
 
Install relayd package if needed, skip this step on RUTX series devices or if you already installed it on your router
 
Install relayd package if needed, skip this step on RUTX series devices or if you already installed it on your router
Line 41: Line 48:  
opkg install relayd</pre>
 
opkg install relayd</pre>
   −
===WiFi client configuration===
+
====WiFi client configuration====
 
----
 
----
 
Add WiFi interface to make your router act as a WiFi client (connect to another AP)
 
Add WiFi interface to make your router act as a WiFi client (connect to another AP)
Line 73: Line 80:  
uci set wireless.@wifi-iface[-1].wifi_id='wifi1'</pre>
 
uci set wireless.@wifi-iface[-1].wifi_id='wifi1'</pre>
   −
===IPv4 interface creation===
+
====IPv4 interface creation====
 
----
 
----
 
Create a new interface IPv4 for WiFi WAN.
 
Create a new interface IPv4 for WiFi WAN.
Line 108: Line 115:  
uci add_list mwan3.balance_default.use_member='wifi_wan_member_balance'</pre>
 
uci add_list mwan3.balance_default.use_member='wifi_wan_member_balance'</pre>
   −
===IPv6 interface creation===
+
====IPv6 interface creation====
 
----
 
----
 
Create a new IPv6 interface for WiFi WAN
 
Create a new IPv6 interface for WiFi WAN
Line 149: Line 156:  
uci set mwan3.default_rule_ipv6.family='ipv6'</pre>
 
uci set mwan3.default_rule_ipv6.family='ipv6'</pre>
   −
===LAN interface configuration===
+
====LAN interface configuration====
 
----
 
----
 
Configure a LAN interface accordingly.
 
Configure a LAN interface accordingly.
Line 171: Line 178:  
uci set dhcp.wifi_wan.ndp='relay'</pre>
 
uci set dhcp.wifi_wan.ndp='relay'</pre>
   −
===Firewall configuration===
+
====Firewall configuration====
 
----
 
----
 
Set firewall zone, using WAN firewall zone for newly created WiFi WAN network interface.
 
Set firewall zone, using WAN firewall zone for newly created WiFi WAN network interface.
 
<pre>uci set firewall.@zone[1].network='wan wan6 mob1s1a1 mob1s2a1 wifi_wan'</pre>
 
<pre>uci set firewall.@zone[1].network='wan wan6 mob1s1a1 mob1s2a1 wifi_wan'</pre>
   −
===Commit changes===
+
====Commit changes====
 
----
 
----
 
Save all the changes and restart the configuration
 
Save all the changes and restart the configuration
Line 185: Line 192:  
If you've taken all of the steps described above, the configuration is done. But as with any other configuration, it is always wise to test the set up in order to make sure that it works properly.
 
If you've taken all of the steps described above, the configuration is done. But as with any other configuration, it is always wise to test the set up in order to make sure that it works properly.
   −
[[File:Sujungta.png|border|center|class=tlt-border|1055x1055px]]
+
* Check what IP address are you getting on [https://whatismyipaddress.com What is my IP address] website.
 +
 
 +
[[File:WhatismyIP.png|border|center|class=tlt-border|1088 × 393px]]
 +
 
 +
* You can also check what IP address you are getting via command line interface.
 +
 
 +
[[File:IPV6 on PC.png|border|center|class=tlt-border|701 × 434px]]
 +
 
 +
[[File:Cmdoutput IPv6.png|border|center|class=tlt-border|634 × 244px]]
 +
 
 +
==See also==
 +
More information about [[RUTOS_relay_/_Wi-Fi_extender_/_repeater_/_bridge_configuration|RelayD]]
 +
==External links==
 +
More about [http://tunnelbroker.net TunnelBroker.net]