[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 275
  • Last Modified:

routing problem for a simple network

I just install redhat linux 6.0 on a sony Z505RX laptop and have connected the laptop to our LAN at work on subnet A (network address 10.1.0.0, netmask 0xffff0000).    The subnet has a DHCP server and a DNS name server.    I successfully configured my laptap as a DCHP client using "control-panel" and am able to do DNS name resolution.    I can ping any other host on subnet A.   However, when I attempt to ping host banzai (10.5.1.5) on subnet B (address 10.5.0.0, netmask 0xffff0000) or anything on the Internet, I get the following error:

    PING banzai (10.5.1.5): 56 data bytes
    Ping: sindto: Network is unreachable
    Ping: wrote banzai 64 chars, ret=-1

I set the default route using

   "Route add default netmask 0xffff0000 gw 10.1.2.1 eth0"

The netstat -r command shows the routing table as

Destination  Gateway   Genmask              flags   metric  Ref Use Ifac
127.0.0.1     *                255.255.255.255  UH     0           0    0     lo
default         10.1.2.1     255.255.0.0          UG     0          0     0    eth0
10.1.0.0       *                255.255.0.0          U        0          0     0    eth0
127.0.0.0     *                255.0.0.0              U        0          0     0     lo

The gateway interconnects subnet A, subnet B and the Internet.   It has the following NIC installed and UP.
    10.1.2.1, netmask 0xffff0000   on subnet A
    10.5.1.1, netmask 0xffff0000   on subnet B
    some other IP address for the Internet

I know that the gateway is working because I can ping banzai using any other host on subnet A.   What is peculiar is that "ifconfig -a" shows packets received and transmitted in response to ping commands.   Yet, "netstat -r" always shows '0' for the "Use" statistic for the 10.1.0.0 destination.   I know the route for distination 10.1.0.0 is used to ping other host on sybnet A, yet the route "Use" statistics remains 0 after pinging hosts on subnet A.     What could possible be the problem?   Do I need to load some other module to get packets forwarded to the router as required?    Also, "traceroute 10.5.1.5" gave me the same error as ping.

Thank for your help.

Don
0
donpulk
Asked:
donpulk
  • 2
1 Solution
 
stardrakeCommented:
Don,

  On the laptop, try changing your command of:
"Route add default netmask 0xffff0000 gw 10.1.2.1 eth0"
to the following:
"Route add default netmask 0xffffffff gw 10.1.2.1 eth0"
and see if that works.  I don't think the default gateway needs a 16 bit subnet mask, I think you would specifiy it as if it were a direct host (IOW use a 32-bit subnet mask).

   --- Joel
0
 
stardrakeCommented:
Also, try not using the netmask parameter at all so that the command would become:
"Route add default gw 10.1.2.1 eth0"

Good luck,

   --- Joel
0
 
donpulkAuthor Commented:
Joel,

Thanks a MILLION!!!   It was your second suggestion of not specifying the netmask at all that worked.

Don
0

Featured Post

[Webinar] Improve your customer journey

A positive customer journey is important in attracting and retaining business. To improve this experience, you can use Google Maps APIs to increase checkout conversions, boost user engagement, and optimize order fulfillment. Learn how in this webinar presented by Dito.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now