LinuxQuestions.org
Visit Jeremy's Blog.
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 01-26-2003, 07:24 PM   #1
LAR12345
LQ Newbie
 
Registered: Jan 2003
Location: Memphis, TN
Posts: 14

Rep: Reputation: 0
Help Routing RH 8.0


I am having trouble routing between 2 net cards in RH 8.0. On eth0 10.52.1.200 gw 10.52.1.254, eth1 10.52.3.2 gw 10.52.1.200. Using a workstation 10.52.3.60 gw 10.52.3.2 I can ping 10.52.3.2, and 10.52.1.200, anything else I am unable to ping. Any help would be appreciated thanks in advance.
 
Old 01-26-2003, 08:21 PM   #2
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
you need a default route to the interface where your connection to the host is

for instance if your internet connection is connected through eth0 then the router that's connected to eth0's ip address will be the default route

route add default gw xxx.xxx.xxx.xxx

if you already have a default route set and it is incorrect then remove it first

route delete default


if the ip you are reaching is in the same network as one of the interfaces you have it will be routed that way, all others will go through the default router
 
Old 01-26-2003, 08:26 PM   #3
wdingus
Member
 
Registered: Aug 2001
Location: Kingsport, TN
Distribution: RHEL & FC
Posts: 267

Rep: Reputation: 30
To add to what David said here, what is your subnet mask(s) on these machines? Unless they're class C 255.255.255.0 both networks would be considered to be on the local LAN and would not be sent to the 'router'.
 
Old 01-26-2003, 09:17 PM   #4
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
I misread this original post
you are trying to access a client connected to eth1 from a client on eth0 right.


you can enable ip forwarding and proxyarp


echo 1 > /proc/sys/net/ipv4/ip_forward
echo 1 > /proc/sys/net/ipv4/conf/eth0/proxy_arp
echo 1 > /proc/sys/net/ipv4/conf/eth1/proxy_arp




Last edited by DavidPhillips; 01-26-2003 at 09:22 PM.
 
Old 01-26-2003, 09:45 PM   #5
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
Another thing..

depending on the netmask of the interfaces, they could be on the same network. If they are you will need to add routes to each host. This can be a pain if you have a lot of hosts, so you would be better off making the interfaces on deifferent networks. Or you could setup a bridge.

This shows how to do both proxyarp and bridge..
http://www.linuxquestions.org/questi...392#post188392

Last edited by DavidPhillips; 01-26-2003 at 09:47 PM.
 
Old 04-11-2003, 05:24 PM   #6
tirgon
LQ Newbie
 
Registered: Apr 2003
Posts: 2

Rep: Reputation: 0
I think I may have the same problem....any help is greatly appreciated.

My setup is to connect (eventually via VPN) a wireless network to a wired network where the wireless network can have access to the Internet.

Wireless LAN:
192.168.10.0/24--> Linux Mandrake Box
ETH0:192.168.10.254
ETH1:192.168.160.10-->(GW/FW)192.168.160.254-->Internet

I can ping from the 192.168.10.0 subnet to the ETH0 IP but can't get beyond that. The Linux box can ping both subnets.

Anyone got suggestions?
 
Old 04-11-2003, 11:17 PM   #7
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
To access the internet through your linux router you need to setup your iptables rules for doing masquerade. This will give anyone on the masqed interface a connection.

besides iptables rules you also need to make sure ip forwarding is enabled

echo 1 > /proc/sys/net/ipv4/ip_forward

here are some iptables scripts

http://www.linuxguruz.org/iptables/
 
Old 04-13-2003, 01:13 AM   #8
ankscorek
Member
 
Registered: Mar 2003
Distribution: Slackware10.2,SUSE,FC,RHL,Vector Linux,WHAX,PHLAK,bt4,ubuntu,debian,aptosid,backtrack,blackbuntu
Posts: 529

Rep: Reputation: 31
just goto

/etc/sysctl.conf

over there reset the value of packet forwarding from 0 to 1 and then......
echo 1 > /proc/sys/net/ipv4/ip_forward
echo 1 > /proc/sys/net/ipv4/conf/eth0/proxy_arp
echo 1 > /proc/sys/net/ipv4/conf/eth1/proxy_arp

your packets will be forwareded.......
tell me did it work!!!!!
 
Old 04-13-2003, 07:06 PM   #9
tirgon
LQ Newbie
 
Registered: Apr 2003
Posts: 2

Rep: Reputation: 0
getting frustrated...

okay...i'm a linux convert wanna-be so I'm getting frustrated as heck. I even installed webmin to help with all this configuration at least till i'm comfortable with an editor that's not GUI based.

Anyway, ip_forward is set to 1.....i attempted to go through the IP Masq How-to...I'm running Mandrake so I decided to try and use Shorewall since that's what comes with it. To no avail....i'm still not able to browse the web from the masq'ed subnet.

would love some hand-holding on this one if anyone would be so gracious enough.
 
Old 04-13-2003, 08:04 PM   #10
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
so the linux box has web access and a browser functions on it?

If so you just need three more things

IP_forward = 1

echo 1 > /proc/sys/net/ipv4/ip_forward


the masquerade rule on an iptables enabled machine

$IPTABLES -t nat -A POSTROUTING -o $INET_IFACE -j MASQUERADE


dns configured on the clients

this needs to be done for a browser to be able to get the right address. You can see if that's your problem by trying an ipaddress in your browser.

the nameservers can be found in /etc/resolv.conf on a linux box with a working dns.

I use dhcpd on my router to setup my clients, but you can do it manually
 
  


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 09:17 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