Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Wie Netzwerkbrücke einrichten?
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) Diskussionsforum
View previous topic :: View next topic  
Author Message
3PO
Veteran
Veteran


Joined: 26 Nov 2006
Posts: 1110
Location: Schwabenländle

PostPosted: Fri Jan 13, 2017 10:43 pm    Post subject: Wie Netzwerkbrücke einrichten? Reply with quote

Hallo Zusammen,

Ich versuche mich gerade etwas mit qemu zu befassen, was soweit auch ganz gut klappt, einzig das Thema Netzwerk macht mit noch zu schaffen.

Ich habe in meinem Server 2 NICs, die als bond0 zusammengefasst sind:


Code:
server01 ~ # ifconfig
bond0: flags=5187<UP,BROADCAST,RUNNING,MASTER,MULTICAST>  mtu 1500
        inet 192.168.177.10  netmask 255.255.255.0  broadcast 192.168.177.255
        ether 00:13:3b:0e:53:da  txqueuelen 1000  (Ethernet)
        RX packets 11203262  bytes 2972690593 (2.7 GiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 9916429  bytes 6462405886 (6.0 GiB)
        TX errors 0  dropped 33 overruns 0  carrier 0  collisions 0

enp10s0: flags=6211<UP,BROADCAST,RUNNING,SLAVE,MULTICAST>  mtu 1500
        ether 00:13:3b:0e:53:da  txqueuelen 1000  (Ethernet)
        RX packets 4471160  bytes 1228069809 (1.1 GiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 2539100  bytes 2271873765 (2.1 GiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

enp8s0: flags=6211<UP,BROADCAST,RUNNING,SLAVE,MULTICAST>  mtu 1500
        ether 00:13:3b:0e:53:da  txqueuelen 1000  (Ethernet)
        RX packets 6732102  bytes 1744620784 (1.6 GiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 7377329  bytes 4190532121 (3.9 GiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        loop  txqueuelen 1  (Lokale Schleife)
        RX packets 957503  bytes 4512991392 (4.2 GiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 957503  bytes 4512991392 (4.2 GiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

server01 ~ #


Während meiner Googlerei habe ich herausgefunden, dass ich wohl eine "Netzwerkbrücke" benötige, leider aber habe ich nirgends eine Anleitung gefunden, die beschreibt, wie das mit gebondeten NICs geht.

Evtl. hat ja Jemanden eine Idee dazu?
Back to top
View user's profile Send private message
misterjack
Veteran
Veteran


Joined: 03 Oct 2004
Posts: 1648

PostPosted: Sat Jan 14, 2017 8:22 am    Post subject: Re: Wie Netzwerkbrücke einrichten? Reply with quote

3PO wrote:
Während meiner Googlerei habe ich herausgefunden, dass ich wohl eine "Netzwerkbrücke" benötige, leider aber habe ich nirgends eine Anleitung gefunden, die beschreibt, wie das mit gebondeten NICs geht.


Code:
brctl addif bond0


Anstatt enp*s* (wie z.B. hier: https://wiki.gentoo.org/wiki/Network_bridge) nimmst du einfach bond0 ;)
_________________
„Meine Meinung steht fest! Bitte verwirren Sie mich nicht mit Tatsachen.“
Back to top
View user's profile Send private message
3PO
Veteran
Veteran


Joined: 26 Nov 2006
Posts: 1110
Location: Schwabenländle

PostPosted: Sat Jan 14, 2017 11:25 am    Post subject: Reply with quote

Meine jetzige Config sieht so aus:

Code:
ifdown_enp8s0="NO"
ifdown_enp10s0="NO"

config_enp3s0="null"
config_enp8s0="null"
config_enp10s0="null"

slaves_bond0="enp8s0 enp10s0"
mode_bond0="802.3ad"

config_bond0=("192.168.177.10 netmask 255.255.255.0")
routes_bond0=("default via 192.168.177.1")


Wenn ich das richtig verstanden habe, dann muss das wie folgt aussehen:

Code:
ifdown_enp8s0="NO"
ifdown_enp10s0="NO"

config_enp8s0="null"
config_enp10s0="null"

slaves_bond0="enp8s0 enp10s0"
mode_bond0="802.3ad"
config_bond0="null"

bridge_br0="bond0"
config_br0=("192.168.177.10 netmask 255.255.255.0")
routes_br0=("default via 192.168.177.1")

bridge_forward_delay_br0=0
bridge_hello_time_br0=1000


Dann noch den Symlink auf br0 anpassen und mit "brctl" bond0 hizufügen.

Stimmt das so?

Wenn ich das richtig verstanden habe, dan kann ich nun weitere Brücken (br1, br2, ... brx) zu bond0 hinzufügen?
Back to top
View user's profile Send private message
misterjack
Veteran
Veteran


Joined: 03 Oct 2004
Posts: 1648

PostPosted: Sat Jan 14, 2017 2:42 pm    Post subject: Reply with quote

3PO wrote:

Stimmt das so?

Denke schon, habs selbst nie aufgesetzt in der Konstellation :)

3PO wrote:
weitere Brücken (br1, br2, ... brx) zu bond0 hinzufügen?

?
_________________
„Meine Meinung steht fest! Bitte verwirren Sie mich nicht mit Tatsachen.“
Back to top
View user's profile Send private message
3PO
Veteran
Veteran


Joined: 26 Nov 2006
Posts: 1110
Location: Schwabenländle

PostPosted: Sat Jan 14, 2017 2:54 pm    Post subject: Reply with quote

So wie es aussieht, funktioniert das Bridging wohl nicht mit gebondeten NICs.

Ich habe eine weitere NIC eingebaut, damit geht es einwandfrei.

Die Frage ist halt nun, ob das generell nicht geht, oder ob ich etwas falsch gemacht habe?
Back to top
View user's profile Send private message
misterjack
Veteran
Veteran


Joined: 03 Oct 2004
Posts: 1648

PostPosted: Sun Jan 15, 2017 6:05 pm    Post subject: Reply with quote

Machbar isses: https://www.cyberciti.biz/faq/ubuntu-linux-bridging-and-bonding-setup
_________________
„Meine Meinung steht fest! Bitte verwirren Sie mich nicht mit Tatsachen.“
Back to top
View user's profile Send private message
3PO
Veteran
Veteran


Joined: 26 Nov 2006
Posts: 1110
Location: Schwabenländle

PostPosted: Sun Jan 15, 2017 6:11 pm    Post subject: Reply with quote

Ubuntu scheint das anders zu machen, als gentoo.

Bei mir funktioniert es jedenfalls nicht. :(
Back to top
View user's profile Send private message
bbgermany
Veteran
Veteran


Joined: 21 Feb 2005
Posts: 1844
Location: Oranienburg/Germany

PostPosted: Tue Jan 17, 2017 6:31 am    Post subject: Reply with quote

Hi,

Ich hatte da mal ein ähnliches Setup am laufen. Wichtig ist, dass der Bond gestartet ist, bevor die Bridge startet. Eventuell hilft dir folgender Eintrag in deiner /etc/conf.d/net

Code:

rc_net_br0_need="net.bond0"


MfG. Stefan
_________________
Desktop: Ryzen 5 5600G, 32GB, 2TB, RX7600
Notebook: Dell XPS 13 9370, 16GB, 1TB
Server #1: Ryzen 5 Pro 4650G, 64GB, 16.5TB
Server #2: Ryzen 4800H, 32GB, 22TB
Back to top
View user's profile Send private message
mvaterlaus
Apprentice
Apprentice


Joined: 01 Oct 2010
Posts: 234
Location: Switzerland

PostPosted: Tue Jan 17, 2017 10:28 am    Post subject: Reply with quote

@bbgermany,
alternativ kann man die Dependencies auch in der Datei /etc/conf.d/net angeben.
Code:

$ cat /etc/conf.d/net
 ...
 rc_net_br0_need="net.bond0"
 ...


Ich habe bei meiner Konfiguration kein gebondetes Interface, jedoch habe ich zusätzlich noch ein TAP Interface auf der Bridge:
Code:

tuntap_tap0="tap"
config_tap0="null"

config_eth1="null"

bridge_br0="eth1 tap0"
config_br0="10.xxx.xxx.xxx netmask 255.255.0.0 brd 10.xxx.255.255"
routes_br0="default via 10.xxx.xxx.xxx"
brctl_br0="setfd 0 stp off"
rc_net_br0_need="net.eth1 net.tap0"

_________________
For calming down your eyes or clearing your mind: www.patrickwehli.ch
Back to top
View user's profile Send private message
bbgermany
Veteran
Veteran


Joined: 21 Feb 2005
Posts: 1844
Location: Oranienburg/Germany

PostPosted: Tue Jan 17, 2017 2:45 pm    Post subject: Reply with quote

mvaterlaus wrote:
...
Ich habe bei meiner Konfiguration kein gebondetes Interface, jedoch habe ich zusätzlich noch ein TAP Interface auf der Bridge:...


Und genau das ist das Problem. Ein Bonding Interface (Im speziellen wie hier von 3PO ein LACP Interface) benötigt einige Zeit zum initialisieren. Ziemlich oft lässt es sich dann nicht in die Bridge heben, wenn es nicht voll funktionsfähig ist. Deine Konfiguration ist auch die, die ich aktuell auf fast allen Systemen bei mir habe, aber halt ohne bonding.

MfG. Stefan
_________________
Desktop: Ryzen 5 5600G, 32GB, 2TB, RX7600
Notebook: Dell XPS 13 9370, 16GB, 1TB
Server #1: Ryzen 5 Pro 4650G, 64GB, 16.5TB
Server #2: Ryzen 4800H, 32GB, 22TB
Back to top
View user's profile Send private message
mvaterlaus
Apprentice
Apprentice


Joined: 01 Oct 2010
Posts: 234
Location: Switzerland

PostPosted: Wed Jan 18, 2017 4:03 pm    Post subject: Reply with quote

@bbgermany,
ja, du hast recht. Aus irgend einem Grund hab ich /etc/init.d anstatt /etc/conf.d gelesen.

@3PO: du könntest versuchen, einen Delay in das Startscript der br0 einzubauen, welcher genug Zeit verstreichen lässt, bis das Bonding Up ist. Anschliessend wird dann die Bridge konfiguriert.
_________________
For calming down your eyes or clearing your mind: www.patrickwehli.ch
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) Diskussionsforum All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum