On Fri, Apr 24, 2015 at 10:26:18PM +0200, Sven-Haegar Koch wrote:

> > #!/bin/sh
> > ifconfig $INTERFACE 10.96.x.y
> 
> Won't a netmask of 255.255.255.255 be better than not specifying any?
> Otherwise it falls back to old classful adressing and would assume
> 10.0.0.0/8 - which is clearly always wrong. [...] Or are tun devices
> different in this regard?

Hm, it seems that ifconfig indeed treats tun and tap differently, if you
don't specify a netmask it applies a /32 for tun interfaces and a /8 for
tap.

Iproute is better I guess:

#!/bin/sh
ip addr add 10.96.x.y dev $INTERFACE
ip link set dev $INTERFACE up

> > Then, assuming you run tinc in router Mode (the default), you should
> > create a script named "subnet-up" in the same directory as tinc-up, and
> > put this in it:
> > 
> > #!/bin/sh
> > ip addr add $SUBNET dev $INTERFACE
> > 
> > And a "subnet-down" script:
> > 
> > #!/bin/sh
> > ip addr del $SUBNET dev $INTERFACE
> 
> Don't you mean "ip route add/del" here?

Yes, thanks for correcting me.

-- 
Met vriendelijke groet / with kind regards,
     Guus Sliepen <[email protected]>

Attachment: signature.asc
Description: Digital signature

_______________________________________________
tinc mailing list
[email protected]
http://www.tinc-vpn.org/cgi-bin/mailman/listinfo/tinc

Reply via email to