1 |
On 11/13/2012 07:08:24 PM, Florian Philipp wrote: |
2 |
> Am 13.11.2012 17:27, schrieb Bruce Hill: |
3 |
> > On Tue, Nov 13, 2012 at 04:52:25PM +0100, Helmut Jarausch wrote: |
4 |
> >>>> |
5 |
> >>>>> I'd like to assign fixed IP numbers to computers of a local |
6 |
> >>>> map MAC addresses to IP addresses. |
7 |
> > |
8 |
> [...] |
9 |
> > |
10 |
> > If you just want to setup a static IP per machine, /etc/conf.d/net: |
11 |
> > |
12 |
> > config_wlan0="192.168.1.2/24" |
13 |
> > routes_wlan0="default via 192.168.1.1" |
14 |
> > |
15 |
> > Hope this helps. If it's too confusing, might mention where DHCP is |
16 |
> handed |
17 |
> > out, and some more about your LAN. |
18 |
> |
19 |
> The following is taken directly from my /etc/conf.d/net with minimal |
20 |
> editing. It assigns configs based on SSIDs. If I'm not mistaken |
21 |
> (haven't |
22 |
> tested it in a long time) this means it will default to DHCP for |
23 |
> unspecified nets. Good for quick and dirty setups while traveling: |
24 |
> |
25 |
> modules_wlan0="wpa_supplicant" |
26 |
> |
27 |
> config_MySSID="192.168.2.5 netmask 255.255.255.0" |
28 |
> routes_MySSID="default via 192.168.2.1" |
29 |
> dns_servers_MySSID="192.168.6.1" |
30 |
> dns_domain_MySSID="example.net" |
31 |
> |
32 |
> config_SomeHotelSSID="dhcp" |
33 |
> |
34 |
> config_HotelWithVPN="dhcp" |
35 |
> dhcp_HotelWithVPN="nodns" |
36 |
> dns_servers_HotelWithVPN="192.168.6.1" # DNS server via VPN |
37 |
> dns_domain_HotelWithVPN="vpn.example.net" |
38 |
> |
39 |
> Hope this helps, |
40 |
|
41 |
Thanks Florian, |
42 |
|
43 |
it *nearly* works. |
44 |
The line |
45 |
routes_MySSID="default via 192.168.2.1" |
46 |
|
47 |
(adapted to my IPs) |
48 |
doesn't seem to have any effect. |
49 |
|
50 |
Only if I add |
51 |
|
52 |
route add default gw 192.168.2.1 wlan0 |
53 |
|
54 |
to /etc/local.d/local.start |
55 |
it does work. |
56 |
|
57 |
I have no idea why the routes_MySSID=... line doesn't have any effect. |
58 |
|
59 |
Helmut. |