Network-switch

From PTAGISWiki

Jump to: navigation, search

How to switch network IDs between home and work.

Executive summary:

sudo patch -p0 /home/rday/ifcfg-eth0.patch set mail server config in pine blank for work mail.earthlink.net for home

Discussion:

Taking a laptop between two network environments can be tricky if full dhcp is not in use in both places.

At work, I have a static IP address, and at home, I have dhcp. To switch between these two configurations, I have to make some manual changes before I slip in the pcmcia network adapter.

To minimize these manual changes, I've captured some in a patch file that looks like this:


      • /etc/sysconfig/network-scripts/ifcfg-eth0 Mon Jul 19 07:39:02 1999

--- /etc/sysconfig/network-scripts/ifcfg-eth0 Mon Jul 19 07:41:25 1999

      • 1,8 ****
 DEVICE=eth0
 USERCTL=no
 ONBOOT=no

! BOOTPROTO=dhcp ! BROADCAST= ! NETWORK= ! NETMASK= ! IPADDR= --- 1,8 ----

 DEVICE=eth0
 USERCTL=no
 ONBOOT=no

! BOOTPROTO=none ! BROADCAST=168.203.212.255 ! NETWORK=168.203.212.0 ! NETMASK=255.255.255.0 ! IPADDR=168.203.212.37

To apply this patch, just follow the executive summary directions above. The patch will either apply or undo these changes based on the state of the current netconfig file.

Connecting to mail servers is also problematic. Due to spam-prevention measures, my mail server demands that I have an IP address within the domain of the server. If my IP address changes, my mail server must also change. Using Pine, my outgoing mail defaults to my laptop's sendmail daemon, which is trusted by the sendmail daemon at work. At home, the only mail server which will trust me, is the one managed by my ISP. So I must direct outgoing mail to there.

This change in config, I perform manually through Pine's interface.

Personal tools