Create account Login Webmail Contact Us



 
Knowledgebase
How to find your netmask
Posted by Mike C. on 11 September 2009 11:55 PM
It is important to note that in FreeBSD (unlike linux) you will use the correct netmask for all IPs (even aliases) but with FreeBSD you will only need this once. After you have added the first IP the rest of the IPS (aliases) will use netmask 255.255.255.255. The following will guide you to how to find the proper netmask for your main IP depending on how many IPS you have:

/29 - 255.255.255.248
/28 - 255.255.255.240
/27 - 255.255.255.224
/26 - 255.255.255.192
/25 - 255.255.255.128
/24 - 255.255.255.0

If you don't know what a /29 is etc here is a good guide:

/29 = 8 ips
/28 = 16 ips
/27 = 32 ips
/26 = 64 ips
/25 = 128 ips
/24 = 256 ips
/23 = 512 ips
/22 = 1024 ips
/21 = 2048 ips
/20 = 4096 ips
/19 = 8192 ips
/18 = 16384 ips
/17 = 32768
/16 = 65536

This list continues down. I have included the netmask for the most common IP classes you will be given with our services. Your rc.conf line where your main server IP will be will look like this if you have a /25:

ifconfig_rl0="inet 6.6.6.130 netmask 255.255.255.128"

The rl0 means that you are using the rl network adapter in your kernel. You can see which you are using by typing "ifconfig" and looking to see which device shows up.
(598 vote(s))
Helpful
Not helpful

Comments (0)
Post a new comment
 
 
Full Name:
Email:
Comments: