tehmaze/ipcalc

Does not calculate Cisco style wildcard masks.

Closed this issue · 4 comments

K0HAX commented

I would like to request that this library generates Cisco style wildcard masks, possibly with Network.wildcard().
For example, 10.1.1.1/30 = 10.1.1.1/255.255.255.252 with a wildcard mask of 0.0.0.3.

Is this part of an RFC, or is it vendor specific?

I don't believe it is part of an RFC but they are still in use in networking. Obviously Cisco ACLs and OSPF configuration are the predominant features using wild mask or inverse mask. You will find them in other vendors like Juniper, Quagga, Cisco, Dell, Alcatel and many others. They are also used for discontiguous subnetwork support in routers (See RFC 1812 4.2.3.4 Subnetting) and firewall configurations.

I would like to join the request to support wildcard mask or inverse mask in this library as well.

When instantiating a new Network object, how do I differentiate between a netmask and a wildcard mask? Because 10.0.0.0/255.255.255.255 could both mean 10/32 (netmask) and 10/0 (wildcard).

No updates. The .wildcard() method was implemented, closing issue.