don't dream your life, live your dreams !
Contents
Class | Leading bits | Start address | End address | Network mask |
---|---|---|---|---|
A | 0 | 0.0.0.0 | 127.255.255.255 | 255.0.0.0 |
B | 10 | 128.0.0.0 | 191.255.255.255 | 255.255.0.0 |
C | 110 | 192.0.0.0 | 223.255.255.255 | 255.255.255.0 |
D (multicast) | 1110 | 224.0.0.0 | 239.255.255.255 | not defined |
E (reserved) | 1111 | 240.0.0.0 | 255.255.255.255 | not defined |
Prefix | Start address | End address |
---|---|---|
10.0.0.0/8 | 10.0.0.0 | 10.255.255.255 |
172.16.0.0/12 | 172.16.0.0 | 172.31.255.255 |
192.168.0.0/16 | 192.168.0.0 | 192.168.255.255 |
Your gateway ip address must end thid ‘.1’.
For example, if you have 192.168.5.0/24 (CIDR notation) network, the default gateway should have the ip 192.168.5.1
Note: You are allowed to set an other ip address for your gateway.
CIDR (Classless Inter-Domain Routing) is a shot notation for the mask address.
For example, if the mask address 255.255.255.0 become /24.
To find the ‘/24’, first you have to trasform the mask address in binary:
1111 1111 . 1111 1111 . 1111 1111 . 0000 0000
Then you have to count the number of ‘1’. Here there is 24 ‘1’.
For this example, we will have the following entries:
IP address : 192.168.10.20
subnet mask : 255.255.255.224 (i.e. /27)
The results:
Network : 192.168.10.0/27
Broadcast Address: 192.168.10.31
First host : 192.168.10.1
Last host : 192.168.10.30
Number of hosts : 30
To calculate all of this, you have to transform values to binary:
Entries | |||
---|---|---|---|
Address | 192.168.10.20 | 1100 0000 . 1010 1000 . 0000 1010 . 0001 0100 | |
Netmask | 255.255.255.224 | 1111 1111 . 1111 1111 . 1111 1111 . 1110 0000 | /27 (because of 27 bits ‘1’) |
Wildcard | 0.0.0.31 | 0000 0000 . 0000 0000 . 0000 0000 . 0001 1111 | it is the ‘not’ bits from Netmask. If netmask bit is ‘1’, wildcard bit is ‘0’. If netmask bit is ‘0’, wildcard bit is ‘1’. |
Results | |||
Network | 192.168.10.0/27 | 1100 0000 . 1010 1000 . 0000 1010 . 0000 0000 | class C address (because start with ‘110’). |
Broadcast | 192.168.10.31 | 1100 0000 . 1010 1000 . 0000 1010 . 0001 1111 | ‘Address’ OR ‘Wildcard’ |
First host | 192.168.10.1 | 1100 0000 . 1010 1000 . 0000 1010 . 0000 0001 | |
Last host | 192.168.10.30 | 1100 0000 . 1010 1000 . 0000 1010 . 0001 1110 | |
Number of hosts | 30 |
FQDN is the Fully Qualified Domain Name that give its absolute position in the DNS node.
For example:
MYCOMPUTER.MYDOMAIN.local
First, you have to use an allowed private ip adresses.
Then, in each place you have to define a sub network. Important : sub networks must be unique and must not intersect sub network in an other place (otherwise if request an ip, you will have route conflicts !).
In the following example we have tree places : USA, France, Australia.
Each place is :
A user in Australia need to request a USA server 192.168.2.147. The route will go like this (in the easiest case):
Copyright © 2024 My linux world - by Marc RABAHI
Design by Marc RABAHI and encelades.
admin