1 |
Am 14.11.2012 18:55, schrieb Helmut Jarausch: |
2 |
> On 11/13/2012 07:08:24 PM, Florian Philipp wrote: |
3 |
>> Am 13.11.2012 17:27, schrieb Bruce Hill: |
4 |
>> > On Tue, Nov 13, 2012 at 04:52:25PM +0100, Helmut Jarausch wrote: |
5 |
>> >>>> |
6 |
>> >>>>> I'd like to assign fixed IP numbers to computers of a local |
7 |
>> >>>> map MAC addresses to IP addresses. |
8 |
>> > |
9 |
>> [...] |
10 |
>> > |
11 |
>> > If you just want to setup a static IP per machine, /etc/conf.d/net: |
12 |
>> > |
13 |
>> > config_wlan0="192.168.1.2/24" |
14 |
>> > routes_wlan0="default via 192.168.1.1" |
15 |
>> > |
16 |
>> > Hope this helps. If it's too confusing, might mention where DHCP is |
17 |
>> handed |
18 |
>> > out, and some more about your LAN. |
19 |
>> |
20 |
>> The following is taken directly from my /etc/conf.d/net with minimal |
21 |
>> editing. It assigns configs based on SSIDs. If I'm not mistaken (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. |
60 |
> |
61 |
|
62 |
Just guessing, could it be related to iproute2? |
63 |
From net.example: |
64 |
# If you don't specify an interface then we prefer iproute2 if it's |
65 |
# installed. To prefer ifconfig over iproute2 |
66 |
modules="!iproute2" |