RE: Routing public IP's through a gateway

Linux Advanced Routing and Traffic Control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Sounds to me like you don't actually need to do anything - just enable IP forwarding on the linux machine (the gateway - usually something like echo 1 > /proc/sys/net/ipv4/ip_forward), and point your 202.172.122.7x machines at 202.172.122.74 for their default gateway (which your DHCP server should be passing out as a dhcp option anyway).

Unless I have missed something in the question?

Dan

-----Original Message-----
From: lartc-bounces@xxxxxxxxxxxxxxx [mailto:lartc-bounces@xxxxxxxxxxxxxxx] On Behalf Of Tim Groeneveld
Sent: 15 October 2007 13:15
To: lartc@xxxxxxxxxxxxxxx
Subject: Re:  Routing public IP's through a gateway

On Sunday 14 October 2007 11:07:10 pm Tim Groeneveld wrote:
> Greeting all,
>
> I have a bit of a complicated question.
>
> I have two ethernet devices, eth1 and eth2.
>
> eth1 is where my internet comes from. It is in the form of 
> 202.172.122.208/29. It has another IP range, 202.172.122.72/29. What I 
> want to be able to do is route 202.172.122.72/29 to eth2, so that 
> other machines can use those IPs, any ideas on how to do this, I 
> cannot work out how to do this.
>
> eth2 has a DHCP server, which only gives out IPs 202.172.122.74 to 
> 202.172.122.76.
>
> eth1 is basically just hooked into my internet router, while eth2 is 
> hooked into a switch, and will be used for other computers.
>
> If anyone could help me with this setup, I would more then appreciate it.
>
> Thank you very much,
>
>      - Tim Groeneveld
>

To extend what I have tried to say further:

My ISP has given me two IP ranges. 202.172.122.208/29 and 202.172.122.72/29. 
They are unable to give me any larger IP ranges for some lame excuse, which I am sure was written by the BOfH.

Does your isp route 202.172.122.72/29 to me? Why yes it does. It routes this IP through the gateway 202.172.122.209.

If I want to give a machine an IP in 202.172.122.72/29, this is what I need
   > A machine already in the 202.172.122.208/29 IP range.
   > ip route add 202.172.122.72/29 via 202.172.122.209 dev eth1
   > ifconfig eth1 202.172.122.73 netmask 255.255.255.248 (where on this machine, eth1 is hooked into my router).

What I would like, is a gateway machine, which will use eth2 to provide a gateway for other machines to assign themselves .72/29 IP's, *without* the need of 202.172.122.209 being in the route table.

So, there would be *one* gateway machine. This gateway machine has (already) an IP on both ranges.
    > 202.172.122.211 (eth1)
    > 202.172.122.74 (eth2)

eth2 would then be connected into a switch, and eth1 into the internet router.

I am not sure if this helps at all, sorry if it does not.

Thanks again,
     - Tim G


_______________________________________________
LARTC mailing list
LARTC@xxxxxxxxxxxxxxx
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc


[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux