1 |
Alon Bar-Lev <alonbl@g.o> writes: |
2 |
|
3 |
> On 6 November 2015 at 17:28, lee <lee@××××××××.de> wrote: |
4 |
>> Hi, |
5 |
>> |
6 |
>> finally I got set up pppoe, which turned out to be surprisingly easy. |
7 |
>> It's working fine, though I'm getting a warning when the pppoe interface |
8 |
>> is brought up: |
9 |
>> |
10 |
>> |
11 |
>> heimdali init.d # service net.ppp0 start |
12 |
>> * Bringing up interface ppp0 |
13 |
>> * Starting pppd in ppp0 ... [ ok ] |
14 |
>> * Backgrounding ... |
15 |
>> * WARNING: net.ppp0 has started, but is inactive |
16 |
>> heimdali init.d # |
17 |
>> |
18 |
>> |
19 |
>> Why is this warning showing, and what can I do about it? |
20 |
>> |
21 |
> |
22 |
> this warning can be safely ignored, all it tells you is that the |
23 |
> service will be fully up when connection will be established. |
24 |
> the same state is for ethernet until the ifplugd detects connection to network. |
25 |
> |
26 |
>> How does pppoe work together with shorewall and bind? |
27 |
>> |
28 |
>> When I stop the net.ppp0 service, shorewall is automatically stopped as |
29 |
>> well. When I start net.ppp0, shorewall is not started automatically. |
30 |
>> |
31 |
>> I would like to automatically have net.ppp0 first started and then |
32 |
>> shorewall. |
33 |
> |
34 |
> usually the firewall service should be started before all interfaces |
35 |
> (except lo). |
36 |
> add the following to /etc/conf.d/net.ppp0: |
37 |
> --- |
38 |
> rc_net_ppp0_need="firewall net.enp2s0" |
39 |
> --- |
40 |
|
41 |
Thanks! I copied net.lo to net.ppp0 and put it at the top so it now |
42 |
goes: |
43 |
|
44 |
|
45 |
#!/sbin/runscript |
46 |
# Copyright (c) 2007-2009 Roy Marples <roy@×××××××.name> |
47 |
# Released under the 2-clause BSD license. |
48 |
|
49 |
MODULESDIR="/lib/netifrc/net" |
50 |
MODULESLIST="${RC_SVCDIR}/nettree" |
51 |
_config_vars="config routes" |
52 |
|
53 |
rc_net_ppp0_need="firewall net.enp2s0" |
54 |
|
55 |
|
56 |
I'm not sure if that's right --- I guess I shouldn't make a copy? |
57 |
|
58 |
> this will make sure that the ppp0 interface is started after both |
59 |
> firewall and enp2s0. |
60 |
> |
61 |
> I also have the following in /etc/rc.conf to avoid stopping services |
62 |
> while network is down: |
63 |
> --- |
64 |
> rc_hotplug="!net.enp2s0 !net.ppp*" |
65 |
> --- |
66 |
|
67 |
The comment in /etc/rc.conf says no hotplugging is done by default. |
68 |
IIUC, you are hotplugging 'net.enp2s0' and 'net.ppp*'? So allowing to |
69 |
hotplug them would kinda make them independent of other services, or |
70 |
other services independent from them? |
71 |
|
72 |
>> When net.ppp0 is stopped and restarted, I also must restart the name |
73 |
>> server (bind) :( Otherwise it is unable to resolve anything. |
74 |
>> |
75 |
>> Can this somehow be avoided? If not, can this be done automatically? |
76 |
> |
77 |
> this is strange... why bind must be restarted? |
78 |
> I use dnsmasq and it survive network down without any issue. |
79 |
> but if you must, add the following to /etc/conf.d/net.ppp0: |
80 |
> --- |
81 |
> postup() { |
82 |
> # whatever required after interface is up |
83 |
> return 0 |
84 |
> } |
85 |
> --- |
86 |
|
87 |
Ah, yes, good idea :) |
88 |
|
89 |
Fortunately, everything survives when the link goes down and comes back |
90 |
up, so this would only be an issue when I manually stop/start the |
91 |
net.ppp0 service. I can live with that. |
92 |
|
93 |
|
94 |
>> The log files show martian sources from a bridge device which is used |
95 |
>> for the networking of a container: |
96 |
>> |
97 |
>> |
98 |
>> [1734776.722127] IPv4: martian source 255.255.255.255 from 192.168.1.1, on dev enp2s0 |
99 |
>> [1734776.722132] ll header: 00000000: ff ff ff ff ff ff 00 0b 6b 81 c9 44 08 00 ........k..D.. |
100 |
>> |
101 |
>> |
102 |
>> The enp2s0 interface is used for pppoe, 192.168.1.1 is the IP of the |
103 |
>> bridge. The bridge does not have a physical network interface assigned |
104 |
>> to it. |
105 |
>> |
106 |
>> The routefilter option is enabled on all interfaces. Why would there be |
107 |
>> such a broadcast originating from the bridge, and how can I prevent it? |
108 |
> |
109 |
> not sure what you describe here, but maybe you would like to disable |
110 |
> spanning tree, add the following to disable spanning tree to |
111 |
> /etc/conf.d/br0.conf (provided br0 is the name of the bridge). |
112 |
> --- |
113 |
> stp_state_br0=0 |
114 |
> --- |
115 |
|
116 |
STP is disabled when the bridge is brought up with |
117 |
|
118 |
|
119 |
config_br_dmz="192.168.1.1 netmask 255.255.255.0 brd 192.168.1.255" |
120 |
brctl_br_dmz="setfd 0 sethello 10 stp off" |
121 |
|
122 |
|
123 |
... in /etc/conf.d/net. |
124 |
|
125 |
|
126 |
heimdali init.d # brctl show |
127 |
bridge name bridge id STP enabled interfaces |
128 |
br_dmz 8000.fe150e283be5 no vethJRMBC7 |
129 |
heimdali init.d # |
130 |
|
131 |
|
132 |
[1829515.036283] IPv4: martian source 255.255.255.255 from 192.168.1.1, on dev enp2s0 |
133 |
[1829515.036296] ll header: 00000000: ff ff ff ff ff ff 00 0b 6b 81 c9 44 08 00 ........k..D.. |
134 |
[1829575.021793] IPv4: martian source 255.255.255.255 from 192.168.1.1, on dev enp2s0 |
135 |
[1829575.021806] ll header: 00000000: ff ff ff ff ff ff 00 0b 6b 81 c9 44 08 00 ........k..D.. |
136 |
[1829634.958151] IPv4: martian source 255.255.255.255 from 192.168.1.1, on dev enp2s0 |
137 |
[1829634.958164] ll header: 00000000: ff ff ff ff ff ff 00 0b 6b 81 c9 44 08 00 ........k..D.. |
138 |
[1829694.919256] IPv4: martian source 255.255.255.255 from 192.168.1.1, on dev enp2s0 |
139 |
[1829694.919269] ll header: 00000000: ff ff ff ff ff ff 00 0b 6b 81 c9 44 08 00 ........k..D.. |
140 |
[1829754.880046] IPv4: martian source 255.255.255.255 from 192.168.1.1, on dev enp2s0 |
141 |
[1829754.880059] ll header: 00000000: ff ff ff ff ff ff 00 0b 6b 81 c9 44 08 00 ........k..D.. |
142 |
[1829814.849173] IPv4: martian source 255.255.255.255 from 192.168.1.1, on dev enp2s0 |
143 |
[1829814.849186] ll header: 00000000: ff ff ff ff ff ff 00 0b 6b 81 c9 44 08 00 ........k..D.. |
144 |
[1829874.802373] IPv4: martian source 255.255.255.255 from 192.168.1.1, on dev enp2s0 |
145 |
[1829874.802386] ll header: 00000000: ff ff ff ff ff ff 00 0b 6b 81 c9 44 08 00 ........k..D.. |
146 |
[1829934.762920] IPv4: martian source 255.255.255.255 from 192.168.1.1, on dev enp2s0 |
147 |
[1829934.762933] ll header: 00000000: ff ff ff ff ff ff 00 0b 6b 81 c9 44 08 00 ........k..D.. |
148 |
[1829994.724216] IPv4: martian source 255.255.255.255 from 192.168.1.1, on dev enp2s0 |
149 |
[1829994.724230] ll header: 00000000: ff ff ff ff ff ff 00 0b 6b 81 c9 44 08 00 ........k..D.. |
150 |
[1830054.689127] IPv4: martian source 255.255.255.255 from 192.168.1.1, on dev enp2s0 |
151 |
[1830054.689132] ll header: 00000000: ff ff ff ff ff ff 00 0b 6b 81 c9 44 08 00 ........k..D.. |
152 |
|
153 |
|
154 |
It looks as if there is a broadcast on the bridge interface every 60 |
155 |
seconds. This could come from the bridge itself, or from something |
156 |
running inside the container. Once I have more containers, there might |
157 |
be more broadcasts and thus more martian sources. |
158 |
|
159 |
Can I run some network spying tool inside the container to find out |
160 |
where the broadcasts are coming from? |
161 |
|
162 |
With 'tcpdump -e -i eth0 ether broadcast and ether multicast', I'm not |
163 |
getting anything so far, neither on the bridge interface itself from the |
164 |
host, nor on the virtual eth0 from within the container. |
165 |
|
166 |
|
167 |
-- |
168 |
Again we must be afraid of speaking of daemons for fear that daemons |
169 |
might swallow us. Finally, this fear has become reasonable. |