LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 11-10-2006, 11:08 PM   #1
Mandle
LQ Newbie
 
Registered: Apr 2006
Posts: 9

Rep: Reputation: 0
networking with multiple nic's


I've got 3 nic's installed running Slackware 10.2. When I did the install it asked for a nameserver and I said that I didn't want one. Mistake number one. I've specified my gateway as 192.168.0.1(roomates computer). It is running winxp with ICS enabled and routing fine to My winxp install. The uppermost nic is the one plugged into the crossover cable.(pci1) I cant even ping the gateway. My ip is set to 192.168.0.69(you can tell i've not gotten any in awhile I'm going to install slack 11 once I get this fixed, but I need some help. (I need to get this fixed for my own personal sanity. This has happend to me a number of times, whenever I try to set up a static ip, and the only thing that reliably fixes it is a reinstall with dhcp enabled.) I dont want to reinstall just to setup dhcp. Thanks
 
Old 11-10-2006, 11:23 PM   #2
Mandle
LQ Newbie
 
Registered: Apr 2006
Posts: 9

Original Poster
Rep: Reputation: 0
well, I guess I just need a point in the right direction. Not too sure how bad on the newb scale this ranks, but I'm getting somewhere. thanks
 
Old 11-10-2006, 11:56 PM   #3
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
The default gateway address does need to be your roommates computer interface ( The one you connect to or that connects to the LAN. ) You can check this with the route command:
ex: /sbin/route. the last line should look like:
default 192.168.0.1 0.0.0.0 UG 0 0 0 eth0

Does ifcofig show that the NIC interface has an IP address? If so, then either you set it up manually or you have access to a DHCP server through your roommates computer. You can run "/usr/sbin/ifconfig eth0" to check if it does.

The first two lines of output should look similar to this:
Code:
eth0      Link encap:Ethernet  HWaddr 00:17:31:AB:78:A9
          inet addr:192.168.1.102  Bcast:192.168.1.127  Mask:255.255.255.128
Now I'm not certain how windows does network sharing. What is your roommates WAN side IP address? If it is someting like 192.168.0.xxx then there may be a problem because his two interfaces may be in the same subnet. I did something similar once where my desktop didn't have a wireless interface but my laptop did. So I used ip forwarding to gain access to the internet. Both computers were running SuSE Linux. I had the wireless device in the 192.168.1.0/255.255.255.128 subnet and my desktop, and printer were on the 192.168.128.0/255.255.255.0 subnet. If your roommate has an interface with an internet address ( not a private one like 192.168.xxx.xxx or 10.xxx.xxx.xxx, etc ) then there probably isn't a problem.

Another thing to look for is the nameserver addresses. If you are configuring your interface manually, then you may need to get those addresses from you roommate. ( He can get them in the device properties configuration, or by entering "ipconfig /all". These address are needed in /etc/resolv.conf. Take a look at your /etc/resolv.conf file and see if they are there. Using dhcp this will be filled in. One trick is to set up your computer first for dhcp and record your ISP's nameserver addresses. Then add those address to /etc/resolv.conf when you configure it for static addressing. Sometimes, if you want your computer to function as a server you will want a static address.

Last edited by jschiwal; 11-11-2006 at 12:00 AM.
 
Old 11-11-2006, 07:13 AM   #4
manishsingh4u
Member
 
Registered: Oct 2005
Location: Bhopal, India
Distribution: RHEL 6
Posts: 422

Rep: Reputation: 30
I would like to add a little bit to what "jschiwal" said.
If your linux machine is connecting to the LAN via eth0, your system's /etc/rc.d/rc.inet1.conf should have these lines.
Code:
# Config information for eth0:
IPADDR[0]="192.168.0.69"
NETMASK[0]="255.255.255.0"
USE_DHCP[0]=""
DHCP_HOSTNAME[0]=""
And for default gateway
Code:
# Default gateway IP address:
GATEWAY="192.168.0.1"
You can check which interface(s) is / are available by using
Code:
ifconfig -a
or
Code:
dmesg | grep eth
Now the /etc/resolv.conf should have appropriate domain and DNS entries. You can get these value by using the trick told by "jschiwal"
Code:
search yourIspDomain.com
nameserver XXX.XXX.XXX.XXX
nameserver XXX.XXX.XXX.XXX
Replace XXX.XXX.XXX.XXX with primary and secondary DNS IP Addresses.

Now try restarting the network using
Code:
/etc/rc.d/rc.inet1 restart
 
Old 11-11-2006, 12:03 PM   #5
Mandle
LQ Newbie
 
Registered: Apr 2006
Posts: 9

Original Poster
Rep: Reputation: 0
well, I'm going to make assumptions here. Foremost that my nameserver should be 192.168.0.1. The windows box running ICS. Works with windows, and unless nix uses drastically different dns protocols this should work. Thanks and I'll post an update either later today or tomorow.
 
Old 11-11-2006, 03:46 PM   #6
TigerOC
Senior Member
 
Registered: Jan 2003
Location: Devon, UK
Distribution: Debian Etc/kernel 2.6.18-4K7
Posts: 2,380

Rep: Reputation: 49
Quote:
Originally Posted by Mandle
I've got 3 nic's installed running Slackware 10.2.
Can you tell us why you need 3 nic's
Quote:
When I did the install it asked for a nameserver and I said that I didn't want one. Mistake number one. I've specified my gateway as 192.168.0.1(roomates computer). It is running winxp with ICS enabled and routing fine to My winxp install.
First important concept to understand is that an ip address is assigned to a n ethernet card and not a box. Following on this if you have 3 ethernet cards in one box they must all have different subnet ip addresses.
Some practical examples. Lets say that you route through your mates box at 192.168.0.1 then the ethernet card connected to it must also have an address on the same range eg 192.168.0.2. The second ethernet card could be assigned an address like 192.168.1.1 and the 3rd 192.168.2.1. Boxes connected via 192.168.1.1 should have addresses in the same range eg 192.168.1.2 and their gateway would be 192.168.1.1. The same would apply to the 3rd card. Now if you intend sharing the internet you need to implement ip-masquerading and forwarding and preferably use some iptables rules see http://mia.ece.uic.edu/~papers/WWW/iptables.html
 
Old 11-13-2006, 10:27 AM   #7
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
The nameserver address should be the internet address. If the windows machine supplies a DHCP service, it may be supplied if your client is set up that way. If not, you can get that information from the windows macbine. These are the DNS servers that resolve internet address when you browse the internet.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
networking with multiple IP and client Mycado Linux - Networking 11 06-11-2006 07:45 AM
assigning ip's to multiple NIC's in a Fedora Core 4 box vinnypie Linux - Networking 4 11-23-2005 03:21 PM
Multiple networking configurations with RedHat 9? pelakh Linux - Networking 0 05-19-2004 09:22 AM
Help with multiple NIC's gilinko Slackware 9 07-05-2002 10:33 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 02:23 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration