Page 3 of 6 FirstFirst 12345 ... LastLast
Results 21 to 30 of 52

Thread: HOWTO: Automatic network configuration

  1. #21
    Join Date
    Jan 2005
    Beans
    90

    Re: HOWTO: Automatic network configuration

    Quote Originally Posted by NTolerance
    Still the same - scanning not supported.
    You might need to look into the networking forum to see if your specific card is supported under Ubuntu.

  2. #22
    Join Date
    Mar 2005
    Location
    Florence, Italy
    Beans
    54

    Re: HOWTO: Automatic network configuration

    Ok, I've seen how to configure whereami to choose between a static wired connection and a wireless, the choiche is all about the cable, if it is inserted or not.
    But I can't figure out how to set it up for two static-ip wired network, with different IP ranges.
    I have this IP at home network: 192.168.254.253
    and this other at work: 192.168.0.251

    How can I determine on wich of the two network I am?

  3. #23
    Join Date
    Mar 2005
    Location
    Florence, Italy
    Beans
    54

    Re: HOWTO: Automatic network configuration

    No matter, I solved using "Divine", it can be configured for many static networks and uses ARP instead of ping to determine on wich network the laptop is (either I completely ignore what it means...).
    Divine can be found here: http://www.fefe.de/divine/

  4. #24
    Join Date
    Jun 2005
    Location
    Yardley, PA. USA
    Beans
    1,050
    Distro
    Ubuntu 7.10 Gutsy Gibbon

    Re: HOWTO: Automatic network configuration

    My eth0 is not a problem no matter where I am but I'm having problems with multiple wireless configurations (home, work, random detect of broadcasting ssid).

    #detect.conf

    #use wired by default
    default down

    #check for an ethernet cable in the wired interface
    testmii eth0 wired

    if wired #if it finds a cable
    set INTERFACE eth0
    notat down #then there must be some kind of connectivity, let's use it
    else
    notat wired #no cable found, must not be wired
    always set INTERFACE eth1
    testssid <myhomessid> secure-wireless #make sure your ssid is present
    testssid <myworkssid> work-wireless #make sure your ssid is present
    fi

    #whereami.conf

    =rm /etc/network/interfaces.last

    +secure-wireless cp /etc/network/interfaces /etc/network/interfaces.last
    +secure-wireless cp /etc/network/interfaces.wireless /etc/network/interfaces
    +secure-wireless /etc/init.d/networking restart

    +work-wireless cp /etc/network/interfaces /etc/network/interfaces.last
    +work-wireless cp /etc/network/interfaces.wireless /etc/network/interfaces
    +work-wireless /etc/init.d/networking restart

    +wired cp /etc/network/interfaces /etc/network/interfaces.last
    +wired cp /etc/network/interfaces.wired /etc/network/interfaces
    +wired /etc/init.d/networking restart

    As it's set now, even if I'm at home, it will look for my work ssid. If I take out my work profile, then it "stops" at home wireless and works. How can I make it work that at home it'll stop at my home ssid and at work it'll detect my work ssid?

    Also, is there a way to detect nonsecure broadcasting networks and setup like if I were at coffee shop with free wireless?

    Thanks.

  5. #25
    Join Date
    May 2005
    Beans
    65

    Re: HOWTO: Automatic network configuration

    blueplazma,

    thank You very much for Your good HowTo.

    Next days I will configure settings for my notebook (different wlan places, vpn, wired) and will sho 'em (hopefully working) configs here...

    Anybody else having experience with devine??

  6. #26
    Join Date
    Feb 2005
    Beans
    130

    Re: HOWTO: Automatic network configuration

    Quote Originally Posted by blueplazma
    Code:
    	=rm /etc/network/interfaces.old
    
    +home-wired /etc/init.d/networking restart
    +home-wired /etc/init.d/firestarter restart
    +home-wired setresolver search <put in your settings here>
    There are really three things that need explanation here. First is the equals sign (=), which means to always perform the command, regardless of which network we were on before. The plus (+) means to perform this command only if we were not on this network before, and the minus (-) means to perform this command only if we were on this network before, but are NOT anymore. See the documentation for specifics.
    Good post, but I think you might have a typo in here. According to the page you have linked to:

    The 'equals' indicates that this action applies whenever whereami finds that you are in this location, regardless of whether your last location was different.
    So, I think what you meant to type above was

    Code:
    =any rm /etc/network/interfaces.old
    Otherwise it will try to execute /etc/network/interfaces.old whenever it is entering or exiting the network "rm". Is this correct?

  7. #27
    Join Date
    Jun 2005
    Location
    Yardley, PA. USA
    Beans
    1,050
    Distro
    Ubuntu 7.10 Gutsy Gibbon

    Re: HOWTO: Automatic network configuration

    bump...bump...

    ...I'm begging...

    is blueplazma even around anymore to respond?

    in the meantime...I'm just using a custom script connected to Kwifi that I run on KDE startup. Dirty but it works. I'd like to get the whereami to work though.

    anyone???

    My scripts are in posts above....

  8. #28
    Join Date
    Feb 2005
    Beans
    130

    Re: HOWTO: Automatic network configuration

    Quote Originally Posted by reckless2k2
    anyone???

    My scripts are in posts above....
    I strongly suggest doing the following:

    Code:
    sudo whereami --scriptdebug shutdown
    sudo whereami --scriptdebug
    In between putting whereami into shutdown and running it again, you can also check to make sure the interfaces are down (i.e. ifconfig eth0 down). Using this debug feature, you should be able to figure out what's going wrong.

  9. #29
    Join Date
    Aug 2005
    Location
    Saint Paul, MN
    Beans
    2,907

    Re: HOWTO: Automatic network configuration

    Ran across this post while troubleshooting my detect.conf file. The version of whereami that I have on Hoary amd64 doesn't accept the following syntax, which I've seen in a variety of places:

    Code:
    testdhcp 192.168.1.0/24 home-wired
    This works:

    Code:
    testdhcp '192.168.1.*' home-wired
    Thought I'd pass that along in case someone else is having trouble with the tests.

  10. #30
    Join Date
    Apr 2005
    Beans
    1,395

    Re: HOWTO: Automatic network configuration

    OK, I tried to configure it but miserably failed. I've got a laptop with wired and wireless connection (Broadcom chip PCMCIA card with ndiswrapper). So I need it to autoconfig three types of networks:

    1. Wired unsecure
    2. Wireless secure (with WEP)
    3. Wireless unsecure and unknown

    At home I usually use my unsecure wired connection with a direct cable to my router. However, sometimes I have to go downstairs and use wireless. So I want to plug out the cable, insert the card and get the connection without rebooting and changing anything.

    However, sometimes I have to use laptop out of my home with a unknown wireless unsecure network. So I want to boot the laptop and hook on the network automatically. Yes, I know that I want too much.

    So I decided to handle my home connections.

    First of all I installed whereami and edited detect.conf file in this way (using this topic):

    Code:
    default down
    testmii eth0 wired
    if wired
    set INTERFACE eth0
    notat down
    else
    notat wired
    always set INTERFACE wlan0
    always testssid connexant secure-wireless
    fi
    then I created to files:
    interfaces.wired
    Code:
    # This file describes the network interfaces available on your system
    # and how to activate them. For more information, see interfaces(5).
    
    # The loopback network interface
    auto lo
    iface lo inet loopback
    
    # This is a list of hotpluggable network interfaces.
    # They will be activated automatically by the hotplug subsystem.
    mapping hotplug
    	script grep
    	map eth0
    
    # The primary network interface
    
    iface eth0 inet dhcp
    
    auto eth0
    
    #iface wlan0 inet dhcp
    #wireless-essid conexant
    #wireless-key *******************
    
    #auto wlan0
    and interfaces.wireless
    Code:
    # This file describes the network interfaces available on your system
    # and how to activate them. For more information, see interfaces(5).
    
    # The loopback network interface
    auto lo
    iface lo inet loopback
    
    # This is a list of hotpluggable network interfaces.
    # They will be activated automatically by the hotplug subsystem.
    mapping hotplug
    	script grep
    	map eth0
    
    # The primary network interface
    
    #iface eth0 inet dhcp
    
    #auto eth0
    
    iface wlan0 inet dhcp
    wireless-essid conexant
    wireless-key *******************
    auto wlan0
    basically I took a 'interfaces' file and commented wired stuff in .wireless and vice versa.

    Then I edited by copy and paste from this topic whereami.conf file:

    Code:
    =rm /etc/network/interfaces.last
    +secure-wireless cp /etc/network/interfaces /etc/network/interfaces.last
    +secure-wireless cp /etc/network/interfaces.wireless /etc/network/interfaces
    +secure-wireless /etc/init.d/networking restart
    +wired cp /etc/network/interfaces /etc/network/interfaces.last
    +wired cp /etc/network/interfaces.wired /etc/network/interfaces
    +wired /etc/init.d/networking restart
    well, as aresult nothing worked. I guess I did it too mechanically without really geting into it, but I am not good in it at all. I looks quite logical to me I do not know why it did not work. Any help?

Page 3 of 6 FirstFirst 12345 ... LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •