Networking Question Ip Range


Recommended Posts

I have this line in my /etc/exports. this will allow all ips in my local network

/mnt/media   192.168.1.0/255.255.255.0(rw,no_root_squash)

I want to add a range of addresses in the 5. range for example, 5.18.152.214

how would I include all address starting with 5.18, or even just with 5

would this work

5.18.0/255.255.255.0

and this

5.0/255.255.255.0

edit added later//

I tried those and they did not work. I am sure they obviouly show I have no understaning of cidr. it does give you the idea of what I need to do

Edited by shanenin
Link to post
Share on other sites

You need to change your masks and it wouldn't be a bad idea to fill out the netID (some apps handle it, some don't).

So your 5.18.0/255.255.255.0

should be 5.18.0.0/255.255.0.0

In CIDR notation that would be 5.18.0.0/16 (or just 5.18/16)

Your 5.0/255.255.255.0

should be 5.0.0.0/255.0.0.0

In CIDR it would be 5.0.0.0/8 (or just 5/8)

Edited by CataclysmCow
Link to post
Share on other sites

Thanks alot :-)

I think I am following your pattern(not really understanding the concepts) , so then this should work for a class c network

so to specify all ips starting with 192 would either be

192.0.0.0/255.0.0.0

192.0.0.0/8 (using CIDR)

then for a specifing all ips in a class c network that start with 192.168 would be

192.168.0.0/255.255.0.0

192.168.0.0/16 (using CIDR)

Edited by shanenin
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...