1

I store many IP-Addresses in a database. Is there any common notation for a group of IP-Addresses and subnet.

Currently I dither between these notations:

  • *.*.*.160/29
  • ?.?.?.160/29
  • ...160/29
  • x.x.x.160/29
  • 0.0.0.160/29
  • I'm not really sure what you're asking, do you want to know what's the correct way to designate a wildcarded subnet? – Stuggi Sep 5 '16 at 9:52
  • Yes, that's what I mean. – Wernfried Domscheit Sep 5 '16 at 10:01
  • Did any answer help you? If so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you could provide and accept your own answer. – Ron Maupin Aug 15 '17 at 1:21
0

You should not need the subnet mask if you are storing endpoint IP addresses.

Networks are said to be super netted when grouped together. So you would not x out the left (network) side of the address, you would x out the right side, i.e., 10.12.x.x/24. Each x represents 8 bits of address space.

IPv4 endpoints are configured with a subnet mask that specifies how many of its 32 address bits represents network addressing vs host numbering. Each network has a network address (all 0's) and a broadcast address (all 1's).

The network address is synonymous to the subnet, e.g., the 10.1 network (10.1.0.0/16).

| improve this answer | |
1

I know of no standard. In documentation, when possible, I would replace by letters:

x.y.z.160/29

followed by something like "where x.y.z is the network of each branch office".

In ACLs I would possibly use a netmask with holes, such as 0.0.0.160 netmask 0.0.0.248, but I would not expect it to be understood even by an "expert" firewall administrator, and I'm not sure that Cisco ACLs still support this.

I think your other possibilities are harder to understand.

If your network architecture should be explained to non-experts and it cannot be represented in x.y.z.160/29 notation, I submit that it is a problem more in the architecture than in the possibilities of the standardized nomenclature.

| improve this answer | |
0

Zeroes should be the preferred way, consider the default route of 0.0.0.0/0 which matches every single subnet.

| improve this answer | |
  • But it will be more difficult to understand than x.y.z.160/28, and how would you write x.y.z.0/28? 0.0.0.0 netmask 0.0.0.248 is even worse. – Law29 Sep 5 '16 at 16:00
0

In all my days I've never seen anyone want to do this but if you really must have a technically correct description you need to use a mask, not CIDR notation and for all /29 nets I guess that would be "network 0.0.0.160 mask 0.0.0.248"

| improve this answer | |
  • There can be valid reasons to want to do this in documentation, typically if you are standardizing the IP addressing plan for branch offices. If each office gets a /24 and you want to document that such and such sub-range in the /24 is for printers, and another for DHCP devices, then you would end up having to deal with this. In that case I typically go for A.B.C.0/27 or X.Y.Z.160/28 or something like that, with the assumption that the context makes A.B.C or X.Y.Z clear. – Jeremy Gibbons Sep 5 '16 at 15:24
  • @Jeremy. That's true, in the past where I've dealt with those cases I have opted for 0.0.0.160/29 but I have found that although it may be technically correct and succint, it confuses people to the extent where it's unhelpful without further commentary. I think your method A.B.C. works better so long as there are no significant bits required in the third octet, where each site may be based on an overall /22 for instance then it's harder – marctxk Sep 6 '16 at 13:15
  • In the few cases where I need to deal with non /24s I generally go with a letter for the first value (say X.Y.Z.0) and then +1, +2... as required (say X.Y.Z+1.0 for the first IP if the second half of a /23). This also works for subnets smaller than a /24, by applying similar logic to the final byte. – Jeremy Gibbons Sep 6 '16 at 17:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.