LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 11-10-2003, 06:12 AM   #1
Paul Woodhouse
LQ Newbie
 
Registered: Nov 2003
Posts: 6

Rep: Reputation: 0
Question Red Hat 9 Default Gateway


Hi

I have a Red Hat Linux pc set up, dual booting with 2003. Now, 2003 connects to internet over dsl no probs. Linux is another matter. I set it up as follows.

IP: 217.155.x.x
Sub: 255.255.255.248
Def Gatway: 10.0.0.138 (ADSL router Speedtouch 510)

you see the problem?! my adsl router has a IP in a different subnet, and for some reason linux has a problem with this. There no way the router will take an external IP.

How can i workaround this problem. It must have the external ip.

Thanks

Paul
 
Old 11-10-2003, 07:49 AM   #2
idaho
Member
 
Registered: Aug 2003
Location: Portland, Oregon
Distribution: RedHat, Libranet
Posts: 438

Rep: Reputation: 30
Check your MSWin image's network configuration by invoking at a command line:
ipconfig /all

Compare this to what you are setting up in your RH image.

Your gateway has to have a ip address in your subnet, or you can not talk to it. If this was not the case, then there would be no reason for you to need a gateway.
 
Old 11-10-2003, 08:15 AM   #3
Paul Woodhouse
LQ Newbie
 
Registered: Nov 2003
Posts: 6

Original Poster
Rep: Reputation: 0
the router is in the same subnet, the problem is that linux thinks its not cos it evaluates 10.0.0.138 into being on a different subnet. ( the routers subnet is deffo 255.255.255.248)

From routers ip config:

1 eth0 Type:Ethernet HWaddr 00:90:d0:20:68:3b BRHWaddr ff:ff:ff:f
f:ff:ff
ip-addr:10.0.0.138 mask:255.255.255.248
 
Old 11-10-2003, 12:28 PM   #4
idaho
Member
 
Registered: Aug 2003
Location: Portland, Oregon
Distribution: RedHat, Libranet
Posts: 438

Rep: Reputation: 30
Perhaps I am misunderstanding you. I understood your first post to say that your RH box has an ip of 217.155.x.x. In your secnd post you say your router is on the same subnet as the RH box with an ip address of 10.0.0.138.

Even though your subnet masks may be the same, the two ip addresses you have given would be on different subnets because the first two octets (217.155 and 10.0) are different.
 
Old 11-10-2003, 01:14 PM   #5
Paul Woodhouse
LQ Newbie
 
Registered: Nov 2003
Posts: 6

Original Poster
Rep: Reputation: 0
yeah yeah i know, terrible setup! its the only way i could get this crap router to work with my 8ip block from isp though. because the routers address is assinged to the ppp0a port. it won't let me assign it to eth0 as well, rediculous situation i think you'll agree. let be go though it again.

My pcs all have an address of
IP: 217.155.x.x.
SUB: 255.255.255.248
DG: 10.0.0.138

Router:
IP: 10.0.0.138
SUB: 255.255.255.248

As you say linux must calculate the subnet for the default gateway as 255.0.0.0. and therfore can't access it, windows i assume uses the subnet for the configured ip address, and therefore doesn't have a problem.

Is there a solution to make linux work in this setup?

Thanks

Paul
 
Old 11-10-2003, 01:43 PM   #6
idaho
Member
 
Registered: Aug 2003
Location: Portland, Oregon
Distribution: RedHat, Libranet
Posts: 438

Rep: Reputation: 30
Ahhh, I was confused.

I suspect iptables is your friend.

If you have trouble getting iptables configured to do this, you might want to repost your question - phrasing it along the lines of: "how do I get iptables to redirect my default gateway address?"
 
Old 11-10-2003, 02:24 PM   #7
Paul Woodhouse
LQ Newbie
 
Registered: Nov 2003
Posts: 6

Original Poster
Rep: Reputation: 0
ok i'll do that. Thanks for your help.

Paul
 
Old 11-11-2003, 11:19 AM   #8
idaho
Member
 
Registered: Aug 2003
Location: Portland, Oregon
Distribution: RedHat, Libranet
Posts: 438

Rep: Reputation: 30
Paul:

After I gave you the suggestion to use iptables, I recalled that I had actually done something similar to what you are requesting (different situation, but the same end result). The distro was RH7.3, so the implementation should be similar.

1) copy your /etc/sysconfig/network-scripts/ifcfg-eth0 file to /etc/sysconfig/network-scripts/ifcfg-eth0-alias

2) edit the new file, adding lines appropriate for a device sitting on your gateway's subnet, and defining the interface as eth0:0 (i.e., DEVICE='eth0:0').

3) Modify (or create) the /etc/sysconfig/static-routes files to add a route to the gateway using your eth0:0 interface.
 
  


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
Setting up a Gateway in Red Hat 9 depam Linux - Software 1 10-02-2005 11:35 PM
how do i configure red hat 9.0 to run as an internet gateway shadowvamp04 Linux - Networking 4 07-31-2004 07:34 PM
gateway solo 1450 Red Hat 9 HOWTO!!!!! Ricio Linux - Hardware 1 09-30-2003 07:01 PM
Red Hat 9.0 on Gateway 2500 laptop matkins Linux - Laptop and Netbook 3 09-16-2003 08:23 AM
Red Hat 7.3 gateway troubles Calista Jade Linux - Networking 1 11-04-2002 03:41 PM

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

All times are GMT -5. The time now is 07:31 AM.

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