A network configuration script?

I use my suse laptop at 2 locations: at home and at the university. Problem is that at university i have to configure gateway, subnet, ip, dns-server… When i get home, i have to restore everything to default.

So i change my settings 2 times a day, can i write a script for this? In what file can i save these settings? And how do i apply them then?

If you use persistant names “ifcfg-eth-id-xx:xx:xx:xx:xx:xx” it will work just fine. You set up each NIC one time and after that the system will use wich ever NIC it finds.

Check out /etc/udev/rules.d - look in the 30-… file.