1

Test question - mikrotik In MikroTik RouterOS, Layer-3 communication between 2 hosts can be achieved by using an address subnet. Which one of those "/29" "/30" "/31" "/32"? Why?


I understand subnetting such as "x.x.x.x/n"(CIDR not. ..) but i don't understand what is it asking me for.. i mean you can connect 2 hosts even with /24, but on the internet you have to change it because of the bigger network, so, bigger networkID and that kind of stuff (at least this is what i've understood)... still can't get the difference between using /29,30,32 ... when should i use those, and why. I'd really appreciate an "in-dept" explanation.

4
  • We could use more context, but I can gues that they are taling about a point to point connection. And a /32 will do for that. (no need for broadcast or net address in a 2 host link).
    – Hennes
    Jan 18, 2017 at 15:10
  • actually the right answers are : /29,/30, /32, because of multibox selection, so yeah, /32 is right but why /29, /30 then? D: Jan 18, 2017 at 15:17
  • Well, with /31 you could use 2 IPs and Network ID and broadcast. And anything bigger will also work but waste more IPs. Depending on the exam question that is either a waste and thus wrong (even though it will work), or it is preparing for the future but allocating slightly more than needed.
    – Hennes
    Jan 18, 2017 at 15:20
  • with this "thinking", i can presume that /31 should work, yes it would waste IPs, but the question asks which one is correct between "/29,30,31,32"... but if you answer /31 it logs the answer as error. Can't figure out why >:( Jan 18, 2017 at 15:26

3 Answers 3

0

/31 is a special case and only should be used for Point to Point and has its own RFC 3021. It is a little unclear but it might because the test did not specify that this is Point to Point but rather just a network with only two hosts.

A /30 will give you two usable hosts with one broadcast and one network ID. I am unaware of when you would not need a broadcast and network ID. however you usually also have a gateway which takes away from one of the usable hosts but it is still considered two usable hosts

0

I actually tested the /32 option and it does not work:

[admin@OB1] > ip addr pr
Flags: X - disabled, I - invalid, D - dynamic 
 #   ADDRESS            NETWORK         INTERFACE                                
 0   102.168.88.11/32   102.168.88.11   ether4  

[admin@OB2] > ip addr pr
Flags: X - disabled, I - invalid, D - dynamic 
 #   ADDRESS            NETWORK         INTERFACE                                
 0   192.168.88.10/32   192.168.88.10   ether4

[admin@OB2] > ping 192.168.88.11
  SEQ HOST                            SIZE TTL TIME  STATUS             
    0                                                no route to host   
    1                                                no route to host   
    2                                                no route to host   
    sent=3 received=0 packet-loss=100% 
1
  • Because you've tested it wrong. Since /32 doesn't constitute a subnet (it's a single IP), it doesn't create a subnet route automatically. Therefore you need to add a direct interface route to the other host. And that way /32 will perfectly work. Jun 16, 2022 at 12:19
0

You have to understand CIDR. The simple cases are the ones where the /x is multiple of 8. i.e 192.168.100.0/24 can be broken in 192.168.100 network address (255.255.255.0 subnet mask) 1-254 host address

So lets take an example where /x is not multiple of 24:
192.168.100.0/30. As before, 30 corresponds the amount of bits dedicated to the network address(or subnet mask). we know that the first three octets are subnet address, those are 24 bits. 30-24 is 6, so the last octet can be divided in 6 bits for network address and 2 bits for host address. 64 is the max decimal number that can be represented with 6 bits and 4 is the max decimal number represented with 2 bits. So this would mean the last octet has 64 subnet addresses and each subnet would have 4 hosts So 192.168.100.0/30 represents 4 host addresses, from 192.168.100.0 to 192.168.100.3 192.168.100.4/30 hosts from .4 to .7 192.168.100.8/30 hosts from .8 to .11 And so on.

Note that this implies that cidr of 192.168.100.6/30 would yield the same hosts as 192.168.100.4/30 as .6 is a host of that subnetwork.

So the answer would be x.x.x.x/31 as this means there are 7 bits of the last octet for network, meaning there are 128 network addresses (on last octet) and 2 host addresses on each.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .