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

From: Christian.Lang_at_bertelsmann.de
Date: Thu 31 Jul 2003 - 12:24:50 BST


Hi,

 

I'm using vserver on a box with 2 ethernet devices, eth0 and eth1:

 

eth0 Link encap:Ethernet HWaddr

          inet addr:145.228.83.129 Bcast:145.228.83.255 Mask:255.255.255.0

          UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

          RX packets:21223 errors:0 dropped:0 overruns:0 frame:0

          TX packets:5770 errors:0 dropped:0 overruns:0 carrier:7

          collisions:20 txqueuelen:100

          RX bytes:2213696 (2.1 Mb) TX bytes:789266 (770.7 Kb)

          Interrupt:11 Base address:0x6000

 

eth1 Link encap:Ethernet HWaddr

          inet addr:192.168.3.1 Bcast:192.168.3.255 Mask:255.255.255.0

          UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:154 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:100

          RX bytes:0 (0.0 b) TX bytes:9240 (9.0 Kb)

          Interrupt:11 Base address:0xa000

 

the vservers are bound to eth1 with IP's 192.168.3.XXX and should be routed
through 192.168.3.1 (and then NATed to 145.228.83.129). Therefore I need to
change the default route of the vservers from 145.228.83.129 to 192.168.3.1.
I did it according to a posting from February 2002 (for the vserver-IP
192.168.3.20):

 

   ip rule add from 192.168.3.20 table 101 prio 20

   ip route add 192.168.0.0/24 dev eth1 table 101

   ip route add default via 192.168.3.1 dev eth1 table 101

   ip route flush cache

 

the result is:

--------------------------------------

the global RULES:

0: from all lookup local

20: from 192.168.3.20 lookup 101

32766: from all lookup main

32767: from all lookup 253

 

--------------------------------------

the global ROUTES:

145.228.83.0/24 dev eth0 scope link

192.168.3.0/24 dev eth1 scope link

127.0.0.0/8 dev lo scope link

default via 145.228.83.1 dev eth0

 

--------------------------------------

the ROUTES for table 101:

192.168.0.0/24 dev eth1 scope link

default via 192.168.3.1 dev eth1

 

--------------------------------------

But for some reason, the default default route within the vservers is not
affected. Any ideas?

 

Regards

Christian

 

 


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 Thu 31 Jul 2003 - 12:50:34 BST by hypermail 2.1.3