On Thu, May 6, 2010 at 13:35, Kevin Ross
<kevin@familyross.net> wrote:
On 5/6/2010 12:05 AM, Alex Samad wrote:
well think about it, if we are talking about network 192.168.11.0/24
(for my example I will use 24 instead of 27)
the server would have an address 192.168.11.55/24 (for example) and the
router would have 192.168.11.1/24
if I change the netmask of the server it can no longer talk to the
router because it is in a different ip network ie 192.168.11.55/22 can't
talk to 192.168.11.1/24 (you can fake it on linux with iproute - see my
other answer to this thread).
Sorry if I'm being dense, I said I'm not a networking expert. But I have thought about this, and I am not seeing how it wouldn't work.
192.168.11.1 is:
11000000 10101000 00001011 00000001
192.168.11.55 is:
11000000 10101000 00001011 00110111
So, the computer at 192.168.11.55 will think it's subnet is the first 22 bits of the address, which is 11000000 10101000 000010, which matches the first 22 bits of the router address. So far so good. Client side will think the machine at 192.168.11.1 is on the same IP subnet, so it will do an ARP request for 192.168.11.1 (ARP doesn't care about subnet masks, it just does an Ethernet broadcast), which will succeed, and the server will be able to send to the router. The reverse direction is also true.
What am I missing?
Archive: [🔎] 4BE27852.6010804@familyross.net" target="_blank">http://lists.debian.org/[🔎] 4BE27852.6010804@familyross.net
@Kevin Ross
You are correct. Nice explation with details.
Just to see what happens when two different networks/broadcast domain on the same switch, I updated my configuration below.
pc1: cat /etc/network/interfaces
auto eth0
iface eth0 inet static
address 192.168.1.50
netmask 255.255.255.0
gateway 192.168.1.1
auto eth0:0
iface eth0:0 inet static
address 192.168.10.50
netmask 255.255.255.0
broadcast 192.168.10.255
pc2: cat /etc/network/interfaces
auto eth0
iface eth0 inet static
address 192.168.1.100
netmask 255.255.255.0
gateway 192.168.1.1
auto eth0:0
iface eth0:0 inet static
address 192.168.10.100
netmask 255.255.255.0
broadcast 192.168.10.255
Then I changed pc2 to be.
pc2: cat /etc/network/interfaces
auto eth0
iface eth0 inet static
address 192.168.10.100
netmask 255.255.255.0
With this pc2 could only access pc1 using
192.168.10.0/24 address. It could not access the router or internet.