Community discussions

MikroTik App
 
jw1
just joined
Topic Author
Posts: 12
Joined: Thu Jul 14, 2016 8:49 pm

ipv6 strangeness

Tue Mar 05, 2019 7:58 pm

Working on an IPV6 test network. Assigned a 2001:db8::33/126 address to a running interface. A route is added for 2001:db8:30/126. Seems strange since my understanding is that it should be 32/126 and that 30/126 is not a valid network.
Assigned 2001:db8::29/126 to another running interface. Routing table only shows the first route - nothing is added for the 29 address.
Removed the 33 address from the first interface. Routing table now has a 28/126 route.
Assigned 2001:db8::31/126 to another running interface. Routing table now has a 28/126 route and a 30/126 route. Both addresses should be in the 28/126 subnet.
If I continue with my test network, OSPFv3 is happy to propagate these bogus networks to my other routers and my other routers are happy to install them as routes.
(All my test routers are on 6.44. Don't know what happens on previous versions.)
[admin@MikroTik] /ipv6> address add address=2001:0db8::33/126 interface=ether1 
[admin@MikroTik] /ipv6> route print 
Flags: X - disabled, A - active, D - dynamic, C - connect, S - static, r - rip, o - ospf, b - bgp, U - unreachable 
 #      DST-ADDRESS              GATEWAY                  DISTANCE
 0 ADC  2001:db8::30/126         ether1                          0
[admin@MikroTik] /ipv6> address add address=2001:0db8::29/126 interface=ether2    
[admin@MikroTik] /ipv6> route print                                            
Flags: X - disabled, A - active, D - dynamic, C - connect, S - static, r - rip, o - ospf, b - bgp, U - unreachable 
 #      DST-ADDRESS              GATEWAY                  DISTANCE
 0 ADC  2001:db8::30/126         ether1                          0
[admin@MikroTik] /ipv6> address print      
Flags: X - disabled, I - invalid, D - dynamic, G - global, L - link-local 
 #    ADDRESS                                     FROM-POOL INTERFACE                                                                                                                                                                                                                                          ADVERTISE 
 0 DL fe80::4e5e:cff:fe09:8103/64                           bridge1                                                                                                                                                                                                                                            no        
 1 DL fe80::4e5e:cff:fe09:8102/64                           ether1                                                                                                                                                                                                                                             no        
 2 DL fe80::4e5e:cff:fe09:8104/64                           ether3                                                                                                                                                                                                                                             no        
 3 DL fe80::4e5e:cff:fe09:8103/64                           ether2                                                                                                                                                                                                                                             no        
 4 DL fe80::4e5e:cff:fe09:8105/64                           ether4                                                                                                                                                                                                                                             no        
 5  G 2001:db8::33/126                                      ether1                                                                                                                                                                                                                                             no        
 6  G 2001:db8::29/126                                      ether2                                                                                                                                                                                                                                             no        
[admin@MikroTik] /ipv6> address remove 5 
[admin@MikroTik] /ipv6> route print 
Flags: X - disabled, A - active, D - dynamic, C - connect, S - static, r - rip, o - ospf, b - bgp, U - unreachable 
 #      DST-ADDRESS              GATEWAY                  DISTANCE
 0 ADC  2001:db8::28/126         ether2                          0
[admin@MikroTik] /ipv6>  
[admin@MikroTik] /ipv6> address add address=2001:db8::31/126 interface=ether3 
[admin@MikroTik] /ipv6> route print 
Flags: X - disabled, A - active, D - dynamic, C - connect, S - static, r - rip, o - ospf, b - bgp, U - unreachable 
 #      DST-ADDRESS              GATEWAY                  DISTANCE
 0 ADC  2001:db8::28/126         ether2                          0
 1 ADC  2001:db8::30/126         ether3                          0
 
jw1
just joined
Topic Author
Posts: 12
Joined: Thu Jul 14, 2016 8:49 pm

Re: ipv6 strangeness

Tue Mar 05, 2019 8:43 pm

I think i've figured out that it's just me still living in an IPV4 world and failing to think in hex
 
User avatar
jprietove
Trainer
Trainer
Posts: 212
Joined: Fri Jun 03, 2016 3:00 pm
Location: Cádiz, Spain
Contact:

Re: ipv6 strangeness

Tue Mar 05, 2019 8:46 pm

It is not strange, it is called hexadecimal:

In the address 2001:db8::33/126 I will look into the last '33'. As it is HEX, in Binary it is 00110011 The last two bits are not belonging to the prefix, so the prefix is 00110000

If I write it in HEX again it is 30, os the prefix is 2001:db8::30/126

There you have your "strangeness".

Who is online

Users browsing this forum: No registered users and 85 guests