LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-21-2004, 05:19 PM   #1
deardron
Member
 
Registered: Dec 2003
Location: Russia/Iceland
Distribution: Ubuntu 6, NetBSD 3.1, Cygwin
Posts: 39

Rep: Reputation: 15
LAN connection


I've got 2 comps both having RedHat 9.0. I was setting up LAN connection between them but when I did and ping started working I had to re-install the system on the one of them and after that I can't restore connection. The first computer has 2 cards eth0 (for DSL) and eth1 (for intranet, 192.168.0.1). The second one has one interface eth0 (192.168.0.2). I'm trying to do it from scratch but such tools as redhat-network-config or manual editing /etc/sysconfig/network, /etc/sysconfig/network-scripts/ifcfg-eth0 and /etc/sysconfig/network-scripts/ifcfg-eth1 don't help. I suspect the problem can be in routeing, I go
route add -net <second computer> netmask 255.255.255.255 gateway 192.168.0.1 eth1

but it doesn't work either. How can I work it out?
 
Old 01-21-2004, 05:45 PM   #2
ricstirato
Member
 
Registered: Jan 2004
Location: Gießen, Germany
Distribution: Xubuntu 12.04, Mythbuntu, Ubuntu Server 12.04
Posts: 174

Rep: Reputation: 24
The Interfaces are up on both systems?

Can you post the output of

route -n

and

ifconfig

on both systems?
 
Old 01-22-2004, 05:49 PM   #3
deardron
Member
 
Registered: Dec 2003
Location: Russia/Iceland
Distribution: Ubuntu 6, NetBSD 3.1, Cygwin
Posts: 39

Original Poster
Rep: Reputation: 15
All right, you asked: (yes, all the ethX interfaces were up on both computers)

Computer 1
route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.0.2 192.168.0.1 255.255.255.255 UGH 0 0 0 eth1
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
10.5.32.0 0.0.0.0 255.255.252.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth1
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 10.5.32.1 0.0.0.0 UG 0 0 0 eth0
ifconfig
eth0 Link encap:Ethernet HWaddr 00:08:95:C5:54:BA
inet addr:10.5.34.24 Bcast:10.5.35.255 Mask:255.255.252.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:40 errors:0 dropped:0 overruns:0 frame:0
TX packets:5 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:4796 (4.6 Kb) TX bytes:1151 (1.1 Kb)
Interrupt:5 Base address:0xcc00

eth1 Link encap:Ethernet HWaddr 00:51:04:08:44:AA
inet addr:192.168.0.1 Bcast:192.168.0.255 Mask:255.255.255.0
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:4 errors:0 dropped:0 overruns:0 carrier:4
collisions:0 txqueuelen:100
RX bytes:0 (0.0 b) TX bytes:240 (240.0 b)
Interrupt:11 Base address:0xc800

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

Computer 2
route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.0.1 192.168.0.2 255.255.255.255 UGH 0 0 0 eth0
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
ifconfig
eth0 Link encap:Ethernet HWaddr 00:32:4F:27:C5:C9
inet addr:192.168.0.2 Bcast:192.168.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:19 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:0 (0.0 b) TX bytes:1140 (1.1 Kb)
Interrupt:11 Base address:0xf000

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:20 errors:0 dropped:0 overruns:0 frame:0
TX packets:20 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1724 (1.6 Kb) TX bytes:1724 (1.6 Kb)
-------------------------------------------------------------------------
I don't understand several things there:
1) Where does the net 169.254.0.0 comes from? I didn't add it.
2) Where are stored the default values for route? When the system loads anew it doesn't remember the values I added before and posts out defaults and I'm forced to type them again.
3) What's finally wrong?
 
Old 01-23-2004, 06:35 PM   #4
ricstirato
Member
 
Registered: Jan 2004
Location: Gießen, Germany
Distribution: Xubuntu 12.04, Mythbuntu, Ubuntu Server 12.04
Posts: 174

Rep: Reputation: 24
The 169.254 subnet is used by LINKLOCAL. Using this, computers in a local network do a handshake to get an IP address automagically, without any DHCP server.
This address range is not routeable over the Internet.

I don't know much about this, since I never used it, and it is more common in Windows home networks.


Basic routing/network configuration on Red Hat is stored in /etc/sysconfig/network and /etc/sysconfig/network-scripts/ifcg-<interface_name>
Routes configured on the console are never stored anywhere, so they are lost after reboot.


Concerning your configuration:
The direct routes to the single hosts are unnecessary (you figured out already they don't work either).
I suspect (without really knowing it) that LINKLOCAL may be your problem. Maybe it collides with your static IP configuration. Try to turn in off - you don't need it anyway.

Otherwise: Have you already checked the cable(s) and the hub/switch, if you use one?
 
Old 01-23-2004, 08:37 PM   #5
deardron
Member
 
Registered: Dec 2003
Location: Russia/Iceland
Distribution: Ubuntu 6, NetBSD 3.1, Cygwin
Posts: 39

Original Poster
Rep: Reputation: 15
Thanks, I'm afraid the cable is set up correctly. I don't use a switch, as there are only 2 machines in the net.

Your say about LINKLOCAL and static IP address is more interesting, I'm gonna try it. I think I should delete it with 'route del 169.254.0.0' each time. Strange that it doesn't appear anywhere in the network configuration files. So I'll let you know about my attempts later ;-)
 
  


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
Lan Connection kruzzin Linux - Networking 2 11-16-2005 10:30 AM
Backgrounding Lan connection Carroarmato0 Linux - Networking 2 03-11-2005 03:48 PM
Lan Connection But No Internet Connection chant151 Linux - Networking 1 03-04-2005 08:55 AM
Can't get a connection from my LAN M4A1Carbine Linux - Networking 3 08-20-2003 12:31 PM
LAN connection but no INTERNET connection Coolrunr Linux - Networking 9 07-28-2003 12:28 AM


All times are GMT -5. The time now is 06:41 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration