In this Cisco CCNA tutorial, you’ll learn how to write and convert the dotted decimal subnet mask into slash (/) notation. Scroll down for the video and also the text tutorial.
Cisco Slash Notation Video Tutorial
Adam Gherras
I am so happy that I passed the test on my first attempt. I am proud now to say that I’m Cisco certified, and I couldn’t have done it without the help of Neil Anderson and his CCNA course.
Subnet Mask in Slash Notation
In the example below, the subnet mask 255.255.255.0 is in decimal notation. We can write the subnet mask in binary, and you can see a line between the network and host portions. It's always contiguous 1's and then followed by a block of contiguous 0's. Because it's contiguous, we can count how many 1's that we have in a row.
Here, we have got 24 1's in a row. Each block is an octet (8), so that's 8, 16, 24. Therefore the dotted decimal notation 255.255.255.0 can be written as /24 in slash notation. Those two things both mean the same thing.
If we had 255.255.0.0 as a subnet mask, we could write that as /16, and so on. Whenever you configure a Cisco router or switch on IOS, the IP address and the subnet mask configuration are written out in the full dotted decimal notation. But whenever we're having a conversation with somebody, or if we are creating a network diagram, more commonly, we will use slash notation.
It's not much fun to be saying 255.255.255.0 all the time. It's much easier to say /24. Also, /24 takes up much less space on your network diagrams, so you can have your diagrams looking a lot neater and tidier. There's the network portion for a /24 highlighted.
Subnet Mask in Slash Notation Example 2
Let's look at another example. We have IP address 10.10.10.15 /255.0.0.0, and hopefully, you can just by looking at this, you're going to see that that's going to be a /8. The more you get used to working with IP addresses and subnets, you'll very quickly be able to see where the lines are by just looking at the actual address and mask.
In the example below, the IP address can be written as 10.10.10.15 255.0.0.0 or 10.10.10.15/8. The network address is 10.0.0.0/8, not 10.10.10.0 /8.
When we write this out, it's just the network portion of the address that we specify. It's a /8, so it's only the first octet that includes the network portion, so that is the 10. All the rest of the address, the last three octets is the host portion.
When we write this address, it would be 10.0.0.0/8, and the available addresses would be 10.0.0.1 for our first host. The last host would be 10.255.255.254. We can't use 10.255.255.255 because that would be the broadcast address, and 10.0.0.0 is the network address.
Additional Resources
Subnet Mask: https://study-ccna.com/subnet-mask/
Configure IP Addresses and Unique Subnets for New Users: https://www.cisco.com/c/en/us/support/docs/ip/routing-information-protocol-rip/13788-3.html
About Slash Notation: https://www.watchguard.com/help/docs/help-center/en-US/Content/en-US/Fireware/overview/networksecurity/slash_about_c.html
Subnetting Practice Questions: https://www.flackbox.com/subnetting-practice-questions
Libby Teofilo
Text by Libby Teofilo, Technical Writer at www.flackbox.com
With a mission to spread network awareness through writing, Libby consistently immerses herself into the unrelenting process of knowledge acquisition and dissemination. If not engrossed in technology, you might see her with a book in one hand and a coffee in the other.