Feature request: convert decimal to hexadecimal format
Posted: Fri Jun 25, 2010 12:21 am
http://wiki.mikrotik.com/wiki/Manual:IP ... 29_tunnels
Link above describe howto set up an 6to4 relay on ROS but one thing is missing:
Link above describe howto set up an 6to4 relay on ROS but one thing is missing:
It would be nice if I can do this in ROS scripting as converting decimal number to hexadecimal format is missing from ROS scripting at the moment.Now you need to add a IPv6 address to the tunnel interface. The address should be in form "2002 + <IPv4 address in hex> + <custom id>" . A bash script can be used to generate such IPv6 address for you:Code: Select allatis@atis-desktop:~$ ipv4="1.2.3.4"; id="1"; printf "2002:%02x%02x:%02x%02x::$id\n" `echo $ipv4 | tr "." " "` 2002:0102:0304::1