modified on 29 gru 2009 at 11:19 ••• 276 views

Konfiguracja stanowiska testowego MPLS

Z MikroTik Wiki

Spis treści

Wprowadzenie

Ten artykuł próbuje połączyć konfigurację stanowiska do testowania MPLS / VPLS jak i Kształtowania Ruchu. Nie jest to próba wytłumaczenia jak działa MPLS, a raczej próba zachęcenia do dyskusji o działaniu MPLS. Przed stworzeniem stanowiska powinieneś najpierw zaznajomić się z koncepcjami z artykułu LDP i VPLS oparty o LDP, ponieważ większa część konfiguracji oparta jest o te koncepcje. Ponieważ moje zrozumienie MPLS jest ograniczone, możesz zmienić i poprawić artykuł, jeśli to konieczne. Jeśli chcesz oryginalny schemat sieci (w formacie Visio) wyślij e-mail do mnie na adres david [at] mikrotiksa dot com. Mogę eksportować schemat na inne formaty.

Tyczy się również dyskusja na forum o tym artykule.

--Savagedavid 1:59, 21 Kwiecień 2008 (EEST)

Konfiguracja stanowiska

Schemat sieci

Najpierw spójrzmy na schemat sieci Image:MPLS_Lab_Setup.png

Konfiguracja została utworzona przez użycie 6 RB532, ale wszystko z 3 interfejsami sieciowymi i 32 MB pamięci powinno się nadawać. P1- P3 są routerami Dostawcy (szkieletu MPLS). PE1 - PE3 są routerami brzegowymi dostawcy z przydzielaniem etykiet.

Konfiguracja Routera

Interfejs pętli zwrotnej

Każdy router jest skonfigurowany z adapterem pętli zwrotnej lobridge, który przechowuje adres pętli zwrotnej z LDP i VPLS oparty o LDP widzimy, że ma to 2 zastosowania:

  • ponieważ jest tylko jedna sesja LDP pomiędzy każdymi 2 routerami, nie ważne ile łączy jest pomiędzy nimi, adres IP pętli zwrotnej zapewnia, że sesja LDP nie jest zależna od stanu interfejsu lub zmiany adresu
  • użycie adresu pętli zwrotnej jako adresu transportowego LDP zapewnia poprawne zachowanie wstawiania przedostatniego skoku gdy przydzielone jest wiele etykiet do pakietu, tak samo jak w przypadku VPLS.

Przedstawiono tutaj typową konfigurację routera (w tym przypadku z P1)

P1

/interface bridge add name=lobridge
/ip address add address=10.255.255.1/32 interface=lobridge

Pozostałe routery są skonfigurowane z 10.255.255.2-6 jak w powyższym schemacie

P2

/interface bridge add name=lobridge
/ip address add address=10.255.255.2/32 interface=lobridge

P3

/interface bridge add name=lobridge
/ip address add address=10.255.255.3/32 interface=lobridge

PE1

/interface bridge add name=lobridge
/ip address add address=10.255.255.4/32 interface=lobridge

PE2

/interface bridge add name=lobridge
/ip address add address=10.255.255.5/32 interface=lobridge

PE3

/interface bridge add name=lobridge
/ip address add address=10.255.255.6/32 interface=lobridge

Adresacja IP

Następnie skonfigurujmy łącza pomiędzy rdzeniowymi routerami i routerami brzegowymi:

P1

/ip address 
add address=10.0.255.1/30 interface=ether1 
add address=10.0.255.5/30 interface=ether2
add address=10.1.0.254/24 interface=ether3

P2

/ip address 
add address=10.0.255.6/30 interface=ether1 
add address=10.0.255.9/30 interface=ether2
add address=10.2.0.254/24 interface=ether3

P3

/ip address 
add address=10.0.255.10/30 interface=ether1
add address=10.0.255.2/30 interface=ether2
add address=10.3.0.254/24 interface=ether3

PE1

/ip address 
add address=10.1.0.1/24 interface=ether1

PE2

/ip address 
add address=10.1.0.2/24 interface=ether1

PE3

/ip address 
add address=10.1.0.3/24 interface=ether1

Konfiguracja dynamicznego routingu

Skonfigurujmy OSPF na każdym routerze aby dynamicznie rozsyłać trasy

P1

/routing ospf 
set distribute-default=never redistribute-connected=as-type-1 router-id=10.255.255.1 
/routing ospf network 
add area=backbone network=10.0.255.0/30 
add area=backbone network=10.0.255.4/30 
add area=backbone network=10.1.0.0/24 

P2

/routing ospf 
set distribute-default=never redistribute-connected=as-type-1 router-id=10.255.255.2
/routing ospf network 
add area=backbone network=10.0.255.8/30 
add area=backbone network=10.0.255.4/30 
add area=backbone network=10.2.0.0/24 

P3

/routing ospf 
set distribute-default=never redistribute-connected=as-type-1 router-id=10.255.255.3 
/routing ospf network 
add area=backbone network=10.0.255.0/30 
add area=backbone network=10.0.255.8/30 
add area=backbone network=10.1.0.0/24 

PE1

/routing ospf 
set distribute-default=never redistribute-connected=as-type-1 router-id=10.255.255.4
/routing ospf network 
add area=backbone network=10.1.0.0/24 

PE2

/routing ospf 
set distribute-default=never redistribute-connected=as-type-1 router-id=10.255.255.5
/routing ospf network 
add area=backbone network=10.2.0.0/24 

PE3

/routing ospf 
set distribute-default=never redistribute-connected=as-type-1 router-id=10.255.255.6
/routing ospf network 
add area=backbone network=10.3.0.0/24 

Teraz powinieneś mieć działający system trasowania OSPF

Konfiguracja MPLS

Dodajmy i skonfigurujmy system MPLS. Aby rozsyłać etykiety dla tras, należy włączyć LDP. Następnie należy dodać wszystkie interfejsy uczestniczące w MPLS.

P1

/mpls ldp 
set enabled=yes lsr-id=10.255.255.1 transport-address=10.255.255.1
/mpls ldp interface 
add interface=ether1
add interface=ether2
add interface=ether3

P2

/mpls ldp 
set enabled=yes lsr-id=10.255.255.2 transport-address=10.255.255.2
/mpls ldp interface 
add interface=ether1
add interface=ether2
add interface=ether3

P3

/mpls ldp 
set enabled=yes lsr-id=10.255.255.3 transport-address=10.255.255.3
/mpls ldp interface 
add interface=ether1

PE1

/mpls ldp 
set enabled=yes lsr-id=10.255.255.4 transport-address=10.255.255.4
/mpls ldp interface 
add interface=ether1

PE2

/mpls ldp 
set enabled=yes lsr-id=10.255.255.5 transport-address=10.255.255.5
/mpls ldp interface 
add interface=ether1

PE3

/mpls ldp 
set enabled=yes lsr-id=10.255.255.6 transport-address=10.255.255.6
/mpls ldp interface 
add interface=ether1

To powinno dać Ci działający system MPLS.

Image:LDP1.png Image:mpls2.png Image:mpls1.png