Comments (6)
I have not seen this... Will try to reproduce later today.
Can you please give exact commands to create the DNS records?
from routeros-scripts.
BTW... I did not test my scripts with RouterOS 7.x at all... Possibly they broke arithmetics with IPv6 addresses? I will check.
from routeros-scripts.
Re-tested with 6.48.2 and got same result. And figured it out. This one doesn't get prefix, but IPv6-address of interface:
:local Prefix [ / ipv6 address get [ find where interface=($Comment->"interface") from-pool=$Pool global ] address ];
If interface's address is smth else than :: then it's OR-ed to the static address. I had ::1, which explains +1:
Let's test:
/ipv6 address add address=::100 from-pool=isp interface=bridge
/ip dns static add address=::2 comment="isp-pool-isp, interface=bridge" name=test.test ttl=15m;
/ipv6 dhcp-client disable ether1
/ipv6 dhcp-client enable ether1
With added logging:
:log info ($Prefix);
:set Prefix [ :toip6 [ :pick $Prefix 0 [ :find $Prefix "/64" ] ] ];
:log info ($Prefix);
:log info ("Address is: ". ($RecordVal->"address"));
:local Address ($Prefix | ([ :toip6 ($RecordVal->"address") ] & ::ffff:ffff:ffff:ffff));
:log info ("Updating DNS record for " . ($RecordVal->"name") . ($RecordVal->"regexp") . " to " . $Address);
Creates output:
21:53:29 system,info static dns entry added by admin
21:53:34 system,info DHCPv6 client on ether1 changed by admin
21:53:36 system,info DHCPv6 client on ether1 changed by admin
21:53:37 script,info Updating IPv6 address list with new IPv6 prefix 2001:7d0:87c6:7b00::/56
21:53:37 system,info address list entry changed by admin
21:53:39 script,info 2001:7d0:87c6:7b00::100/64
21:53:39 script,info 2001:7d0:87c6:7b00::100
21:53:39 script,info Address is: ::2
21:53:39 script,info Updating DNS record for test.test to 2001:7d0:87c6:7b00::102
from routeros-scripts.
Ah, got it... Can you please test?
/ system script set comment="url-suffix=\?h=next" ipv6-update
$ScriptInstallUpdate
Also fix the address in dns record, then disable and re-enable.
from routeros-scripts.
Already merged to main
branch... Please complain if your issue remains.
... and leave a star if you have not.
from routeros-scripts.
Thanks, works now as expected!
from routeros-scripts.
Related Issues (20)
- Dhcp2dns HOT 10
- Script syntax broken. not compatible with ROS v6.49.7 HOT 1
- Feature Request: dhcp-to-dns - use Access List comment and/or ignore if already in DNS HOT 10
- Feature Request: dhcp-to-dns - use domain from networks HOT 3
- SendTelegram can't be called inside the script HOT 3
- Manage system update - schedule reboot at night no longer working HOT 8
- dhcp-to-dns crashes with IP pool instead of address HOT 5
- DNS records for Openvpn pears HOT 3
- Allow to customize certificate name HOT 11
- DHCP-to-DNS script IPv6 support HOT 5
- DHCP-to-DNS script does not differentiate same MAC addresses on different network domains HOT 4
- 64k limit problem for "tool fetch url" HOT 1
- $ScriptInstallUpdate: Policies differ for script 'global-functions' and its scheduler 'global-scripts'! HOT 1
- netwatch + sendNotification HOT 2
- Add html support to notification telegram HOT 1
- log-forwarding: non expected messages are still forwarded HOT 2
- check-routeros-update and other similar scripts suggested scheduler time HOT 12
- ADD username/password auth for ntfy HOT 7
- Failed Telegram Notification HOT 9
- notification doesn't stat from netwatch HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from routeros-scripts.