Wildcard Mask is a string of 32 binary digits used by the router to determine which bits of the address to examine for a match. We use wildcard mask in several places, for example: To indicate the size of a network or subnet for some routing protocols, such as OSPF. The IPv6 ACLs uses prefix-length to indicate how much of an IPv6 source or destination address should be matched. We identity the network portion, host portion and subnet of IP address using the subnet masks bits 0s and 1s. However, in the wildcard masking binary 1s and 0s filter particular IP addresses or groups of IP addresses to permit or deny access to resources. Wildcard masks use the following rules to match binary 1s and 0s:
- Bit 0 – Match the corresponding bit value in the address.
- Bit 1 – Ignore the corresponding bit value in the address.
Wildcard masking usually referred to as an inverse of the subnet mask. Because binary 1 is equal to a match and binary 0 is not a match in the subnet mask, but in a wildcard mask it is reverse. The Figure 1 Illustrates the results of applying a 0.0.255.255 wildcard mask to a 32-bit IPv4 address. Remember the rules mention above.
Calculating the Wildcard Mask
The shortcut method of calculating a wildcard mask is to subtract the subnet mask of the network or IP from 255.255.255.255.
If we have a network 172.16.0.0 with subnet mask 255.255.255.0. We want to permit access to all users. So we can subtract the subnet mask from 255.255.255.255 as shown in figure 2. This is the easiest and shortest way to calculating wildcard mask for any network.
If we have a network 172.16.1.0 with sub subnet mask 255.255.255.224. So in this network we have 32 network users and want to permit network access for all the users. Therefore take 255.255.255.255 and subtract the subnet mask 255.255.255.224. The solution this time produces the wildcard mask 0.0.0.31. Figure-3 illustrates example-2 calculation.
In this example the network address is 172.16.4.0 with subnet mask of 255.255.252.0 and we want to calculate the wildcard mask for the network, so again take the 255.255.255.255 and subtract the subnet mask of the network. This time the wildcard mask is 0.0.3.255. Figure-4 illustrates example-3 calculation.
How Wildcard Masking Work
For understanding the wildcard masking see the following examples. In the first example, the wildcard mask stipulates that every bit in the IPv4 address 172.16.10.10 must match exactly. In the second example, the wildcard mask stipulates that anything will match and in the third example, the wildcard mask stipulates that any host within the 172.16.10.0/24 network will match.
The fourth example are little complex. Where, the first two octets and first two bits of the third octet must match exactly. The last six bits in the third octet and the last octet can be any valid number. This results in a mask that checks for the range of networks 172.16.64.0 to 172.16.127.255.
Use of Wildcard Keywords
The any and host Keywords
We can use key words any and host, for example we can use the “any” keyword to substitute the IPv4 address 0.0.0.0 with a wildcard mask of 255.255.255.255.
Router1(config)# access-list 10 permit 0.0.0.0 255.255.255.255
This means that any host with IPv4 address permitted to the network. So we can replace the command with:
Router1(config)# access-list 10 permit any
Another example of keyword that is “hos”, for example if we want to permit a specific IPv4 address to the network as follow with wildcard mask:
Router1(config)# access-list 10 permit 172.16.10.100 0.0.0.0
We can configure this access-list using keyword host instead of wildcard mask 0.0.0.0 for example:
Router1(config)# access-list 10 permit host 172.16.10.100
OSPFv2 is a link-state routing protocol Introduced in 1991 for IPv4 as an alternative to Routing Information Protocol (RIP). The figure1 is reference topology for configuring OSPFv2. The routers in the topology have a starting configuration, including interface address configuration, password configuration, etc. There is no static or dynamic routing configured on any of the […]
If router interface is configured with OSPF, the router must determine if there is another OSPF neighbor on the link. To do this, the router forwards a Hello packet that containing its router ID out all OSPF-enabled interfaces as multicast. The router ID is used by the OSPF process to individually recognize every router in […]
When an OSPF router is initially connected to a network it completes the following generic link-state routing process and gets the state of convergence through changing different states. Create adjacencies with neighbors OSPF configured router form adjacencies with their neighbors prior to share information with that neighbor. It sends Hello packets out all OSPF-enabled interfaces […]
Hello Type 1 packets are OSPF packet which sent periodically on all interfaces including virtual links to establish and maintain neighbor adjacency. It is a multicast packet having a multicast and broadcast capability also enabling dynamic discovery of neighboring routers. Hello packet advertise parameters on which routers agree to become neighbors. It also elect the […]
Open Shortest Path First (OSPF) runs over the Internet Protocol’s network layer. So, Open Shortest Path First (OSPF) encapsulated only by IP and local data-link headers. Encapsulating OSPF messages transmitting over an Ethernet link contain the following information: Data Link Frame Header– This header contains the destination multicast MAC addresses. IP Packet Header–This header contain […]
Open Shortest Path First (OSPF) uses link-state packets (LSPs) to establish and maintain neighbor adjacencies. It also uses LSPs to exchange routing updates. There are five different OSPF packet types. Beginning of all OSPF packets is specified by standard header of 24 bytes. A list of link state advertisements is deal with all OSPF packet […]
Because of hierarchical design the OSPF are more efficient and scalable. The OSPF segments network into different areas. The area is a group of routers sharing the same link-state information in their Link-State Databases (LSDBs). We can implement the OSPF on the following two ways. Single-Area OSPF Multi area OSPF Single Area OSPF (Area 0) […]
Link-state is most used routing protocol, therfore the link-state operation is very important for the networking student. In this article we are discussing the link-state operation. Link State Routing protocols reduce broadcast traffic as they do not send any periodic updates. It also not sends entire routing tables with each broadcast. Link state only exchange […]