Difference between revisions of "Bridge"

From HackerNet
Jump to: navigation, search
(Created page with "Gör om portar på din Linuxmaskin till switchportar. ==Installation== aptitude install bridge-utils ==Konfiguration== ifconfig eth0 0.0.0.0 ifconfig eth1 0.0.0.0 brctl...")
 
m (MAC Table)
Line 39: Line 39:
 
Kolla packet
 
Kolla packet
 
  cat /proc/net/bonding/bond0
 
  cat /proc/net/bonding/bond0
 +
 +
==MAC Table==
 +
Man kan kolla MAC-tabellen på en brygga med följande kommando:
 +
brctl show
 +
brctl showmacs <bridge_name>

Revision as of 15:57, 7 September 2015

Gör om portar på din Linuxmaskin till switchportar.

Installation

aptitude install bridge-utils

Konfiguration

ifconfig eth0 0.0.0.0
ifconfig eth1 0.0.0.0
brctl addbr bridge1
brctl addif bridge1 eth0 eth1
brctl show

/etc/network/interfaces

auto bridge
iface bridge
 bridge-vlan-aware yes
 bridge-ports eth0 eth1 eth7
 bridge-vids 3 4 6-10   #allowed vlan
 bridge-pvid 1          #native vlan
 bridge_waitport 0      #portfast
 bridge-stp on
 mstpctl-treeprio 20480

VLAN

aptitude install vlan ifenslave
echo "8021q" >> /etc/modules

/etc/network/interfaces

auto bond0
iface bond0 inet manual
       up ifconfig bond0 0.0.0.0 up
       slaves eth0 eth1
       bond-mode 4       #bond-mode 4 = 802.3ad
       bond-miimon 100
       bond-downdelay 200
       bond-updelay 200
       bond-lacp-rate 1
       bond-xmit-hash-policy layer2+3

Kolla packet

cat /proc/net/bonding/bond0

MAC Table

Man kan kolla MAC-tabellen på en brygga med följande kommando:

brctl show
brctl showmacs <bridge_name>