OK, here's the situation:
I use the same laptop at home and at w*rk (SuSE 10.1, KDE 3.5). At home, the setup is as follows
IP adress provided by dhcp
default GW is the IP of my router (set by hand)
DNS IP's from my prvider (also set by hand)
no proxies used
hostname Ganymede
at work, it looks quite different
IP fixed (entered by hand)
default GW also entered by hand
DNS IP's from the Insitute
must use proxy for http and ftp
hostname a cryptic alphanumeric alphabet soup
Now, I have no trouble clicking through all the necessary menus in YaST, and both configurations work without any trouble. However, it's annoying to do this every morning and evening. I don't want to set up two profiles, so I was looking towards creating two small shell scripts, "ifhome" and "ifwork", that would switch the things for me.
So far, I think I've figured out how to set the I adress to a fixed IP with 'ipconfig eth0 address xx.xx.xx.xx' and also the default GW with 'ipconfig eth0 broadcast xx.xx.xx.xx'.
However, I'm stumped as to how I can use 'ifconfig' to tell it to listen to dhcp for its IP.
Further, I have no idea where to start looking for the appropriate command to switch proxies on and off, or to change DNS servers. Any pushes in the right direction would be appreciated muchly.
|