[prev in list] [next in list] [prev in thread] [next in thread] 

List:       nix-dev
Subject:    Re: [Nix-dev] When creating a bridge interface, the bridge doesn't appear
From:       zimbatm <zimbatm () zimbatm ! com>
Date:       2016-06-15 9:03:58
Message-ID: CANEP-f7_QyVK0fOx378M=6t2yPzdSSfEXm70OM46e43pQ5KS0A () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Can you paste the content of the service?

Can you paste the list of units that nixos restarts after applying the
config?

According to
https://github.com/NixOS/nixpkgs/blob/928035378d82de9641adc60e188c3b9313667729/nixos/modules/tasks/network-interfaces-scripted.nix#L184
 it should be started to satisfy network.target.

Or maybe you have `useNetworkd` enabled and then it's using another
mechanism.


The behavior might change if you enabled `useNetworkd` or not.
On Wed, 15 Jun 2016 at 07:12 Arnold Krille <arnold@arnoldarts.de> wrote:

> did you define anything depending on the bridge? that is did you configure
> anything in networking.interfaces?
> 
> - Arnold
> 
> Am 15. Juni 2016 02:28:54 MESZ, schrieb Matthew Robbetts <
> wingfeathera@gmail.com>:
> 
> > Hi list,
> > (I filed an issue at GitHub (
> > https://github.com/NixOS/nixpkgs/issues/16230), but realized that since
> > it's probably a PEBKAC issue, the mailing list might be more suitable.
> > Sorry for the cross-post!)
> > 
> > 
> > I am configuring a new nixOS system. My machine has two ethernet
> > interfaces (enp3s0 and enp4s0) and one wireless interface (wlp5s0). I
> > want to bridge the wireless with one of the ethernets, so in my
> > configuration.nix I add:
> > 
> > networking = {
> > ...
> > bridges.br0.interfaces = [ "enp4s0" "wlp5s0" ];
> > ...
> > 
> > and run nixos-rebuild switch.
> > 
> > I observe in the output that, among other things, a
> > 
> > /nix/store/z18i1q0r4i2bn0vkpcz45d10nn0628nf-unit-br0-netdev.service/br0-netdev.service
> >  is created. However, ifconfig does not show the new bridge interface.
> > 
> > If I manually run:
> > systemctl start br0-netdev.service
> > 
> > the bridge interface appears.
> > 
> > Probably I am doing something wrong, but I would have expected the bridge
> > to appear immediately as a result of nixos-rebuild switch.
> > Anyone have an opinion?
> > 
> > 
> > Thanks,
> > Matt
> > 
> > nix-dev mailing list
> > nix-dev@lists.science.uu.nl
> > http://lists.science.uu.nl/mailman/listinfo/nix-dev
> > 
> > 
> --
> Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail
> gesendet.
> _______________________________________________
> nix-dev mailing list
> nix-dev@lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev
> 


[Attachment #5 (text/html)]

<div dir="ltr"><div>Can you paste the content of the \
service?</div><div><br></div><div>Can you paste the list of units that nixos restarts \
after applying the config?</div><div><br></div><div>According to  <a \
href="https://github.com/NixOS/nixpkgs/blob/928035378d82de9641adc60e188c3b9313667729/n \
ixos/modules/tasks/network-interfaces-scripted.nix#L184">https://github.com/NixOS/nixp \
kgs/blob/928035378d82de9641adc60e188c3b9313667729/nixos/modules/tasks/network-interfaces-scripted.nix#L184</a></div><div>it \
should be started to satisfy network.target.</div><div><br></div><div>Or maybe you \
have `useNetworkd` enabled and then it&#39;s using another \
mechanism.</div><div><br></div><div><br></div>The behavior might change if you \
enabled `useNetworkd` or not.<br><div class="gmail_quote"></div><div \
class="gmail_quote"><div dir="ltr">On Wed, 15 Jun 2016 at 07:12 Arnold Krille &lt;<a \
href="mailto:arnold@arnoldarts.de" target="_blank">arnold@arnoldarts.de</a>&gt; \
wrote:<br></div></div><div class="gmail_quote"><blockquote class="gmail_quote" \
style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div \
style="word-wrap:break-word">did you define anything depending on the bridge? that is \
did you configure anything in networking.interfaces?<br> <br>
- Arnold<br><br><div class="gmail_quote"></div></div><div \
style="word-wrap:break-word"><div class="gmail_quote">Am 15. Juni 2016 02:28:54 MESZ, \
schrieb Matthew Robbetts &lt;<a href="mailto:wingfeathera@gmail.com" \
target="_blank">wingfeathera@gmail.com</a>&gt;:</div></div><div \
style="word-wrap:break-word"><div class="gmail_quote"><blockquote class="gmail_quote" \
style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid \
rgb(204,204,204);padding-left:1ex"> <p \
style="margin-top:0px;margin-bottom:16px;color:rgb(51,51,51);font-family:&#39;Helvetica \
Neue&#39;,Helvetica,&#39;Segoe UI&#39;,Arial,freesans,sans-serif,&#39;Apple Color \
Emoji&#39;,&#39;Segoe UI Emoji&#39;,&#39;Segoe UI Symbol&#39;">Hi list,</p><div>(I \
filed an issue at GitHub (<a href="https://github.com/NixOS/nixpkgs/issues/16230" \
target="_blank">https://github.com/NixOS/nixpkgs/issues/16230</a>), but realized that \
since it's probably a PEBKAC issue, the mailing list might be more suitable. Sorry \
for the cross-post!)</div><p \
style="margin-top:0px;margin-bottom:16px;color:rgb(51,51,51);font-family:&#39;Helvetica \
Neue&#39;,Helvetica,&#39;Segoe UI&#39;,Arial,freesans,sans-serif,&#39;Apple Color \
Emoji&#39;,&#39;Segoe UI Emoji&#39;,&#39;Segoe UI Symbol&#39;"><br></p><p>I am \
configuring a new nixOS system. My machine has two ethernet interfaces (<code \
style="font-family:Consolas,&#39;Liberation \
Mono&#39;,Menlo,Courier,monospace;padding:0.2em \
0px;margin:0px;background-color:rgba(0,0,0,0.0392157);border-top-left-radius:3px;borde \
r-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px">enp3s0</code> \
and  <code style="font-family:Consolas,&#39;Liberation \
Mono&#39;,Menlo,Courier,monospace;padding:0.2em \
0px;margin:0px;background-color:rgba(0,0,0,0.0392157);border-top-left-radius:3px;borde \
r-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px">enp4s0</code>) \
and one wireless interface (<code style="font-family:Consolas,&#39;Liberation \
Mono&#39;,Menlo,Courier,monospace;padding:0.2em \
0px;margin:0px;background-color:rgba(0,0,0,0.0392157);border-top-left-radius:3px;borde \
r-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px">wlp5s0</code>). \
I want to bridge the wireless with one of the ethernets, so in my configuration.nix I \
add:</p><pre style="font-family:Consolas,&#39;Liberation \
Mono&#39;,Menlo,Courier,monospace;margin-top:0px;margin-bottom:16px;line-height:1.45;w \
ord-wrap:normal;padding:16px;overflow:auto;background-color:rgb(247,247,247);border-to \
p-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;color:rgb(51,51,51)"><code>networking \
                = {
    ...
    bridges.br0.interfaces = [ &quot;enp4s0&quot; &quot;wlp5s0&quot; ];
    ...
</code></pre><p style="margin-top:0px;margin-bottom:16px;color:rgb(51,51,51);font-family:&#39;Helvetica \
Neue&#39;,Helvetica,&#39;Segoe UI&#39;,Arial,freesans,sans-serif,&#39;Apple Color \
Emoji&#39;,&#39;Segoe UI Emoji&#39;,&#39;Segoe UI Symbol&#39;">and run  <code \
style="font-family:Consolas,&#39;Liberation \
Mono&#39;,Menlo,Courier,monospace;padding:0.2em \
0px;margin:0px;background-color:rgba(0,0,0,0.0392157);border-top-left-radius:3px;borde \
r-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px">nixos-rebuild \
switch</code>.</p><p \
style="margin-top:0px;margin-bottom:16px;color:rgb(51,51,51);font-family:&#39;Helvetica \
Neue&#39;,Helvetica,&#39;Segoe UI&#39;,Arial,freesans,sans-serif,&#39;Apple Color \
Emoji&#39;,&#39;Segoe UI Emoji&#39;,&#39;Segoe UI Symbol&#39;">I observe in the \
output that, among other things, \
a<br><code>/nix/store/z18i1q0r4i2bn0vkpcz45d10nn0628nf-unit-br0-netdev.service/br0-netdev.service</code><br>is \
created. However,  <code style="font-family:Consolas,&#39;Liberation \
Mono&#39;,Menlo,Courier,monospace;padding:0.2em \
0px;margin:0px;background-color:rgba(0,0,0,0.0392157);border-top-left-radius:3px;borde \
r-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px">ifconfig</code> \
does not show the new bridge interface.</p><p>If I manually run:<br><code \
style="font-family:Consolas,&#39;Liberation \
Mono&#39;,Menlo,Courier,monospace;padding:0.2em \
0px;margin:0px;background-color:rgba(0,0,0,0.0392157);border-top-left-radius:3px;borde \
r-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px">systemctl \
start br0-netdev.service</code></p><p \
style="margin-top:0px;margin-bottom:16px;color:rgb(51,51,51);font-family:&#39;Helvetica \
Neue&#39;,Helvetica,&#39;Segoe UI&#39;,Arial,freesans,sans-serif,&#39;Apple Color \
Emoji&#39;,&#39;Segoe UI Emoji&#39;,&#39;Segoe UI Symbol&#39;">the bridge interface \
appears.</p><p>Probably I am doing something wrong, but I would have expected the \
bridge to appear immediately as a result of  <code \
style="font-family:Consolas,&#39;Liberation \
Mono&#39;,Menlo,Courier,monospace;padding:0.2em \
0px;margin:0px;background-color:rgba(0,0,0,0.0392157);border-top-left-radius:3px;borde \
r-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px">nixos-rebuild \
switch</code>.</p><div>Anyone have an \
opinion?</div><div><br></div><div><br></div><div>Thanks,</div><div>Matt</div><p \
style="margin-top:2.5em;margin-bottom:1em;border-bottom:1px solid \
#000"></p></blockquote></div></div></blockquote></div><div \
class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 \
.8ex;border-left:1px #ccc solid;padding-left:1ex"><div \
style="word-wrap:break-word"><div class="gmail_quote"><blockquote class="gmail_quote" \
style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid \
rgb(204,204,204);padding-left:1ex"><pre>nix-dev mailing list<br><a \
href="mailto:nix-dev@lists.science.uu.nl" \
target="_blank">nix-dev@lists.science.uu.nl</a><br><a \
href="http://lists.science.uu.nl/mailman/listinfo/nix-dev" \
target="_blank">http://lists.science.uu.nl/mailman/listinfo/nix-dev</a><br></pre></blockquote></div></div></blockquote></div><div \
class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 \
.8ex;border-left:1px #ccc solid;padding-left:1ex"><div \
                style="word-wrap:break-word"><br>
-- <br>
Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail \
gesendet.</div>_______________________________________________<br> nix-dev mailing \
list<br> <a href="mailto:nix-dev@lists.science.uu.nl" \
target="_blank">nix-dev@lists.science.uu.nl</a><br> <a \
href="http://lists.science.uu.nl/mailman/listinfo/nix-dev" rel="noreferrer" \
target="_blank">http://lists.science.uu.nl/mailman/listinfo/nix-dev</a><br> \
</blockquote></div></div>



_______________________________________________
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic