Help problems with route ...

Kernels & Hardware, configuring network, installing services

Help problems with route ...

Postby aan43s » 2008-06-24 05:36

I'm newbie in Linux :( ...

These are what I have right now:
  1. In my network configured with 10.10.4.0/24, I called it LAN-A, I have computer that already set up as my router/gateway, so I can accessing the Internet with IP number is 10.10.4.1. (it use DHCP) from inside LAN-A
  2. In my office I have network configured with 192.168.10.0/24, I called it LAN-B

Internet is already connected in LAN-A and I decided to connecting LAN-A and LAN-B vice versa.

Then I set one of my computer with 2 Ethernet card, that is eth0 and eth1 so it would be a router between LAN-A and LAN-B. I will show you how my /etc/network/interface is configured:
Code: Select all
# The loopback network interface
auto lo
iface lo inet loopback
#to LAN A - special for this comp. I used static
auto eth0
iface eth0 inet static
        address 10.10.4.55
        netmask 255.255.255.0
        network 10.10.4.0
        broadcast 10.10.4.255
        gateway 10.10.4.1

# to LAN B
auto eth1
iface eth1 inet static
        address 192.168.10.5
        netmask 255.255.255.0
        network 192.168.10.0
        broadcast 192.168.10.255
        #gateway 10.10.4.1

and here is the result of netstat -nr
Code: Select all
gagoyiku@lewu-tatau:~$ netstat -nr
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
10.10.4.0       0.0.0.0         255.255.255.0   U         0 0          0 eth0
192.168.10.0    0.0.0.0         255.255.255.0   U         0 0          0 eth1
0.0.0.0         10.10.4.1       0.0.0.0         UG        0 0          0 eth0

I have used route add etc command to connecting my LAN, but it won't work for me.

Any advices really appreciated ...

Please ignoring my grammar..
Last edited by aan43s on 2008-06-26 03:00, edited 1 time in total.
aan43s
 
Posts: 4
Joined: 2008-06-24 05:06

Postby Quantum » 2008-06-24 12:39

Really good for a n00b!

Where is 10.10.4.1? You have this set up so that eth0 is connected to 10.10.4.1 (next machine), and 10.10.4.1 is connected to The Internets.
Quantum
 
Posts: 1455
Joined: 2006-03-21 19:06
Location: Seattle, Ecotopia

Postby aan43s » 2008-06-26 02:58

Quantum wrote:Where is 10.10.4.1? You have this set up so that eth0 is connected to 10.10.4.1 (next machine), and 10.10.4.1 is connected to The Internets.


10.10.4.1 is in 10.10.4.0/24, this is what I called with LAN-A.. In 10.10.4.1 already installed Web Server, DHCP and transparent Proxy ..
In 10.10.4.1 I've executed command to add route like this

Code: Select all
route add -net 192.168.10.0/24 gw 10.10.4.55


When I ping number 192.168.10.55 from the other computer in LAN-A, it works! But when I ping the other computers, ie : 192.168.10.1, it won't works.
aan43s
 
Posts: 4
Joined: 2008-06-24 05:06

Postby Quantum » 2008-06-26 03:12

aan43s wrote:
Quantum wrote:Where is 10.10.4.1?

10.10.4.1 is in 10.10.4.0/24, this is what I called with LAN-A

This answer is self-referencing.

What I am asking is what is the topology of your network? I understand that LAN-A is one cloud, and that LAN-B is another cloud, and that you want to use the new machine to route.

So maybe you man that 10.10.4.1is just one of the machines in LAN-A, which happens to have an internet connection. But then you seem to say that all of LAN-A is accessible from outside, since 10.10.4.1 is? If one is, they all are, since this is not a private address range.

Seems to me that you want to give 192.168.10.* access to The Internets through the new machine. So when any machine in 192.168.10.* requests some strange IP that nobody recognizes, it must go out the default gateway.
Quantum
 
Posts: 1455
Joined: 2006-03-21 19:06
Location: Seattle, Ecotopia

Postby aan43s » 2008-06-26 03:41

Quantum wrote:What I am asking is what is the topology of your network?

Oke, here is my topology ..
Image

Quantum wrote:Seems to me that you want to give 192.168.10.* access to The Internets through the new machine.

Yes it is. But not only internet access, I want to try connecting LAN A <--> LAN B so it can share their file and etc ...
aan43s
 
Posts: 4
Joined: 2008-06-24 05:06

Postby Quantum » 2008-06-26 04:00

OK, it's about what I inferred.

So in /etc/network/interfaces 10.10.4.55 should have as its gateway 10.10.4.1, and your server should have as its gateway the firewall interface it looks at. So when any machine on either cloud asks for an IP no one knows about, the request is sent out the default gateway.

Where exactly is it failing?
Quantum
 
Posts: 1455
Joined: 2006-03-21 19:06
Location: Seattle, Ecotopia

Postby aan43s » 2008-06-26 04:29

Quantum wrote:So in /etc/network/interfaces 10.10.4.55 should have as its gateway 10.10.4.1, and your server should have as its gateway the firewall interface it looks at. So when any machine on either cloud asks for an IP no one knows about, the request is sent out the default gateway.

Does it means I have to add more routing command in the new router between LAN-A <---> LAN-B?

In 10.10.4.1 (gateway of LAN-A) I've added command:
Code: Select all
# route add -net 10.10.4.0/24 gw 10.10.4.55

After that, I can ping 192.168.10.5 (previously I can't do that) from any computer in LAN-A; that is IP of my new router which connected into LAN-B. But like I said before, when I ping another computer in LAN-B, it reported 'Request timed out'.

Quantum wrote:Where exactly is it failing?

I've configured any computer in LAN-B to use 192.168.10.5 as its gateway, but it failed to accessing LAN-A.
I don't know somehow, the request command I sent was dropped in the new router, but I still can ping any computers in LAN-A and LAN-B from the new machine.
aan43s
 
Posts: 4
Joined: 2008-06-24 05:06


Return to System configuration

Who is online

Users browsing this forum: No registered users and 11 guests

fashionable