[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Routing question?





Robert Middleswarth wrote:
Here is what I am tiring to do?

Yes, we have no bananas?  Bunny with a pancake on it's head?

No offense intended, but your question is just confusing from the first sentence. You loose points on the respect-o-meter for not being able to spell or using a spell checker, and inappropriate use of the question mark. You also don't clearly define what your objective is, so it's hard to figure out what kind of result you want to have from asking your question. Maybe English isn't your native language, and that's forgivable. Finally, you didn't RTFM.

Now that I've chastised you, the least I can do is try to help.

I'm guessing that what your objective is as follows;
	You have a host with two network interfaces, eth0 and eth1
	eth0 is on net 70.1.1.5/26
	eth1 is on net 192.168.10.5/24
	Your default gateway (internet) is at 70.1.1.1

	You NEED a route for net 192.168.0.0/16 to 192.168.10.1

Your first configuration example was more correct, but you are missing the route for the 192.168.0.0/16 network. You tried doing that with another default route in the second example, but that messes everything up.

You need to use the route program!

man route

just type "route" on the command line to get the existing routing table.

Here is what you need to do as root on the command line;

route add -net 192.168.0.0 netmask 255.255.0.0 gw 192.168.10.1

All fixed.

Now, you need to add something to your interfaces file so that you get this route during boot time.

Read this, specifically section 10.6.1.1
http://www.debian.org/doc/manuals/reference/ch-gateway.en.html

All fixed.

Now RTFM!



I have both a public IP and private IP address for this we will call them 70.1.1.5 and 192.168.10.5. The 192.168.10.5 has a gateway of 192.168.10.1 and it routes out to 192.168.x.x address. The 70.1.1.5 has a gateway of 70.1.1.1 and routes to the inet. I haven't be able to get this to work. I have searched and can't find what I am looking this is the closest I have found but can't figuire how to use. This is my current interface setup.

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
       address 70.1.1.5
       netmask 255.255.255.192
       network 70.1.1.1
       broadcast 70.1.1.63
       gateway 70.1.1.1

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

This works but only if the I am connecting or talking to 192.168.10.x IP if I try to connection 192.168.11.20 it wont work then I tired.

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
       address 70.1.1.5
       netmask 255.255.255.192
       network 70.1.1.1
       broadcast 70.1.1.63
       gateway 70.1.1.1

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 192.168.10.1

This caused my public IP trafic to go thought my local IP network resulting in major problems with the connection. I known I am missing something simple but can't see it now. If there is doc for networking under debian please point me to it.

Thanks
Robert




--
# Jesse Molina
# Mail = jesse@opendreams.net
# Page = page-jesse@opendreams.net
# Cell = 1.602.323.7608
# Web  = http://www.opendreams.net/jesse/




Reply to: