Does anyone know where I can find some good basic subnet mask information? I need to block certain IP ranges and I don't know the first thing about what subnet mask to use. Thanks.
What you just asked for is not easily done with any simple explenation. You are basically asking how do I use IP addressing in itself, and that is a large bit of learning.
NOTE: MY BELOW EXPLENATION IS NOT EXTREMELY DESCRIPTIVE. THERE IS A LOT I AM LEAVING OUT TO REDUCE SOME EXPLAINING.THIS IS JUST A GLANCE OVER. Hope it helps.
Here is the easiest things I can point out to you, if you are blocking a range using and Access-List the access list has a wild card bit mask. This bit mask is a reversed version of a subnet mask. Zero equals match and the subnet is reversed, for example let us say you want to block the first 30 addresses in the below example.
10.17.1.1 255.255.255.0
hmmmmmm, what will my access list look like, what do I need to do? Well let's take a look at this subnet mask in binary.
11111111.11111111.11111111.00000000
Now, we need to block the up to the first 30 valid addresses of this class C address pool. Think of the zeros as matching and the ones are what you need to calculate for blocking. Now going from left to right we see match.match.match.??????
If we match the 00011111 with the below numbers you get your wildcard bit.
124 64 32 16 8 4 2 1
0 0 0 1 1 1 1 1 = 16+8+4+2+1=31
So from left to right we see 0.0.0.31 this is your bit mask for an access list. Which for an example of an access list
would look like:
Router1>en
Router1#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router1(config)#access-list 187 deny ip 10.17.1.1 0.0.0.31 any
Router1(config)#access-list 187 permit ip any any
(You would then need to apply the Access-List to an interface)
Router1(config)# interface serial 0/0
Router1(config-if)# ip access-group 187 in
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.