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? |
The Interfaces are up on both systems?
Can you post the output of route -n and ifconfig on both systems? |
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? |
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? |
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 ;-) |
All times are GMT -5. The time now is 01:47 AM. |