Loading ...
Sorry, an error occurred while loading the content.

Re: [linux-dell-laptops] Networking Question

Expand Messages
  • Paul
    How about creating an alias for your Ethernet interface? One network could use eth0 and the other could use eth0:0. Set eth0 to your home address, and set
    Message 1 of 5 , Apr 2, 2002
    • 0 Attachment
      How about creating an alias for your Ethernet interface? One network could
      use eth0 and the other could use eth0:0. Set eth0 to your home address, and
      set eth0:0 to use DHCP.
    • David Whitmarsh
      Have a look at http://sourceforge.net/projects/columbus/ From the blurb: columbus is a script and set of supporting scripts and tools to allow for
      Message 2 of 5 , Apr 2, 2002
      • 0 Attachment
        Have a look at http://sourceforge.net/projects/columbus/

        From the blurb:

        "columbus is a script and set of supporting scripts and tools to allow
        for auto-detection of the network you're in and allows you to adjust
        files and configuration on the system to match your preferred settings
        (fstab, gateways, proxy, ...)"


        Regards,

        David


        On Tue, 2002-04-02 at 22:00, simbateman wrote:
        > This isnt a dell specific questions but this group has such a great
        > response that I thought I would ask here.
        >
        > I have a i81k with the built in network/modem combo. I use the
        > network card at home and at work. I also occasionally use a wireless
        > nic at home. at home I am running on the 192.168.1 subnet but at the
        > office I am running 10.10.1. So I need to have the nic card using
        > dhcp so it can get the correct ip address when it boots up.
        >
        > Here is the problem that i have. When I am not connected to a
        > network my box takes forever to load because it waits for dhcp to
        > time out(i am guessing). So what I am looking for is a way to not
        > have that nic fire up on boot but then have a script I can run that
        > will tell it to fire up and get an ip address when I need it to.
        >
        > If i run the S10Network start file in /etc/rc3.d then I can get it to
        > fire up but I dont know how to tell the computer not to bother
        > turning on eth0 at boot.
        >
        > I think this is what my problem and the solution I need is but if
        > anyone has any suggestion or alternate solutions please let me know.
        >
        > I appreciate the great help that comes from this group. Also, I
        > guess another short question when I hit fcn+esc to suspend my box,
        > the screen goes all funny then it restarts X. Is this what is
        > supposed to happen? I havnt set up hibernate yet but that is next.
        >
        > Again Thanks in advance.
        > simeon
        >
        >
        >
        > --------------------------------------------------------------
        > Please post your X config files in the group links or database
        > To unsubscribe, email: linux-dell-laptops-unsubscribe@yahoogroups.com
        > FAQ: http://www.whacked.net/ldl/faq
        >
        > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
        >
        --

        David Whitmarsh
        Sparkle Computer Co Ltd
        Systems Development and Consultancy
        UNIX/LINUX/Windows, C/C++/perl/java Sybase

        web: www.sparkle-cc.co.uk
        mob: +44 (0)7802 537097

        ==========================================
      • Steve Baldwin
        I have a similar (I think) situation in that my home setup is on a different subnet to work, and the IP address is statically assigned, whereas at work it is
        Message 3 of 5 , Apr 3, 2002
        • 0 Attachment
          I have a similar (I think) situation in that my home setup is on a
          different subnet to work, and the IP address is statically assigned,
          whereas at work it is assigned by DHCP. There are also issues of
          different DNS's and DNS search paths, etc, etc. Here's how I solved it.


          create a directory /etc/sysconfig/networking/backup

          set up the networking correctly for home

          copy the following files into the backup directory, giving them a suffix
          of '.home' :
          /etc/sysconfig/networking/devices/eth0.route
          /etc/sysconfig/networking/devices/ifcfg-eth0
          /etc/sysconfig/networking/profiles/default/resolv.conf
          /etc/ntp.conf (optional)

          then, set up networking correctly for work

          copy the same set of files to the backup directory, giving them a suffix
          of '.work'

          the contents of your backup directory should now look something like this :

          -rw------- 1 root root 57 Jan 31 20:16 eth0.route.home
          -rw------- 1 root root 57 Jan 31 18:33 eth0.route.work
          -rw------- 1 root root 191 Jan 31 21:26 ifcfg-eth0.home
          -rw------- 1 root root 123 Jan 31 21:26 ifcfg-eth0.work
          -rw-r--r-- 1 root root 1765 Feb 25 08:50 ntp.conf.home
          -rw-r--r-- 1 root root 1777 Feb 25 08:47 ntp.conf.work
          -rw-r--r-- 1 root root 103 Jan 31 19:54 resolv.conf.home
          -rw-r--r-- 1 root root 88 Apr 3 08:54 resolv.conf.work

          Then, I created a little perl script to copy the correct set of files
          into the right places. Heres the script :

          [steve@i4100 backup]$ cat /usr/local/bin/setnet.pl
          #!/usr/bin/perl -W

          use strict ;

          #
          # Check command line args for either 'work' or 'home'
          #
          my $loc ;
          foreach my $arg (@ARGV) {
          if (($arg eq 'work') || ($arg eq 'home')) {
          $loc = $arg ;
          last ;
          }
          }

          unless ($loc) {
          $loc = 'work' ;
          my ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst)
          = localtime (time) ;
          if (($wday > 0) && ($wday < 6)) {
          $loc = 'home' if (($hour < 7) || ($hour >= 17)) ;
          }
          else {
          $loc = 'home' ;
          }
          }
          my %files = (
          'eth0.route' => ['../devices'],
          'ifcfg-eth0' => ['../devices', '../profiles/default',
          '../../network-scripts'],
          'resolv.conf' => ['../profiles/default'],
          'ntp.conf' => ['/etc'],
          ) ;
          chdir '/etc/sysconfig/networking/backup' ;
          foreach my $f (keys %files) {
          foreach my $d (@{$files {$f}}) {
          my $cmd = "cp ${f}.${loc} ${d}/${f}" ;
          my $ret = `${cmd} 2>&1` ;
          }
          }

          The script can take an optional argument of either 'home' or 'work', or
          if no argument is present, it works out where I am, depending on the day
          of the week and the hour of the day. You will probably want to change
          this to suit your situation. I called the script 'setnet.pl', and
          copied it into /usr/local/bin.

          I then modified the /etc/init.d/network script, putting a call to
          /usr/local/bin/setnet.pl right at the top of the script. If you don't
          want to make the script executable, you would need to change this to
          'perl /usr/local/bin/setnet.pl'.

          Then, when you start your machine, it will automatically copy over the
          correct set of files, and your network should start properly. You don't
          need to fiddle with the DHCP timeout.

          I hope this helps.

          Steve


          David Whitmarsh wrote:

          >Have a look at http://sourceforge.net/projects/columbus/
          >
          >>From the blurb:
          >
          >"columbus is a script and set of supporting scripts and tools to allow
          >for auto-detection of the network you're in and allows you to adjust
          >files and configuration on the system to match your preferred settings
          >(fstab, gateways, proxy, ...)"
          >
          >
          >Regards,
          >
          >David
          >
          >
          >On Tue, 2002-04-02 at 22:00, simbateman wrote:
          >
          >>This isnt a dell specific questions but this group has such a great
          >>response that I thought I would ask here.
          >>
          >>I have a i81k with the built in network/modem combo. I use the
          >>network card at home and at work. I also occasionally use a wireless
          >>nic at home. at home I am running on the 192.168.1 subnet but at the
          >>office I am running 10.10.1. So I need to have the nic card using
          >>dhcp so it can get the correct ip address when it boots up.
          >>
          >>Here is the problem that i have. When I am not connected to a
          >>network my box takes forever to load because it waits for dhcp to
          >>time out(i am guessing). So what I am looking for is a way to not
          >>have that nic fire up on boot but then have a script I can run that
          >>will tell it to fire up and get an ip address when I need it to.
          >>
          >>If i run the S10Network start file in /etc/rc3.d then I can get it to
          >>fire up but I dont know how to tell the computer not to bother
          >>turning on eth0 at boot.
          >>
          >>I think this is what my problem and the solution I need is but if
          >>anyone has any suggestion or alternate solutions please let me know.
          >>
          >>I appreciate the great help that comes from this group. Also, I
          >>guess another short question when I hit fcn+esc to suspend my box,
          >>the screen goes all funny then it restarts X. Is this what is
          >>supposed to happen? I havnt set up hibernate yet but that is next.
          >>
          >>Again Thanks in advance.
          >>simeon
          >>
          >>
          >>
          >>--------------------------------------------------------------
          >>Please post your X config files in the group links or database
          >>To unsubscribe, email: linux-dell-laptops-unsubscribe@yahoogroups.com
          >>FAQ: http://www.whacked.net/ldl/faq
          >>
          >>Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
          >>
        Your message has been successfully submitted and would be delivered to recipients shortly.