LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 06-11-2003, 08:01 PM   #1
campo
LQ Newbie
 
Registered: Jan 2003
Posts: 18

Rep: Reputation: 0
Slackware and 2 NICs


hi,

I have recently switched from a RH and XP dual boot system to a complete installation of slackware. Why? Well thats a story for another day. Anyway, I have two NICs, one for my cable modem (which works fine) and one for a cross over cable for my flat mate so he can share my internet connection. On installation Slackware picked up the cable modem NIC on eth0 and prompted me to configure it with netconfig. Once completed eth0 works fine. However, the installation did not detect the second network card. After browsing the internet for solutions I have managed to get the second NIC detected by doing the following:

Adding "alias eth1 ne" to /etc/modules.conf
Configuring the eth1 section of /etc/rc.d/rc.inet1 to include my local network IP settings in this way:

# Edit these values to set up your second Ethernet card (eth1),
# if you have one. Otherwise leave it configured to 127.0.0.1,
# or comment it out, and it will be ignored at boot.
IPADDR2="192.168.0.1" # REPLACE with YOUR IP address!
NETMASK2="255.255.255.0" # REPLACE with YOUR netmask!
# Or, uncomment the following lines to set up eth1 using DHCP:
#USE_DHCP2=yes
# If your provider requires a DHCP hostname, uncomment and edit below:
#DHCP_HOSTNAME2="CCHOSTNUM-A

following these changes I rebooted and ifconfig now shows eth1:
eth0 Link encap:Ethernet HWaddr 00:50:BF8:AE:32
inet addr:81.107.157.9 Bcast:255.255.255.255 Mask:255.255.255.0
UP BROADCAST NOTRAILERS RUNNING MULTICAST MTU:1500 Metric:1
RX packets:5525 errors:0 dropped:0 overruns:0 frame:0
TX packets:502 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:639165 (624.1 Kb) TX bytes:90866 (88.7 Kb)
Interrupt:9 Base address:0x6000

eth1 Link encap:Ethernet HWaddr 00:40:05:73:098
inet addr:192.168.0.1 Bcast:192.168.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:49 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:9804 (9.5 Kb) TX bytes:0 (0.0 b)
Interrupt:5 Base address:0x240

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:2 errors:0 dropped:0 overruns:0 frame:0
TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:100 (100.0 b) TX bytes:100 (100.0 b)

now its been detected and appears to display the right settings Im not sure how to configure properly for the internet connection sharing. Ive tried to use netconfig to configure eth1 but this seems to reconfigure eth0 every time its run.

Whats the next course of action? Or is there any slackware home networking how tos or resources available? Ive used the redhat one sucessfully in the past but the instructions in this howto are not generic.

Any help would be very appreciated particularly by my housemate who is currently internet connectionless!

Cheers

Campo
 
Old 06-12-2003, 05:28 AM   #2
campo
LQ Newbie
 
Registered: Jan 2003
Posts: 18

Original Poster
Rep: Reputation: 0
I have now got my both computers on the network pinging each other and my flatmates computer obtaining its IP address from mine using dhcp. However I still cant ping my ISPs domain name servers from my flatmates computer although I can do from mine.

Whats the next step?
 
Old 06-12-2003, 05:35 AM   #3
campo
LQ Newbie
 
Registered: Jan 2003
Posts: 18

Original Poster
Rep: Reputation: 0
just fixed it with the command:

/usr/sbin/iptables -t nat -A POSTROUTING -s 192.168.1.0 -d 0/0 -j MASQUERADE

which I found on another post in this forum.

Thanks, this is a great information resource.

Andy
 
Old 06-12-2003, 06:54 AM   #4
fsbooks
Member
 
Registered: Jan 2002
Location: Missoula. Montana, USA
Distribution: Slackware (various)
Posts: 464

Rep: Reputation: 52
Nice dialog with yourself :-) This is a great forum. It is getting to the point that the most pertinent answer is often "search the archives".
 
  


Reply



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
Slackware and 2 nics mikz Slackware 13 09-27-2004 10:26 AM
5 NICs in Slackware 9.1 current slaken Linux - Networking 4 05-20-2004 11:54 PM
Slackware box with 2 nics with squid & guarddog flesh Linux - Security 3 03-08-2004 12:31 AM
2 NICs / 2 WANs, 1 dynamic 1 static -- on Slackware 9.1 VioLaToR Linux - Networking 11 03-03-2004 08:53 PM
Slackware 8.1 - Two NICs and DHCP Gn0me Linux - Networking 5 05-15-2003 03:38 AM

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

All times are GMT -5. The time now is 02:52 AM.

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