Gentoo Archives: gentoo-user

From: Tom H <tomh0665@×××××.com>
To: Gentoo User <gentoo-user@l.g.o>
Subject: Re: [gentoo-user] Network manager [ control of wireless and wired interafaces]
Date: Wed, 11 Mar 2015 20:16:01
Message-Id: CAOdo=SwhAcoDJVnTMLK757m8_9GgXY-uHN_8B03DRaeAaJ+r7g@mail.gmail.com
In Reply to: Re: [gentoo-user] Network manager [ control of wireless and wired interafaces] by "Jc García"
1 On Wed, Mar 11, 2015 at 2:35 PM, Jc García <jyo.garcia@×××××.com> wrote:
2 >
3 > If you want an easy way of configuring wirless without GUI use wicd
4 > and the wicd curses client(enabled via USE flag), NetworkManager is
5 > simpler to use with a GUI, the CLI client is not so easy to use, but
6 > if you want to, make sure none of the GUI related use flags are set
7 > e.g. gtk qt X emerge it, and then read and search info(man, google)
8 > about nmcli.
9
10 I've never used nmcli except to get ip information (see below) but
11 setting up NM without a gui is simple.
12
13 This is my home wifi setup:
14
15 # cat /etc/NetworkManager/system-connections/thsky
16 [connection]
17 id=thsky
18 uuid=e03d75e4-043a-4276-bf03-3995270ec891
19 type=802-11-wireless
20
21 [802-11-wireless]
22 ssid=myssidname
23 mode=infrastructure
24 security=802-11-wireless-security
25
26 [802-11-wireless-security]
27 key-mgmt=wpa-psk
28 psk=myssidpassword
29
30 [ipv4]
31 method=manual
32 address1=192.168.1.11/24,192.168.1.1
33 dns=192.168.1.111
34
35 [ipv6]
36 method=link-local
37
38 If you want to use dhcp, you simply replace the three lines in the
39 "[ipv4]" stanza with "method=auto".
40
41 I have a script that uses nmcli and does the following:
42
43 # nmcli -f ip4 -m tabular -t c s id $(nmcli -t -f name c s --active)
44 IP4:ip = 192.168.1.11/24, gw = 192.168.1.1::192.168.1.111:--:--
45
46 "nmcli -t -f name c s --active" outputs the name of the active
47 connection, "thsky".
48
49 "nmcli -f ip4 c s id thsky" ouputs its ipv4 settings.

Replies

Subject Author
Re: [gentoo-user] Network manager [ control of wireless and wired interafaces] Fernando Rodriguez <frodriguez.developer@×××××××.com>