4

Whether we usual use dot-decimal notation to represent network or IP by opposite mask?

10.10.10.0 0.0.0.255 # a network
10.10.10.0 255.255.255.0  # a IP

Update

if we represent a network, we can use 10.10.10.0/24, but how can we represent a IP address of 10.10.10.0 with mask? Is it not 10.10.10.0/24 too?
I also sometimes find the 10.10.10.0 0.0.0.255 can represent a network, what's the difference.


Update-02

Some friend says like the 192.168.2.1/32 can not stand for the networks, but in the route, there obviously regard this as a subnet.

     192.168.1.0/24 is variably subnetted, 2 subnets, 2 masks
C       192.168.1.0/24 is directly connected, GigabitEthernet0/0/0
L       192.168.1.1/32 is directly connected, GigabitEthernet0/0/0
     192.168.2.0/24 is variably subnetted, 2 subnets, 2 masks
C       192.168.2.0/24 is directly connected, GigabitEthernet0/0/1
L       192.168.2.1/32 is directly connected, GigabitEthernet0/0/1
244boy
  • 1,767
  • 4
  • 24
  • 42
  • 1
    I don't understand your question. A network mask will tell you which part of the address is the network, and which part is the host. Read both parts of this answer to see if your question is answered by something in the answers. – Ron Maupin Nov 15 '18 at 02:12
  • Hello 244boy and welcome to NE. /24 is an alternative but equivalent method of writing the mask 255.255.255.0, which has 24 ones at the beginning followed by 8 zeros. 0.0.0.255 is only used in ACLs, see my answer. – jonathanjo Nov 15 '18 at 03:08
  • @jonathanjo Does the ospf need the 0.0.0.255? – 244boy Nov 15 '18 at 03:27
  • Yes, in Cisco configurations, OSPF uses wildcard bits, not masks. Answer below updated. – jonathanjo Nov 15 '18 at 10:24

2 Answers2

4

As far as I know, the only thing which uses the "opposite mask" are the "wildcard bits" of access control lists in Cisco equipment. These can represent hosts or networks (and portions or aggregations of networks), but in practice they don't represent hosts because they are optional on Cisco IOS:

ip access-list standard NTPCLIENTS
 permit 192.168.0.0 0.0.255.255   # network
 permit 10.10.10.0 0.0.0.0        # host
 permit 10.10.10.0                # host

Edit: ... also in Cisco configurations, some parts of the OSPF configurations also use wildcard bits, not masks. It needs saying that it doesn't mean anything different, it's just a different way of writing it, required for no reason other than that's the way Cisco decided to do it.

jonathanjo
  • 16,234
  • 2
  • 24
  • 54
  • Yes OSPFv2 uses wildcard masks, but it is only to determine which interfaces will participate in OSPF, not for advertising networks (many people get confused by that). OSPFv3 corrects that by moving the configuration to the actual interfaces. – Ron Maupin Nov 15 '18 at 16:22
1

You are mistaken as both the first two examples you provide are networks.

---Networks---
10.10.10.0 255.255.255.0 (dotted decimal)
10.10.10.0/24            (CIDR)
10.10.10.0 0.0.0.255     (wildcard mask)

Each of these examples provides the information that defines a range of IP addresses, specifically 10.10.10.0 - 10.10.10.255.

To indicate a single host or IP address, your mask or wildcard mask would have to indicate that only a single IP address was indicated. For example:

---Host---
10.10.10.0 255.255.255.255 (dotted decimal)
10.10.10.0/32              (CIDR)
10.10.10.0 0.0.0.0         (wildcard mask)
YLearn
  • 27,291
  • 5
  • 59
  • 128
  • the 10.10.10.0/32 still is a network, which only have one IP. – 244boy Nov 15 '18 at 05:57
  • @244boy, a single IP does not constitute a network. To establish any sort of IP network, you need a minimum of two (typically four) IP addresses. A /32 is used to indicate a single host IP. – YLearn Nov 15 '18 at 05:59
  • So, we can use 10.10.10.1/32 ? – 244boy Nov 15 '18 at 06:30
  • To indicate a single host? Yes. In routing, this would indicate a "host route" or the route to take to reach a single host. – YLearn Nov 15 '18 at 06:33
  • Hi, friend, check my update-02 of my post. – 244boy Nov 15 '18 at 10:09
  • @244boy, please read my previous comment. Your update provides clear examples of "host routes" in a routing table. Host routes as routes must be part of the routing table, but they refer to routes to a single host and not to a network of multiple hosts. By your definition, any way to indicate a single host would also indicate a "network" as it is the same as 10.10.10.1/255.255.255.255 or with a wildcard mask 10.10.10.1/0.0.0.0 as examples. Please feel free to reference RFC4632 which defines CIDR notation for the meaning of a /32. – YLearn Nov 15 '18 at 20:13