Configurando MPLS Traffic Engineer em roteadores cisco

Share Button

English Title: Configuring MPLS Traffic Engineer in cisco routers

Nesse simples artigo irei demostrar como configurar uma rede em formado de malha usando OSPF, e realizando engenharia de trafego com MPLS.

Para criar essa topologia utilizei o GNS3 como emulador. Emulei 4 routers cisco 7200 mais 2 Mikrotiks emulados com o QEMU apenas para ter um terminal para os testes.

Depois de criar a rede MPLS criei um túnel MPLS-TE entre o router-1 e router-2 e propositalmente farei com que o trafego entre o router-1 e 2 passe por todos os routers (caminho mais longo) para chegar ao seu destino.

Segue topologia:
topology

Sendo assim mãos a obra. Segue configurações que realizei em cada equipamento.
ROUTER-01

hostname cisco-R1
ip cef
mpls traffic-eng tunnels
interface Tunnel1
 ip unnumbered Loopback0
 tunnel destination 10.10.10.2
 tunnel mode mpls traffic-eng
 tunnel mpls traffic-eng autoroute announce
 tunnel mpls traffic-eng priority 0 0
 tunnel mpls traffic-eng bandwidth  100000
 tunnel mpls traffic-eng path-option 1 explicit name VOLTA
 no routing dynamic
!
interface Loopback0
 ip address 10.10.10.1 255.255.255.255
!
interface FastEthernet0/0
 ip address 10.0.1.1 255.255.255.252
 duplex auto
 speed auto
 mpls traffic-eng tunnels
 ip rsvp bandwidth 100000
!
interface FastEthernet0/1
 ip address 10.0.0.1 255.255.255.252
 duplex auto
 speed auto
 mpls traffic-eng tunnels
 ip rsvp bandwidth 100000
!
interface FastEthernet1/0
 ip address 10.0.2.1 255.255.255.252
 duplex auto
 speed auto
 mpls traffic-eng tunnels
 ip rsvp bandwidth 100000
!
interface FastEthernet1/1
 ip address 192.168.11.1 255.255.255.0
 duplex auto
 speed auto
!
router ospf 1
 mpls traffic-eng router-id Loopback0
 mpls traffic-eng area 0
 log-adjacency-changes
 no auto-cost
 network 10.0.0.0 0.0.0.255 area 0
 network 10.0.1.0 0.0.0.255 area 0
 network 10.0.2.0 0.0.0.255 area 0
 network 10.10.10.1 0.0.0.0 area 0
 network 192.168.11.0 0.0.0.255 area 0
!
ip explicit-path name VOLTA enable
 next-address 10.10.10.3 
 next-address 10.10.10.4 
!

Foi configurando também em cada interface que faz parte do MPLS a velocidade de 100Mbps nesse cenário todas as interfaces são FastEthernet.

Também foi configurado a velocidade do tunnel com o comando:

tunnel mpls traffic-eng bandwidth  100000

Caso necessite diminuir a velocidade que esse túnel pode alcançar basta diminuir esse valor.

E também foi configurado o caminho que sera utilizado para entre o túnel com os comandos:

tunnel mpls traffic-eng path-option 1 explicit name VOLTA
ip explicit-path name VOLTA enable
 next-address 10.10.10.3 
 next-address 10.10.10.4 
!

E da mesma forma configurei o router-2 que nesse caso é a outra ponta do tunnel.

ROUTER-02

hostname cisco-R2
ip cef
mpls traffic-eng tunnels
interface Tunnel1
 ip unnumbered Loopback0
 tunnel destination 10.10.10.1
 tunnel mode mpls traffic-eng
 tunnel mpls traffic-eng autoroute announce
 tunnel mpls traffic-eng priority 0 0
 tunnel mpls traffic-eng bandwidth  100000
 tunnel mpls traffic-eng path-option 1 explicit name VOLTA
 no routing dynamic
!
interface Loopback0
 ip address 10.10.10.2 255.255.255.255
!
interface FastEthernet0/0
 ip address 10.0.3.1 255.255.255.252
 duplex auto
 speed auto
 mpls traffic-eng tunnels
 ip rsvp bandwidth 100000
!
interface FastEthernet0/1
 ip address 10.0.0.2 255.255.255.252
 duplex auto
 speed auto
 mpls traffic-eng tunnels
 ip rsvp bandwidth 100000
!
interface FastEthernet1/0
 ip address 192.168.10.1 255.255.255.0
 duplex auto
 speed auto
!
router ospf 1
 mpls traffic-eng router-id Loopback0
 mpls traffic-eng area 0
 log-adjacency-changes
 network 10.0.0.0 0.0.0.255 area 0
 network 10.0.3.0 0.0.0.255 area 0
 network 10.10.10.2 0.0.0.0 area 0
 network 192.168.10.0 0.0.0.255 area 0
!
ip explicit-path name VOLTA2 enable
 index 8 next-address 10.10.10.4 
 next-address 10.10.10.3 
!

ROUTER-03

hostname cisco-R3
ip cef
mpls traffic-eng tunnels
interface Loopback0
 ip address 10.10.10.3 255.255.255.255
!
interface FastEthernet0/0
 ip address 10.0.4.1 255.255.255.252
 duplex auto
 speed auto
 mpls traffic-eng tunnels
 ip rsvp bandwidth 100000
!
interface FastEthernet0/1
 ip address 10.0.1.2 255.255.255.252
 duplex auto
 speed auto
 mpls traffic-eng tunnels
 ip rsvp bandwidth 100000
!
router ospf 1
 mpls traffic-eng router-id Loopback0
 mpls traffic-eng area 0
 log-adjacency-changes
 network 10.0.1.0 0.0.0.255 area 0
 network 10.0.4.0 0.0.0.255 area 0
 network 10.10.10.3 0.0.0.0 area 0
!

ROUTER-04

hostname cisco-R4
ip cef
mpls traffic-eng tunnels
interface Loopback0
 ip address 10.10.10.4 255.255.255.255
!
interface FastEthernet0/0
 ip address 10.0.3.2 255.255.255.252
 duplex auto
 speed auto
 mpls traffic-eng tunnels
 ip rsvp bandwidth 100000
!
interface FastEthernet0/1
 ip address 10.0.4.2 255.255.255.252
 duplex auto
 speed auto
 mpls traffic-eng tunnels
 ip rsvp bandwidth 100000
!
interface FastEthernet1/0
 ip address 10.0.2.2 255.255.255.252
 duplex auto
 speed auto
 mpls traffic-eng tunnels
 ip rsvp bandwidth 100000
!
router ospf 1
 mpls traffic-eng router-id Loopback0
 mpls traffic-eng area 0
 log-adjacency-changes
 network 10.0.2.0 0.0.0.255 area 0
 network 10.0.3.0 0.0.0.255 area 0
 network 10.0.4.0 0.0.0.255 area 0
 network 10.10.10.4 0.0.0.0 area 0
!

E também as configurações realizadas nos mikrotiks.

MIKROTIK-01

/ip address add adress=192.168.10.2/24 interface=ether1
/ip route add gateway=192.168.10.1

MIKROTIK-04

/ip address add adress=192.168.11.2/24 interface=ether1
/ip route add gateway=192.168.11.1

Vejam os testes realizados entre os mikrotiks.

Captura de tela de 2014-07-06 20:36:19

E a tabela de roteamento OSPF do router-01

Captura de tela de 2014-07-06 20:37:22

É isso, espero ter ajudado.

 

 

Deixe uma resposta