2 NIC in linux


 
Thread Tools Search this Thread
Operating Systems Linux SuSE 2 NIC in linux
# 1  
Old 03-29-2007
2 NIC in linux

Hi all,

i tried to set up two network cards in Linux. During installation, it can detect both; eth0 and eth1. In the GUI, i can click on eth0 and type in the IP add and netmask. In the lower half of the window, I can also enter the gateway,hostname,and DNS servers

When i click on eth1, i can also enter the IP add and netmask. However, the gateway and dns values follows that of eth0. I am fine if the hostname follows that of eth0. (does not matter to me)

I assume this is incorrect because i do not want eth1 to follow the gateway and dns of eth0.

What i would like to achieve is eth0 and eth1 have totally different set of IP add, netmask, dns and gateway. I can't achieve that using the GUI, can anyone shed some light on where is my mistake or how can i achieve it using command line?

Last edited by new2ss; 03-29-2007 at 06:20 AM..
# 2  
Old 03-29-2007
Your DNS settings (i.e. those which you define in /etc/resolv.conf) are not per-NIC, they take effect over the whole system.

If you want to configure your network interfaces and routing manually, take a look at the man pages for ifconfig and route.

You may want to post the output of uname -a, and let us know exactly which Linux distribution you're using, as each has it's network configuration files in a slightly different location (/etc/sysconfig/network-scripts in Redhat/SUSE, /etc/conf.d in Gentoo, etc).

Cheers
ZB
# 3  
Old 03-30-2007
Hi zazzybob, the route command solved my issue. thank you.
# 4  
Old 11-23-2007
hi new2ss,
I'm having the same problem, please tell me how did you solve it?
Thanks
# 5  
Old 11-24-2007
Quote:
Originally Posted by new2ss
Hi all,


I assume this is incorrect because i do not want eth1 to follow the gateway and dns of eth0.
You can only have one default route. You can have routes added for a specific network however and "man route" will show you the right way to do that for your system.

Also you may add as many dns server entries to /etc/resolv.conf as you like, however only the first one that replies with answer will be used.

Where and how these settings are configured are dependant on your linux distro, see your distros documentation. One thing is sure though, it will most likely be configurable by changing a text file or two somewhere in the /etc directory. Some creative "grep" and "find" usage should light your way.
# 6  
Old 12-04-2007
Hi,

i used the route command to set up a static route for the second network card.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Linux

Add two different subnet public IPs to single NIC or two different NIC on same box

Hello Admins, My ask is how can I add two different subnet IPs to same box with two different gateways? The issue is I can connect to the box when I am on ethernet LAN, but I am not able to connect to the same IP when I am on wifi. The server is RHEL 7 VM on vmware. How can I get connected... (4 Replies)
Discussion started by: snchaudhari2
4 Replies

2. Red Hat

I want to tune NIC's rps, rfs and xps value. which NIC device should I modify.

Dear All I want tune my NIC's rps, rfs and xps value. In my system I have two NIC (eth0, eth1) and I have a bond0 ( eth0, eth1). Here is the question? Which device should I modify ? eth0 and eth1? or just modify bond0 or modify all device (eth0, eth1, bond0) Any advice is welcome.... (0 Replies)
Discussion started by: nnnnnnine
0 Replies

3. IP Networking

squid proxy: one NIC for inbound & one NIC for outbound?

I am new in squid proxy. My question is how to (and if it's necessary) to set one NIC for inbound traffic (http requests) and one NIC for outbound traffic (http answers)? Thank you in advance! (4 Replies)
Discussion started by: aixlover
4 Replies

4. Solaris

x86 Solaris 10 nic driver added but not attached. NIC is not detected.

I couldn't install my nic in solaris 10. I compiled and added the driver but failed to attach the driver and ifconfig output shows only loopback dev. Please see the following output and tell me whether my nic has been detected and why the driver failed to attach? My nic is detected in linux... (0 Replies)
Discussion started by: vectrum
0 Replies

5. UNIX for Dummies Questions & Answers

Will Linux force NIC into promiscuous mode?

Right now I have a computer that I want to use as the monitor for my network. It's currently running Windows 7, and so as I understand it the NIC won't monitor all the traffic on the network. So my question is, if I install Linux on this computer will I be able to force the NIC card into... (1 Reply)
Discussion started by: iJeydon
1 Replies

6. Linux

changing speed of NIC Card in linux

Hi, I would like to know how to change the speed of ethernet card in linux? as it is showing auto-neg using mii-tool -v eth0 and my requirement is 100mbps full duplex. Regards, Manoj (3 Replies)
Discussion started by: manoj.solaris
3 Replies

7. UNIX for Dummies Questions & Answers

controlling traffic source from NIC eth0, eth1 in Linux

Hi Guys, is there a way to send traffic coming from the source iface (eth0, eth1)? i need to test traffic that will come from both eth0 and eth1 from a Linux box. Thanks, Martin (0 Replies)
Discussion started by: mdap
0 Replies

8. HP-UX

how can I determine which NIC card is virtual NIC Card

how can I determine which NIC card is virtual NIC Card which condition can make a decision Does HP UX have Virtual Network Adapter Concept if ,it has where I can Find if I Install Virutal Network Adapter or which command that i can get it or which software can generate thanks (2 Replies)
Discussion started by: alert0919
2 Replies

9. Solaris

Cause of NIC changes ...?

Hi , I came across a SUN server whereby it was installed with additional ethernet card. By right in any configuration, you would probably see the onboard ports Net0,Net1 and so on should correspond to e1000g0,e1000g1... But instead the ext PCI takes precedence in the order and the Net0 becomes... (3 Replies)
Discussion started by: incredible
3 Replies
Login or Register to Ask a Question