Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
ip address question
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
phillosophy
Tux's lil' helper
Tux's lil' helper


Joined: 23 May 2005
Posts: 94

PostPosted: Sun May 29, 2005 8:04 am    Post subject: ip address question Reply with quote

when an example specifies a network ip address such as

Code:
168.109.1.10/28  or 127.0.0.0/8


what does the 28 and 8 numbers mean?
Back to top
View user's profile Send private message
Mamour
Tux's lil' helper
Tux's lil' helper


Joined: 26 Sep 2004
Posts: 82

PostPosted: Sun May 29, 2005 8:11 am    Post subject: Reply with quote

They are called masks. Essentially, writing 168.109.1.10/28 means that you take 168.109.1.10 as base address but let the last 4 bits (out of 32, which comes from 32-28 ) change freely.

In practice, if you take the 168.109.1.10 address, the last byte of the adress (here represented by 10) would be 00001010 in binary notation. These last 4 numbers are the 4 bits that are allowed to changed with the /28 mask. Thus, they can take any value of 0 or 1. Using this mask would thus generate all adresses where these last 4 bits are between 0000 and 1111 in binary notation, which translates to 0 and 15 in decimal notation.

168.109.1.10/28 thus stands for all adresses from 168.109.1.0 to 168.109.1.15 (2^4 = 16 addresses).

The same thing can be applied for the /8 mask, where the 24 last bits are allowed to change (effectively representing the last 3 IP numbers, as each numer separated by a dot represents one byte, or 8 bits). You'd then generate all adresses from 168.0.0.0 to 168.255.255.255 (2^24 = 16,777,216 adresses).

This can be pretty daunting at first, but don't hesitate to ask if you don't get it!

Cheers,
_________________
//Markus.
Back to top
View user's profile Send private message
Earthwings
Bodhisattva
Bodhisattva


Joined: 14 Apr 2003
Posts: 7753
Location: Germany

PostPosted: Sun May 29, 2005 1:13 pm    Post subject: Reply with quote

Moved from Installing Gentoo to Networking & Security.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum