Re: Selective routing / how to separate 2 subnets
- From: ibuprofin@xxxxxxxxxxxxxxxxxxxxxx (Moe Trin)
- Date: Sat, 19 Apr 2008 12:21:21 -0500
On Sat, 19 Apr 2008, in the Usenet newsgroup comp.os.linux.networking, in
article <fucg8u$ak8$1@xxxxxxxxxxxxxxxxx>, Piotrek G. wrote:
I have problem to separate 2 subnets:
192.168.0.64/26
192.168.0.128/26
Normally they are working togheter and everything is ok (I mean hosts
from 192.168.0.64/26 cannot communicate with 192.168.0.128/26 hosts -
according to ip theory :) ), but now i want to provide them with
internet and i don't want them to see each other.
So, this is how it looks like:
1.host (192.168.0.66/26) eth0 \
\ router
== eth0 (192.168.0.65/26) | eth1 ==>
/ (192.168.0.129/26)|(80.0.0.2/30)
2.host (192.168.0.130/26) eth0/
They are physically connected - and you need to separate that. (Try
listening with a packet sniffer on 192.168.0.66, and you will see the
packets from 192.168.0.130.) Add a third network card to the router
so that 192.168.0.64/26 and 192.168.0.128/26 are on different NICs such
as eth0 and eth2.
Router configuration:
Look basically OK. The more important data - what is the output of
/sbin/route -a on all three systems?
ip a add 80.0.0.2/30 dev eth1 #(let's just assume that address)
Let's not. That address is real, and in use. See RFC3330 for other
addresses you can use for text examples - 192.0.2.12 would be nice.
Now I ping 192.168.0.130 from host 192.168.0.66 and it replies...
It looks like this:
/sbin/arp -a will show the "other" MAC address. This happens
because you have them on the same physical wire.
So without a router pings don't work - it's ok.
Because the 192.168.0.64/26 and 192.168.0.128/26 wires are not
connected together.
With router - hosts communicate :/
Because you connected both networks to the same single NIC.
How to prevent router from doing it - i suppose "Redirect Host(New
nexthop: 192.168.0.130)" is the key...
Separate them physically. The redirects occur when the router sees
that it's going to be sending the packet out of the same NIC it
received the original from - and it thinks "Why are these idiots
bothering me when they are on the same wire and can talk directly?".
What's wierd - host communicate directly, which means after first ping
reply, I can shut down the router and communication still works
(192.168.0.66 directly to 192.168.0.130 - where is ip theory now? :) ).
Why?
You've wired the Ethernets together. Don't do that.
Old guy
.
- Follow-Ups:
- Re: Selective routing / how to separate 2 subnets
- From: Piotrek G.
- Re: Selective routing / how to separate 2 subnets
- References:
- Selective routing / how to separate 2 subnets
- From: Piotrek G.
- Selective routing / how to separate 2 subnets
- Prev by Date: Selective routing / how to separate 2 subnets
- Next by Date: Re: Selective routing / how to separate 2 subnets
- Previous by thread: Selective routing / how to separate 2 subnets
- Next by thread: Re: Selective routing / how to separate 2 subnets
- Index(es):
Relevant Pages
|