Totally different IP's on the same LAN?

Totally different IP's on the same LAN?

NewsGroups | Search | Tools
 comp.dcom.lans.ethernet  Post an article  get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content  add this group's latest topics to your Google content  YahooMyWeb Yahoo!  Google Google  Windows Live Favorites Windows Live  del.icio.us del.icio.us  digg digg  Add to Netscape Netscape
Subject Author Date
Totally different IP's on the same LAN? Tomás Ó hÉilidhe 12-29-2007
Posted by Tomás Ó hÉilidhe on December 29, 2007, 11:25 am
If you were  Registered and logged in, you could reply and use other advanced thread options

Imagine a common home DSL internet setup:

1) You have a router that has a public IP address on the WAN port
(I'll pick an entirely random value of 73.52.66.5) and a private IP
address on the LAN port (192.168.1.1).
2) Your two home PC's are 192.168.1.3 and 192.168.1.4.
3) The router uses Network Address Translation to allow the home PC's
to surf the web.

(Ok, nothing exciting there)

Now, the router has a feature called "IP Passthrough" whereby the IP
address of the WAN port can become the IP address of one of the machines
on the LAN. Forgetting for the moment the effect this would have on the
router's NAT facility, I'd like ask how the following setup could work:

1: You have a LAN with two machines and a router.
2: Router's LAN port address = 192.168.1.1
3: Machine One's address = 192.168.1.3
4: Machine Two's address = 73.52.66.5 (because of IP passthrough)

I'm curious what would happen if you tried to ping Machine One from
Machine Two. Firstly assume that both machines have the following setup:

Default gateway = 192.168.1.1
Netmask = 255.255.255.0

Here's what I *think* would happen:

(Assume that the ARP cache is empty)

1) Machine Two performs a bitwise-AND with its own netmask and the
address of Machine One. From this, it finds that Machine One is *not* on
the same network.
2) Because the machine is not on the same network, it decides to send the
packet to the default gateway (hard-coded as 192.168.1.1). But first, it
needs the MAC address of the default gateway.
3) So it broadcasts an ARP request looking for the MAC of 192.168.1.1.
4) Once it gets the MAC, it uses the router's LAN port of 192.168.1.1 as
a default gateway to reach machines that are 192.168.1.*

Is this right? Basically I'm asking if it's possible to have unrelated IP
addresses on the same LAN?

(I haven't begun to think about how NAT would still work for the other
machines on the LAN)

--
Tomás Ó hÉilidhe

Pure Networks
Posted by Albert Manfredi on December 29, 2007, 1:49 pm
If you were  Registered and logged in, you could reply and use other advanced thread options
> Imagine a common home DSL internet setup:
>
> =A0 =A0 1) You have a router that has a public IP address on the WAN port
> (I'll pick an entirely random value of 73.52.66.5) and a private IP
> address on the LAN port (192.168.1.1).
> =A0 =A0 2) Your two home PC's are 192.168.1.3 and 192.168.1.4.
> =A0 =A0 3) The router uses Network Address Translation to allow the home P=
C's
> to surf the web.
>
> (Ok, nothing exciting there)
>
> =A0 =A0 Now, the router has a feature called "IP Passthrough" whereby the =
IP
> address of the WAN port can become the IP address of one of the machines
> on the LAN. Forgetting for the moment the effect this would have on the
> router's NAT facility, I'd like ask how the following setup could work:
>
> 1: You have a LAN with two machines and a router.
> 2: Router's LAN port address =3D 192.168.1.1
> 3: Machine One's address =3D 192.168.1.3
> 4: Machine Two's address =3D 73.52.66.5 (because of IP passthrough)
>
> =A0 =A0 I'm curious what would happen if you tried to ping Machine One fro=
m
> Machine Two. Firstly assume that both machines have the following setup:
>
> =A0 =A0 Default gateway =3D 192.168.1.1
> =A0 =A0 Netmask =3D 255.255.255.0
>
> Here's what I *think* would happen:
>
> (Assume that the ARP cache is empty)
>
> 1) Machine Two performs a bitwise-AND with its own netmask and the
> address of Machine One. From this, it finds that Machine One is *not* on
> the same network.
> 2) Because the machine is not on the same network, it decides to send the
> packet to the default gateway (hard-coded as 192.168.1.1).

The default gateway of Machine Two has to be in the same IP subnet as
Machine Two. So Machine Two would communicate with Machine One through
the WAN side of the NAT.

See RFC 1122 Section 3.3.
If the destination is on a connected network, the
datagram is sent directly to the destination host; otherwise,
it has to be routed to a gateway on a connected network.

"A connected network" means an IP subnet to which the host is
connected. In order for Machine Two to be able to use the 192.168.1.1
gateway, Machine Two would have to be dual-homed, on the 73.52.66.0
subnet and on the 192.168.1.0 subnet.

> But first, it
> needs the MAC address of the default gateway.
> 3) So it broadcasts an ARP request looking for the MAC of 192.168.1.1.
> 4) Once it gets the MAC, it uses the router's LAN port of 192.168.1.1 as
> a default gateway to reach machines that are 192.168.1.*
>
> Is this right? Basically I'm asking if it's possible to have unrelated IP
> addresses on the same LAN?

Unrelated IP addresses can certainly coexist on any given L2 network.
But if a host on that L2 network only has one IP address, belonging to
one of the IP subnets, then it would have to send packets targeted at
the other IP subnet in that same LAN through the default router, no
matter that there's a quicker way that bypasses the router.

This is the norm. Even if you use Proxy ARP, a strange ARP hack, the
gateway is still involved in forwarding packets to the other L3 net.

Bert

Posted by glen herrmannsfeldt on December 29, 2007, 2:18 pm
If you were  Registered and logged in, you could reply and use other advanced thread options
Albert Manfredi wrote:
(snip)

> Unrelated IP addresses can certainly coexist on any given L2 network.
> But if a host on that L2 network only has one IP address, belonging to
> one of the IP subnets, then it would have to send packets targeted at
> the other IP subnet in that same LAN through the default router, no
> matter that there's a quicker way that bypasses the router.

Some years ago I had machines one a net with two different subnets.
(Part of a transition from one to the other.) One ran gated,
which allowed one to add static metric 0 routes, and I believe
would send directly on either net. (That was HP-UX 7.0 for the
appropriate time frame.) routed did not allow for metric 0
static routes, though.

More modern systems have secondary IP addresses for an interface,
which should also avoid the need for going through a router.
The reply may or may not avoid the router depending on the
addressing of that machine.

-- glen


Posted by glen herrmannsfeldt on December 29, 2007, 2:34 pm
If you were  Registered and logged in, you could reply and use other advanced thread options
"Tom��������������������������������"
wrote:

(snip)

> Now, the router has a feature called "IP Passthrough" whereby the IP
> address of the WAN port can become the IP address of one of the machines
> on the LAN. Forgetting for the moment the effect this would have on the
> router's NAT facility, I'd like ask how the following setup could work:

The ones I know of do IP passthrough as part of NAT. That is, the
addresses get converted to one host on the internal network.

-- glen



other useful resources:
The Federal Communications Commission (FCC)
Telecommunications Industry Association
Electronic and Software Security Products and Services
International Telecommunication Union

Custom CGI Perl and PHP programming by 1-Script.com

Contact Us | Privacy Policy
The site map in XML format XML site map