VYATTA - Semplice guida - Caso Studio 10 - Bridging

Vyatta Case 10 - Bridging
Last Update: Mar 14 2008


Tool
Install
Ergonomy
Forum



Details Cosa è Vyatta?
Screenshots
Prerequisiti
Tutorial Vyatta
Confronto comandi Vyatta & Cisco
Vyatta/Cisco/Quagga confronto (sezione Quagga)
Caso Studio 1 - Static routes (VC 2.0)
Caso Studio 2 - OSPF simple (VC 2.0)
Caso Studio 3 - OSPF advanced (VC 2.0)
Caso Studio 4 - BGP (VC 3.0)
Caso Studio 5 - VRRP (VC 2.2)
Caso Studio 6 - NAT (VC 2.0)
Caso Studio 7 - DHCP (VC 2.2)
Caso Studio 8 - IPSec (VC 2.2)
Caso Studio 9 - Packages (VC 3.0)
Caso Studio 10 - Bridging (VC 3.0)
Caso Studio 11 - CDP (VC 3.0)

Italian translation by Giovanni Fredducci.



⚠️⚠️⚠️
Please check our website about
attractions in Western Switzerland !! (Please use english translation).

⚠️⚠️⚠️
Merci de consulter notre site sur les
activités à faire en Suisse romande !!



1. CASO STUDIATO 2. FIGURA 3. CONFIGURZIONE 4. COMANDI



Vyatta versione: VC 3.0 Oct 29, 2007
1. CASO STUDIATO

“Network bridges” connettono più network segmenti o local area networks al livello data link (layer 2) nello standard OSI.
Il comportamento dei bridges sono molto simili agli hubs o switches, tutto il traffico broadcast layer 2 è lasciato passare.
Di contro, I routers operano al livello layer 3 dello standard OSI e possono arrestare questo traffico di broadcasts.

Nel nostro caso, faremo il bridge tra due interface di network e su tre componenti diverse:un router Vyatta, un router Cisco e una macchina Linux. (Il bridging con windows xp sarà illustrato prossimamente).

Un indirizzo IP è assegnato al bridges per poter configurare lo stesso:
Su Vyatta, non è possible effettuare la configurazione al livello di router intefaccia, la configurazione va effettuata al livello Debian Linux.
Sul Cisco, bisogna attivare “integrated routing and bridging” (IRB) mode.


2. FIGURA

Funzionalità testate:

(click on the web links to have more details about a protocol)

Interface settings
bridging

case study bridge vyatta   case study bridge cisco   case study bridge linux


3. CONFIGURZIONE

VYATTA ROUTER VC3.0 Oct 29, 2007
CISCO ROUTER 2621 IOS: 12.2(23a)
edit interfaces ethernet eth0
  set bridge-group bridge br0
interface FastEthernet0/0
  bridge-group 1
edit interfaces ethernet eth1
  set bridge-group bridge br0
interface FastEthernet0/1
  bridge-group 1
set system host-name Vyatta-Router hostname Cisco-router
set service telnet
 
line vty 0 4
  no login
 
 
bridge irb
bridge 1 protocol ieee
bridge 1 route ip
 
 
interface BVI 1
  ip address 10.0.2.1
 
Configurazione fatta
al livello Debian/Linux:
:
Login come root user.
Configurare l’indirizzo IP bridge:

#ifconfig br0 10.0.2.1 netmask 255.255.255.0
Per rendere permanenti I cambiamenti:

#vim /etc/network/interfaces
auto br0
iface br0 inet static
address 10.0.2.1
netmask 255.255.255.0



LINUX Debian o Ubuntu

- Installare I pacchetti per fare il bridge module:

#apt-get install bridge-utils
- Caricare il bridge nel kernel:

#modprobe bridge
- Controllare che il bridge module è caricato:

#lsmod | grep bridge
- Attivare l’interfacce Ethernet:

#ifconfig eth0 up
#ifconfig eth1 up
- Creare il bridge:

#brctl addbr br0
- Aggiungere un membro al bridge:

#brctl addif br0 eth0
#brctl addif br0 eth1
- Configurare l’indirizzo IP al bridge:

#ifconfig br0 10.0.2.1 netmask 255.255.255.0
Per mantener I cambiamenti effettuati dopo il reboot, create il seguente script e salvatelo in "/root/bridge.sh":

#!bin/bash
# Load the bridge kernel module
modprobe bridge
# Activate the Ethernet interfaces
ifconfig eth0 up
ifconfig eth1 up

# Create the bridge
brctl addbr br0
# Add members to the bridge
brctl addif br0 eth0
brctl addif br0 eth1
# Set the bridge IP address:
ifconfig br0 10.0.2.1 netmask 255.255.255.0
Aggiungete le seguenti linee in "/etc/crontab":

#vim /etc/crontab
@reboot root /root/bridge.sh


4. COMANDI:

Vyatta Router

- Controlla lo stato del bridge:

Vyatta-Router#show bridge
bridge name bridge id STP enabled interfaces
br0 8000.0000ab12cd34 no eth0
      eth1
Il bridge ID inizia con "8000" e seguono i MAC address più bassi dei suoi membrei.

- Controlla i membri del bridge:

Vyatta-Router#show bridge br0 macs
port no mac addr is local? ageing timer
2   00:00:ab:12:cd:34 yes 0.00
1   00:04:11:22:33:44 yes 0.00
- Controlla l’interfaccia di bridge:

vyatta:~#ifconfig br0
Cisco Router

- Controlla I membri di bridge:

#show interface irb
- Controlla l’interfaccia di bridge:

#show interface BVI1
Linux Router

- Controlla lo stato del bridge:

Linux#brctl show
bridge name bridge id STP enabled interfaces
br0 8000.0000ab12cd34 no eth0
      eth1
Il bridge ID inizia con "8000" e seguono i MAC address più bassi dei suoi membrei.

- Controlla i membri del bridge:

Linux#brctl showmacs br0
port no mac addr is local? ageing timer
2   00:00:ab:12:cd:34 yes 0.00
1   00:04:11:22:33:44 yes 0.00
- Controlla l’interfaccia di bridge:

Linux#ifconfig br0