Re: [gentoo-user] conf.d/net routes

2017-09-03 Thread Enzo Rapagnetta
Maybe is this ...

#route add default gw IPgateway

Il 02/set/2017 21:14, "Branko Grubic"  ha scritto:
>
> On Sat, 2 Sep 2017 11:54:48 -0700
> Ian Zimmerman  wrote:
>
> > What is the exact syntax of the *_routes lines in the /etc/conf.d/net
> > file, or where is it documented?
> >
> > The wiki gives a couple of examples, but they are all either just for
> > dhcp (so no configurable routes) or else they are of the form
> >
> > eth0_routes="default via eth0"
> >
> > "via" is not something I can use on the command line of the route
> > command, at least according to its manpage.  So it can't be just
> > straight repetition of the command line.  But then, what is it?
> >
> > Motivation: I want to add a route for a point-to-point interface.
> >
>
> Some examples you can find
> in /usr/share/doc/netifrc-0.5.1/net.example.bz2
>
> Replace netifrc version with one installed on your system.
>
>


Re: [gentoo-user] conf.d/net routes

2017-09-02 Thread Tom H
On Sat, Sep 2, 2017 at 2:54 PM, Ian Zimmerman  wrote:
>
> What is the exact syntax of the *_routes lines in the /etc/conf.d/net
> file, or where is it documented?
>
> The wiki gives a couple of examples, but they are all either just for
> dhcp (so no configurable routes) or else they are of the form
>
> eth0_routes="default via eth0"
>
> "via" is not something I can use on the command line of the route
> command, at least according to its manpage. So it can't be just
> straight repetition of the command line. But then, what is it?
>
> Motivation: I want to add a route for a point-to-point interface.

For documentation, see "/usr/share/doc/netifrc-/"

For "via", "man ip-route".



Re: [gentoo-user] conf.d/net routes

2017-09-02 Thread Mick
On Saturday, 2 September 2017 19:54:48 BST Ian Zimmerman wrote:
> What is the exact syntax of the *_routes lines in the /etc/conf.d/net
> file, or where is it documented?
> 
> The wiki gives a couple of examples, but they are all either just for
> dhcp (so no configurable routes) or else they are of the form
> 
> eth0_routes="default via eth0"
> 
> "via" is not something I can use on the command line of the route
> command, at least according to its manpage.  So it can't be just
> straight repetition of the command line.  But then, what is it?
> 
> Motivation: I want to add a route for a point-to-point interface.

The /usr/share/doc/netifrc-0.5.1/net.example.bz2 page offers this:

10.0.0.0/8 via 192.168.0.1

Is this what you are after?

If you want to add a route in real time using the CLI, then this would work:

ip route add 10.0.0.0/8 via 192.168.0.1 dev eth0

-- 
Regards,
Mick

signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-user] conf.d/net routes

2017-09-02 Thread Simon Thelen
On 17-09-02 at 11:54, Ian Zimmerman wrote:
> What is the exact syntax of the *_routes lines in the /etc/conf.d/net
> file, or where is it documented?
[..]
> "via" is not something I can use on the command line of the route
> command, at least according to its manpage.  So it can't be just
> straight repetition of the command line.  But then, what is it?
As far as I'm aware it's based on ip-route(8) syntax separated by newlines.

There's a complete documentation file for netifrc in
/usr/share/doc/netifrc-/net.example[.bz2]

You'll probably be most interested in the "INTERFACE HANDLERS" section
and potentially the "Advanced Routing" section.
 
> Motivation: I want to add a route for a point-to-point interface.
You probably only need to list the peer address on a single line and
then that peer should become routable.

-- 
Simon Thelen



Re: [gentoo-user] conf.d/net routes

2017-09-02 Thread Branko Grubic
On Sat, 2 Sep 2017 11:54:48 -0700
Ian Zimmerman  wrote:

> What is the exact syntax of the *_routes lines in the /etc/conf.d/net
> file, or where is it documented?
> 
> The wiki gives a couple of examples, but they are all either just for
> dhcp (so no configurable routes) or else they are of the form
> 
> eth0_routes="default via eth0"
> 
> "via" is not something I can use on the command line of the route
> command, at least according to its manpage.  So it can't be just
> straight repetition of the command line.  But then, what is it?
> 
> Motivation: I want to add a route for a point-to-point interface.
> 

Some examples you can find
in /usr/share/doc/netifrc-0.5.1/net.example.bz2

Replace netifrc version with one installed on your system.




[gentoo-user] conf.d/net routes

2017-09-02 Thread Ian Zimmerman
What is the exact syntax of the *_routes lines in the /etc/conf.d/net
file, or where is it documented?

The wiki gives a couple of examples, but they are all either just for
dhcp (so no configurable routes) or else they are of the form

eth0_routes="default via eth0"

"via" is not something I can use on the command line of the route
command, at least according to its manpage.  So it can't be just
straight repetition of the command line.  But then, what is it?

Motivation: I want to add a route for a point-to-point interface.

-- 
Please don't Cc: me privately on mailing lists and Usenet,
if you also post the followup to the list or newsgroup.
Do obvious transformation on domain to reply privately _only_ on Usenet.