LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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 08-10-2002, 06:30 PM   #1
gonus
Member
 
Registered: Apr 2002
Location: Huntsville, Alabama
Distribution: Ubuntu 9.04
Posts: 445

Rep: Reputation: 30
added second nic to network at home now cannot connect to internet


I see people talking about Samba, what is it?

I have two nics. One connects to my cable modem the other connects to a hub. Before I installed the second one ( that runs to the hub) I could surf the net and everything. Now with the second one in I cannot. I did not change any settings. I am thinking it's going to the2nd nic. How would I tell it not to do that and to stay with the first nic?

in linux u ping using arping correct?

what is the equivalent to windows ipconfig /all in linux?

thanx all

gonus
 
Old 08-10-2002, 10:35 PM   #2
sarin
Member
 
Registered: May 2001
Location: India, Kerala, Thrissur
Distribution: FC 7-10
Posts: 354
Blog Entries: 2

Rep: Reputation: 34
1. samba is used to do file sharing when you have a network of windows and linux m/cs.

2. Try posting o/p of /sbin/route -n.

For the time being try "route del default; route add default dev ethX"

Where ethx is the card connected to your cable modem.

3. In linux we use ping and arping too. If you want to see the the path is complete, then use ping. Arping will just go to your gateway and come back. ( Some nice book on networking can tell more about why it is so. Not that difficult, hope you can find yourself)

4. In linux the the command the yields almost same result as windows ipconfig is "/sbin/ifconfig"
--Sarin
 
Old 08-12-2002, 10:37 AM   #3
GAVollink
Member
 
Registered: Apr 2002
Location: St. Paul, Minnesota
Distribution: UbuntuStudio, Ubuntu
Posts: 357

Rep: Reputation: 31
Samba can be found at:

www.samba.org
 
Old 08-13-2002, 08:19 AM   #4
gonus
Member
 
Registered: Apr 2002
Location: Huntsville, Alabama
Distribution: Ubuntu 9.04
Posts: 445

Original Poster
Rep: Reputation: 30
Thanx for all the info and the website. I have been unable to try your suggestions, or even visit the website. I will ASAP. Thanx again.

Gonus
 
Old 08-13-2002, 08:30 AM   #5
orgcandman
Member
 
Registered: May 2002
Location: dracut MA
Distribution: Ubuntu; PNE-LE; LFS (no book)
Posts: 594

Rep: Reputation: 102Reputation: 102
NOTE: to see all the devices, "ifconfig -a" will show all wlan, ppp, eth, lo, et. al. devices.
 
Old 08-15-2002, 11:33 PM   #6
gonus
Member
 
Registered: Apr 2002
Location: Huntsville, Alabama
Distribution: Ubuntu 9.04
Posts: 445

Original Poster
Rep: Reputation: 30
I got my first machine back up at this point have not tried to get the second one up. I ran the net cfg and added the eth1. Had to do a reboot cause i don't know the command to restart networking service\daemon. It came up and now I am on. Off to try and get my scrolling mouse to work and get other linux machine up.

Gonus
 
Old 08-20-2002, 10:51 PM   #7
gonus
Member
 
Registered: Apr 2002
Location: Huntsville, Alabama
Distribution: Ubuntu 9.04
Posts: 445

Original Poster
Rep: Reputation: 30
Ok, I have to admit I need help. Here is the setup I have.

1 mandrake 9.0 machine with 2 nics.
1 of the nics (eth1) goes to my cable modem.
the other (eth0) goes to my hub.

my other machine is connected to the hub and will be going through my madrake 9.0 machine to connect to the internet.

From here what do I do? I have tried entering the gateway and destination to the other machine. That did not work and i had low hopes on it working because they are not really 2 different networks. Thanx for all the help

Gonus
 
Old 08-21-2002, 05:17 AM   #8
Griffon26
Member
 
Registered: Sep 2001
Location: The Netherlands
Distribution: Gentoo, Debian, Mandrake, LFS
Posts: 182

Rep: Reputation: 30
To get specific help, you need to provide specific information.

Give us the output of netstat -ar and of ifconfig. Then we may be able to help you.
 
Old 08-21-2002, 01:57 PM   #9
gonus
Member
 
Registered: Apr 2002
Location: Huntsville, Alabama
Distribution: Ubuntu 9.04
Posts: 445

Original Poster
Rep: Reputation: 30
netstat -ar

Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
xxx.xxx.xxx.0 * 255.255.252.0 U 40 0 0 eth1
127.0.0.0 * 255.0.0.0 U 40 0 0 lo
default idontknow.sd 0.0.0.0 UG 40 0 0 eth1

ifconfig

ifconfig
eth1 Link encap:Ethernet HWaddr 00:50A:B4:3D2
inet addr:xxx.xxxx.xxx.112 Bcast:xxx.xxx.xxx.255 Mask:255.255.252.0
UP BROADCAST NOTRAILERS RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2796 errors:0 dropped:0 overruns:0 frame:0
TX packets:122 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:237447 (231.8 Kb) TX bytes:15296 (14.9 Kb)
Interrupt:10 Base address:0xec00

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:328 errors:0 dropped:0 overruns:0 frame:0
TX packets:328 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:23017 (22.4 Kb) TX bytes:23017 (22.4 Kb)


thats what I have for netstat -ar and ifconfig. Thanx if there is anything else just let me know I will post it ASAP.

Gonus
 
Old 08-22-2002, 04:55 AM   #10
Griffon26
Member
 
Registered: Sep 2001
Location: The Netherlands
Distribution: Gentoo, Debian, Mandrake, LFS
Posts: 182

Rep: Reputation: 30
If you have redhat, the network scripts will probably be in /etc/sysconfig.

Please paste the contents of /etc/sysconfig/network as well as /etc/sysconfig/network-scripts/ifcfg-eth0 and /etc/sysconfig/network-scripts/ifcfg-eth1.

Oh, and also tell us what ifconfig -a says about eth0.

P.S.: Looks like indeed the second interface is assumed to be the external one now. If the cable modem is not connected to eth1, it's no wonder you cannot use the internet.

Last edited by Griffon26; 08-22-2002 at 04:57 AM.
 
Old 08-22-2002, 01:29 PM   #11
gonus
Member
 
Registered: Apr 2002
Location: Huntsville, Alabama
Distribution: Ubuntu 9.04
Posts: 445

Original Poster
Rep: Reputation: 30
here is network

NETWORKING=yes
FORWARD_IPV4="yes"
HOSTNAME="cowan.mine"
DOMAINNAME=localdomain
GATEWAY="XXX.XXX.XXX.112"
GATEWAYDEV=""

here is eth0

DEVICE="eth0"
BOOTPROTO="dhcp"
NETMASK="255.255.255.0"
ONBOOT="yes"
IPADDR=""
IPXNETNUM_802_2=""
IPXPRIMARY_802_2="no"
IPXACTIVE_802_2="no"
IPXNETNUM_802_3=""
IPXPRIMARY_802_3="no"
IPXACTIVE_802_3="no"
IPXNETNUM_ETHERII=""
IPXPRIMARY_ETHERII="no"
IPXACTIVE_ETHERII="no"
IPXNETNUM_SNAP=""
IPXPRIMARY_SNAP="no"
IPXACTIVE_SNAP="no"

here is eth1

DEVICE="eth1"
BOOTPROTO="dhcp"
NETMASK="255.255.255.0"
ONBOOT="yes"
IPADDR="XXX.XXX.0.1"
IPXNETNUM_802_2=""
IPXPRIMARY_802_2="no"
IPXACTIVE_802_2="no"
IPXNETNUM_802_3=""
IPXPRIMARY_802_3="no"
IPXACTIVE_802_3="no"
IPXNETNUM_ETHERII=""
IPXPRIMARY_ETHERII="no"
IPXACTIVE_ETHERII="no"
IPXNETNUM_SNAP=""
IPXPRIMARY_SNAP="no"
IPXACTIVE_SNAP="no"

here is ifconfig -a for eth0

th0 Link encap:Ethernet HWaddr 00:50:04:B2:3C9
BROADCAST NOTRAILERS MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:8 errors:0 dropped:0 overruns:0 carrier:1
collisions:0 txqueuelen:100
RX bytes:0 (0.0 b) TX bytes:4720 (4.6 Kb)
Interrupt:5 Base address:0xe800

Now, I have internet up, eth1 is connected to my cable modem. Its the old nic, once I put in the new nic it bumped it up from eth0 to eth1. Now what I need is hwo to let my other machines access this machine via eth0 to access the internet.

thanx
Gonus
 
Old 08-22-2002, 02:05 PM   #12
Griffon26
Member
 
Registered: Sep 2001
Location: The Netherlands
Distribution: Gentoo, Debian, Mandrake, LFS
Posts: 182

Rep: Reputation: 30
You need to turn off dhcp for the interface that is connected to the LAN.

ifcfg-eth0 should look something like this:

DEVICE="eth0"
BOOTPROTO="none"
IPADDR="10.0.0.1"
NETMASK="255.0.0.0"
ONBOOT="yes"

This is a reserved IP address that you can use for LANs that access the internet using NAT/masquerading.

How to do that is described in the masquerading howto: http://www.tldp.org/HOWTO/IP-Masquerade-HOWTO/

Because you are most likely using a 2.4.x kernel, you will be using iptables to do masquerading. If you need more information than the masquerading howto provides, check out the iptables howto: http://www.linuxguruz.org/iptables/h...les-HOWTO.html

Finally, if you want to take a look at some scripts using iptables, visit http://www.linuxguruz.org/iptables

or check out the script that I am using: ftp://griffon26.kfk4ever.com/pub/iptables.txt

(I added the .txt extension because certain browsers *ahum* assume files without extensions are directories =/ )
 
Old 08-23-2002, 09:56 PM   #13
gonus
Member
 
Registered: Apr 2002
Location: Huntsville, Alabama
Distribution: Ubuntu 9.04
Posts: 445

Original Poster
Rep: Reputation: 30

I can not figure it out even with the help and links provideed. I figure that I am to new for that right now and will have to purchase a cable router. That sux casue this seemed so kewl. Thanx for the help and when/if I try again I hope I get as good as post as I did this time.

Thanx
gonus
 
  


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
Cannot connect to Internet using Ralink rt2500 wireless NIC dsuratman Linux - Wireless Networking 2 09-04-2005 05:32 AM
integrated NIC on Dimension 4700 with WBEL cannot connect to the internet rpkosuri Linux - Networking 1 07-14-2005 03:41 PM
Setting up a home network - can't connect to router awagner99 Linux - Networking 7 01-30-2005 09:23 PM
Wifi@Home can't connect to internet mlr266 Linux - Newbie 6 11-24-2004 05:48 AM
can ping to/from pcs on home network but not connect to internet stumblefingers Linux - Networking 13 04-12-2004 09:34 AM


All times are GMT -5. The time now is 03:41 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration