About this list Date view Thread view Subject view Author view Attachment view

From: Dariush Pietrzak (eyck_at_ghost.anime.pl)
Date: Fri 12 Sep 2003 - 11:05:34 BST


> more) DSL Connections at once with one PC? IN short this boils down to the
> question if it is possible to simulate an internet in one PC.
> The idea is as follows, one host that has two network cards (eth0, eth1) with
> fixed IP numbers and a vserver. The vserver accesses the host via a gateway IP
> number that allows the vserver only to access the host.
This boils down to the problem - how to get two default gateways working on
linux, vserver can handle the rest.
 And something like this requires such setup:

IF1=eth0
P1_NET=NETWORK1/29
P2=GATEWAY2
IP1=IP1

IF2=eth1
P2_NET=NETWORK2/28
P2=GATEWAY2
IP2=IP2

ip route flush table ISP1
ip route add $P1_NET dev $IF1 src $IP1 table ISP1
ip route add default via $P1 table ISP1

ip route flush table ISP2
ip route add $P2_NET dev $IF2 src $IP2 table ISP2
ip route add default via $P2 table ISP2

ip route add $P1_NET dev $IF1 src $IP1
ip route add $P2_NET dev $IF2 src $IP2

ip rule add from $IP1 table ISP1
ip rule add from $IP2 table ISP2

 now you can create one vserver on IP1, and another on IP2.

-- 
Mayoi komuno wa Usuyami no sekai, Dariush Pietrzak
Key fingerprint = 40D0 9FFB 9939 7320 8294  05E0 BCC7 02C4 75CC 50D9


About this list Date view Thread view Subject view Author view Attachment view
[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Fri 12 Sep 2003 - 11:25:10 BST by hypermail 2.1.3