TRB500 with IPv6 Prefix not working

Hello all,

I have a TRB500 in use here and use it as a pure gateway in passthrough behind a Microtik router board.

The DHCP client over IPv4 works great and I get the IP from the provider … In my case a 4G/5G from Vodafone DE.

Now I have set up the IPv6 support, but I only get the public IPv6 (2a00:20:…).

As prefix I get only a ULA Ipv6 (fd38:xxxx:xxxx:x::/62).

How can I set it on the TRB500 to get a public prefix from the provider to the Mikrotik?

With my DSL line it works with the DHCP client on the Mikrotik router without problems, but the TRB500 passes only a ULA IPv6 through.

Hello,

Do you have IPv6 DHCP server configured on the LAN interface?

Kind Regards,

Yes … i have test a many Options, but the result is not good
Only a ULA Prefix come to my Routerboard.

Do I need the bridge mode for this or should this also work in passthrough mode?

Currently I am in passthrough mode

Hi, IPv6 is a bit different in comparison to IPv4. If you want to delegate a specific prefix to your Mikrotik via Teltonika then you’ll have to ensure that your ISP actually delegates a bigger than /64 subnet (/60, /56, /52 etc.). If your ISP provides only /64 subnet for you then you should try to stick with a relay configuration.

Simplest things first - on Teltonika’s LAN interface, try to set RA and DHCPv6 modes to Relay mode instead of Server mode. This should relay the delegation that you receive on your TRB500 [from ISP] downstream towards LAN (looking from TRB500 perspective).

If this doesn’t work, can you post output of these command here (please make sure to remove sensitive info, but try to leave all prefixes visible):
ifstatus mob1s1a1_6
ifstatus lan
ifconfig -a

In case you’re interested in IPv6 details, this documentation should be quite useful if you want to mess with IPv6 beyond what’s available via GUI:

It works for a /64 subnet (on a RUTX50 and RUTX11) IPv6 addresses (not ULA) are distributed to the LAN devices.

Thx for your Feedback … The Real Mode is not working … My DHCP Client still in mode “searching”

Here the Output

root@Teltonika-TRB500:~# ifstatus mob1s1a1_6
{
	"up": true,
	"pending": false,
	"available": true,
	"autostart": true,
	"dynamic": true,
	"uptime": 8206,
	"l3_device": "rmnet_data0",
	"proto": "static",
	"device": "rmnet_data0",
	"updated": [
		"data"
	],
	"metric": 2,
	"dns_metric": 0,
	"delegation": true,
	"ipv4-address": [
		
	],
	"ipv6-address": [
		{
			"address": "2a00:xx:xxxx:xxxx:xxxx:xxxx:xxxx:xxx",
			"mask": 64
		}
	],
	"ipv6-prefix": [
		{
			"address": "2a00:xx:xxxx:xxxx::",
			"mask": 64,
			"class": "mob1s1a1_6",
			"assigned": {
				"lan": {
					"address": "2a00:xx:xxxx:xxxx::",
					"mask": 64
				}
			}
		}
	],
	"ipv6-prefix-assignment": [
		
	],
	"route": [
		{
			"target": "::",
			"mask": 0,
			"nexthop": "2a00:xx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx",
			"source": "::/0"
		}
	],
	"dns-server": [
		"2a01:860:0:300::53",
		"2a01:860:0:300::153"
	],
	"dns-search": [
		
	],
	"neighbors": [
		
	],
	"inactive": {
		"ipv4-address": [
			
		],
		"ipv6-address": [
			
		],
		"route": [
			
		],
		"dns-server": [
			
		],
		"dns-search": [
			
		],
		"neighbors": [
			
		]
	},
	"data": {
		"modem": "3-1",
		"sim": "1",
		"zone": "wan"
	}
}
root@Teltonika-TRB500:~# ifstatus lan
{
	"up": true,
	"pending": false,
	"available": true,
	"autostart": true,
	"dynamic": false,
	"uptime": 9188,
	"l3_device": "br-lan",
	"proto": "static",
	"device": "br-lan",
	"updated": [
		"addresses"
	],
	"metric": 1,
	"dns_metric": 0,
	"delegation": true,
	"ipv4-address": [
		{
			"address": "192.168.2.1",
			"mask": 24
		}
	],
	"ipv6-address": [
		
	],
	"ipv6-prefix": [
		
	],
	"ipv6-prefix-assignment": [
		{
			"address": "2a00:xx:xxxx:xxxx::",
			"mask": 64,
			"local-address": {
				"address": "2a00:xx:xxxx:xxxx::1",
				"mask": 64
			}
		},
		{
			"address": "fd38:xxxx:xxxx::",
			"mask": 64,
			"local-address": {
				"address": "fd38:xxxx:xxxx::1",
				"mask": 64
			}
		}
	],
	"route": [
		
	],
	"dns-server": [
		
	],
	"dns-search": [
		
	],
	"neighbors": [
		
	],
	"inactive": {
		"ipv4-address": [
			
		],
		"ipv6-address": [
			
		],
		"route": [
			
		],
		"dns-server": [
			
		],
		"dns-search": [
			
		],
		"neighbors": [
			
		]
	},
	"data": {
		
	}
}
ifconfig -a
br-lan    Link encap:Ethernet  HWaddr 00:1E:42:63:23:76  
          inet addr:100.xx.xxx.xxx  Bcast:255.255.255.255  Mask:255.255.255.255
          inet6 addr: fd38:xxxx:xxxx::1/60 Scope:Global
          inet6 addr: 2a00:xx:xxxx:xxxx::1/64 Scope:Global
          inet6 addr: fe80::xxx:xxxx:xxxx:xxxx/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1921260 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2175047 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:1430641864 (1.3 GiB)  TX bytes:1952256829 (1.8 GiB)

ecm0      Link encap:Ethernet  HWaddr 00:1E:42:63:23:77  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

erspan0   Link encap:Ethernet  HWaddr 00:00:00:00:00:00  
          BROADCAST MULTICAST  MTU:1450  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

eth0      Link encap:Ethernet  HWaddr 00:1E:42:63:23:76  
          inet addr:169.xxx.x.x  Bcast:169.xxx.xxx.xxx  Mask:255.255.0.0
          inet6 addr: fe80::21e:42ff:fe63:2376/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1921278 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2175020 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:1431183122 (1.3 GiB)  TX bytes:1952254361 (1.8 GiB)
          Interrupt:41 

gre0      Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  
          NOARP  MTU:1476  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

gretap0   Link encap:Ethernet  HWaddr 00:00:00:00:00:00  
          BROADCAST MULTICAST  MTU:1462  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

ip6gre0   Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  
          NOARP  MTU:1448  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

ip6tnl0   Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  
          NOARP  MTU:1452  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:583 errors:0 dropped:0 overruns:0 frame:0
          TX packets:583 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:49514 (48.3 KiB)  TX bytes:49514 (48.3 KiB)

rmnet_data0 Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  
          inet6 addr: fe80::xxxx:xxxx:xxxx:xxxx/64 Scope:Link
          inet6 addr: 2a00:xx:xxxx:xxxx:xxxx:xxxx:xxxx:xxx/64 Scope:Global
          UP RUNNING  MTU:1500  Metric:1
          RX packets:2024116 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1767011 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:1867056053 (1.7 GiB)  TX bytes:1415818313 (1.3 GiB)

rmnet_data1 Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  
          [NO FLAGS]  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

rmnet_data2 Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  
          [NO FLAGS]  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

rmnet_data3 Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  
          [NO FLAGS]  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

rmnet_data4 Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  
          [NO FLAGS]  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

rmnet_data5 Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  
          [NO FLAGS]  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

rmnet_ipa0 Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  
          inet6 addr: fe80::xxxx:xxxx:xxxx:xxxx/64 Scope:Link
          UP RUNNING  MTU:9216  Metric:1
          RX packets:679453 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1767011 errors:0 dropped:35 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:1883248981 (1.7 GiB)  TX bytes:1429954401 (1.3 GiB)

sit0      Link encap:IPv6-in-IPv4  
          NOARP  MTU:1480  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

tunl0     Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  
          NOARP  MTU:1480  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

Yes the IP is ok, but not a Prefix Delegation for a Router. The TRB500 is only the Gateway

Do you have any idea what’s going wrong here?
My load balancing is not ok under IPv6 due to this ULA prefix.

Under IPv4 I have no problems… However, some devices in my homelab prefer to work with IPv6 and I would like to get a clean load balancing here as well.

Over my DSL line I get a clean public prefix, which I can then distribute over the Mikrotik router to the clients.

Unfortunately this does not work from the TRB500… Is this possible with a 64 prefix from Vodafone DE?

This is a bit of a longshot but try to add the following entries in /etc/config/dhcp file:

config dhcp mob1s1a1_6
    option dhcpv6 relay
    option ra relay
    option ndp relay
    option master 1
    option interface mob1s1a1_6

Once done, restart the dnsmasq service using this command:
/etc/init.d/dnsmasq restart

This should make your mobile interface to be able to relay an IPv6 address downstream. Might not work, but it’s worth a shot. You can do that using vi text editor using CLI. Here’s a link instructing how to use vim at a basic level, in case it’s needed:
https://wiki.teltonika-networks.com/view/Shell_Commands

Unfortunately no change… The Ula prefix is still assigned.
But now only if I set DHCPv6 to server mode on the LAN interface.

Hybrid and relay send now nothing more

root@Teltonika-TRB500:~# cat /etc/config/dhcp

config dnsmasq
	option domainneeded '1'
	option boguspriv '1'
	option filterwin2k '0'
	option localise_queries '1'
	option rebind_protection '1'
	option rebind_localhost '1'
	option local '/lan/'
	option domain 'lan'
	option expandhosts '1'
	option nonegcache '0'
	option authoritative '1'
	option readethers '1'
	option leasefile '/tmp/dhcp.leases'
	option nonwildcard '1'
	option ednspacket_max '1232'
	option dhcpscript '/usr/sbin/dhcpinfo.sh'

config dhcp 'lan'
	option interface 'lan'
	option start '100'
	option limit '150'
	option leasetime '12h'
	option relay_enabled '0'
	option force '1'
	option dhcpv6 'server'
	option ra_management '1'
	option ra 'relay'

config dhcp 'wan'
	option interface 'wan'
	option ignore '1'

config dhcp 'mob1s1a1_6'
	option dhcpv6 'relay'
	option ra 'relay'
	option ndp 'relay'
	option master '1'
	option interface 'mob1s1a1_6'

Random thought but could you plug in end-machine (Windows/Linux/macOS based) directly into TRB500 and see if you’re receiving a public IPv6 address on it? It’s rather strange that IPv6 prefix is not being relayed downstream to other interfaces - that should definitely not be the case with this configuration.

Another thing - can you try to ping some IPv6 address directly from TRB500, without resolving hostname? See if you can reach, for example, Google IPv6 DNS servers:
2001:4860:4860::8888
2001:4860:4860::8844

I get assigned a public IP with the following setting…

root@Teltonika-TRB500:~# cat /etc/config/dhcp

config dnsmasq
	option domainneeded '1'
	option boguspriv '1'
	option filterwin2k '0'
	option localise_queries '1'
	option rebind_protection '1'
	option rebind_localhost '1'
	option local '/lan/'
	option domain 'lan'
	option expandhosts '1'
	option nonegcache '0'
	option authoritative '1'
	option readethers '1'
	option leasefile '/tmp/dhcp.leases'
	option nonwildcard '1'
	option ednspacket_max '1232'
	option dhcpscript '/usr/sbin/dhcpinfo.sh'

config dhcp 'lan'
	option interface 'lan'
	option start '100'
	option limit '150'
	option leasetime '12h'
	option relay_enabled '0'
	option force '1'
	option dhcpv6 'server'
	option ra_management '1'
	option ra 'server'
	option ra_default '0'

config dhcp 'wan'
	option interface 'wan'
	option ignore '1'

config dhcp 'mob1s1a1_6'
	option dhcpv6 'relay'
	option ra 'relay'
	option ndp 'relay'
	option master '1'
	option interface 'mob1s1a1_6'

Only further I do not get the public prefix but only ULA assigned. Can this have something to do with NAT66? Is this possibly active on the TRB500?
According to the OpenWRT documentation it seems to be.

My routerboard gets a public IP, the LAN interface on the TRB500 also gets a public IP.

I just don’t want to have to route IPv6 somehow, which currently happens with the ULA prefix.

Ping from TRB500 is OK

root@Teltonika-TRB500:~# ping 2001:4860:4860::8888
PING 2001:4860:4860::8888 (2001:4860:4860::8888): 56 data bytes
64 bytes from 2001:4860:4860::8888: seq=0 ttl=114 time=69.530 ms
64 bytes from 2001:4860:4860::8888: seq=1 ttl=114 time=31.421 ms
64 bytes from 2001:4860:4860::8888: seq=2 ttl=114 time=28.360 ms
64 bytes from 2001:4860:4860::8888: seq=3 ttl=114 time=29.087 ms

Currently the gateway is running in brigde mode.
Does it matter at this point whether bridge or passthrough?

If you want to use purely a mobile bridge device, without any firewalling or DHCP services inbetween then I’d advise to use bridge mode on TRB. One thing to note - bridge mode will NOT provide any type of addressing for other devices connected to the TRB and you will need a static IP address to reach it.

Consider bridge mode as a layer 2 concept (OSI model) and passthrough as layer 3. I do not recommend using it if your devices are in a remote location, simply because you might lose management of TRB.

I now have the bridge mode off again. that was for testing.

Unfortunately I haven’t gotten any further.

I can’t get a prefix to the Mikrotik router. do you have any ideas what i could try?

I don’t understand why the relay doesn’t work on the TRB500.
I’ve been reading a lot about Openwrt in connection with relay and IPv6 prefix these days and also found some instructions, but the prefix is ​​simply not passed to Mikrotik.

I can transfer an IPv6 address, but not the prefix.

From my PPPoe connection from the DSL modem there are absolutely no problems.

Does anyone have any ideas as to what the TRB might not correspond to the OpenWRT standard and I can still try?

Does anyone else have ideas?
I can’t get a relay to work on the TRB500.

All the instructions I have read so far have brought nothing

I am having the same problem as @simatec.

In passthrough mode, setting DHCPv6 and RA to relay does not pass IPv6 addresses downstream (server mode does).