Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Your ISP will determine whether you get dynamic or static IP. Most times static IPs are assigned to business accounts while dynamic IPs are usually given to residential (at least with my cable internet company). I don't think you'll be able to control that beyond selecting whether you want a business or residential account. If I'm wrong, someone please correct me. Hope this helps.
I believe that it would be possible to make it work through a shell script that would give you an option to run one of two (or more) options.
ie.: press 1 to DHCP
press 2 to staticIP
Would that be a sollution? I don't know if there is a way of setting up profiles... But if the script would help -- let me know and I'll produce it and send it... (hoping that your shell is BASH and the 'ifconfig' runs smoothly + your network interface is Eth0).
Twolf. I think you have a successfull idea. I have already setup run-level 5 as the network at work, run-level 4 as no network, and I could use run-level 2 for other networks.
If you already have a script to do this, maybe other would benifit from seeing it also.
This isn't very advanced but it should work OK. Just create 2 files "eth0.dhcp" "eth0.static" and put the relevant details in each. Put this script a startup folder or run it manually. (you will need to create a seperate one for static ip's - just change "eth0.dhcp" to "eth0.static")
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.