LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 05-05-2004, 05:08 PM   #1
Shackman
LQ Newbie
 
Registered: May 2004
Posts: 2

Rep: Reputation: 0
Question Another IP Routing


OK, I've read through all the IP forwarding posts and I'm still confused....

Here's the environment:
-Red Hat 9.0
-2 Ethernet Interfaces (99.99.99.1, x.x.x.0 & 10.10.20.189, x.x.x.0)
-The 99.99.99.1 interface is the def gateway of the 99.99.99.x subnet
-The 10.10.20.189 interface is a member of the 10.10.20.x subnet, has a default gateway of 10.10.20.1
-The 99.99.99.x network needs to pass through the linux box, then onto the 10.10.20.x network to get out to the world.

Question:
The 10.10.20.189 interface has mask 255.255.255.0, & gw of 10.10.20.1
The 99.99.99.1 interface has mask of 255.255.255.0, what should its gateway be? blank?

Main Question:
How do I get this thing to route between the 10.10.20.x and 99.99.99.x subnets?

Many thanks in advance.
Shack
 
Old 05-05-2004, 05:34 PM   #2
chort
Senior Member
 
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 76
You should only have one default gateway, which is represented as the route for:
0.0.0.0 netmask 0.0.0.0

That route is the "default" which is where you send all traffic that isn't going to an IP on one of the local subnets. A local subnet is anything that falls in the netmask of one of your configured network cards (or loopback).

You'll notice that ifconfig does not have an argument for "gateway", only IP, netmask, and various other options that you can generally ignore.

You need to enable IP forwarding in order for that box to route traffic between the subnets. You'll also need to put a route on the default gateway for the 10.10.20.x subnet that routes traffic for 99.99.99.x back to 10.10.20.189.

By the way, 99.99.99.x falls in a netblock that is reserved by IANA, but it may be delegated to a Regional Internet Registrar in the future, so making use of that netblock for internal number is very bad form. You should also use IPs from the "special" reserved blocks listed in RFC1918.
 
Old 05-06-2004, 09:01 AM   #3
Shackman
LQ Newbie
 
Registered: May 2004
Posts: 2

Original Poster
Rep: Reputation: 0
OK.
I enabled IP Forwarding.
Routing tables look correct now (after correcting the def gateway issue)

From the box, I can ping devices on the 99.99.99.x network, but I cant ping anything on the 10.10.20.x subnet, 'Destination Host Unreachable'

I can ping my local 10.10.20.189 interface.

Added a static route in the def gateway for the 99.99.99.x network.

I can ping the 10.10.20.189 interface from devices on the 99.99.99.x network, but can't ping anything else on the 10.10.20.x network (nor can the linux box)

What could the problem be now?

Shack
 
Old 05-06-2004, 10:51 AM   #4
zaphodiv
Member
 
Registered: Oct 2003
Distribution: Slackware
Posts: 388

Rep: Reputation: 30
Show us the routing table.

>after correcting the def gateway issue
Which one? You had two default gateway issues.

You'll also need to put a route on the default gateway for the 10.10.20.x subnet that routes traffic for 99.99.99.x back to 10.10.20.189.

Chort means that you have to set a route on the box which is 10.10.20.1, not on your box.
 
Old 05-06-2004, 02:55 PM   #5
chort
Senior Member
 
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 76
Quote:
Originally posted by zaphodiv
Show us the routing table.
You'll also need to put a route on the default gateway for the 10.10.20.x subnet that routes traffic for 99.99.99.x back to 10.10.20.189.

Chort means that you have to set a route on the box which is 10.10.20.1, not on your box.
Correct. I guess I wasn't clear enough about that.
 
  


Reply



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
routing jmono Linux - Networking 5 02-07-2006 06:20 AM
Routing gtkmike Linux - Networking 1 11-13-2003 09:21 AM
real routing under nat routing nothingmuch Linux - Networking 4 10-27-2003 03:11 PM
Routing in RH 8.0 Hybrid Blue Linux - Networking 2 10-12-2003 05:41 PM
Routing jimval7 Linux - Networking 3 02-08-2002 04:06 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 03:01 PM.

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
Open Source Consulting | Domain Registration