Gentoo Archives: gentoo-user

From: "Florian Gamböck" <ml@×××××.de>
To: Gentoo User <gentoo-user@l.g.o>
Subject: [gentoo-user] netifrc, configure by SSID and MAC simultaneously?
Date: Tue, 18 Apr 2017 14:03:37
Message-Id: 20170418140325.GA26697@furore
1 Hello!
2
3 In my wireless home network I use a static IP for my machine. The
4 regarding line in /etc/conf.d/net reads as follows (let's assume that my
5 SSID is in fact "MySSID"):
6
7 config_MySSID="192.168.0.10/24"
8
9 Is there a possibility to configure this IP not only for this specific
10 SSID, but also for a specific MAC address of my wireless card? I only
11 want my "main" wireless card to have this static IP, if another card
12 goes up and connects with the same SSID, it should be configured via
13 DHCP.
14
15 I tried the following:
16
17 config_MySSID="dhcp"
18 config_001122334455="192.168.0.10/24"
19
20 I also changed the order of those two lines, but the SSID based config
21 seems to "win" regardless. Also, if this config would actually work,
22 then I would have this static IP in every network I change (this is not
23 desireable). So I need a logical AND with those two variables, like so:
24
25 config_MySSID="dhcp"
26 config_001122334455_MySSID="192.168.0.10/24"
27
28 This would mean the following: Connect to MySSID via DHCP, except when
29 using the interface with the MAC address 001122334455, which should get
30 a static IP.
31
32 Not to mention that I indeed tried this last one, but it didn't work
33 either.
34
35 So, what are your thoughts? Is this possible via netifrc?
36
37 --
38 Kind regards
39
40 Flo

Replies

Subject Author
Re: [gentoo-user] netifrc, configure by SSID and MAC simultaneously? Mick <michaelkintzios@×××××.com>