Hello ! I'm setting up workstations to acces a lan behind a tinc host (server) in parenthesis, their vpn ip address workstations on the internet running tinc 1.2.3.4 (10.0.0.2) -> internet -> tinc host 4.3.2.1 (10.0.0.1) -> lan 192.168.1.0/24 in linux, no problem : root@natch> cat tinc-up #!/bin/sh ifconfig $INTERFACE 10.0.0.2 netmask 255.255.255.0 route add -net 192.168.1.0 netmask 255.255.255.0 dev $INTERFACE on windows : tinc-up.bat (after configuring the interface with correct default gateway) route add 192.168.1.0 mask 255.255.255.0 10.0.0.1 The route addition failed: Either the interface index is wrong or the gateway do es not lie on the same network as the interface. Check the IP Address Table for the machine. so, windows cannot set up routes because the network is not yet up... after the network is up, i can launch the tinc-up.bat script without problem... what is wrong on my setup ? thanks ps : may be an example like this one is missing on the "example" page... -- xavier
On Tue, Jun 22, 2004 at 04:11:35PM -0400, xavier wrote:> on windows : tinc-up.bat > (after configuring the interface with correct default gateway) > route add 192.168.1.0 mask 255.255.255.0 10.0.0.1 > > The route addition failed: Either the interface index is wrong or the gateway do > es not lie on the same network as the interface. Check the IP Address Table for > the machine. > > > so, windows cannot set up routes because the network is not yet up... > > after the network is up, i can launch the tinc-up.bat script without > problem...What do you mean "the network is not yet up"? The real network or the VPN? Because tinc-up.bat is called AFTER the VPN interface is brought up. You could try moving the route add command from tinc-up.bat to hosts/linux-up.bat (replace linux with the name of the linux host). -- Met vriendelijke groet / with kind regards, Guus Sliepen <guus@sliepen.eu.org> -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: Digital signature Url : http://brouwer.uvt.nl/pipermail/tinc/attachments/20040623/bbabb8f6/attachment.pgp
On Tue, 22 Jun 2004, xavier wrote:> on windows : tinc-up.bat > (after configuring the interface with correct default gateway) > route add 192.168.1.0 mask 255.255.255.0 10.0.0.1 > > The route addition failed: Either the interface index is wrong or the gateway do > es not lie on the same network as the interface. Check the IP Address Table for > the machine. > > > so, windows cannot set up routes because the network is not yet up...I dunno why the network isnt up at that point, but.. try just adding this as a persistent route (run route -p add 192.168.1.0 mask 255.255.255.0 10.0.0.1 one time) and then the route will work when it can and be ignored when it doesn't apply. And it is stored in the registry and survives a reboot.
On Wed, Jun 23, 2004 at 12:08:40AM +0200, Guus Sliepen wrote:> On Tue, Jun 22, 2004 at 04:11:35PM -0400, xavier wrote: > > > on windows : tinc-up.bat > > (after configuring the interface with correct default gateway) > > route add 192.168.1.0 mask 255.255.255.0 10.0.0.1 > > > > The route addition failed: Either the interface index is wrong or the gateway do > > es not lie on the same network as the interface. Check the IP Address Table for > > the machine. > > > > > > so, windows cannot set up routes because the network is not yet up... > > > > after the network is up, i can launch the tinc-up.bat script without > > problem... > > What do you mean "the network is not yet up"? The real network or the > VPN?the vpn. I should try to call ipconfig before setting up the route to see.> Because tinc-up.bat is called AFTER the VPN interface is broughtwhen i run it with tincd -n my_net_name -D -d2, it prints (sorry, not in front of it right now) the route add error and then "connected to my_linux_vpn_server" and the route script is working after that.> up. You could try moving the route add command from tinc-up.bat to > hosts/linux-up.bat (replace linux with the name of the linux host).will do. thanks a lot ! -- xavier