2 public ips from 2 networks on one server

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

 



hey folks,


I have to do a IP-Adress-Change on two Internet-Servers.

I already did something like that with another provider, they routed the new
IP-Adresses over the same physical network, I simply created an alias
(eth0:0) and it worked with either gateway.

The recent configuration: (it's the same for the Linux and the W2k-Server,
only different IP-Adresses)

   old line                 new line
      |                         |
      |                     pub. server ip (213.33.76.50)
   gateway                  checkpoint fw 1:1 NAT
(194.112.167.129)              |
    |                        gateway
    |                        (10.1.3.1)
     \                         /
       \                     /
         \                 /
eth0 (194.112.167.130)   eth1 (10.1.3.50)
              \         /
                 server


I need for some days both IP-Addresses configured on the machine. (good old
nameserver-caches ..)
When I use the old gateway,
the server is not reachable via the new (external) IP-Addresse, and vice
versa.

When I do

route add default gw 194.112.167.129 dev eth0
route add default gw 10.1.3.1 dev eth1

only the old Address works, always the first default-gw which is found in
the routing-table is used.

kernel: 2.2.16
routing-table:

    Destination     Gateway         Genmask         Flags Met Ref Use Iface
1) 194.112.167.128 0.0.0.0         255.255.255.224 U     0    0    0 eth0
2) 10.1.3.0        10.1.3.1        255.255.255.0   UG    0    0    0 eth1
3) 10.1.3.0        0.0.0.0         255.255.255.0   U     0    0    0 eth1
4) 127.0.0.0       0.0.0.0         255.0.0.0       U     0    0    0 lo
5) 0.0.0.0         194.112.167.129 0.0.0.0         UG    0    0    0 eth0

Since I inserted line 2, eth1 works locally (ping works in the 10.1.3.0
network).

I did the same thing for a W2k-Server (same networks), there I created a new
network-connection with the new IP-Adress and the new Gateway, it works
fine.
The old Connection is still using the old Gateway.

Does anyone have some hints for me?
(I found some things like
ip rule add ... table 101, different routing-tables for each subnet, but I
don't know, if I'm on the right way)

Many thx!

Regards
Tom

###############################################
E-Mail: tom@uttenthaler.at
ICQ: 14162173
GSM: +43 664 967 52 30
SMS: sms@uttenthaler.at

-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux