1 |
On Tue, Nov 13, 2012 at 04:52:25PM +0100, Helmut Jarausch wrote: |
2 |
> >> |
3 |
> >> > I'd like to assign fixed IP numbers to computers of a local |
4 |
> >> map MAC addresses to IP addresses. |
5 |
|
6 |
This is what your /etc/dhcp/dhcp.conf would look like on the router, or how it |
7 |
should be configured wherever DHCP is handed out: |
8 |
|
9 |
authoritative; |
10 |
ddns-update-style none; |
11 |
|
12 |
default-lease-time 1800; |
13 |
max-lease-time 1800; |
14 |
|
15 |
subnet 192.168.54.0 netmask 255.255.255.0 { |
16 |
range 192.168.54.10 192.168.54.50; |
17 |
option broadcast-address 192.168.54.255; |
18 |
option domain-name-servers 192.168.54.1; |
19 |
option routers 192.168.54.1; |
20 |
} |
21 |
|
22 |
subnet 192.168.100.0 netmask 255.255.255.0 { |
23 |
range 192.168.100.10 192.168.100.50; |
24 |
option broadcast-address 192.168.100.255; |
25 |
option domain-name-servers 192.168.100.1; |
26 |
option routers 192.168.100.1; |
27 |
} |
28 |
|
29 |
host server { |
30 |
hardware ethernet 00:d0:68:0b:87:66; |
31 |
fixed-address 192.168.100.3; |
32 |
} |
33 |
|
34 |
You of course need to adjust for your network(s). And I'd install dhcpcd and |
35 |
put it in the default runlevel. |
36 |
|
37 |
Then on the client you have /etc/conf.d/net like this: |
38 |
|
39 |
modules_wlan0="wpa_supplicant" |
40 |
wpa_supplicant_wlan0="-Dwext" |
41 |
config_wlan0="dhcp" |
42 |
|
43 |
if you're using wpa_supplicant (you mentioned wpa_cli). |
44 |
|
45 |
And your /etc/wpa_supplicant/wpa_supplicant.conf would look like: |
46 |
|
47 |
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=wheel |
48 |
#ap_scan=0 |
49 |
#update_config=1 |
50 |
|
51 |
network={ |
52 |
ssid="YourSSID" |
53 |
psk=your-secret-key |
54 |
scan_ssid=1 |
55 |
proto=WPA2 |
56 |
key_mgmt=WPA-PSK |
57 |
group=CCMP TKIP |
58 |
pairwise=CCMP TKIP |
59 |
priority=5 |
60 |
} |
61 |
|
62 |
|
63 |
|
64 |
If you just want to setup a static IP per machine, /etc/conf.d/net: |
65 |
|
66 |
config_wlan0="192.168.1.2/24" |
67 |
routes_wlan0="default via 192.168.1.1" |
68 |
|
69 |
Hope this helps. If it's too confusing, might mention where DHCP is handed |
70 |
out, and some more about your LAN. |
71 |
-- |
72 |
Happy Penguin Gymnastics >') |
73 |
126 Fenco Drive ( \ |
74 |
Tupelo, MS 38801 ^^ |
75 |
admin@××××××××××××××××××××××.com |
76 |
662-321-7009 |
77 |
http://happypenguingymnastics.com/ |
78 |
FB: http://tiny.cc/HappyPenguinGymnastics |
79 |
|
80 |
Don't top-post: http://en.wikipedia.org/wiki/Top_post#Top-posting |