On Wed, 12 Nov 2003 07:59:34 +0000, Simon Dean <(E-Mail Removed)> wrote:
> David Efflandt wrote:
>
>> On Tue, 11 Nov 2003 09:24:28 +0000, Simon Dean <(E-Mail Removed)> wrote:
>>
>>>Hi,
>>>
>>>I (could) have an option of getting a 4 IP block from my ISP.
>>>
>>>As I understand it:
>>>
>>>1 IP = Network Address
>>>1 IP = Broadcast Address
>>>
>>>Now I already have a public linux server, (lets call it Router), using
>>>ADSL Dialup, so ppp0 takes one. But I'd like to create another public
>>>viewable linux server (lets call it Server). It wont be dialup, so will
>>>connect to a network card right, eth0, but that will need one of the
>>>four IP addresses correct?
(snip)
> Hi,
>
> Thanks for the reply. its a bit early for me to wrap my head around
> that, but are you saying I could do:
>
> Linux Router:
> ppp0 - Public IP (as Assigned by ISP, ie, 212.xxx.xxx.1)
> eth0 - Private IP (ie 192.168.0.1)
>
> Linux Server:
> eth0 - Public IP (ie 212.xxx.xxx.2)
>
> Would I need an eth1 on the Linux server, with an IP address of maybe
> 192.168.0.2, or are you saying that Linux (with the correct setup) can
> be intelligent enough to not need a second network card?
>
> Im obviously working from the assumption that 212.xxx is on a different
> subnet as 192.xxx, so I was thinking the second ethernet card would be
> required in the server with a 192.xxx address so it can route to the router.
IPs on the same wire do not necessarily have to be on the same subnet,
they just need proper routing, so 1 nic knows how to reach another IP
(locally by arp, or through a gateway).
> The other philosophy which Im learning, is that ppp0 and eth0 on the
> server could theoretically have the same IP address, and therefore the
> server is free to take the second IP address, and things could work like
> that.
I did not think of that until your 2nd post under different subject. You
could use the same 212.xxx.xxx.1 IP for ppp0 and eth0 of your router, but
the netmask of the ppp0 IP would have to be 255.255.255.255 (which might
be automatic, along with default gateway routing) so it would not try to
use ppp0 to route to 212.xxx.xxx.2.
Then eth0 on your router would either use netmask 255.255.255.252 for your
4 IPs, or in its simplest form, a 255.255.255.255 netmask and host route
to 212.xxx.xxx.2 (no gw). Routing example:
Destination Gateway Genmask Flags Metric Ref Use Iface
68.x.x.254 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0
212.x.x.0 0.0.0.0 255.255.255.252 U 0 0 0 eth0
0.0.0.0 68.x.x.254 0.0.0.0 UG 0 0 0 ppp0
Or following would also work, since you only have 1 box on eth0:
Destination Gateway Genmask Flags Metric Ref Use Iface
68.x.x.254 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0
212.x.x.2 0.0.0.0 255.255.255.255 H 0 0 0 eth0
0.0.0.0 68.x.x.254 0.0.0.0 UG 0 0 0 ppp0
--
David Efflandt - All spam ignored
http://www.de-srv.com/