route in busybox
Chien-Yu Chen
torus0 at gmail.com
Wed Dec 7 03:40:31 UTC 2005
thanks for replying
on most systems (non-busybox)
----------------------
bash-2.05b$ /sbin/route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.0.0 * 255.255.255.0 U 0 0 0 wlan0
loopback localhost 255.0.0.0 UG 0 0 0 lo
default 192.168.0.1 0.0.0.0 UG 0 0 0 wlan0
--------------------------
the default route is to an IP..
with busybox (I am using v1.01, this was from compiling buildroot)
if the gateway to the default route has a name associated, when I do route,
I'll get
default name_to_IP
if I do route -n, I'll get
0.0.0.0 IP_address
I am trying to use vpnc, a vpn client....
In my school environment, once I get an IP with udhcpc, I'll get an
internal IP, with default route to an internal gw.....
now I'll run vpnc (with universal tunneling device), and set up the
default gw to the IP I got from vpnc...
however, before I set up the new default gw, I need the IP of the old
gw, so that I can add a -host rule to the routing table for the VPN
server....
hm...not sure if I made this clear enough....
chen
On 12/7/05, Rob Landley <rob at landley.net> wrote:
> On Tuesday 06 December 2005 16:40, Chien-Yu Chen wrote:
> > hi!
> >
> > I was wondering if there is a way to do route, where the destination
> > is not resolved, while leaving others as IP
> >
> > because I have a need to get IP for the default route...
> >
> > if I just do "route" to search for default, I'll get a name for gateway,
> > not IP
> >
> > if I do "route -n", then I get 0.0.0.0 for default...
> > thanks for all the comment
>
> The busybox and non-busybox route commands are giving me the same result:
>
> landley at driftwood:~/busybox/busybox$ ./busybox route -n
> Kernel IP routing table
> Destination Gateway Genmask Flags Metric Ref Use Iface
> 10.0.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth1
> 0.0.0.0 10.0.0.1 0.0.0.0 UG 0 0 0 eth1
> landley at driftwood:~/busybox/busybox$ route -n
> Kernel IP routing table
> Destination Gateway Genmask Flags Metric Ref Use Iface
> 10.0.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth1
> 0.0.0.0 10.0.0.1 0.0.0.0 UG 0 0 0 eth1
>
> What exactly are you trying to do again? (And what version of busybox are you
> using?)
More information about the busybox
mailing list