Re: IP address depending on the MAC

2011-10-08 Thread Tony van der Hoff
On 06/10/11 20:30, Ireneusz Szcześniak wrote: Student bring their laptops and get the ethernet cable from the lab computers. They do it frantically a few times, and the desktop interface gets this address. Personally, I would set up a wireless interface for student's laptops. Then, LART any s

Re: IP address depending on the MAC

2011-10-07 Thread Chris Davies
Ireneusz Szcześniak wrote: > Thank you, Chris, for the idea. The IP addresses would be randomly > distributed, while I would like to keep them in a contiguous range. That's fine; I suspect the earlier suggestion would suit you better. Chris -- To UNSUBSCRIBE, email to debian-user-requ...@lis

Re: IP address depending on the MAC

2011-10-06 Thread Liam O'Toole
On 2011-10-06, Ireneusz Szcześniak wrote: > On 06.10.2011 00:08, Liam O'Toole wrote: >> Yet another option is to configure clients to send their hostname in the >> DHCP request. The hostnames will register with dnsmasq's DNS resolver, >> so you can connect to the clients by hostname rather than IP

Re: IP address depending on the MAC

2011-10-06 Thread Raf Czlonka
On Thu, Oct 06, 2011 at 07:30:00PM BST, Ireneusz Szcześniak wrote: > On 06.10.2011 08:56, Raf Czlonka wrote: > > What do you mean by "falls back to a random IP address"? > > The interface is assigned an address in the range 169.254.0.0/16. Remove the package which assigns those IP addresses, e.g.

Re: IP address depending on the MAC

2011-10-06 Thread Ireneusz Szcześniak
On 06.10.2011 08:56, Raf Czlonka wrote: > What do you mean by "falls back to a random IP address"? The interface is assigned an address in the range 169.254.0.0/16. > What purpose unplugging the PC from the network has? > Is it part of the lab? Student bring their laptops and get the ethernet

Re: IP address depending on the MAC

2011-10-05 Thread Raf Czlonka
On Thu, Oct 06, 2011 at 06:13:04AM BST, Ireneusz Szcześniak wrote: > This is what I have already done, but the static lease doesn't > protect me from the "unplugging problem" and the behaviour of > dhclient. I haven't looked into the config of dhclient yet, but > reconfiguring it so that it keeps

Re: IP address depending on the MAC

2011-10-05 Thread Ireneusz Szcześniak
On 06.10.2011 00:08, Liam O'Toole wrote: On 2011-10-05, Raf Czlonka wrote: On Wed, Oct 05, 2011 at 08:59:08PM BST, Ireneusz Szcześniak wrote: The computers are in a university laboratory, where students often unplug the lan cable. Then they plug the cable again after some time, and unplug aga

Re: IP address depending on the MAC

2011-10-05 Thread Ireneusz Szcześniak
On 05.10.2011 23:15, Raf Czlonka wrote: On Wed, Oct 05, 2011 at 08:59:08PM BST, Ireneusz Szcześniak wrote: The computers are in a university laboratory, where students often unplug the lan cable. Then they plug the cable again after some time, and unplug again. The problem with this plugging a

Re: IP address depending on the MAC

2011-10-05 Thread Liam O'Toole
On 2011-10-05, Raf Czlonka wrote: > On Wed, Oct 05, 2011 at 08:59:08PM BST, Ireneusz Szcześniak wrote: >> The computers are in a university laboratory, where students often >> unplug the lan cable. Then they plug the cable again after some >> time, and unplug again. >> >> The problem with this p

Re: IP address depending on the MAC

2011-10-05 Thread Raf Czlonka
On Wed, Oct 05, 2011 at 08:59:08PM BST, Ireneusz Szcześniak wrote: > The computers are in a university laboratory, where students often > unplug the lan cable. Then they plug the cable again after some > time, and unplug again. > > The problem with this plugging and unplugging is that when the >

Re: IP address depending on the MAC

2011-10-05 Thread Ireneusz Szcześniak
Thank you, Chris, for the idea. The IP addresses would be randomly distributed, while I would like to keep them in a contiguous range. On 03.10.2011 18:52, Chris Davies wrote: Javier Barroso wrote: If you know which macs you will have, you can make an init script which generate /etc/network/

Re: IP address depending on the MAC

2011-10-05 Thread Ireneusz Szcześniak
On 03.10.2011 12:38, Darac Marjal wrote: I'm not sure about hostname but there IS a way to assign a static IP address to an interface based on it's MAC address. It's called StateLess Address Autoconfiguration (SLAAC). Basically, you take the 48-bit mac address, modify it a little (mainly adding

Re: IP address depending on the MAC

2011-10-05 Thread Ireneusz Szcześniak
On 03.10.2011 09:43, Scott Ferguson wrote: If you have a large number of identical hardware machines to image - a multicast solution that allows defining build rules (ie static network addresses, hostname, /etc/host, passwords, usernames, network shares and logons etc) might save time and make m

Re: IP address depending on the MAC

2011-10-05 Thread Ireneusz Szcześniak
On 03.10.2011 01:36, Liam O'Toole wrote: Could you elaborate on why you can't use a DHCP server? I ask this because you can set up dnsmasq to assign a fixed IP address to a client based on its hostname or MAC address, and to give clients an infinite lease. Therefore it offers a convenient way to

Re: IP address depending on the MAC

2011-10-05 Thread Ireneusz Szcześniak
On 02.10.2011 22:37, Raf Czlonka wrote: I was about to suggest preseeding as well - works great if you combine it with pxelinux, even if you need to set up a DHCP server on a small subnet only for that purpose. But if it doesn't, your option is a script - try some scripts/rules from ifupdown* pa

Re: IP address depending on the MAC

2011-10-05 Thread Ireneusz Szcześniak
On 02.10.2011 21:19, Camaleón wrote: True, I wasn't clear enough. Ideally, I would like to have a config file that would list MAC addresses and IP addresses that these NICs should have. Hum... if I understood you correctly, you want to "dump" a previously generated ISO image into a set of com

Re: IP address depending on the MAC

2011-10-03 Thread Chris Davies
Javier Barroso wrote: > If you know which macs you will have, you can make an init script > which generate /etc/network/interface and /etc/hostname and /etc/hosts > the first boot and then remove itself. You don't even need to know in advance the MACs as long as enough of the address is unique.

Re: IP address depending on the MAC

2011-10-03 Thread Darac Marjal
On Sun, Oct 02, 2011 at 06:31:59PM +0200, Ireneusz Szcześniak wrote: > Hi, > > I'm planning to install an image of Debian to a number of computers. > Each of these computers will have the same configuration except the > hostname and the IP address. The IP configuration has to be static. > I can't

Re: IP address depending on the MAC

2011-10-03 Thread Scott Ferguson
On 03/10/11 03:31, Ireneusz Szcześniak wrote: > Hi, > > I'm planning to install an image of Debian to a number of computers. > Each of these computers will have the same configuration except the > hostname and the IP address. The IP configuration has to be static. > I can't use a DHCP server. >

Re: IP address depending on the MAC

2011-10-02 Thread Lisi
On Sunday 02 October 2011 19:08:26 Ireneusz Szcześniak wrote: > As I mentioned before, I > can't use a DHCP server. Ah, sorry. I missed that. Ignore the noise from me! Lisi -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listm

Re: IP address depending on the MAC

2011-10-02 Thread Lisi
On Sunday 02 October 2011 17:31:59 Ireneusz Szcześniak wrote: > QUESTION; Is there a way to assign a hostname and a static IP address > at boot time depending on the MAC address of the computer's network > interface card? I can do this via my router if I wish, and set the computer up with dhcp. I

Re: IP address depending on the MAC

2011-10-02 Thread Liam O'Toole
On 2011-10-02, Ireneusz Szcześniak wrote: > Dnsmasq is a DHCP and DNS server combined. As I mentioned before, I > can't use a DHCP server. > > On 02.10.2011 20:02, H.S. wrote: >> On 02/10/11 12:31 PM, Ireneusz Szcześniak wrote: >>> Hi, >>> >>> I'm planning to install an image of Debian to a numb

Re: IP address depending on the MAC

2011-10-02 Thread H.S.
On 02/10/11 02:08 PM, Ireneusz Szcześniak wrote: > Dnsmasq is a DHCP and DNS server combined. As I mentioned before, I > can't use a DHCP server. > > On 02.10.2011 20:02, H.S. wrote: >> On 02/10/11 12:31 PM, Ireneusz Szcześniak wrote: >>> Hi, >>> >>> I'm planning to install an image of Debian to

Re: IP address depending on the MAC

2011-10-02 Thread Raf Czlonka
On Sun, Oct 02, 2011 at 05:31:59PM BST, Ireneusz Szcześniak wrote: > I'm planning to install an image of Debian to a number of computers. > Each of these computers will have the same configuration except the > hostname and the IP address. The IP configuration has to be static. > I can't use a DHCP

Re: IP address depending on the MAC

2011-10-02 Thread Camaleón
On Sun, 02 Oct 2011 20:06:45 +0200, Ireneusz Szcześniak wrote: > On 02.10.2011 19:31, Camaleón wrote: > >> On Sun, 02 Oct 2011 18:31:59 +0200, Ireneusz Szcześniak wrote: >> >>> I'm planning to install an image of Debian to a number of computers. >>> Each of these computers will have the same conf

Re: IP address depending on the MAC

2011-10-02 Thread Ireneusz Szcześniak
Javier, thank you for your input. It seems that your solution should work. The file /etc/network/interfaces should only be modified early enough. I will give it a try! Thank you again! On 02.10.2011 20:52, Javier Barroso wrote: Hello, 2011/10/2 Ireneusz Szcześniak: Hi, I'm planning to i

Re: IP address depending on the MAC

2011-10-02 Thread Javier Barroso
Hello, 2011/10/2 Ireneusz Szcześniak : > Hi, > > I'm planning to install an image of Debian to a number of computers. Each of > these computers will have the same configuration except the hostname and the > IP address.  The IP configuration has to be static. I can't use a DHCP > server. > > QUESTI

Re: IP address depending on the MAC

2011-10-02 Thread green
On 02/10/11 12:31 PM, Ireneusz Szcześniak wrote: > The IP configuration has to be static. I can't use a DHCP server. H.S. wrote at 2011-10-02 13:02 -0500: > I use dnsmasq for exactly this purpose (my home lan is quite small > though). Works quite well. dnsmasq is a DHCP server, which the original

Re: IP address depending on the MAC

2011-10-02 Thread Ireneusz Szcześniak
Dnsmasq is a DHCP and DNS server combined. As I mentioned before, I can't use a DHCP server. On 02.10.2011 20:02, H.S. wrote: On 02/10/11 12:31 PM, Ireneusz Szcześniak wrote: Hi, I'm planning to install an image of Debian to a number of computers. Each of these computers will have the same c

Re: IP address depending on the MAC

2011-10-02 Thread Ireneusz Szcześniak
Camaleón, thank you for your input. However, I don't want to install the system from scratch, but to clone a previously prepared image. True, I wasn't clear enough. Ideally, I would like to have a config file that would list MAC addresses and IP addresses that these NICs should have. On 02.

Re: IP address depending on the MAC

2011-10-02 Thread H.S.
On 02/10/11 12:31 PM, Ireneusz Szcześniak wrote: > Hi, > > I'm planning to install an image of Debian to a number of computers. > Each of these computers will have the same configuration except the > hostname and the IP address. The IP configuration has to be static. I > can't use a DHCP server.

Re: IP address depending on the MAC

2011-10-02 Thread Camaleón
On Sun, 02 Oct 2011 18:31:59 +0200, Ireneusz Szcześniak wrote: > I'm planning to install an image of Debian to a number of computers. > Each of these computers will have the same configuration except the > hostname and the IP address. The IP configuration has to be static. I > can't use a DHCP se

IP address depending on the MAC

2011-10-02 Thread Ireneusz Szcześniak
Hi, I'm planning to install an image of Debian to a number of computers. Each of these computers will have the same configuration except the hostname and the IP address. The IP configuration has to be static. I can't use a DHCP server. QUESTION; Is there a way to assign a hostname and a sta