LinuxQuestions.org
Review your favorite Linux distribution.
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 08-28-2005, 06:38 PM   #1
harikari
LQ Newbie
 
Registered: Aug 2005
Location: Texas
Distribution: SuSE 9.1 personal
Posts: 7

Rep: Reputation: 0
connect to the internet over LAN


Hi everyone! TOTAL linux n00b here, and not afraid to show it!

i surfed through the other threads and couldnt find one that solved my problem, or came close to the conditions of my windoze LAN.

the stats of the linux box (SuSE 9.1 personal) isnt that important since its just an old piece of junk that im using for my experiments and education prior to ditching microsoft (hehe).

i will say that the eithernet card (NIC?...) is a "3com 3c905b-tx fast eitherlink xl pci" (same as all the cards in my windoze network)

as for the LAN, its set up odd, but it works for my microsoft network. i have a XP pro machine acting as the gateway for ICS, with a cable modem hooked up via USB and network connection through another of those 3com cards to a normal hub which distributes the internet and allows normal file/printer sharing among the other computers. (i went through 2 routers before i just settled back on this tried and true configuration).

now, the linux problem, which is that i cant get it to even try to connect to anything. even pinging my gateway machine gets a "Connect: network is unreachable" response. i was able to ping the linux machine from my XP machine *once* and get a response, but i havent been able to reproduce it.

ANY thoughts or ideas will be very helpful, even if you tell me to go buy another router! sorry if i left out any details needed for troubleshooting. just ask me and i'll get any information that can help.
 
Old 08-28-2005, 07:34 PM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
If your Linux box has an active link and IP, your problem is most likely a route issue.

What is the output of ifconfig and route?
 
Old 08-28-2005, 08:39 PM   #3
harikari
LQ Newbie
 
Registered: Aug 2005
Location: Texas
Distribution: SuSE 9.1 personal
Posts: 7

Original Poster
Rep: Reputation: 0
ifconfig:

eth0 Link encap:Ethernet HWaddr 00:50:04:65:29:47
inet6 addr: fe80::250:4ff:fe65:2947/64 Scope:Link
UP BROADCAST NOTRAILERS RUNNING MULTICAST MTU:1500 Metric:1
RX packets:389 errors:0 dropped:0 overruns:0 frame:0
TX packets:219 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:150857 (147.3 Kb) TX bytes:98362 (96.0 Kb)
Interrupt:11 Base address:0xd480

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:20759 errors:0 dropped:0 overruns:0 frame:0
TX packets:20759 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1790931 (1.7 Mb) TX bytes:1790931 (1.7 Mb)


route (seemed pretty pointless... this could be the problem, maybe?):

linux:/home/dave # route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface


...thats all. lol
standing by for further instructions.
 
Old 08-28-2005, 08:46 PM   #4
kz26
Member
 
Registered: Aug 2005
Location: USA
Distribution: Fedora, Ubuntu, Backtrack
Posts: 70

Rep: Reputation: 15
Hmmm. You have *nothing* in your route table?
 
Old 08-28-2005, 09:28 PM   #5
harikari
LQ Newbie
 
Registered: Aug 2005
Location: Texas
Distribution: SuSE 9.1 personal
Posts: 7

Original Poster
Rep: Reputation: 0
nope... nada.

im wishing i actually knew what the route table was... i assume its important though.

dont laugh, i'm learning! lol
 
Old 08-28-2005, 10:34 PM   #6
carl.waldbieser
Member
 
Registered: Jun 2005
Location: Pennsylvania
Distribution: Kubuntu
Posts: 197

Rep: Reputation: 32
Quote:
Originally posted by harikari
nope... nada.

im wishing i actually knew what the route table was... i assume its important though.

dont laugh, i'm learning! lol
The routing table is what you computer uses when it needs to know where to send data over the network. So if your routing table is empty, your computer has no idea where to send the data.

To set up your computer for networking, you really just need to use 2 commands most of the time-- ifconfig and route.

The ifconfig command lets you configure your network interface with an IP address. Your ipconfig output doesn't show an IP address, so that's a problem right there.
Code:
# ifconfig eth0 <ip address>
will set the IP address for your NIC, and it will oftentimes set up a route for your network as well. You need to pick an IP address that is on your network, though! You can't just pick any old address out of a hat!

The route command lets you add and delete routing information. On a simple home network, you will probably just want to add a route that tells your PC to send all packets to a default gateway. This command will do it:
Code:
# route add -net 0.0.0.0 netmask 0.0.0.0 gw <gateway ip address>
Note that if the ifconfig command didn't set up your network route, this route won't work since it depends on knowing how to reach other NICs on the same network. You would have to add that route manually with something like:
Code:
# route add -net <network quad> netmask <network mask> dev eth0
That says, "all packets destined for the network given should be sent to the NIC represented by eth0."
 
Old 08-29-2005, 12:01 AM   #7
harikari
LQ Newbie
 
Registered: Aug 2005
Location: Texas
Distribution: SuSE 9.1 personal
Posts: 7

Original Poster
Rep: Reputation: 0
great info! cant wait to try it out. but its late here.

so i should pick an IP thats "in my network", would that be like "192.168.0.2", or the next available number in the series? idk what all the IP's on my LAN are, guess i'll figure it out with a little tinkering tomorrow.
 
Old 08-29-2005, 08:51 AM   #8
harikari
LQ Newbie
 
Registered: Aug 2005
Location: Texas
Distribution: SuSE 9.1 personal
Posts: 7

Original Poster
Rep: Reputation: 0
problem resolved! and i understand network addressing better then ever before to boot!

i went in through yast and switched the nic to static IP, entered 192.168.0.5, still nothing worked, internet wise, but i was able to ping back and forth between my xp machine and the linux box

so i went to get the IP's from the other computers and noticed that the default gateway on all of them were set to the ip of my XP machine, so i went into the "routing" module and set default gateway to 192.168.0.1, pinged www.yahoo.com, and got responses. went to the web browser and it popped right up.

im glad i got this working, since its one less roadblock out of the way in my quest to ditch microsoft before "vista" comes out. thanks for everyones help! i wouldnt have known what to try if it wasnt for you guys!
 
  


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
No Internet but LAN and VPN connect LAN work fine??? xavior SUSE / openSUSE 7 11-09-2005 01:14 PM
How to connect to Internet using LAN bongski55 Linux - Networking 2 10-13-2005 08:29 AM
Can't connect to the internet through my LAN... help? bigmetalrabbit Fedora 5 10-03-2005 01:46 AM
Can't connect to internet thru LAN HenrikG Linux - Newbie 9 05-06-2004 05:30 AM
can't connect to the internet via Lan neo_aj Linux - Networking 11 10-13-2003 11:51 PM

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

All times are GMT -5. The time now is 12:22 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