Re: creating default route in kernel

From: Waldemar Kornewald (Waldemar.Kornewald_at_web.de)
Date: 09/25/04

  • Next message: Waldemar Kornewald: "Re: locking"
    Date: Sat, 25 Sep 2004 09:53:36 +0200
    To: FreeBSD-net <freebsd-net@freebsd.org>
    
    

    George V. Neville-Neil wrote:
    >>could you please tell me how I can create a default route from within
    >>the kernel? I am a member of the Haiku (OS) networking team and
    >>maintainer of the PPP stack and for dial-on-demand support there must be
    >>a default route which does not work. BTW, we use a port of your netstack
    >>(from the 4.x releases, I think).
    >>Which values should the default route get (netmask, destination, etc.)
    >>and which function(s) should I call (our PPP stack lives in the kernel)?
    >
    >
    > If you look at src/sys/net/route.c you will find a function (in
    > -CURRENT) called rtrequest1(). Read through that routine to see how
    > to do an RTM_ADD.
    >
    > You will need a destination and netmask, yes. The destination for the
    > default route is 0 and you need to set the gateway to the correct
    > gateway.

    The normal default route works correctly. The problem is just that I
    cannot create an undefined default route (because one cannot know the
    gateway while being disconnected).
    Using a temporary gateway (10.10.10.1) or just 0 did not work when I
    tried it, but now I am in the process of changing the way dial-on-demand
    is handled and cannot test it. :(
    Maybe our port of your old netstack is buggy. I hope all problems will
    be gone with the new port.

    Bye,
    Waldemar

    _______________________________________________
    freebsd-net@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-net
    To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"


  • Next message: Waldemar Kornewald: "Re: locking"

    Relevant Pages

    • Re: Routing with windows 2000
      ... netmask Specifies a subnet mask value for this route entry. ... gateway Specifies gateway. ... ie. cost for the destination. ...
      (microsoft.public.win2000.general)
    • Re: VPN and remote gateway
      ... > It seems you use the wrong route add command. ... > when the VPN connection is established. ... > | using the remote network as my gateway. ...
      (microsoft.public.windows.server.sbs)
    • Re: Persistent Route ignored on W2K when destination network is unavailable
      ... a global setting like the gateway to a particular subnet should be set ... this network access the internet via a NAT firewall (connected to ... via a WAN link. ... route on the Cisco firewall so that any traffic to the internet gets ...
      (microsoft.public.win2000.networking)
    • Re: AIX 1.3 Failures and Fables
      ... DESTINATION GATEWAY FLGS REFCNT USE INTERFACE ... Is my interpretation of the AIX 1.3 #man route correct? ... Manually manipulates the routing tables. ... Is the destination host or network. ...
      (comp.sys.ibm.ps2.hardware)
    • Re: AD-DNS-DHCP
      ... If I do NOT remove the gateway configurationfrom my DHCP ... scope but add route command to my logon script, ...
      (microsoft.public.windows.server.active_directory)