Dual Ethernet in CentOS

Hi,

I have to Centos 5.5 Server which hold two ethernet card as I wanted two networks to be interfaced with.

One network has LAN connectivity, the other has internet connectivity on DHCP.

I could not make both work on same time. I tried to set static ip on internet router, then LAN connectivity works but internet does not work.

When I set dynamic DHCP, Internet works but LAN connectivity does not work.

I tried swapping the cables configuring them but the result remains same.

Can any one guide me what could be wrong?

Thanks,
Marutha

Hi,
Can you run this command in the terminal and output here:

ifconfig -a 

Centos has a nice GUI you can use to setup each NIC. I would use that. Make sure that each network is different IP range.
Example:
10.0.1.0
10.0.2.0

This will help if you don't have this setup this way.

Hi,

One ethernet has extremly differnt ips.

eth1: 10.40.8.21
eth0: 192.168.1.4

Thanks,
Marutha

Ok is this a project your doing at home or at work?

What is the default gateway/router?

Also after you make changes are you restating the network service?

service network restart

I would try to get the primary network working 1st. I guess this would be the DHCP/Internet access one. Which ever network that the router that controls the Internet access. Set the NIC using the GUI tool at system --> Admin --> Network. in there pic the NIC and input the info like router/gatway, DHCP. then use the command above to restart the network.
After that the network interface should work and you should be able to surf the web.
Then set the second interface. Add info router/gatway, no-DHCP. Then you have one more set edit the /etc/hosts file.

Lets say your host name is server1 that name should be set in DHCP to that name. If you don't know the host name type:

hostname

for the 2nd interfase add this line to your host file. For example:

10.40.8.21 sever1-2

This should do it. If you need more help let me know.