Gentoo Archives: gentoo-user

From: Shawn Wilson <ag4ve.us@×××××.com>
To: gentoo-user@l.g.o, Torben Hensgens Mailer <thens.mail@××××××××××.com>
Subject: Re: [gentoo-user] re: alternating between wired and wireless interfaces
Date: Sat, 21 Sep 2013 17:41:11
Message-Id: f3371f8c-8552-4a28-8cd1-381ba535ce6f@email.android.com
In Reply to: Re: [gentoo-user] re: alternating between wired and wireless interfaces by Torben Hensgens Mailer
1 Just thought I'd give the other popular alternative of the Redhat backed NetworkManager.
2
3 Also, if you don't wait for the interface to come up I don't think the service can bind to the interface (and it obviously can't bind to an IP). Probably not an issue for ssh but possibly one for MySQL or Apache.
4
5 Torben Hensgens Mailer <thens.mail@××××××××××.com> wrote:
6 >Am 21.09.2013 12:47, schrieb Alexander Kapshuk:
7 >> I have both wired and wireless network interfaces configured:
8 >> box0 log # rc-update show|egrep 'enp3s0|wlp2s0'
9 >> net.enp3s0 | default
10 >> net.wlp2s0 | default
11 >>
12 >> (1). Is there a way to instruct the system as to which network
13 >interface
14 >> to use, so it doesn't try to bring up the one not intended to be used
15 >at
16 >> boot time:
17 >> box0 log # egrep 'enp3s0|wlp2s0' messages
18 >> -------------------------------------------
19 >> Sep 21 12:30:18 localhost kernel: [ 12.268209] r8169 0000:03:00.0
20 >> enp3s0: link down
21 >> Sep 21 12:30:18 localhost kernel: [ 12.268236] IPv6:
22 >> ADDRCONF(NETDEV_UP): enp3s0: link is not ready
23 >> Sep 21 12:30:18 localhost /etc/init.d/net.enp3s0[1888]: No
24 >configuration
25 >> specified; defaulting to DHCP
26 >> Sep 21 12:30:18 localhost dhcpcd[1896]: enp3s0: waiting for carrier
27 >> Sep 21 12:30:56 localhost /etc/init.d/net.enp3s0[1801]: ERROR:
28 >> net.enp3s0 failed to start
29 >> Sep 21 12:30:56 localhost kernel: [ 50.595278] IPv6:
30 >> ADDRCONF(NETDEV_UP): wlp2s0: link is not ready
31 >> Sep 21 12:30:56 localhost /etc/init.d/net.wlp2s0[1917]: WARNING:
32 >> net.wlp2s0 has started, but is inactive
33 >> Sep 21 12:30:56 localhost /etc/init.d/netmount[2007]: ERROR: cannot
34 >> start netmount as net.enp3s0 would not start
35 >> Sep 21 12:30:56 localhost /etc/init.d/sshd[2008]: ERROR: cannot start
36 >> sshd as net.enp3s0 would not start
37 >> Sep 21 12:30:57 localhost kernel: [ 51.817387] wlp2s0: authenticate
38 >> with f4:ec:38:b9:59:a7
39 >> Sep 21 12:30:57 localhost kernel: [ 51.825344] wlp2s0: send auth to
40 >> f4:ec:38:b9:59:a7 (try 1/3)
41 >> Sep 21 12:30:57 localhost kernel: [ 51.826811] wlp2s0:
42 >authenticated
43 >> Sep 21 12:30:57 localhost kernel: [ 51.827059] wlp2s0: associate
44 >with
45 >> f4:ec:38:b9:59:a7 (try 1/3)
46 >> Sep 21 12:30:57 localhost kernel: [ 51.829316] wlp2s0: RX AssocResp
47 >> from f4:ec:38:b9:59:a7 (capab=0x411 status=0 aid=2)
48 >> Sep 21 12:30:57 localhost kernel: [ 51.829586] wlp2s0: associated
49 >> Sep 21 12:30:57 localhost kernel: [ 51.829598] IPv6:
50 >> ADDRCONF(NETDEV_CHANGE): wlp2s0: link becomes ready
51 >> Sep 21 12:30:59 localhost wpa_cli: interface wlp2s0 CONNECTED
52 >> Sep 21 12:30:59 localhost /etc/init.d/net.wlp2s0[2130]: No
53 >configuration
54 >> specified; defaulting to DHCP
55 >> Sep 21 12:30:59 localhost dhcpcd[2138]: wlp2s0: sending IPv6 Router
56 >> Solicitation
57 >> Sep 21 12:30:59 localhost dhcpcd[2138]: wlp2s0: sendmsg: Cannot
58 >assign
59 >> requested address
60 >> Sep 21 12:30:59 localhost dhcpcd[2138]: wlp2s0: rebinding lease of
61 >> 192.168.1.5
62 >> Sep 21 12:30:59 localhost dhcpcd[2138]: wlp2s0: acknowledged
63 >192.168.1.5
64 >> from 192.168.1.1 `TP-LINK'
65 >> Sep 21 12:30:59 localhost dhcpcd[2138]: wlp2s0: checking for
66 >192.168.1.5
67 >> Sep 21 12:31:03 localhost dhcpcd[2138]: wlp2s0: sending IPv6 Router
68 >> Solicitation
69 >> Sep 21 12:31:03 localhost dhcpcd[2138]: wlp2s0: leased 192.168.1.5
70 >for
71 >> 259200 seconds
72 >> Sep 21 12:31:07 localhost dhcpcd[2167]: wlp2s0: sending IPv6 Router
73 >> Solicitation
74 >> Sep 21 12:31:11 localhost dhcpcd[2167]: wlp2s0: sending IPv6 Router
75 >> Solicitation
76 >> Sep 21 12:31:11 localhost dhcpcd[2167]: wlp2s0: no IPv6 Routers
77 >available
78 >> -------------------------------------------
79 >> (2). sshd seems to start only if the wired interface is up. How do I
80 >> tell it start when the wireless interface is running?
81 >> box0 log # rc-status|egrep 'enp3s0|wlp2s0|sshd'
82 >> net.enp3s0 [
83 >> stopped ]
84 >> net.wlp2s0 [
85 >> started ]
86 >> sshd [
87 >> stopped ]
88 >>
89 >>
90 >> Thanks.
91 >>
92 >>
93 >
94 >Yeh, same advice here, try wicd first. If you don't want a GUI (or you
95 >don't have corresponding UI toolkits installed), there's also the
96 >option
97 >to configure and use wicd via the ncurses interface.