unable to route traffic between two networks on Red Hat 6.2
Hello all.
I am a Sun administrator needing to get a router set up on Red Hat 6.2. I am simply trying to join two private networks, 192.168.0.0 and 10.1.1.0. The router I have configured has eth0 at 10.1.1.100 and eth1 at 192.168.1.1. I do not need to be able to route traffic to the internet using NAT -- I only need a DHCP server on my 192.168.0.0 network to give out IP addresses on that network (this works fine) that will allow users to access the 10.1.1.0 network.
On my router, currently I can ping an address on the 10.1.1.0 network, but not when I use something like ping -I 192.168.1.1 10.1.1.1 to do so. This should work, right?
/etc/sysconfig/network looks like:
NETWORKING=yes
HOSTNAME=myhost.mydomain
GATEWAYDEV=eth0
GATEWAY=10.1.1.1
FORWARD_IPV4=YES
/etc/sysconfig/static-routes has:
eth1 net 192.168.0.0 netmask 255.255.0.0 gw 192.168.1.1 eth0 net 10.1.1.0 netmask 255.255.255.0 gw 10.1.1.100
Can anyone please point out what I am missing or otherwise doing wrong? Even if the answer is "buy a book", a suggestion on which one might help me is welcome also.
Again, I don't need to be concerned about NAT, firewalls or security at this point, which is why I haven't touched ipchains for this purpose. I assume I don't need it only to route traffic between two networks, no?
Thanks much in advance!
-Ian
begin:vcard
n:Zapczynski;Ian
tel;work:215-283-4877 x120
x-mozilla-html:FALSE
url:http://www.quarterleaf.com/
org:The Sycamore Group
adr:;;;;;;
version:2.1
email;internet:[email protected]
title:Sun Certified System/Network Administrator
fn:Ian Zapczynski
end:vcard
Thanks very much for the suggestion. This was indeed something I missed and will make a note of.
I set /etc/sysctl.conf, rebooted, and confirmed that /proc/sys/net/ipv4/ip_forward contained "1", but I still can't do a ping -I 192.168.1.1 10.1.1.1 nor a traceroute -i eth1 10.1.1.1.
I hope it's just one other minor piece I'm missing.
Thanks,
-Ian
Quoted 47 lines · Jeff Largent
echo 1 >
/proc/sys/net/ipv4/ip_forwardand to make it take effect everytime the sys boots edit
/etc/sysctl.confchange
net.ipv4.ip_forward = 0
to
net.ipv4.ip_forward = 1Quoted 38 lines · Ian Zapczynski
Hello all.
I am a Sun administrator needing to get a router set up on Red Hat 6.2. I am simply trying to join two private networks, 192.168.0.0 and 10.1.1.0. The router I have configured has eth0 at 10.1.1.100 and eth1 at 192.168.1.1. I do not need to be able to route traffic to the internet using NAT -- I only need a DHCP server on my 192.168.0.0 network to give out IP addresses on that network (this works fine) that will allow users to access the 10.1.1.0 network.
On my router, currently I can ping an address on the 10.1.1.0 network, but not when I use something like ping -I 192.168.1.1 10.1.1.1 to do so. This should work, right?
/etc/sysconfig/networklooks like:NETWORKING=yes
HOSTNAME=myhost.mydomain
GATEWAYDEV=eth0
GATEWAY=10.1.1.1
FORWARD_IPV4=YES
/etc/sysconfig/static-routeshas:eth1 net 192.168.0.0 netmask 255.255.0.0 gw 192.168.1.1 eth0 net 10.1.1.0 netmask 255.255.255.0 gw 10.1.1.100
Can anyone please point out what I am missing or otherwise doing wrong? Even if the answer is "buy a book", a suggestion on which one might help me is welcome also.
Again, I don't need to be concerned about NAT, firewalls or security at this point, which is why I haven't touched ipchains for this purpose. I assume I don't need it only to route traffic between two networks, no?
Thanks much in advance!
-Ian
begin:vcard
n:Zapczynski;Ian
tel;work:215-283-4877 x120
x-mozilla-html:FALSE
url:http://www.quarterleaf.com/
org:The Sycamore Group
adr:;;;;;;
version:2.1
email;internet:[email protected]
title:Sun Certified System/Network Administrator
fn:Ian Zapczynski
end:vcard
Quoted 10 lines
Thanks very much for the suggestion. This was indeed something I missed and will make a note of.
I set
/etc/sysctl.conf, rebooted, and confirmed that/proc/sys/net/ipv4/ip_forwardcontained "1", but I still can't do a ping -I 192.168.1.1 10.1.1.1 nor a traceroute -i eth1 10.1.1.1.I hope it's just one other minor piece I'm missing.
but without indicating the source interface, does your traceroute work?
you could give us the output from "/sbin/route -n" and "/sbin/ifconfig". it might help.
best regards,
camelia
--
Camelia Nastase, [email protected]
Network Administrator
Dynamic Network Technologies, Romania
Tel: +40-1-2106863 Fax: +40-1-3122745
Yes, if I do not indicate the source interface, I can traceroute to 10.1.1.1 (or any other machine on the 10.1.1.0 network) from the router successfully. I can also ping/traceroute to the 192.168.0.0 machines from the router.
I will add that I can also traceroute/ping the router's 10.1.1.100 interface from the other machines on the 192.168.0.0 network, but using Ethereal on my router, I see that ping requests from 192.168.0.0 clients to other 10.1.1.0 addresses come to the router but go no further.
I have pasted the output you requested below. I am very grateful for your time and assistance.
-Ian
/sbin/route -n:
Destination Gateway Genmask Flags Metric Ref Use Iface 10.1.1.0 10.1.1.100 255.255.255.0 UG 0 0 0 eth0 10.1.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 192.168.0.0 192.168.1.1 255.255.0.0 UG 0 0 0 eth1 192.168.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth1 127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo 0.0.0.0 10.1.1.1 0.0.0.0 UG 0 0 0 eth0
eth0 Link encap:Ethernet HWaddr 00:50:DA:10:E6:E7
inet addr:10.1.1.100 Bcast:10.1.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:68380 errors:0 dropped:0 overruns:0 frame:0
TX packets:21254 errors:0 dropped:0 overruns:0 carrier:5
collisions:199 txqueuelen:100
Interrupt:10 Base address:0xe400eth1 Link encap:Ethernet HWaddr 00:04:5A:6A:86:33
inet addr:192.168.1.1 Bcast:192.168.255.255 Mask:255.255.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:6423 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:11211 dropped:0 overruns:0 carrier:20183
collisions:0 txqueuelen:100
Interrupt:5 Base address:0xe000Quoted 11 lines · Camelia NASTASE
Quoted 10 lines
Thanks very much for the suggestion. This was indeed something I missed and will make a note of.
I set
/etc/sysctl.conf, rebooted, and confirmed that/proc/sys/net/ipv4/ip_forwardcontained "1", but I still can't do a ping -I 192.168.1.1 10.1.1.1 nor a traceroute -i eth1 10.1.1.1.I hope it's just one other minor piece I'm missing.
Quoted 8 lines
but without indicating the source interface, does your traceroute work?
you could give us the output from "
/sbin/route-n" and "/sbin/ifconfig". it might help.best regards,
camelia
--
begin:vcard
n:Zapczynski;Ian
tel;work:215-283-4877 x120
x-mozilla-html:FALSE
url:http://www.quarterleaf.com/
org:The Sycamore Group
adr:;;;;;;
version:2.1
email;internet:[email protected]
title:Sun Certified System/Network Administrator
fn:Ian Zapczynski
end:vcard
Quoted 6 lines · James A. Goodwin
You say in your message that your router eth0 is 10.1.1.100 but you then say that your gateway is set as 10.1.1.1
Shouldn't the gateway be the appropriate router address for that side of the network.
The 10.1.1.1 gateway specified is actually our firewall on that network which gets us out to the internet. If specifying that causes a problem, I can remove it, because the 192.168.0.0 clients do not need to get to the internet. They only need access to the 10.1.1.0 network.
I tried setting the gateway in /etc/sysconfig/network and /etc/sysconfig/static-routes to 10.1.1.100 which is the router I set up, and unfortunately I still can't route traffic from 192.168.0.0 to 10.1.1.0.
Thanks,
-Ian
Quoted 47 lines
Quoted 47 lines
Hello all.
I am a Sun administrator needing to get a router set up on Red Hat 6.2. I am simply trying to join two private networks, 192.168.0.0 and 10.1.1.0. The router I have configured has eth0 at 10.1.1.100 and eth1 at 192.168.1.1. I do not need to be able to route traffic to the internet using NAT -- I only need a DHCP server on my 192.168.0.0 network to give out IP addresses on that network (this works fine) that will allow users to access the 10.1.1.0 network.
On my router, currently I can ping an address on the 10.1.1.0 network, but not when I use something like ping -I 192.168.1.1 10.1.1.1 to do so. This should work, right?
/etc/sysconfig/networklooks like:NETWORKING=yes
HOSTNAME=myhost.mydomain
GATEWAYDEV=eth0
GATEWAY=10.1.1.1
FORWARD_IPV4=YES
/etc/sysconfig/static-routeshas:eth1 net 192.168.0.0 netmask 255.255.0.0 gw 192.168.1.1 eth0 net 10.1.1.0 netmask 255.255.255.0 gw 10.1.1.100
Can anyone please point out what I am missing or otherwise doing wrong? Even if the answer is "buy a book", a suggestion on which one might help me is welcome also.
Again, I don't need to be concerned about NAT, firewalls or security at this point, which is why I haven't touched ipchains for this purpose. I assume I don't need it only to route traffic between two networks, no?
Thanks much in advance!
-Ian
Content-Type: text/x-vcard; charset=us-ascii;
name="ianz.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Ian Zapczynski
Content-Disposition: attachment;
filename="ianz.vcf"
Quoted 3 lines
Quoted 1 line
Attachment converted: Macintosh HD:ianz.vcf (TEXT/ttxt) (00007AA9)
--
begin:vcard
n:Zapczynski;Ian
tel;work:215-283-4877 x120
x-mozilla-html:FALSE
url:http://www.quarterleaf.com/
org:The Sycamore Group
adr:;;;;;;
version:2.1
email;internet:[email protected]
title:Sun Certified System/Network Administrator
fn:Ian Zapczynski
end:vcard
Quoted 8 lines · Ian Zapczynski
/etc/sysconfig/networklooks like:NETWORKING=yes
HOSTNAME=myhost.mydomain
GATEWAYDEV=eth0
GATEWAY=10.1.1.1
FORWARD_IPV4=YES
Quoted 4 lines
/etc/sysconfig/static-routeshas:eth1 net 192.168.0.0 netmask 255.255.0.0 gw 192.168.1.1 eth0 net 10.1.1.0 netmask 255.255.255.0 gw 10.1.1.100
I'm fairly sure that neither of these routes should have a gateway specified.
Also, do all of the hosts on each network know that the router is a gateway to the other network?
Signature · 1 line
Glynn Clements <[email protected]>
Quoted 22 lines · Ian Zapczynski
Hello all.
I am a Sun administrator needing to get a router set up on Red Hat 6.2. I am simply trying to join two private networks, 192.168.0.0 and 10.1.1.0. The router I have configured has eth0 at 10.1.1.100 and eth1 at 192.168.1.1. I do not need to be able to route traffic to the internet using NAT -- I only need a DHCP server on my 192.168.0.0 network to give out IP addresses on that network (this works fine) that will allow users to access the 10.1.1.0 network.
On my router, currently I can ping an address on the 10.1.1.0 network, but not when I use something like ping -I 192.168.1.1 10.1.1.1 to do so. This should work, right?
/etc/sysconfig/networklooks like:NETWORKING=yes
HOSTNAME=myhost.mydomain
GATEWAYDEV=eth0
GATEWAY=10.1.1.1
FORWARD_IPV4=YES
Quoted 4 lines
/etc/sysconfig/static-routeshas:eth1 net 192.168.0.0 netmask 255.255.0.0 gw 192.168.1.1 eth0 net 10.1.1.0 netmask 255.255.255.0 gw 10.1.1.100
no need to set static-routes. your interface config do these settings in /etc/sysconf/network-scripts/ifup-routes automatic.
with your settings in static-routes you have double entries in the output from /sbin/route.
the correct entrys from /sbin/route -n would be somethink like this:
10.1.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 192.168.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth1 127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo 0.0.0.0 10.1.1.1 0.0.0.0 UG 0 0 0 eth0
bye,
helmut
Signature · 3 lines
ASCII ribbon campaign ( )
- against HTML email X
& vcards / \Thanks again, all, for your thoughts and suggestions.
You're right - the static routes were overkill. I have since removed them, but for some reason I am still unable to route between the two networks.
Indeed I have set my router as the default gateway for my client machines using the 192.168.1.1 address that they can contact it on. When a client machine tries to ping a 10.1.1.0 address, I can see via Ethereal that the request goes to my router. I just still stumped as to why it won't forward the traffic on to the proper host!
Being somewhat green on Linux administration, I even went to the bookstore last night to check out a Red Hat admin book. It seems to tell me pretty much what you kind folks have already told me.
Hmmm... when I figure this out, I know it's going to be something I'll want to slap myself over. ;-)
-Ian
Quoted 34 lines · helmut djurkin
Quoted 22 lines · Ian Zapczynski
Hello all.
I am a Sun administrator needing to get a router set up on Red Hat 6.2. I am simply trying to join two private networks, 192.168.0.0 and 10.1.1.0. The router I have configured has eth0 at 10.1.1.100 and eth1 at 192.168.1.1. I do not need to be able to route traffic to the internet using NAT -- I only need a DHCP server on my 192.168.0.0 network to give out IP addresses on that network (this works fine) that will allow users to access the 10.1.1.0 network.
On my router, currently I can ping an address on the 10.1.1.0 network, but not when I use something like ping -I 192.168.1.1 10.1.1.1 to do so. This should work, right?
/etc/sysconfig/networklooks like:NETWORKING=yes
HOSTNAME=myhost.mydomain
GATEWAYDEV=eth0
GATEWAY=10.1.1.1
FORWARD_IPV4=YESQuoted 4 lines
/etc/sysconfig/static-routeshas:eth1 net 192.168.0.0 netmask 255.255.0.0 gw 192.168.1.1 eth0 net 10.1.1.0 netmask 255.255.255.0 gw 10.1.1.100
no need to set static-routes. your interface config do these settings in
/etc/sysconf/network-scripts/ifup-routesautomatic.with your settings in static-routes you have double entries in the output from
/sbin/route.
Quoted 9 lines
the correct entrys from
/sbin/route-n would be somethink like this:10.1.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 192.168.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth1 127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo 0.0.0.0 10.1.1.1 0.0.0.0 UG 0 0 0 eth0bye,
helmut
begin:vcard
n:Zapczynski;Ian
tel;work:215-283-4877 x120
x-mozilla-html:FALSE
url:http://www.quarterleaf.com/
org:The Sycamore Group
adr:;;;;;;
version:2.1
email;internet:[email protected]
title:Sun Certified System/Network Administrator
fn:Ian Zapczynski
end:vcard
Quoted 8 lines · Ian Zapczynski
You're right - the static routes were overkill. I have since removed them, but for some reason I am still unable to route between the two networks.
Indeed I have set my router as the default gateway for my client machines using the 192.168.1.1 address that they can contact it on. When a client machine tries to ping a 10.1.1.0 address, I can see via Ethereal that the request goes to my router. I just still stumped as to why it won't forward the traffic on to the proper host!
Have you confirmed that it isn't forwarding the packet, by monitoring the 10.1.1.0 network?
Do the hosts on the 10.1.1.x have a route back to the 192.168.1.x network via the router? If not, you'll need to use proxy-ARP on that interface, e.g.
sysctl -w net/ipv4/conf/eth0/proxy_arp=1
Signature · 1 line
Glynn Clements <[email protected]>
All,
Yes, as I suggested, I have figured out my problem and it was indeed something I want to slap myself over. I neglected to recall a basic concept and even though some of you pointed out my error, I kept misreading what you stated.
My problem was not that I misconfigured the new Linux router or the hosts on the 192.168.0.0 network. It was that I neglected to add a route to the hosts on the 10.1.1.0 network back to the 192.168.0.0 network. Once I did so, I became able to ping the 10.1.1.0 hosts from 192.168.0.0 machines. Somehow I forgot that it needs to be a two-way street. Ugh.
I apologize for taking everyone's time. I learned new things in the process though.
-Ian
Quoted 11 lines · Ian Zapczynski
Thanks again, all, for your thoughts and suggestions.
You're right - the static routes were overkill. I have since removed them, but for some reason I am still unable to route between the two networks.
Indeed I have set my router as the default gateway for my client machines using the 192.168.1.1 address that they can contact it on. When a client machine tries to ping a 10.1.1.0 address, I can see via Ethereal that the request goes to my router. I just still stumped as to why it won't forward the traffic on to the proper host!
Quoted 6 lines
Being somewhat green on Linux administration, I even went to the bookstore last night to check out a Red Hat admin book. It seems to tell me pretty much what you kind folks have already told me.
Hmmm... when I figure this out, I know it's going to be something I'll want to slap myself over. ;-)
begin:vcard
n:Zapczynski;Ian
tel;work:215-283-4877 x120
x-mozilla-html:FALSE
url:http://www.quarterleaf.com/
org:The Sycamore Group
adr:;;;;;;
version:2.1
email;internet:[email protected]
title:Sun Certified System/Network Administrator
fn:Ian Zapczynski
end:vcard