From: John Stumbles on
I'd like to be able to use wired ethernet if it's available,
otherwise wireless, with a static IP. It would be neat to be able to
also use wireless with DHCP if I'm in a wifi cafe.

I've tried network-manager (with knetworkmanager front end) and wicd and
both swear blind that I don't even *have* a wireless interface, despite
the face that I have the wireless running, manually configured.

It shouldn't be too hard to knock up a script to plug some ready-rolled
versions of /etc/network/interfaces into the working files and do ifdown
and ifup on the interfaces but I can't find how to set the wireless essid
etc in a file anywhere and everything I google just says to use
network-manager or wicd :-(



What I have is, in /etc/network/interfaces:

auto lo
interface lo inet loopback

allow-hotplug wlan0
iface wlan0 inet static
address 192.168.1.51
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1

/etc/resolv.conf contains opendns nameservers

And then manually I have to do:
iwconfig wlan0 essid my_essid enc s:my_string

That gets the wireless interface up and running.



Can anyone help?

thanks

--
John Stumbles

The astronomer married a star
From: Robert Heller on
At 7 Aug 2010 16:42:35 GMT John Stumbles <john.stumbles(a)ntlworld.com> wrote:

>
> I'd like to be able to use wired ethernet if it's available,
> otherwise wireless, with a static IP. It would be neat to be able to
> also use wireless with DHCP if I'm in a wifi cafe.
>
> I've tried network-manager (with knetworkmanager front end) and wicd and
> both swear blind that I don't even *have* a wireless interface, despite
> the face that I have the wireless running, manually configured.
>
> It shouldn't be too hard to knock up a script to plug some ready-rolled
> versions of /etc/network/interfaces into the working files and do ifdown
> and ifup on the interfaces but I can't find how to set the wireless essid
> etc in a file anywhere and everything I google just says to use
> network-manager or wicd :-(
>
>
>
> What I have is, in /etc/network/interfaces:
>
> auto lo
> interface lo inet loopback
>
> allow-hotplug wlan0
> iface wlan0 inet static
> address 192.168.1.51
> netmask 255.255.255.0
> network 192.168.1.0
> broadcast 192.168.1.255
> gateway 192.168.1.1

The 'static' qualifier pretty much disables networkmanager.

I presume that 192.168.1.0 is like your home or office network? Is a
dhcp server running there? If not, you should install (or have
installed) a dhcp server and then configure it to feed your 'static' IP
address to the MAC of your wireless NIC. This is what I do with my
laptop, which has both wireless and wired networking. Both are setup
with dhcp and my home office desktop runs a DHCP server and feeds my
laptop a (fixed) static ip on my home office LAN:

subnet 192.168.250.0 netmask 255.255.255.0 {
# --- default gateway
option subnet-mask 255.255.255.0;

option domain-name "deepsoft.com";
option domain-name-servers 192.168.250.1;
option routers 192.168.250.1;
option time-offset -18000; # Eastern Standard Time
option broadcast-address 192.168.250.255;
option time-servers 192.168.250.1;

use-host-decl-names on;

range dynamic-bootp 192.168.250.128 192.168.250.250;
authoritative;
default-lease-time 21600;
max-lease-time 2592000;

host gollum {
hardware ethernet 00:0d:60:cc:82:03;
fixed-address 192.168.250.5;
default-lease-time 2592000;
option host-name "gollum.deepsoft.com";
}
}

My desktop box runs a cacheing / local nameserver and routes to the internet
(via ppp over dialup).

Both of my machines run CentOS 5.5, but it should work much the same
for Debian.

>
> /etc/resolv.conf contains opendns nameservers
>
> And then manually I have to do:
> iwconfig wlan0 essid my_essid enc s:my_string
>
> That gets the wireless interface up and running.
>
>
>
> Can anyone help?
>
> thanks
>

--
Robert Heller -- 978-544-6933
Deepwoods Software -- Download the Model Railroad System
http://www.deepsoft.com/ -- Binaries for Linux and MS-Windows
heller(a)deepsoft.com -- http://www.deepsoft.com/ModelRailroadSystem/

From: John Stumbles on
On Sat, 07 Aug 2010 12:51:25 -0500, Robert Heller wrote:

>> What I have is, in /etc/network/interfaces:
>>
>> auto lo
>> interface lo inet loopback
>>
>> allow-hotplug wlan0
>> iface wlan0 inet static
>> address 192.168.1.51
>> netmask 255.255.255.0
>> network 192.168.1.0
>> broadcast 192.168.1.255
>> gateway 192.168.1.1
>
> The 'static' qualifier pretty much disables networkmanager.

Sorry I didn't mention: I only had the loopback interface lines in
/etc/network/interfaces when I tried network manager.

> I presume that 192.168.1.0 is like your home or office network? Is a
> dhcp server running there? If not, you should install (or have
> installed) a dhcp server and then configure it to feed your 'static' IP

The DHCP server is on my ancient wireless router and can't be configured
to give specific IP addresses to particular MAC addresses.

--
John Stumbles

Procrastinate now!
From: Robert Heller on
At 7 Aug 2010 19:33:43 GMT John Stumbles <john.stumbles(a)ntlworld.com> wrote:

>
> On Sat, 07 Aug 2010 12:51:25 -0500, Robert Heller wrote:
>
> >> What I have is, in /etc/network/interfaces:
> >>
> >> auto lo
> >> interface lo inet loopback
> >>
> >> allow-hotplug wlan0
> >> iface wlan0 inet static
> >> address 192.168.1.51
> >> netmask 255.255.255.0
> >> network 192.168.1.0
> >> broadcast 192.168.1.255
> >> gateway 192.168.1.1
> >
> > The 'static' qualifier pretty much disables networkmanager.
>
> Sorry I didn't mention: I only had the loopback interface lines in
> /etc/network/interfaces when I tried network manager.

You might need to add 'dhcp' lines to /etc/network/interfaces in order
for network manager to see them. I am not sure how Debian does things.
In my case (CentOS), I have ifcfg-eth0 and ifcfg-eth1 on my laptop:

gollum.deepsoft.com% cat /etc/sysconfig/network-scripts/ifcfg-eth[01]
# Intel Corporation 82540EP Gigabit Ethernet Controller (Mobile)
DEVICE=eth0
BOOTPROTO=dhcp
HWADDR=00:0D:60:CC:82:03
IPV6INIT=yes
IPV6_AUTOCONF=yes
ONBOOT=yes
DHCP_HOSTNAME=gollum.deepsoft.com
# Intel Corporation PRO/Wireless LAN 2100 3B Mini PCI Adapter
DEVICE=eth1
BOOTPROTO=dhcp
ONBOOT=yes
HWADDR=00:04:23:72:b4:49

and network manager is happy to manage both network devices.

>
> > I presume that 192.168.1.0 is like your home or office network? Is a
> > dhcp server running there? If not, you should install (or have
> > installed) a dhcp server and then configure it to feed your 'static' IP
>
> The DHCP server is on my ancient wireless router and can't be configured
> to give specific IP addresses to particular MAC addresses.

Then you are stuck with whatever IP addresses, etc. it provides.

>

--
Robert Heller -- Get the Deepwoods Software FireFox Toolbar!
Deepwoods Software -- Linux Installation and Administration
http://www.deepsoft.com/ -- Web Hosting, with CGI and Database
heller(a)deepsoft.com -- Contract Programming: C/C++, Tcl/Tk


From: Balwinder S Dheeman on
On 08/08/10 01:03, John Stumbles wrote:
> On Sat, 07 Aug 2010 12:51:25 -0500, Robert Heller wrote:
>
>>> What I have is, in /etc/network/interfaces:
>>>
>>> auto lo
>>> interface lo inet loopback
>>>
>>> allow-hotplug wlan0
>>> iface wlan0 inet static
>>> address 192.168.1.51
>>> netmask 255.255.255.0
>>> network 192.168.1.0
>>> broadcast 192.168.1.255
>>> gateway 192.168.1.1
>>
>> The 'static' qualifier pretty much disables networkmanager.
>
> Sorry I didn't mention: I only had the loopback interface lines in
> /etc/network/interfaces when I tried network manager.
>
>> I presume that 192.168.1.0 is like your home or office network? Is a
>> dhcp server running there? If not, you should install (or have
>> installed) a dhcp server and then configure it to feed your 'static' IP
>
> The DHCP server is on my ancient wireless router and can't be configured
> to give specific IP addresses to particular MAC addresses.

Though, I don't like and use NetworkManager and GUI tools, but I
found/think, the GUI tool/applet available for/under GNOME is much
better compared with the KDE variant.

[bsd(a)sun ~]$ uapt search network.*-gnome
network-manager-gnome - network management framework (GNOME frontend)
network-manager-openvpn-gnome - " (OpenVPN plugin)
network-manager-pptp-gnome - " (PPTP plugin)
network-manager-vpnc-gnome - " (VPNC plugin)

--
Balwinder S "bdheeman" Dheeman Registered Linux User: #229709
Anu'z Linux(a)HOME (Unix Shoppe) Machines: #168573, 170593, 259192
Chandigarh, UT, 160062, India Plan9, T2, Arch/Debian/FreeBSD/XP
Home: http://werc.homelinux.net/ Visit: http://counter.li.org/