Avatar of INDARKUMAR
INDARKUMAR
 asked on

multiple nic cards in linux

Dear Sir/Madam:


when configured two ethernet cards and assign public ip ,subnetmask,  gateway and name server for eth0 and assigin private ip ,subnetmask, gateway and name server for eth1 , after restarting the network services eth1 is taking the nameserver of the eth0 , how to configure eth1 with the different gateway and name servers , is it by manually editing the /etc/sysconfig/network-scripts/ifcfg-eth1 and adding the entires BROADCAST=x.x.x.x , NETWORK=x.x.x.x , GATEWAY=x.x.x  and then adding nameserver for eth1 , please suggest on this .

Regards
InP


Linux Networking

Avatar of undefined
Last Comment
ssvl

8/22/2022 - Mon
ravenpl

You can have only one default gateway per system and usually it's configured in /etc/sysconfig/network
(In fact it's possible to have multiple default gateways - but it's really unusuall and it's only for boxes acting as advanced(!) router)
Exactly same applied to nameserver.

Why You want have different routes/nameservers? What would be the rules for choosing first or second route/NS ?
INDARKUMAR

ASKER
thanks for the reply , the reason is i want the linux box with two nic to work as ftp server webserver  , firewall , squid and the name server for lan ( for local resolving) , users outside can login to the server by ftp and upload the files ,the same can be accesed by the quality team in the lan by using the samba share of their home directory , so all the lan systems should use linux box as the name server listening to eth1 private ip , for this purpose only i wanted different name server for the eth0 ( public ip) and eth1 ( private ip).
 as of now i have done this by making the linux box as cache name server this is working fine is there any other methods because iam migrating from the redhat v.09 to RHEL V.04 now also wanted to deploy LAMP in the same server.

please update me on this regard

ravenpl

Read my previous post: I asked why You want two default gateways OR nameservers configured.
If You intend to be as dns proxy/cache then You propably should set the very same box as namerver for the box. Why ask another one?
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes
INDARKUMAR

ASKER
thanks again for the reply , sorry for not mentioning the following point in the previous question , eth0 is  configured to one ISP and eth1 is for another ISP , eth1 connection with ADSL modem which uses private ip .hence two different gateways and name servers.

ASKER CERTIFIED SOLUTION
ravenpl

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
INDARKUMAR

ASKER
Thanks for the support
INDARKUMAR

ASKER
yes i use the local dns cache , can you suggest me in this case that is i have redhat ES v.o4 with sendmail as MTA working a mailserver this is HP server as of now one nic of static ip with the gateway of router and using the  nameserver of the ISP but now i want to setup the same server as samba server by adding one more nic i,e  eth1 with the private ip assigned to it and the name server entires for this private ip to be assigned of the other linux box which works as name server in out setup  , please suggest me in this case so that linux box -2 should work as mail server and as well samba server which means eth1 one should use the different name server i,e is name server of the linux box -1
which is the name server in our lan , please suggest me on this.
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
ssvl

use route