Network IP Issue

Hello to Everyone.. So today, in some configurations on ROSv7 i thinked about configure ROS with the Network IP, and i’m suprised because the clients of the router is navigated when the router has the network IP… So… I think this cannot happen, because thw network IP is reserverd like broadcast IP, but when i put Broadcast IP in interface, of course, doesn’t have navegation… I used simples configurations on ROSv7.20.4, and tried also in ROS7.19.4… I tested on EVE and in physical router (1100AHx4 Dude Edition). Here the cofigurations bellow:

/interface ethernet
set [ find default-name=ether5 ] disable-running-check=no name=ether10

/ip pool
add name=dhcp_pool0 ranges=10.10.0.1-10.10.0.254

/ip dhcp-server
add address-pool=dhcp_pool0 interface=ether2 name=dhcp1

/port
set 0 name=serial0

/ip address
add address=10.10.0.0/24 interface=ether2 network=10.10.0.0

/ip dhcp-client
add default-route-tables=main interface=ether1

/ip dhcp-server network
add address=10.10.0.0/24 gateway=10.10.0.0

/ip firewall nat
add action=masquerade chain=srcnat out-interface=ether1

I think this cannot happen, but i just want some opinions about that…

Just adding the screenshot in the client:

10.10.0.0 and 10.10.0.255 are IP addresses like any other...
but if they're used BY CONVENTION on a network for other purposes, that's another story...

Have you ever tested whether 192.168.9.255 or 192.168.10.0 work normally on a 192.168.0.0/16 network?

You'll find that some things work, others don't.
Those things that assume on software that .0 or .255 have special purposes won't work, while the others work...

this can't work. this is the network address. not allowed as IP address. But I do not understand what your issue actually is or what you try to achieve by this experiment. I also do not understand what "navegation" means in the context.

I know it sounds weird, but on RouterOS works... (ignoring all the consequences)

Yes, i know that, what i mean is: this cannot happen because is reserved IPs, but ok… And… Yes, i know about subnetting, like in a /23 have 512 possible ips, and .0 and 255 can be used, but what i want to say is like you said: it weird, and for some beginners this may be confusing and issues can appear in some nets

So… One last thing… When i say “navigation”, i mean to say: access internet, resolve names, and all that… I’m sorry for that, force of habit…

I know that… I know this is network ip… And is exactly what i want to say… This cannot work, but its working

I think that the convention is that the first and last address in a subnet (netmask or CIDR) are respectively the network and the broadcast.
I.e. 192.168.1.50/28 is:

IP Address: 192.168.1.50
Network Address: 192.168.1.48
--- ---
Usable Host IP Range: 192.168.1.49 - 192.168.1.62
Broadcast Address: 192.168.1.63
Total Number of Hosts: 16
Number of Usable Hosts: 14

The moment you change it to a /24 it becomes:

IP Address: 192.168.1.50
Network Address: 192.168.1.0
Usable Host IP Range: 192.168.1.1 - 192.168.1.254
Broadcast Address: 192.168.1.255
Total Number of Hosts: 256
Number of Usable Hosts: 254

Using the network address as a normal assigned IP - which Mikrotik RoS allows - is likely to create a number of issues, not entirely unlike using VLAN1, RoS allows it, but then a lot of things may go haywire.

Yes, it’s exactly what i want to bring here… This ip what i used is of network, but is possible to use.. And, of course, it will bring problem to work, but i think it is wrong to allow that… And, of course, open a forum about that maybe can bring some opinions about that, i just want to read about opinions

Why not?

I just wrote it to you, it's just a convention not to use it.

If your provider give you 8 IPs, for example 203.0.113.16/28
following your reasoning you do not use first and last???
So, 203.0.113.16 and 203.0.113.31 are lost...

It is precisely because of this foolish way of thinking that millions of IPv4 addresses are wasted for nothing...

1 Like

And if you use, for example, a /22???...


This "convention" is only valid for end-user networks.
Otherwise, /"anything" are just IP numbers...

Why should RouterOS make a difference if it's 203.0.113.0/24 or 192.168.0.0/24???

They're just IPs...

So I can perfectly use 203.0.113.0 or 203.0.113.255 as public IPs and browse there, and the ENTIRE world complies.

If some stupid programmers have put .0 and .255 on some devices to always be reserved IPs, regardless of the purpose, well, I can't fix them...

The convention as I wrongly understood it is the that 192.168.1.1 is used to identify the host interface (aka gateway) itself, and the rest of the IPs for users/devices.

Then my small world was crushed when I saw people using 192.168.254 for the same purpose.
Then again when some used odd numbers like 192.168.5./24 to identify the gateway or interface.

So anything is possible, but using 192.168.1.0 which is clearly stated as a network address..........
MT is flexible, and is dangerous for people like me that dont fully understand networking or RoS :slight_smile:

I will take rextendeds word for it that 192.168.1.0 can be used for any device on a network, but I aint gonna do it.

@anav, some questions... for you...

What's the difference between 192.168.1.1/24 and 192.168.1.1/23?

And between 192.168.1.0/24 and 192.168.1.0/23?

And between 192.168.1.255/24 and 192.168.1.255/23?

Before you answer, think about it...

Indeed. see https://www.rfc-editor.org/rfc/rfc922#section-7

And here later on in this rfc it just says: SHOULD NOT. https://www.rfc-editor.org/rfc/rfc1812#section-4.2.3.1

On same:

o SHOULD NOT
This phrase means that there may exist valid reasons in particular
circumstances when the described behavior is acceptable or even
useful
. Even so, the full implications should be understood and
the case carefully weighed before implementing any behavior
described with this label.

How should RouterOS distinguish 203.0.113.0/24 or 192.168.0.0/24???

How RouterOS is supposed to know if I'm just routing, or creating a network/broadcast LAN?
It just depends on how I configure everything else...

RFC943 and later RFC950 (both dated 1985) say:

Special Addresses:

         From the Assigned Numbers memo [9]:

            "In certain contexts, it is useful to have fixed addresses
            with functional significance rather than as identifiers of
            specific hosts.  When such usage is called for, the address
            zero is to be interpreted as meaning "this", as in "this
            network".  The address of all ones are to be interpreted as
            meaning "all", as in "all hosts".  For example, the address
            128.9.255.255 could be interpreted as meaning all hosts on
            the network 128.9.  Or, the address 0.0.0.37 could be
            interpreted as meaning host 37 on this network."

         It is useful to preserve and extend the interpretation of these
         special addresses in subnetted networks.  This means the values
         of all zeros and all ones in the subnet field should not be
         assigned to actual (physical) subnets.

            In the example above, the 6-bit wide subnet field may have
            any value except 0 and 63.


         Please note that there is no effect or new restriction on the
         addresses of hosts on non-subnetted networks.

The issue is the "in certain contexts" that has been largely interpreted as "everywhere", by many programmers.

Is again the same:

How should RouterOS distinguish 203.0.113.0/24 or 192.168.0.0/24???

How RouterOS is supposed to know if I'm just routing, or creating a network/broadcast LAN?
It just depends on how I configure everything else...

Just because 192.168.x.x are familiar for LAN not mean that are just numbers like 193.112.x.x

RouterOS does what it's supposed to do,
if it prevented me from putting 203.0.113.0/24 as the IP on the interface, it would break the routing in favor of a subnetting that I'm not doing...

HI there, my brain already hurts, but in my humble opinion there is no differenc! By the way I implemented the netwatch script method of failure over to pi from adguard and the OP is extremely happy because it meant no change to his current setup other then the few additions. Your technique although sexier, would have meant whole sale changes to his current setup and that was not in the cards....

Don't worry, I just wanted to make it clear that, without more details,
distinguishing some IP blocks from a subnet is not easy...

Again, we have some differences between routed prefixes and a common network using a prefix in your interface.

It’s very different when we do this:

[admin@MikroTik] > ip add print
Flags: D - DYNAMIC
Columns: ADDRESS, NETWORK, INTERFACE

ADDRESS NETWORK INTERFACE

0 172.16.0.0/24 172.16.0.0 ether2-pc
1 D 192.168.11.229/24 192.168.11.0 ether1-link
[admin@MikroTik] > ip ro print
Flags: D - DYNAMIC; A - ACTIVE; c - CONNECT, d - DHCP
Columns: DST-ADDRESS, GATEWAY, ROUTING-TABLE, DISTANCE
DST-ADDRESS GATEWAY ROUTING-TABLE DISTANCE
DAd 0.0.0.0/0 192.168.11.1 main 1
DAc 172.16.0.0/24 ether2-pc main 0
DAc 192.168.11.0/24 ether1-link main 0
[admin@MikroTik] >

between this:

[admin@MikroTik] > ip add print
Columns: ADDRESS, NETWORK, INTERFACE

ADDRESS NETWORK INTERFACE

0 172.16.0.0/31 172.16.0.0 ether2-pc
[admin@MikroTik] > ip ro print
Flags: D - DYNAMIC; A - ACTIVE; c - CONNECT, s - STATIC
Columns: DST-ADDRESS, GATEWAY, ROUTING-TABLE, DISTANCE

DST-ADDRESS GATEWAY ROUTING-TABLE DISTANCE

DAc 172.16.0.0/31 ether2-pc main 0
;;; ROUTED PREFIX
0 As 200.0.0.0/24 172.16.0.1 main 1
[admin@MikroTik] >