linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: Routing table problems
  2001-12-29 12:14 Routing table problems Rajasekhar Inguva
@ 2001-11-29 16:40 ` Doug McNaught
  2001-11-29 18:37   ` Madhav Diwan
  0 siblings, 1 reply; 7+ messages in thread
From: Doug McNaught @ 2001-11-29 16:40 UTC (permalink / raw)
  To: Rajasekhar Inguva; +Cc: linux-kernel

"Rajasekhar Inguva" <irajasek@in.ibm.com> writes:

> Hi All, In continuation to my earlier report ...
> 
> The problem is only seen with the default gateway entry.
> 
> The gateway entry for my subnet is also deleted during a 'down', but is
> restored properly after an 'up' .

The default gateway route is installed at boot time by a separate
'route' command.  'ifconfig' can derive your subnet route from the
address and mask of the interface, but it can't magically determine
your default gateway.  Add it yourself using "route" or "ip" or rerun
your network start scripts.

In short, "Working as Designed".

-Doug
-- 
Let us cross over the river, and rest under the shade of the trees.
   --T. J. Jackson, 1863

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Routing table problems
  2001-11-29 16:40 ` Doug McNaught
@ 2001-11-29 18:37   ` Madhav Diwan
  0 siblings, 0 replies; 7+ messages in thread
From: Madhav Diwan @ 2001-11-29 18:37 UTC (permalink / raw)
  To: Doug McNaught; +Cc: Rajasekhar Inguva, linux-kernel

  Use the ifdown and ifup commands instead .. your default routes will
return

 read the scripts in /etc/sysconfig/network-scripts/ for more info.

Madhav Diwan



Doug McNaught wrote:
> 
> "Rajasekhar Inguva" <irajasek@in.ibm.com> writes:
> 
> > Hi All, In continuation to my earlier report ...
> >
> > The problem is only seen with the default gateway entry.
> >
> > The gateway entry for my subnet is also deleted during a 'down', but is
> > restored properly after an 'up' .
> 
> The default gateway route is installed at boot time by a separate
> 'route' command.  'ifconfig' can derive your subnet route from the
> address and mask of the interface, but it can't magically determine
> your default gateway.  Add it yourself using "route" or "ip" or rerun
> your network start scripts.
> 
> In short, "Working as Designed".
> 
> -Doug
> --
> Let us cross over the river, and rest under the shade of the trees.
>    --T. J. Jackson, 1863
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Routing table problems
@ 2001-12-29 12:14 Rajasekhar Inguva
  2001-11-29 16:40 ` Doug McNaught
  0 siblings, 1 reply; 7+ messages in thread
From: Rajasekhar Inguva @ 2001-12-29 12:14 UTC (permalink / raw)
  To: linux-kernel


Hi All, In continuation to my earlier report ...

The problem is only seen with the default gateway entry.

The gateway entry for my subnet is also deleted during a 'down', but is
restored properly after an 'up' .

Thanx,

Raj



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Routing table problems
@ 2001-12-29 11:47 Rajasekhar Inguva
  2001-11-29 18:57 ` Catalin Marinas
  2001-11-30 15:46 ` Dipak
  0 siblings, 2 replies; 7+ messages in thread
From: Rajasekhar Inguva @ 2001-12-29 11:47 UTC (permalink / raw)
  To: linux-kernel

Hi All,

I am facing a problem ( ???, maybe it works that way, but i really dont
know ) with regards to routing table behavior when using ifconfig on a
network interface.

1) netstat -nr      Shows my default gateway for network 0.0.0.0

2) ifconfig eth0 down

3) netstat -nr      No entry for the default gateway is shown (
understandable )

4) ifconfig eth0 up

After the the 4'th command, my interface is up and has it's IP address set
correctly. But .....

netstat -nr  does not show my default gateway for network 0.0.0.0 !!.
Pinging any IP outside of my subnet, results in "Network is unreachable"
error.

Is is meant to be that way ? or is there a problem here ?

I've tried it on kernel versions, 2.4.0, 2.4.5 & 2.4.15

FYI : This has been tried using both DHCP and Static IP.

Thanks in advance !

Regards,

Raj



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Routing table problems
  2001-12-29 11:47 Rajasekhar Inguva
  2001-11-29 18:57 ` Catalin Marinas
@ 2001-11-30 15:46 ` Dipak
  1 sibling, 0 replies; 7+ messages in thread
From: Dipak @ 2001-11-30 15:46 UTC (permalink / raw)
  To: Rajasekhar Inguva; +Cc: linux-kernel

Hi,
    Add the following line in the /etc/rc.d/init.d/network script at the end
of "start" case:
    /sbin/route add default gw <whatever is your default getway ip address>

    OR
    You can modify the /etc/sysconfig/network-scripts/ifcfg-eth* to add a
line as
    GW=<whatever is your default getway ip address>
    and modify the /etc/rc.d/init.d/network script if statement at the end of
"start" case. For example, here are few lines of what I've done in my script:

        # Add non interface-specific static-routes.
        if [ -f /etc/sysconfig/static-routes ]; then
           grep "^any" /etc/sysconfig/static-routes | while read ignore type
dest netmask mask gw gateway; do
              [ "${gateway}" != "${gateway##[0-9}" ] && \
                /sbin/route add -$type $dest $netmask $mask $gw $gateway
           done
        fi

        touch /var/lock/subsys/network
        ;;

best of luck!
dipak

Rajasekhar Inguva wrote:

> Hi All,
>
> I am facing a problem ( ???, maybe it works that way, but i really dont
> know ) with regards to routing table behavior when using ifconfig on a
> network interface.
>
> 1) netstat -nr      Shows my default gateway for network 0.0.0.0
>
> 2) ifconfig eth0 down
>
> 3) netstat -nr      No entry for the default gateway is shown (
> understandable )
>
> 4) ifconfig eth0 up
>
> After the the 4'th command, my interface is up and has it's IP address set
> correctly. But .....
>
> netstat -nr  does not show my default gateway for network 0.0.0.0 !!.
> Pinging any IP outside of my subnet, results in "Network is unreachable"
> error.
>
> Is is meant to be that way ? or is there a problem here ?
>
> I've tried it on kernel versions, 2.4.0, 2.4.5 & 2.4.15
>
> FYI : This has been tried using both DHCP and Static IP.
>
> Thanks in advance !
>
> Regards,
>
> Raj
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Routing table problems
       [not found] <3C069135.6AC55FD8@wanadoo.fr>
@ 2001-11-29 22:37 ` Catalin Marinas
  0 siblings, 0 replies; 7+ messages in thread
From: Catalin Marinas @ 2001-11-29 22:37 UTC (permalink / raw)
  To: Pierre Rousselet; +Cc: Rajasekhar Inguva, linux-kernel

On Thu, 29 Nov 2001, Pierre Rousselet wrote:

> From linux/Documentation/networking/routing.txt (dating back linux-2.2.x
> ?):
>
> ...
> - You don't need to do "route add aaa.bbb.ccc... eth0" anymore,
>   it is done automatically.
> ...

Of course, I meant the default gateway, which is not added automatically.
This is what Rajasekhar Inguva asked.

-- 
Catalin



_____________________________________________________________________
This message has been checked for all known viruses by the 
MessageLabs Virus Scanning Service. For further information visit
http://www.messagelabs.com/stats.asp


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Routing table problems
  2001-12-29 11:47 Rajasekhar Inguva
@ 2001-11-29 18:57 ` Catalin Marinas
  2001-11-30 15:46 ` Dipak
  1 sibling, 0 replies; 7+ messages in thread
From: Catalin Marinas @ 2001-11-29 18:57 UTC (permalink / raw)
  To: Rajasekhar Inguva; +Cc: linux-kernel

On Sat, 29 Dec 2001, Rajasekhar Inguva wrote:

> 4) ifconfig eth0 up
>
> After the the 4'th command, my interface is up and has it's IP address set
> correctly. But .....
>
> netstat -nr  does not show my default gateway for network 0.0.0.0 !!.

ifconfig just brings the interface up, it does not set the routes. It is
not a kernel problem.

Usually, an interface is brought up by the /sbin/ifup (or
/etc/sysconfig/network-scripts/ifup) script which calls ifconfig and then
adds the default route by calling /sbin/route.

-- 
Catalin


_____________________________________________________________________
This message has been checked for all known viruses by the 
MessageLabs Virus Scanning Service. For further information visit
http://www.messagelabs.com/stats.asp


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2001-11-30 16:47 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-12-29 12:14 Routing table problems Rajasekhar Inguva
2001-11-29 16:40 ` Doug McNaught
2001-11-29 18:37   ` Madhav Diwan
  -- strict thread matches above, loose matches on Subject: below --
2001-12-29 11:47 Rajasekhar Inguva
2001-11-29 18:57 ` Catalin Marinas
2001-11-30 15:46 ` Dipak
     [not found] <3C069135.6AC55FD8@wanadoo.fr>
2001-11-29 22:37 ` Catalin Marinas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).