Ip address restriction

Discussion in 'Kernel Questions' started by Harsh Shah, Dec 3, 2019.

  1. Harsh Shah

    Harsh Shah Banned

    Hi
    I want to know that Is it possible that maximum number of hosts in a network, can restrict class of ip address that can be used for network ?
    I have tried to get the answer for it but didn't get proper answer.
    Can anyone please help me ?
    Thanks in advance.
     
  2. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    I admit I do not understand the above question.
    So just some random thoughts here. The maximum number of hosts is restricted by the number of IP-addresses in the subnet. One of the addresses is used by the network address, one is broadcast address and usually one address is for the gateway. So subscract 3 from the number of IP-addresses. The Class A, B, C networks are I believe deprecated nowadays, but C class network is 255 IP-addresses and so allows 252 hosts.
    More info:
    https://en.wikipedia.org/wiki/Subnetwork
    http://www.subnet-calculator.com/
     
  3. nhybgtvfr

    nhybgtvfr Well-Known Member HowtoForge Supporter

    number of possible hosts/ip's is controlled by the netmask

    eg 192.168.0.0 mask 255.255.0.0 allows 65536 addresses, including the network address and broadcast address, so 65534 possible host IPs'
    192.168.40.0 mask 255.255.255.0 (192.168.40.0/24) allows 256 addresses, including network and broadcast, so 254 possible host ip's.

    Basic rules:
    1. The total number of IP addresses in a subnet is a power of two. So that's: 1, 2, 4, 8, 16, ... etc.
    2. The first IP address in a subnet is a multiple (0, 1, 2, 3 ...) of the number of IP addresses in the subnet.
    3. 'x' in netmask '255.255.255.x' is 256 - number of IP addresses in the subnet.
    4. In slash-notation, the netmask is '/y', where y = 32 - n, and 2ⁿ is the number of addresses in the subnet.
    So if we want 4 addresses in our subnet, the first address in this subnet is either 0 or 4 or 8 or 12 or ... etc.
    And 'x' in netmask '255.255.255.x' is: 256 - 4 = 252. So the netmask is: '255.255.255.252'.
    4 = 2², so n = 2 and y is 32 - 2 = 30. The slash-notation netmask is therefore: '/30'.

    Note: You can't actually use IP addresses a.b.c.0 or a.b.c.255

    Netmasks
    Size
    Netmask /
    1 255.255.255.255 /32
    2 255.255.255.254 /31
    4 255.255.255.252 /30
    8 255.255.255.248 /29
    16 255.255.255.240 /28
    32 255.255.255.224 /27
    64 255.255.255.192 /26
    128 255.255.255.128 /25
    256 255.255.255.0 /24
     
    ahrasis likes this.
  4. lukafred

    lukafred New Member

    Hi,
    I've recently installed phpBB version 3.1.6. So far everything seems great. It has almost all features that I need.

    I was just wondering if there is any good way to make my new forum private - to grant access to the forum to only specific users and in the ideal case to allow only one active session per computer and set IP restrictions per user so they can only access the forum using just the specified IPs. Is there an extension which does that?

    Your help will be highly appreciated.
     
  5. nhybgtvfr

    nhybgtvfr Well-Known Member HowtoForge Supporter

    never used phpbb, so don't know the specifics on that.. but most online software would have an option to block new registrations, so access would be via invite only, or the admin creates the client account and sends them the login details, phpbb should be no different.

    and if this is a real question, why have you recently installed version 3.1.6 which was released 9 years ago, and not 3.3.3 which was only released a couple of months ago.

    otherwise, i would ask you why are you reposting (cutting and pasting) a question here, word for word, which was asked, and answered, on a phpbb's own forum 9 years ago?
    https://www.phpbb.com/community/viewtopic.php?t=2337866
     
  6. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    For forum based software, login control is the best bet.

    What you want to achieve is basically possible but I am not sure about phpbb nowadays though I kinda tried all forum sofwares before but I stayed with simplemachines before moving on to its derivative, elkarte.

    Anyway, as suggested above, you should ask this in its own support / community forum.
     
    Last edited: Aug 29, 2024
  7. Taleman

    Taleman Well-Known Member HowtoForge Supporter

Share This Page