ushkand
04-18-2004, 04:08 AM
I have dual NIC on each of my servers and would like to use the second solely for data transfer between each other. Could you guide me step by step on how to set this up?
TIA.
TIA.
![]() | View Full Version : DUAL NICs - setting up eth1 ushkand 04-18-2004, 04:08 AM I have dual NIC on each of my servers and would like to use the second solely for data transfer between each other. Could you guide me step by step on how to set this up? TIA. John[H4Y] 04-19-2004, 03:36 AM 1) Physically network the machines together. 2) On machine 1, type "ifconfig eth1 192.168.0.1 up". On machine 2, type "ifconfig eth1 192.168.0.2 up". This assigns private network addresses to both machines. You should then have a full tcp/ip network between them. You will also need to edit your networking startup scripts to reload these settings at boot. What OS are you running? Heymish 04-19-2004, 05:43 AM Also depends on where abouts your servers are, if they are in a big DC, chances are you will have to check with them for two reasons 1.) Get the internal ip's of both machines 2.) Ask if your allowed your own VLAN ushkand 04-19-2004, 06:05 PM Originally posted by Heymish Also depends on where abouts your servers are, if they are in a big DC, chances are you will have to check with them for two reasons 1.) Get the internal ip's of both machines 2.) Ask if your allowed your own VLAN I am with managed.com and it is they who installed the second NIC on each server and connected them with a crossover cable. If they did that, I am guessing, VLAN is ok with them. :) Will try john's steps and report back. btw.. I am running linux. ushkand 04-19-2004, 06:07 PM You will also need to edit your networking startup scripts to reload these settings at boot. What OS are you running? [/B] How do I do this? I am running linux. Thanks. John[H4Y] 04-19-2004, 10:06 PM Which distribution (Redhat, Debian..?) n2deep 04-20-2004, 03:35 PM You don't need a Vlan for yourself since this is using a crossover cable. Also, doing it with basic ifconfig statements on the command line will work until you reboot, then it won't work. My guess is that John is a *BSD guy. =) The first thing you need to do is to make sure the OS is seeing both of your NICs, you can do this by typing 'ifconfig' with no options. You're looking for an eth0 AND an eth1. If both of those are there, then the hard part is done. =) On a Redhat based system (Redhat 6.2, 7.x, 8.x, 9.x) do this. 'cd /etc/sysconfig/network-scripts/' Once you're in there, do an 'ls' and you'll see a bunch of files, the ones you're interested in are 'ifcfg-eth0 and ifcfg-eth1'. These are the configs for both of these NICs. Edit ifcfg-eth1, and give it something like this. DEVICE=eth1 ONBOOT=yes BOOTPROTO=static IPADDR=192.168.0.2 NETMASK=255.255.255.0 Now do a "/etc/rc.d/init.d/network restart" and wait a second, because it's going to stop/start networking for you. You'll be fine as long as you type 'restart' and nothing else. =) Now if you do an 'ifconfig', you should see eth1 with the IP information you just setup. Go ahead and repeat everything for your other server, just make sure you change the IP to 192.168.0.x wher x is a number between 3 and 254. Let me know if it's another distro and I can get you instructions on that as well. ushkand 04-20-2004, 09:57 PM Thanks so much n2deep - worked perfectly. Now one more thing - I am using the second server for just MYSQL DB and connecting to that server IP in my PHP config files. How should I set the servers to use the eth1 connection for data transfer and not the main IP (huge bandwidth :( )? Btw.I am using WHM/Cpanel on Redhat Thanks again for your help. John[H4Y] 04-20-2004, 10:21 PM Originally posted by n2deep My guess is that John is a *BSD guy. =) I'm an everything guy really :) I just wanted to find out the distro he was using before I typed out the instructions on how to set the network init scripts ;) ushkand 04-21-2004, 02:52 AM john, I actually had setup the network init scripts based on your instructions - I stopped before restarting network settings since i did not know the command. anyway, its all working fine now. I setup my php config files to connect to the db based on local IP and its going ok so far. Boy! I never expected MYSQL transactions to take about avg 8.5Mbps for an entire month. IF it wasn't for managed .com, I would have been paying through my nose for transfer between my two servers. :cartman: |