7/22 /sbin/iptables -t nat -A POSTROUTING -s 10.1.1.0/24 -o eth0 -j MASQUERADE
In the above line what is the point of the /24 ?
Is it saying "this class C." If so how does "24" relate to that?
What would /8 be?
\_ Yes it is -- it means the first 24 bits of the address are the
network address, and so the last 8 bits specify a host on that
network. If it were /8, that would be a class A: the first 8
bits are the network number, and the last 24 bits are for all
the hosts on that network.
\_ It's standard CIDR addressing. Nowadays, you can get IP chunks that
are /22's and so forth, so "Class C" doesn't always make sense.
CIDR is also referred to as classless routing.
\_ Classless Inter-Domain Routing even!
\_ I thought the second number is the number of bits in the subnet
mask. /24 is the same as 255.255.255.0. In practicality, the
example is the same. --dim
\_ Exactly: an IP address specifies both a particular network and
a particular host on that network, and the netmask tells you how
many bits of the address are for the network part.
--original responder
\_ The submask binds the parity bit, that denotes Class A
or Class B, for upstream data logging. |