On Mon, Nov 30, 2009 at 09:16:47PM +0100, Moritz Herrmann wrote:
> Hello misc,
> I am using OBSD on my Laptop and as I use internet
> connections at different places (home, work, university),
> I always have to change my ip-adress and default route after startup.
> To ease the pain a littlebit
> I wrote three scripts that I run manually after startup:
> #bin/sh
> route delete default
> ifconfig em0 inet 192.168.0.44 netmask 255.255.255.0
> route add default 192.168.0.1
> 
> This works quite well, but I am getting tired of doing this 10 times a day,
> so I reread the ifconfig manual and found the alias function.
> I managed to add two aliases for my NIC, but still I have to configure the
> default route every time.
> 
> Is there a way to add permanent "default routes", so that the system 
> automatically
> uses the suitable gateway for the current subnet?
> 
A long time agao, on a machine far away. I wrote a script that tried to
ping the default route for all of the networks I atached it to, and then
set up things for the network it was atached to, once it used this to
figure out which one it was one.

Worked well, but was a bit slow, as it had to wait for the pings to time
out.

-- 
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

Reply via email to