LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   2NICs 2 IP's 1 network (https://www.linuxquestions.org/questions/linux-networking-3/2nics-2-ips-1-network-289960/)

strangeslack 02-14-2005 04:05 AM

2NICs 2 IP's 1 network
 
Got a Dual 1GB NIC server running salckware 10.1
this is a replacement server for a couple of existing machines and as such I'd like it to keep both the existing IP's

i.e.
old Server 1 [192.168.1.10 ]
old server 2 [192.168.1.20 ]

becomes
newserver
: nic 1 [192.168.1.10] - done and working
: nic 2 [192.168.1.20] -


I'm using webmin to configre stuff though can hand edit anything that is needed

with one NIC enabled :- routing seems to work and I can get to the internet
:-
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
localnet * 255.255.255.0 U 0 0 0 eth0
loopback * 255.0.0.0 U 0 0 0 lo
default ipcop 0.0.0.0 UG 1 0 0 eth0

When I enable the 2nd NIC
Destination Gateway Genmask Flags Metric Ref Use Iface
localnet * 255.255.255.0 U 0 0 0 eth0
localnet * 255.255.255.0 U 0 0 0 eth1
loopback * 255.0.0.0 U 0 0 0 lo
default ipcop 0.0.0.0 UG 1 0 0 eth0

then routing does not work and I cannot see the internet :(

how can I make both NIC's work and respond ?

as this will give me [theretically x2 bandwith to server also]

strangeslack 02-14-2005 06:44 AM

OK -- have got things running

ifconfig eth1 192.168.2.10 netmask 255.255.255.0 broadcast 192.168.2.255 mtu 1500 up
route add -host 192.168.1.20 dev eth1
route del -net 192.168.1.0 netmask 255.255.255.0 dev eth1
route add -host 255.255.255.255 dev eth0

seems to do the trick and I can connect on either IP number now.

now to get the services running that I need.

error #1 - don't confuse your Broadcast number with your gateway


All times are GMT -5. The time now is 01:26 PM.