Mr. Know-It-All has the answers to even the really tough questions.
I need to take my laptop to a customer site and connect to their network.
They say I need to use DHCP. I use static routing on my SOHO network.
I know I can use MPTS to reconfigure, but there must be an easier way.
What does Mr. KIA have to say about this?
Yes, there is an easier way.
IBM's TCP/IP stack is pretty flexible.
Most of the TCP/IP settings can be changed dynamically.
The means you can do the switching from the command line.
Let's say your setup.cmd for your static routing setup looks like:
ifconfig lo 127.0.0.1
ifconfig lan0 192.168.0.2 netmask 255.255.255.0
ifconfig lan0 mtu 1492
route add default 192.168.0.1 -hopcount 1
Once you plug into your customer's network, to switch to DHCP all you need to do:
ifconfig lan0 down
dhcpstrt -i lan0
If all goes well, the site's DHCP server will assign a lease and provide a DNS server IP addresses.
The DHCP Monitor status screen will show you if this really happened.
Mr. KIA has been told that some TCP/IP stacks kill the loopback interface when DHCP is enabled. If this occurs, use:
ifconfig lo 127.0.0.1
to restore the interface.
If you have problems, check \mptn\etc\dhcpcd.cfg.
The following set of option requests is usually sufficient.
option 1 # Subnet Mask
option 3 # Router
option 6 # Domain Name Server
option 15 # Domain Name
option 28 # Broadcast Address
option 33 # Static Routes
option 60 "IBMWARP_V3.1" # Vendor Class
option 77 "IBMWARP_V3.1" # User Class
In some cases, you might not get DNS IP addresses.
If so, ask your customer for the IP addresses and update RESOLV and RESOLV2 manually.
You might need to restart your browser or mail client before it will use the new DNS IP addresses.
Most sites will not allow direct browser access from their intranet to the internet.
Typically, there will be a proxy server.
If so, ask your customer for the proxy server URL or IP address and
configure the browser to use these values. For Mozilla, the settings are at
Edit -> Preferences -> Advanced -> Proxies.
When you are done, you'll want to shut down the DHCP setup and return to your normal setup.
To shut down the DHCP setup, use the DHCP Monitor to release the lease.
After releasing the lease, shut down the DHCP Monitor.
Then issue the following commands:
This will empty the routing table, shut down the DHCP daemon and restore your normal settings.
Check that RESOLV or RESOLV2 have returned to their original values.
If not, restore the copies you saved.
If you configured the browser for a proxy, restore the original settings so that the browser will work when you get
back to the office.
That's all there is to it.
Curious or in doubt, you can ask
OS/2 is his specialty and sharing solutions is his passion
Mr. Know-It-All lives in Southern California.
The Southern California OS/2 User Group
P.O. Box 26904
Santa Ana, CA 92799-6904, USA
Copyright 2003 the Southern California OS/2 User Group. ALL RIGHTS
SCOUG, Warp Expo West, and Warpfest are trademarks of the Southern California OS/2 User Group.
OS/2, Workplace Shell, and IBM are registered trademarks of International
Business Machines Corporation.
All other trademarks remain the property of their respective owners.