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?

I tried something like "route add 192.168.100.0/24 192.168.0.1", but it doesn't work.

Thank you in advance

Moritz

Reply via email to