On 7/26/06, Rony <[EMAIL PROTECTED]> wrote:
What is the ip and gateway of the ppp interface after its connected? In
command prompt run `ipconfig /all'. See if you can cheat the network by
giving the final ip in the ethernet card settings. Or does a random
10.10.10.254 as IP and 10.10.10.1 as gateway work for the same? That
would be the least used one. Once the same network settings are
possible, it should work in linux too.

The IP address and gateway are static and were provided at windows
install, not configured after dial-in. So I guess that windows network
config assumes a direct route to the gateway, which should be a fair
assumption right?

Here's what I did to the interfaces file which got it to work in the
end. Now I don't need a separate script to set the direct route to
gateway.

<snippet from /etc/network/interfaces>
iface eth0 inet static
       up route add -host 10.10.10.2 dev $IFACE
       up route add -net 0.0.0.0 netmask 0.0.0.0 gw 10.10.10.2 dev $IFACE
       down route del -net 0.0.0.0 netmask 0.0.0.0 gw 10.10.10.2 dev $IFACE
       down route del -host 10.10.10.2 dev $IFACE
       address 172.20.x.x
       netmask 255.255.255.0
       network 172.20.x.x
       broadcast 172.20.x.x
       # gateway 10.10.10.2
       # dns-* options are implemented by the resolvconf package, if installed
       dns-nameservers 10.10.10.2
</snippet>

Basically, the sequence for initialization is:
1) Set up interface without the gateway
2) Set up direct route to gateway
3) Add default gateway

For de-initialization:
1) Remove default gateway
2) Delete route to the gateway
3) deinitialize interface

But really, isn't it worth it to add this little hack that will
assume(add) a direct route to the gateway like windows apparently
does?


Regards,
Siddhesh
--
http://siddhesh.tk

--
http://mm.glug-bom.org/mailman/listinfo/linuxers

Reply via email to