You are not logged in.

#1 2012-05-20 19:10:00

zorro
Member
Registered: 2011-11-18
Posts: 47

Routing Table - Simple LAN and Internet Router

Hi,

I have a wired LAN with static IP addresses, consisting of a few PCs, an unmanaged Switch and a separate Internet Router.

route shows:
Kernel IP routing table
Destination     Gateway        Genmask         Flags  Metric   Ref    Use   Iface
default         192.168.1.1    0.0.0.0         UG     0        0      0     eth0
192.168.1.0     *              255.255.255.0   U      0        0      0     eth0

This allows internet browsing and NFS etc between the PCs but the Router needs to be powered.

I would like to change the routing table to allow the LAN to function without the Router. I can manually adjust each PC's routing table to define itself as the Gateway.

route now shows:
Kernel IP routing table
Destination     Gateway        Genmask         Flags  Metric   Ref    Use   Iface
default         192.168.1.1    0.0.0.0         UG     0        0      0     eth0
192.168.1.0     192.168.1.2    255.255.255.0   UG     0        0      0     eth0

Is this a nonsense configuration?
Is there a better way to do this?
Can rc.conf define this new configuration?

Thanks

Offline

#2 2012-05-21 00:07:41

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,226
Website

Re: Routing Table - Simple LAN and Internet Router

Give us some more detail about your setup; when you say "separate internet router", do you mean a Linux box acting as a router, or a dedicated device (like a Cisco, Linksys, Netgear etc)?

I think you mean you topology is:

                                                   +------+
                                             +---->| PC 1 |
                                             |     +------+
                                             |
+----------+      +--------+      +----------+     +------+
| Internet +----->| Router |----->|  Switch  +---->| PC 2 |
+----------+      +--------+      +----------+     +------+
                                             |
                                             |     +------+
                                             +---->| PC 3 |
                                                   +------+

You do not need to define any gateway to talk to other computers on the local network, nor should the router need to be turned on to do so unless it is serving DHCP leases (which it isn't if everything has static addresses as you say)

Offline

#3 2012-05-21 19:13:42

zorro
Member
Registered: 2011-11-18
Posts: 47

Re: Routing Table - Simple LAN and Internet Router

Your topology is 100% correct. The router is a dedicated device - BT Voyager 210 ADSL router. DHCP is not used.

I would like a single configuration that allows internet access and keeps LAN traffic within the LAN - Sometimes I want to use a cross-over cable between 2 PCs.

Here are some network files:

cat resolv.conf 
domain home
nameserver 192.168.1.1
cat hosts
127.0.0.1	localhost.localdomain	localhost
::1		localhost.localdomain	localhost
192.168.1.1				router
192.168.1.2				sony
192.168.1.3				toshiba
192.168.1.4				desktop

I always use ip addresses but these may be automatically replaced. ie

route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         router          0.0.0.0         UG    0      0        0 eth0
192.168.1.0     *               255.255.255.0   U     0      0        0 eth0

Thanks for the reply.

Last edited by zorro (2012-05-21 19:14:32)

Offline

#4 2012-05-21 21:54:28

Gcool
Member
Registered: 2011-08-16
Posts: 1,456

Re: Routing Table - Simple LAN and Internet Router

In that case, you don't have to change anything. Just configure a static ip in the 192.168.1.0/24 range for each of the pc's and they should be able to communicate with eachother even when the router's turned off.

EDIT: typo in ip range

Last edited by Gcool (2012-05-22 06:55:10)


Burninate!

Offline

#5 2012-05-21 23:59:57

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,226
Website

Re: Routing Table - Simple LAN and Internet Router

Gcool wrote:

In that case, you don't have to change anything. Just configure a static ip in the 192.168.0.1/24 range for each of the pc's and they should be able to communicate with eachother even when the router's turned off.

Yup.

Although since you're posting, I'm guessing it's not working that way...? What is the actual problem (error messages etc)?

Offline

#6 2012-05-23 20:36:41

zorro
Member
Registered: 2011-11-18
Posts: 47

Re: Routing Table - Simple LAN and Internet Router

I tried to reproduce the fault using NFS but everything work correctly. Both PCs were configured as shown in #1, the first route output. Hmm.

In the past week I have update one of the PCs to use X, firefox, KDM, nx, VNC etc, whilst testing out remote desktop technologies. I will be restoring the back-up soon and will hopefully be able to provide specific failure info.

Thanks.

Offline

Board footer

Powered by FluxBB