English Title: MPLS and L2Circuit with LSP in Juniper Routers
Aproveitando o post anterior e dando continuidade nos estudos de MPLS, aproveitei o mesmo cenário já virtualizado para emular circuitos L2 com o l2circuit nos junipers.
O cenário é bem semelhante ao VPLS, no entanto nem todas as linhas de equipamentos da Juniper suportam tuneis L2 ou L3 com VPLS nesse caso a uma alternativa para o L2 é o L2CIRCUIT.
O l2circuit é balanceado entre duas LSPs e com failover automático caso uma LSP estiver inativa.
Para esse LAB utilizaremos os seguintes equipamentos virtualizados
3 – vMX (Juniper MX virtualized)
2 – CHR (Mikrotik RouterOS Cloud Hosted Router)
Topologia
Abaixo segue as configurações realizadas em todos os equipamentos.
Configuração do R1
system { host-name R1; services { ssh { protocol-version v2; } } syslog { user * { any emergency; } file messages { any notice; authorization info; } file interactive-commands { interactive-commands any; } } } interfaces { ge-0/0/0 { description ROUTER-2; mtu 2000; unit 0 { family inet { address 10.0.0.1/30; } family mpls; } } ge-0/0/1 { description ROUTER-3; mtu 2000; unit 0 { family inet { address 10.0.3.1/30; } family mpls; } } ge-0/0/2 { description MK-01; flexible-vlan-tagging; mtu 2000; encapsulation vlan-ccc; unit 800 { encapsulation vlan-ccc; vlan-id 800; } } fxp0 { unit 0 { family inet { address 192.168.0.101/24; } } } lo0 { unit 0 { family inet { address 10.1.1.1/32; } } } } protocols { rsvp { load-balance bandwidth; interface ge-0/0/1.0; interface ge-0/0/0.0; } mpls { label-switched-path PRINCIPAL { to 10.2.1.1; bandwidth 10m; primary DIRETO; } label-switched-path SECUNDARIA { to 10.2.1.1; bandwidth 10m; primary VIAR3; } path DIRETO { 10.2.1.1; } path VIAR3 { 10.3.1.1; 10.2.1.1; } interface ge-0/0/0.0; interface ge-0/0/1.0; } ospf { traffic-engineering; area 0.0.0.0 { interface ge-0/0/0.0; interface ge-0/0/1.0; interface ge-0/0/2.0; interface lo0.0; } } ldp { interface ge-0/0/0.0; interface ge-0/0/1.0; interface lo0.0; } l2circuit { neighbor 10.2.1.1 { interface ge-0/0/2.800 { virtual-circuit-id 1; } } } } policy-options { policy-statement load-balancing { then { load-balance per-packet; } } }
Configuração do R2
system { host-name R2; services { ssh { protocol-version v2; } } syslog { user * { any emergency; } file messages { any notice; authorization info; } file interactive-commands { interactive-commands any; } } } interfaces { ge-0/0/0 { mtu 2000; unit 0 { family inet { address 10.0.0.2/30; } family mpls; } } ge-0/0/1 { mtu 2000; unit 0 { family inet { address 10.0.2.1/30; } family mpls; } } ge-0/0/2 { flexible-vlan-tagging; encapsulation vlan-ccc; unit 800 { encapsulation vlan-ccc; vlan-id 800; } } fxp0 { unit 0 { family inet { address 192.168.0.102/24; } } } lo0 { unit 0 { family inet { address 10.2.1.1/32; } } } } protocols { rsvp { load-balance bandwidth; interface ge-0/0/1.0; interface ge-0/0/0.0; } mpls { label-switched-path PRINCIPAL { to 10.1.1.1; bandwidth 10m; primary DIRETO; } label-switched-path SECUNDARIA { to 10.1.1.1; bandwidth 10m; primary VIAR3; } path DIRETO { 10.1.1.1; } path VIAR3 { 10.3.1.1; 10.1.1.1; } interface ge-0/0/0.0; interface ge-0/0/1.0; } ospf { traffic-engineering; area 0.0.0.0 { interface ge-0/0/0.0; interface ge-0/0/1.0; interface ge-0/0/2.0; interface lo0.0; } } ldp { interface ge-0/0/0.0; interface ge-0/0/1.0; interface lo0.0; } l2circuit { neighbor 10.1.1.1 { interface ge-0/0/2.800 { virtual-circuit-id 1; } } } } policy-options { policy-statement load-balancing { then { load-balance per-packet; } } }
Configuração do R3
system { host-name R3; services { ssh { protocol-version v2; } } syslog { user * { any emergency; } file messages { any notice; authorization info; } file interactive-commands { interactive-commands any; } } } interfaces { ge-0/0/0 { mtu 2000; mac 52:54:00:bf:a1:0d; unit 0 { family inet { address 10.0.2.2/30; } family mpls; } } ge-0/0/1 { mtu 2000; mac 52:54:00:29:54:42; unit 0 { family inet { address 10.0.3.2/30; } family mpls; } } fxp0 { unit 0 { family inet { address 192.168.0.103/24; } } } lo0 { unit 0 { family inet { address 10.3.1.1/32; } } } } protocols { rsvp { load-balance bandwidth; interface ge-0/0/0.0; interface ge-0/0/1.0; } mpls { interface ge-0/0/0.0; interface ge-0/0/1.0; } ospf { traffic-engineering; area 0.0.0.0 { interface ge-0/0/0.0; interface ge-0/0/1.0; interface lo0.0; } } ldp { interface ge-0/0/0.0; interface ge-0/0/1.0; interface lo0.0; } }
Mikrotik-1
/system identity set name=MIKROTIK-01 /interface vlan add interface=ether2 name=vlan1 vlan-id=800 add interface=vlan1 name=vlan2 vlan-id=900 /ip address add address=192.168.0.104/24 interface=ether1 network=192.168.0.0 add address=10.10.10.1/30 interface=vlan1 network=10.10.10.0 add address=10.20.10.1/30 interface=vlan2 network=10.20.10.0
Mikrotik-2
/system identity set name=MIKROTIK-02 /interface vlan add interface=ether1 name=vlan1 vlan-id=800 add interface=vlan1 name=vlan2 vlan-id=900 /ip address add address=192.168.0.105/24 interface=ether2 network=192.168.0.0 add address=10.10.10.2/30 interface=vlan1 network=10.10.10.0 add address=10.20.10.2/30 interface=vlan2 network=10.20.10.0
Checando a conexão l2circuit
root@R1> show l2circuit connections
Checando o database do LDP
root@R1> show ldp database
Testando do Mikrotik