Community discussions

MikroTik App
 
User avatar
SecCon
Member Candidate
Member Candidate
Topic Author
Posts: 156
Joined: Mon May 03, 2021 10:52 am

192.168.1.0 ?

Sun Jan 16, 2022 4:10 pm

By a coincidence doing some troubleshooting I noticed my tellie had the IP 192.168.1.0 in a DHCP range of 192.168.1.0/24 and the DHCP server being 192.168.1.1.
TV reported having network, but some things requiring Internet Access was not working. After assigning it a fixed IP address (192.168.1.40) the issues were gone.

Is it even possible to get a 192.168.1.0 address with that DHCP range?

/ip/dhcp-server> export
# jan/16/2022 15:06:40 by RouterOS 7.1.1
# software id = Y7E5-SEZ7
#
# model = RB1100x4
# serial number = D8580E4D7A72
/ip dhcp-server
add address-pool=dhcp interface=bridge1 name=dhcp1
/ip dhcp-server lease
add address=192.168.1.5 client-id=1:8:55:31:c1:67:57 mac-address=08:55:31:C1:67:57 server=dhcp1
add address=192.168.1.30 mac-address=58:9E:C6:19:81:1D server=dhcp1
add address=192.168.1.100 mac-address=10:BF:48:89:F3:3C server=dhcp1
add address=192.168.1.10 client-id=1:0:25:90:4b:6b:4b mac-address=00:25:90:4B:6B:4B server=dhcp1
add address=192.168.1.40 mac-address=18:16:C9:D0:8B:B2 server=dhcp1
/ip dhcp-server network
add address=0.0.0.0/24 gateway=0.0.0.0 netmask=24
add address=192.168.1.0/24 gateway=192.168.1.1 netmask=24
 
msatter
Forum Guru
Forum Guru
Posts: 2937
Joined: Tue Feb 18, 2014 12:56 am
Location: Netherlands / Nīderlande

Re: 192.168.1.0 ?

Sun Jan 16, 2022 4:38 pm

192.168.1.40 is range /32
192.168.1.0 is a range /24. You start at 1 counting till 255, zero is reserved for start of subnet and 255 is the broadcast address.
192.168.0.0 is range /16
192.0.0.0 is range /8
 
User avatar
woland
Member Candidate
Member Candidate
Posts: 298
Joined: Mon Aug 16, 2021 4:49 pm

Re: 192.168.1.0 ?

Sun Jan 16, 2022 4:54 pm

Hi,

I think you have a wrong pool definition, like this example:
/ip pool
add name=pool1 ranges=192.168.0.0/31
This would serve 192.168.0.0 and 192.168.0.1
So instead you would need some pool defined like this: (The name of your pool is confusing as it is just dhcp.)
/ip pool
add name=dhcp ranges=192.168.0.10-192.168.0.100

You dont show us the pool definition I can only see a pool named dhcp referenced:
/ip dhcp-server
add address-pool=dhcp interface=bridge1 name=dhcp1
BR

Woland
 
User avatar
anav
Forum Guru
Forum Guru
Posts: 21351
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Re: 192.168.1.0 ?

Sun Jan 16, 2022 4:58 pm

Tellie, perhaps you need a spot of tea whilst fixing it.
Are you looking for an argument,
This is not an argument
Yet it is, no it isnt, yes it is.
Look, arguing is not just taking a contrary position
Yes it is,, no it isnt,

Silly git.
 
msatter
Forum Guru
Forum Guru
Posts: 2937
Joined: Tue Feb 18, 2014 12:56 am
Location: Netherlands / Nīderlande

Re: 192.168.1.0 ?

Sun Jan 16, 2022 5:14 pm

Hi,

I think you have a wrong pool definition, like this example:
/ip pool
add name=pool1 ranges=192.168.0.0/31
This would serve 192.168.0.0 and 192.168.0.1
So instead you would need some pool defined like this: (The name of your pool is confusing as it is just dhcp.)
/ip pool
add name=dhcp ranges=192.168.0.10-192.168.0.100

You dont show us the pool definition I can only see a pool named dhcp referenced:
/ip dhcp-server
add address-pool=dhcp interface=bridge1 name=dhcp1
BR

Woland
/31 address support N/A
see: https://help.mikrotik.com/docs/display/ ... col+Status
 
User avatar
woland
Member Candidate
Member Candidate
Posts: 298
Joined: Mon Aug 16, 2021 4:49 pm

Re: 192.168.1.0 ?

Sun Jan 16, 2022 5:28 pm

Hi,
That's true for routing, but this was just an example how you bring a Mikrotik DHCP server to serve you .0 or .1. And maybe point to the difference between a pool and DHCP server config. So that's what someone should avoid on a /24...
On 6.49.2 this has worked.
BR
Woland
 
User avatar
SecCon
Member Candidate
Member Candidate
Topic Author
Posts: 156
Joined: Mon May 03, 2021 10:52 am

Re: 192.168.1.0 ?

Sun Jan 16, 2022 6:13 pm

@Woland

So
/ip pool
add name=dhcp ranges=192.168.1.0/24
should rather be
/ip pool
add name=dhcp ranges=192.168.1.0-192.168.1.255
That would still keep the dhcp server at 192.168.1.1 I presume...

The reason for the naming, or rather lack of perhaps more explicit naming, is that there is no reason for that yet, only one network and nothing else. For now.
 
User avatar
mkx
Forum Guru
Forum Guru
Posts: 12645
Joined: Thu Mar 03, 2016 10:23 pm

Re: 192.168.1.0 ?  [SOLVED]

Sun Jan 16, 2022 7:11 pm

/ip pool
add name=dhcp ranges=192.168.1.0/24
should rather be
/ip pool
add name=dhcp ranges=192.168.1.0-192.168.1.255

These two settings are exactly the same ... and wrong. As @msatter hinted, first and last address in a subnet are off-limits, in /24 subnet these are addresses ending with 0 and 255. Valid address pool for a /24 subnet is x.y.z.1-x.y.z.254. It seems like DHCP server doesn't consider subnet mask when picking address to offer (n.b. pool 192.168.0.10-192.168.1.200 is completely valid in subnet 192.168.0.0/23 which includes 192.168.0.255 and 192.168.1.0 as ordinary device addresses).
While normally it's not wrong to include address of router/DHCP server because both DHCP server and DHCP client are required to verify availability of offered address it's still not sensible. One really should allocate address pool only large enough for largest number of devices members of same subnet at the same time and for home LAN I guess 50 or 100 addresses are enough ... so pool of 192.168.1.200-192.168.1.254 will probably do. Makes possible to keep static leases outside of pool space.
 
Zacharias
Forum Guru
Forum Guru
Posts: 3459
Joined: Tue Dec 12, 2017 12:58 am
Location: Greece

Re: 192.168.1.0 ?

Sun Jan 16, 2022 7:39 pm

What is the purpose of the network 0.0.0.0/24 ?
 
User avatar
mkx
Forum Guru
Forum Guru
Posts: 12645
Joined: Thu Mar 03, 2016 10:23 pm

Re: 192.168.1.0 ?

Sun Jan 16, 2022 8:21 pm

There's nothing wrong with network spanning IP addresses 0.0.0.1-0.0.0.254 with network address 0.0.0.0/24 and broadcast address 0.0.0.255.

In OP's config it indeed doesn't make sense.
 
Zacharias
Forum Guru
Forum Guru
Posts: 3459
Joined: Tue Dec 12, 2017 12:58 am
Location: Greece

Re: 192.168.1.0 ?

Sun Jan 16, 2022 9:22 pm

Actually the subnet 0.0.0.0/8 is reserved and used for self identification ( identifies the network ) whereas 0.0.0.0/32 to identify the host itself...
So am not sure if it is actually correct to use this subnet...
But since it is not the purpose of this post.. ok...
 
User avatar
mkx
Forum Guru
Forum Guru
Posts: 12645
Joined: Thu Mar 03, 2016 10:23 pm

Re: 192.168.1.0 ?

Sun Jan 16, 2022 10:35 pm

You're right, the 0.0.0.0/8 subnet is special.
 
Sob
Forum Guru
Forum Guru
Posts: 9188
Joined: Mon Apr 20, 2009 9:11 pm

Re: 192.168.1.0 ?

Sun Jan 16, 2022 10:52 pm

But it may not be in the future. While trying to fix my lack of knowledge about it (I knew that it did exists, but didn't remember if it is/was actually used for something), I found this interesting initiative that would like to make it into regular public addresses, together with others, including part of 127.0.0.0/8, which is quite wild idea. I can't decide whether it's actually useful, pointless, crazy, ...
 
Zacharias
Forum Guru
Forum Guru
Posts: 3459
Joined: Tue Dec 12, 2017 12:58 am
Location: Greece

Re: 192.168.1.0 ?

Sun Jan 16, 2022 10:57 pm

You're right, the 0.0.0.0/8 subnet is special.
So 0.0.0.0/24 is not ?
Part of the /24 exists in the /8 ...
 
User avatar
mkx
Forum Guru
Forum Guru
Posts: 12645
Joined: Thu Mar 03, 2016 10:23 pm

Re: 192.168.1.0 ?

Sun Jan 16, 2022 11:02 pm

You're right, the 0.0.0.0/8 subnet is special.
So 0.0.0.0/24 is not ?
Part of the /24 exists in the /8 ...

/24 is special as much as any subnet of a bigger special subnet ... eg. is a 192.168.x.0/24 special? RFC 1918 makes 192.168.0.0/16 special ...

Probably 0.0.0.0/x won't be entirely released for "normal" use, 0.0.0.0/32 is special after all... E.g. DHCP client without any previous state will send out DHCP discover with src address 0.0.0.0 and dst address 255.255.256.255.
 
Zacharias
Forum Guru
Forum Guru
Posts: 3459
Joined: Tue Dec 12, 2017 12:58 am
Location: Greece

Re: 192.168.1.0 ?

Sun Jan 16, 2022 11:11 pm



So 0.0.0.0/24 is not ?
Part of the /24 exists in the /8 ...

/24 is special as much as any subnet of a bigger special subnet ... eg. is a 192.168.x.0/24 special? RFC 1918 makes 192.168.0.0/16 special ...
192.168.0.0/16 is indeed special and reserved for private addresses e.g. for local networks and belongs to network class C... 192.168.x.0/24 exists in the /16 so it keeps being a class C network and part of the reserved space for private addressing ...
 
User avatar
SecCon
Member Candidate
Member Candidate
Topic Author
Posts: 156
Joined: Mon May 03, 2021 10:52 am

Re: 192.168.1.0 ?

Mon Jan 17, 2022 9:17 am

I had an epiphany. Well for me, untrained in the logical side and structure of networks as I am despite working with them.

Router IP can be anything as long as it is fixed and within the regular

Class A: 10.0. 0.0 — 10.255. 255.255.
Class B: 172.16. 0.0 — 172.31. 255.255.
Class C: 192.168. 0.0 — 192.168. 255.255.

ranges.

DHCP Pool can also be anything within those ranges, but I would assume it has to be in the same range as the Router.

This leads me to conclude that - (I may be wrong):
Router IP does not have to be part of the DHCP Pool. (As in you can have a Router on 192.168.11.187 and a pool spanning 192.168.167.23-192.168.167.199)

I have like 5 network books, both analog and digital, but still don't really get the logic with Net Mask. Slow as a damn lama, but I'll get there. I guess you are used to Lama's by now.
 
Zacharias
Forum Guru
Forum Guru
Posts: 3459
Joined: Tue Dec 12, 2017 12:58 am
Location: Greece

Re: 192.168.1.0 ?

Mon Jan 17, 2022 4:18 pm

Sure as long as the client gets the correct CIDR from the DHCP in order to be able to reach the Routers network...
 
User avatar
SecCon
Member Candidate
Member Candidate
Topic Author
Posts: 156
Joined: Mon May 03, 2021 10:52 am

Re: 192.168.1.0 ?

Mon Jan 17, 2022 8:54 pm

Sure as long as the client gets the correct CIDR from the DHCP in order to be able to reach the Routers network...
CIDR: https://en.wikipedia.org/wiki/Classless ... in_Routing
I was going to watch a movie until you threw that acronym in my face.... :shock:
 
User avatar
mkx
Forum Guru
Forum Guru
Posts: 12645
Joined: Thu Mar 03, 2016 10:23 pm

Re: 192.168.1.0 ?

Mon Jan 17, 2022 9:01 pm

Basic principle of IP networking: every device can directly communicate with all other devices in same (sub)net. To determine if communication peer is in same (sub)net, device takes peer's address, applies own netmask and compares result to result of masking own address. Operation is logical AND. Results of these operations are also known as network address. If both network addresses are identical, then both devices are in same subnet.
BTW: net mask is set either in address-like notation or in CIDR notation as /xx where xx is number of significant bits set. The way of defining it doesn't affect the arithmetics. Before CIDR, when addresses were strictly divided to classes (A, B or C), network mask was implicitly set by address itself.
Sometimes own network address is set explicitly (and not calculated as in explanation above) and in this case some interesting communications are possible. Peer network address is still calculated.

Example:

calculated network address: logical AND between device address and net mask
own net mask:/23 or 255.255.254.0 -> 11111111.11111111.11111110.00000000

own IP address: 192.168.10.35     -> 11000000.10101000.00001010.00100011
own network address:                 11000000.10101000.00001010.00000000 -> 192.168.10.0

peer1 IP address: 192.168.11.254  -> 11000000.10101000.00001011.11111110
peer1 network address:               11000000.10101000.00001010.00000000 -> 192.168.10.0

peer2 IP address: 192.168.12.254  -> 11000000.10101000.00001100.11111110
peer2 network address:               11000000.10101000.00001100.00000000 -> 192.168.12.0

So peer1 is in same subnet while peer2 is not.

Connections between peers in different subnets are only possible via gateways (a.k.a. routers). So device sends packets for peer2 to gateway. Which means that gateway and device have to be in same subnet. Another property of gateways: they are part of at least two subnets (can be as small as /31 or even /32 for point-to-point connections, technically they are still subnets).

DHCP pool: basically tells DHCP server which set of addresses should be used for address leases.

So to question of @SecCon: all addresses in DHCP pool have to fall into same subnet as gateway address (sent to clients by DHCP server as well). They should also avoid the off-limits addresses (network adress as explained above and broadcast address) - DHCP server could be smart enough to avoid them, but in ROS it seemingly doesn't. Also: all addresses in DHCP pool are in principle allocated for DHCP clients, all devices with known statically configured addresses should fall outside pool range to avoid potential address conflicts.
 
User avatar
SecCon
Member Candidate
Member Candidate
Topic Author
Posts: 156
Joined: Mon May 03, 2021 10:52 am

Re: 192.168.1.0 ?

Mon Jan 17, 2022 9:17 pm

They should also avoid the off-limits addresses (network adress as explained above and broadcast address) - DHCP server could be smart enough to avoid them, but in ROS it seemingly doesn't. Also: all addresses in DHCP pool are in principle allocated for DHCP clients, all devices with known statically configured addresses should fall outside pool range to avoid potential address conflicts.
Would that lacking smartness indicate that RoS has a bug?

I use static addresses for my FS Server, my NAS, my VOIP, my AP and my Switch. You pick them up from the DHCP Pool and set them to be static - done. Done that always, except some time where I messed up, but in principle with all my routers for the last 25 years (yeah, well age is not an excuse in this case). None of the interfaces even hints at a recommendation to set aside the static addresses to an IP outside the DHCP Pool. Nor do most of the manuals pertaining to the different manufacturers.

I am beginning to think that I need to read 4375 pages of in depth DHCP verbose stuff only to learn to conclude by myself that is a reasonable thing to do - putting static outside the pool that is - , but it does not say explicitly anywhere in those pages that you should do it. :roll:
 
User avatar
mkx
Forum Guru
Forum Guru
Posts: 12645
Joined: Thu Mar 03, 2016 10:23 pm

Re: 192.168.1.0 ?

Mon Jan 17, 2022 9:28 pm

Would that lacking smartness indicate that RoS has a bug?

Possibly. Or a missing feature.

I use static addresses for my FS Server, my NAS, my VOIP, my AP and my Switch. You pick them up from the DHCP Pool and set them to be static - done.

Strictly speaking this is called "static lease" ... device still obtains address via DHCP handshake, but DHCP server always offers same address. Setting "static lease" addresses outside DHCP pool is possible, but it's left to network admin whether it's done or not.

Truely static setup is when one sets IP address, netmask, gateway address (etc.) manually on the networked device directly. Device then uses configured settings and doesn't perform DHCP handshake. In this case it's beneficial to use statically set addresses from different address range than used for DHCP pool.

Both approaches have their pros and cons.

Only few things are requirements in networking. Most things are best practices and one can ignore them quite safely.

Who is online

Users browsing this forum: qatar2022 and 18 guests