Networking Forums

Networking Forums > Computer Networking > Linux Networking > 4 IP Block, 2 Servers and an ADSL

Reply
Thread Tools Display Modes

4 IP Block, 2 Servers and an ADSL

 
 
Simon Dean
Guest
Posts: n/a

 
      11-11-2003, 08:24 AM
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?

OK that's all four. 1 Network, 1 Broadcast, 1 ppp0 on Router, 1 eth0 on
Server.

Now, how would I go about connecting the two servers together?

Im guessing I can't. Im guessing I must have an eth0 inside the Router,
which must also have a public IP? Unless I could have an eth0 inside the
ADSL router and an eth1 in the Linux server, each with a private IP
(like 10.0.0.1 and 10.0.0.2 and use some option to transparently link
the two?)??

Would I need another IP on top of the four then, or is there another
solution?

I am speaking from a position of some education, since I already have a
linux gateway for a network of Windows machines, but I dont want to
throw that into the equation. The primary motive is to connect these two
servers and have them both public viewable somehow, with only four IP
addresses. Well, two usable (and one of those being for the ppp adapter)

Cheers
Simon

 
Reply With Quote
 
 
 
 
David Efflandt
Guest
Posts: n/a

 
      11-12-2003, 02:01 AM
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?
>
> OK that's all four. 1 Network, 1 Broadcast, 1 ppp0 on Router, 1 eth0 on
> Server.


Yes, but there is nothing that says that an IP used for internal routing
has to be a public IP. You just have to know your netmasks and routing.
Many cable users find that their default route is to a private IP even
though they have a public IP. Note that if you have no hub/switch between
router and server, a direct connection should be a crossover cable.

Linux router:

If ppp0 is one of your public IPs, it should end up with netmask
255.255.255.255, a host route to your ISP's gateway, and that gateway as
default gw.

The ethernet on the router could have any private IP (using 192.168.1.1 as
example) with netmask 255.255.255.255, broadcast same as IP, host route to
server's eth0 public IP.

echo 1 > /proc/sys/net/ipv4/ip_forward (if not already enabled)

Server:

eth0 assigned a public IP with netmask 255.255.255.255, broadcast same as
IP, host route to private eth IP of router, and that IP as default gw.

ppp0(pub_ip1)-ROUTER-eth(priv_ip)----------eth0(pub_ip2)-SERVER

Since you would essentially have 1 IP netorks, you might even be able to
add host routes for your network and broadcast IPs on private side of
router and be able to utilize those (untested).

--
David Efflandt - All spam ignored http://www.de-srv.com/
 
Reply With Quote
 
Simon Dean
Guest
Posts: n/a

 
      11-12-2003, 06:59 AM
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?
>>
>>OK that's all four. 1 Network, 1 Broadcast, 1 ppp0 on Router, 1 eth0 on
>>Server.

>
>
> Yes, but there is nothing that says that an IP used for internal routing
> has to be a public IP. You just have to know your netmasks and routing.
> Many cable users find that their default route is to a private IP even
> though they have a public IP. Note that if you have no hub/switch between
> router and server, a direct connection should be a crossover cable.
>
> Linux router:
>
> If ppp0 is one of your public IPs, it should end up with netmask
> 255.255.255.255, a host route to your ISP's gateway, and that gateway as
> default gw.
>
> The ethernet on the router could have any private IP (using 192.168.1.1 as
> example) with netmask 255.255.255.255, broadcast same as IP, host route to
> server's eth0 public IP.
>
> echo 1 > /proc/sys/net/ipv4/ip_forward (if not already enabled)
>
> Server:
>
> eth0 assigned a public IP with netmask 255.255.255.255, broadcast same as
> IP, host route to private eth IP of router, and that IP as default gw.
>
> ppp0(pub_ip1)-ROUTER-eth(priv_ip)----------eth0(pub_ip2)-SERVER
>
> Since you would essentially have 1 IP netorks, you might even be able to
> add host routes for your network and broadcast IPs on private side of
> router and be able to utilize those (untested).
>



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.

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.

Im going to have some fun later with all this.

Cheers
Simon

 
Reply With Quote
 
David Efflandt
Guest
Posts: n/a

 
      11-12-2003, 07:50 PM
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/
 
Reply With Quote
 
Simon Dean
Guest
Posts: n/a

 
      11-12-2003, 08:59 PM
Hi,

Thanks for all that. You've given me plenty to think about and to try.

I'll see what I can do over the weekend and I'll drop a note back here
sometime.

Thanks again for your reply. Much appreciated.

Cya
Simon

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dedicated servers with 24/7 live chat ticket and email support fullymanaged servers with 5 Dedicated IPS.www.servers500.com Master reseller hosting Provider Wireless Internet 0 01-15-2011 01:36 PM
Replacing old servers with new servers, same name and ip address =?Utf-8?B?Q2hhcmxpZQ==?= Windows Networking 5 12-07-2004 08:52 PM
How to block? MisterW Windows Networking 0 12-04-2004 06:03 PM
No network Connectivity between 2 servers (windows 2003 servers) ImraneA Windows Networking 1 11-26-2004 11:18 AM
Block MSN and AIM? Box Broadband Hardware 6 11-17-2004 02:46 PM



1 2 3 4 5 6 7 8 9 10 11