Re: setting up network

2005-01-27 Thread Enrico Zini
On Sun, Jan 23, 2005 at 08:26:43PM +0100, Kai Hildebrandt wrote:

> I use the map-scheme to decide which connection has to be used. If you
> have an Internet router at home your laptop can ping on this should
> work.
> You have to define a mapping in /etc/network/interfaces:

Same example as you, but using guessnet:

---
mapping eth0
script /usr/sbin/guessnet-ifupdown
map default: hotel

iface home inet static
address 192.168.1.3
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 192.168.1.1
dns-search your-nework.de

# test* options are implemented by guessnet
# This would be what you are doing:
#test-peer address 192.168.1.1
# Strongly suggested to also include the peer MAC address in the
# test, so that you're sure that you're matching the right host
test-peer address 192.168.1.1 mac AA:BB:CC:DD:EE:FF

iface hotel inet dhcp
---

And that's it: no other scripts needed, scan is done with a simple ARP
request that works also if the gateway firewalls pings, no need to
supply a source address, many different hosts can be scanned in
parallel.

And if you want to get rid of the DCHP scan at boot if you're unplugged,
you can add this other stanza:

iface none inet static
# 0.0.0.0 doesn't work with some network drivers: if it is your
# case, use some random address like 10.0.0.1/24.
# Better ways of handling this have been suggested to ifupdown:
# see bugs #76142, #92993, #96265, #129003, #164823, #171981 or
# even better #204641.
address 0.0.0.0
netmask 0.0.0.0
test missing-cable


Ciao,

Enrico

--
GPG key: 1024D/797EBFAB 2000-12-05 Enrico Zini <[EMAIL PROTECTED]>


signature.asc
Description: Digital signature


Re: setting up network [SOLVED]

2005-01-23 Thread Pollywog
On 01/24/2005 12:25 am, Loren A. Linden Levy wrote:
> You should post the /etc/network/interfaces file so we can all see it,
> that is those of us silently following the thread.

I already posted the original and I made very few changes to the file.

I set it up to that eth0-home comes up by default and when I travel, I issue 
the command 'if-down eth0=eth0-home' followed by 'ifup eth0=eth0-away'
That should get dhcp working.  I grabbed some other packages in case this 
fails, or I can just dialup, I know that is working.

### /etc/networks/interfaces file ###
# 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-home inet static
address 192.168.0.14
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
gateway 192.168.0.2
# dns-* options are implemented by the resolvconf package, if 
installed
dns-nameservers 192.168.0.2
dns-search shadypond.com
auto eth0=eth0-home

iface eth0-away inet dhcp

iface ppp0 inet ppp
provider provider

### EOF ###


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: setting up network

2005-01-23 Thread Pollywog
On Monday 24 January 2005 12:12 am, NicolÃs VelÃsquez "O. wrote:
> Hello there,
>
> I guess the best way to find out how to configure your nic on a network
> is to ask the administrator, you could use ethercap thou.
>
> If you switch between different networks, consequently different nic
> configurations, you should do [apt-cache show intuitively], I use it and
> it rocks.

Thank you, I will try to get documentation for that package before I install 
it.


8)



Re: setting up network [SOLVED]

2005-01-23 Thread Loren A. Linden Levy
You should post the /etc/network/interfaces file so we can all see it,
that is those of us silently following the thread.

On Mon, 24 Jan 2005 00:13:24 +
Pollywog <[EMAIL PROTECTED]> wrote:

> I think I have solved the problem.  I edited my interfaces file so that when 
> I 
> am away from home, I use 'ifup eth0=eth0-away' and that should start dhcp.
> That was the easiest though not the fanciest thing to do.  Fancy will have to 
> wait until I find out more about how this works.
> 
> 
> 8)
> 
> 
> -- 
> To UNSUBSCRIBE, email to [EMAIL PROTECTED]
> with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]


-- 
-
Loren A. Linden Levy
481 Loomis, Department of Physics
University of Illinois at Urbana-Champaign
1110 W. Green St., Urbana, IL 61801-3080
Tel:   217-244-7995   Fax: 217-333-1215
Email: [EMAIL PROTECTED]
url:   http://w3.physics.uiuc.edu/~lindenle/
_
-
This email has been cryptographically signed.
Search for "lindenle" at pgp.mit.edu
to obtain my public key which can be used 
to verify the authenticity of this message.
_
-


pgpe5Wazygs3E.pgp
Description: PGP signature


Re: setting up network

2005-01-23 Thread O.

Hello there,

I guess the best way to find out how to configure your nic on a network
is to ask the administrator, you could use ethercap thou.

If you switch between different networks, consequently different nic
configurations, you should do [apt-cache show intuitively], I use it and
it rocks.

El dom, 23-01-2005 a las 18:37 +, Pollywog escribiÃ:
> I am planning to stay at a hotel which has Internet access but I know nothing 
> about the IP addresses they use.  I am assuming they use dhcp.  If I know 
> nothing of their network, what is the most convenient way to get my laptop 
> connected?  I am using KDE on a Debian Sarge system and my laptop is a 
> Thinkpad (an old one) using a PCMCIA NIC.
> 
> I have pump and dhcp-client installed and also guessnet, but I have never 
> used 
> either of them.
> 
> thanks
> 
> 
> -- 
> 
> 8)
> 
> [EMAIL PROTECTED]@p: [EMAIL PROTECTED]
> 
> 
-- 

Atentamente,
NicolÃs VelÃsquez
BogotÃ, Colombia

(^)   ASCII Ribbon Campaign
 XNO HTML/RTF in e-mail
/ \   NO Word docs in e-mail


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: setting up network [SOLVED]

2005-01-23 Thread Pollywog
I think I have solved the problem.  I edited my interfaces file so that when I 
am away from home, I use 'ifup eth0=eth0-away' and that should start dhcp.
That was the easiest though not the fanciest thing to do.  Fancy will have to 
wait until I find out more about how this works.


8)


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: setting up network

2005-01-23 Thread Pollywog
Here is my interfaces file, the one that works.
I have tried adding the schemes and that makes things NOT work.
I do not have the resolvconf package installed but even when I installed it, 
it did not fix the problems and besides, the laptop has a nameserver 
installed.  BTW the gateway (a Linksys broadband router) shown in the file 
also runs a nameserver but of course, while I am away from home, it would not 
be available.

### /etc/network/interfaces file ###
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 static
address 192.168.0.14
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
gateway 192.168.0.2
# dns-* options are implemented by the resolvconf package, if 
installed
dns-nameservers 192.168.0.2
dns-search shadypond.com

iface ppp0 inet ppp
provider provider

### EOF ###

-- 

8)

[EMAIL PROTECTED]@p: [EMAIL PROTECTED]


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: setting up network

2005-01-23 Thread Pollywog
On 01/23/2005 08:44 pm, Michael Perry wrote:

> You could also extend the approach to doing schemes or themes inside
> the /etc/network/interfaces file for wireless and wired networks.  I
> travel with laptops to several settings that vary between wireless and
> wired.  I have a set of schemes that load different wireless setups
> like essid, key, etc and then you can extend the above commands even
> more by calling a scheme with the ifup command.  On my laptop it works
> very well for bringing up a variety of wired and wireless network
> configurations without having to install a second package or write
> scripts.

The schemes are not working for me, I must be doing something wrong.
I will look at my Xandros setup and see if I might gain some clues into why 
the schemes are not working on the laptop (which runs Debian).  I am also 
using the "Debian Reference" by Osamu Aoki.   That might help.


-- 

8)

[EMAIL PROTECTED]@p: [EMAIL PROTECTED]


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: setting up network

2005-01-23 Thread Michael Perry
On Sun, 23 Jan 2005 14:55:44 -0500, Curt Howland <[EMAIL PROTECTED]> wrote:
> If you're not averse to a little bit of hand editing, this is how I do
> it:
> 
> In /etc/network/interfaces
> --
> #iface eth0 inet dhcp
> iface eth0 inet static
> address 10.12.14.16
> netmask 255.255.255.0
> --
> 
> Then when I'm in a place like a hotel, I comment out the static
> entries and remove the comment from the dhcp, to wit:
> 
> --
> iface eth0 inet dhcp
> #iface eth0 inet static
> #address 10.12.14.16
> #netmask 255.255.255.0
> --
> 
> Then "ifdown eth0" and "ifup eth0"
> 
> Of course, since you're using a pcmcia network card, you could just
> make the change before plugging in your card and when the card is
> inserted it will load the new configuration.
> 
> Curt-
> 
> On Sunday 23 January 2005 14:31, Pollywog was heard to say:
> > Thanks, I saw something about the map scheme when I was searching
> > for answers to my problem, but I found it rather confusing.  I will
> > try this if the 'dhclient eth0' command fails to connect me.  The
> > information you posted will be very helpful.
> -- 

You could also extend the approach to doing schemes or themes inside
the /etc/network/interfaces file for wireless and wired networks.  I
travel with laptops to several settings that vary between wireless and
wired.  I have a set of schemes that load different wireless setups
like essid, key, etc and then you can extend the above commands even
more by calling a scheme with the ifup command.  On my laptop it works
very well for bringing up a variety of wired and wireless network
configurations without having to install a second package or write
scripts.

Here is a snippet of my /etc/network/interfaces file,

auto eth0
iface eth0 inet dhcp

iface home inet dhcp
wireless-essid yy
wireless-key xx

iface tmobile inet dhcp
wireless-essid tmobile

iface eds inet dhcp
wireless-essid aa
wireless-key d

I used to have a stanza setup for a static IP thing at a colo I worked
at with a wired connection called "work" as well.  So when I want to
bring up a specific interface I visit, I just do "ifup eth1=work" or
eds or whatever.

If I go somewhere like a hotel I have not connected at before, I've
found 99% of the time they use dhcp so its pretty easy to modify the
script or just use a manual setup to make things work and get a sense
of the requirements.  Often hotels have printouts on the wireless
setups or how broadband works in a room.  Usually this information can
be easily modified to a /etc/network/interfaces script if you are
gonna be there for awhile.




-- 
Michael Perry
[EMAIL PROTECTED]


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: setting up network

2005-01-23 Thread Pollywog
On Sunday 23 January 2005 07:55 pm, Curt Howland wrote:
> If you're not averse to a little bit of hand editing, this is how I do
> it:
>
> In /etc/network/interfaces
> --
> #iface eth0 inet dhcp
> iface eth0 inet static
> address 10.12.14.16
> netmask 255.255.255.0
> --




Thanks, I will do it that way if the mapping approach does not work for me.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: setting up network

2005-01-23 Thread Curt Howland
If you're not averse to a little bit of hand editing, this is how I do 
it:

In /etc/network/interfaces
--
#iface eth0 inet dhcp
iface eth0 inet static
address 10.12.14.16
netmask 255.255.255.0
--

Then when I'm in a place like a hotel, I comment out the static 
entries and remove the comment from the dhcp, to wit:

--
iface eth0 inet dhcp
#iface eth0 inet static
#address 10.12.14.16
#netmask 255.255.255.0
--

Then "ifdown eth0" and "ifup eth0"

Of course, since you're using a pcmcia network card, you could just 
make the change before plugging in your card and when the card is 
inserted it will load the new configuration.

Curt-

On Sunday 23 January 2005 14:31, Pollywog was heard to say:
> Thanks, I saw something about the map scheme when I was searching
> for answers to my problem, but I found it rather confusing.  I will
> try this if the 'dhclient eth0' command fails to connect me.  The
> information you posted will be very helpful.
-- 
September 11th, 2001
The proudest day for gun control and central 
planning advocates in American history


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: setting up network

2005-01-23 Thread Pollywog
On 01/23/2005 07:26 pm, Kai Hildebrandt wrote:

>
> I use the map-scheme to decide which connection has to be used. If you
> have an Internet router at home your laptop can ping on this should
> work.
>
> You have to define a mapping in /etc/network/interfaces:
>


> Probably this is what you want?

Thanks, I saw something about the map scheme when I was searching for answers 
to my problem, but I found it rather confusing.  I will try this if the 
'dhclient eth0' command fails to connect me.  The information you posted will 
be very helpful.



-- 

8)

[EMAIL PROTECTED]@p: [EMAIL PROTECTED]


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: setting up network

2005-01-23 Thread Kai Hildebrandt
Hi.

On Sun, 23 Jan 2005 19:07:54 +
Pollywog <[EMAIL PROTECTED]> wrote:

> On 01/23/2005 06:50 pm, Alan Pope wrote:
> > On Sun, 23 Jan 2005 18:37:02 +, Pollywog
> > <[EMAIL PROTECTED]> 
> wrote:
> > > I am planning to stay at a hotel which has Internet access but I
> > > know nothing about the IP addresses they use.  I am assuming they
> > > use dhcp. If I know nothing of their network, what is the most
> > > convenient way to get my laptop connected?
> 
> [...]
> 
> > So you currently use static IP addresses?
> 
> Yes, at home I use static addresses.
> 
I use the map-scheme to decide which connection has to be used. If you
have an Internet router at home your laptop can ping on this should
work.

You have to define a mapping in /etc/network/interfaces:


mapping eth0
script /usr/local/sbin/map-scheme
map HOME eth0-home
map HOTEL eth0-hotel

iface eth0-home inet static
address 192.168.1.3
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1
# dns-* options are implemented by the resolvconf package, if
installeddns-nameservers 192.168.1.1
dns-search your-nework.de

iface eth0-hotel inet dhcp


And of course the file /usr/local/sbin/map-scheme:

#!/bin/sh
#
# Check whether I am at home or at hotel
#

# your NIC
DEV=eth0

# your ip-address
ADDR=192.168.1.2/24

# ip-address of host to ping on
GATEWAY=192.168.1.1


if [ `id -u` -ne 0 ]; then exit 1; fi

if [ -x /usr/bin/fping ]; then
PING="/usr/bin/fping"
else
PING="/bin/ping -c 2"
fi

ip addr add $ADDR dev $DEV >/dev/null 2>&1
ip link set $DEV up>/dev/null 2>&1

if $PING $GATEWAY >/dev/null 2>&1; then
IFACE="eth0-home"
else
IFACE="eth0-hotel"
fi

ip link set $DEV down  >/dev/null 2>&1
ip addr del $ADDR dev $DEV >/dev/null 2>&1

echo $IFACE
# EOF

Probably this is what you want?


Regards
  Kai


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: setting up network

2005-01-23 Thread Pollywog
On 01/23/2005 06:50 pm, Alan Pope wrote:
> On Sun, 23 Jan 2005 18:37:02 +, Pollywog <[EMAIL PROTECTED]> 
wrote:
> > I am planning to stay at a hotel which has Internet access but I know
> > nothing about the IP addresses they use.  I am assuming they use dhcp. 
> > If I know nothing of their network, what is the most convenient way to
> > get my laptop connected?  I am using KDE on a Debian Sarge system and my
> > laptop is a Thinkpad (an old one) using a PCMCIA NIC.
>
> I have yet to stay in a hotel that *didn't* use DHCP!
>
> > I have pump and dhcp-client installed and also guessnet, but I have never
> > used either of them.
>
> So you currently use static IP addresses?

Yes, at home I use static addresses.

>
> Have you got the card working on your laptop? If so, you can just type
> "dhclient eth0" where eth0 is your network inteface. You can run
> ifconfig to find out what the network interface is..

Thanks, that is what I needed to know.  The card works at home but I did not 
know how I would get it working on a network where I did not know the IP 
addresses used or if they used dhcp, since I have not used dhcp since my 
Windows days.



-- 
[EMAIL PROTECTED]@p: [EMAIL PROTECTED]


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: setting up network

2005-01-23 Thread Alan Pope
On Sun, 23 Jan 2005 18:37:02 +, Pollywog <[EMAIL PROTECTED]> wrote:
> I am planning to stay at a hotel which has Internet access but I know nothing
> about the IP addresses they use.  I am assuming they use dhcp.  If I know
> nothing of their network, what is the most convenient way to get my laptop
> connected?  I am using KDE on a Debian Sarge system and my laptop is a
> Thinkpad (an old one) using a PCMCIA NIC.
> 

I have yet to stay in a hotel that *didn't* use DHCP! 

> I have pump and dhcp-client installed and also guessnet, but I have never used
> either of them.

So you currently use static IP addresses? 

Have you got the card working on your laptop? If so, you can just type
"dhclient eth0" where eth0 is your network inteface. You can run
ifconfig to find out what the network interface is..

Cheers,
Al.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]