A apresentação está carregando. Por favor, espere

A apresentação está carregando. Por favor, espere

2008, Edgard Jamhour MPLS Prática com Linux Edgard Jamhour.

Apresentações semelhantes


Apresentação em tema: "2008, Edgard Jamhour MPLS Prática com Linux Edgard Jamhour."— Transcrição da apresentação:

1 2008, Edgard Jamhour MPLS Prática com Linux Edgard Jamhour

2 2008, Edgard Jamhour Instalação yum update yum install udev.i386 071-0.FC4.3 yum install hardlink yum install bridge-utils rpm -ivh kernel-2.6.15-1.1831_FC4mpls_1.950.i686.rpm rpm -ivh iproute-2.6.11-1_mpls_1.950d.i386.rpm rpm -ivh --force iproute-2.6.11-1_mpls_1.950d.i386.rpm rpm -ivh ebtables-2.0.6-7_mpls_1.950d.i386.rpm rpm -ivh iptables-ipv6-1.3.0-2_mpls_1.950d.i386.rpm rpm -ivh --force iptables-1.3.0-2_mpls_1.950d.i386.rpm rpm -ivh kernel-devel-2.6.15-1.1831_FC4mpls_1.950.i686.rpm rpm -e iptables-1.3.0-2 rpm -e iproute-2.6.11-1

3 2008, Edgard Jamhour Comandos Cria uma entrada nhlfe que adiciona o label 1000 e encaminha os pacotes para 10.0.0.3 pela interface eth2.

4 2008, Edgard Jamhour Comandos Mapeia uma FEC para uma NHLFE

5 2008, Edgard Jamhour Comandos O labelspace define que o roteador irá esperar pacotes marcados como mpls em sua interface

6 2008, Edgard Jamhour Comandos A tabela ILM diz quais labels serão esperados

7 2008, Edgard Jamhour Comandos Este comando implementa encaminha um pacote rotulado para uma nhlfe

8 2008, Edgard Jamhour Seqüência para o Egress Router Se for necesário encaminhar o pacote e fazer o pop do label –mpls labelspace set dev ethIN labelspace 0 –mpls ilm add label gen 1000 labelspace 0 –mpls nhlfe add key 0 instructions nexthop ethOUT ipv4 ipGateway –(returns key 0x2) –mpls xc add ilm_label gen 1000 ilm_labelspace 0 nhlfe_key 0x2 Se for necessário fazer apenas o pop do label –mpls labelspace set dev ethIN labelspace 0 –mpls ilm add label gen 1000 labelspace 0

9 2008, Edgard Jamhour Cenário 1 Host AHost B 1 12 1 LER X LER Y LABEL 1000 HOST A1eth2:1IPAI20.E.0.2/24 LER A1eth2:1IPX120.E.0.1/24 2eth2:2IPX210.E.0.1/30 LER B1eth2:1IPY110.E.0.2/30 2eth2:2IPY220.E.1.1/24 HOST B1eth2:1IPB20.E.1.2/24 FECREDE220.E.1.0/24 REDE 2 2 1

10 2008, Edgard Jamhour Configuração # HOST A –ip route add $REDE2 via $IPX1 src $IPA ip route add 20.1.1.0/24 via 20.1.0.1 src 20.1.0.2 # LER X –modprobe mpls4 –mpls nhlfe add key 0 instructions push gen 1000 nexthop $if2 ipv4 $IPY1 mpls nhlfe add key 0 instructions push gen 1000 nexthop eth2:2 ipv4 10.1.0.2 –ip route add $REDE2 via $IPY1 mpls 0x2 ip route add 20.1.1.0/24 via 10.1.0.2 mpls 0x2 –echo 1 > /proc/sys/net/ipv4/ip_forward # LER Y –mpls labelspace set dev $if1 labelspace 0 mpls labelspace set dev eth2:1 labelspace 0 –mpls ilm add label gen 1000 labelspace 0 mpls ilm add label gen 1000 labelspace 0

11 2008, Edgard Jamhour Script MPLS para LER X #!/bin/bash -x # Carrega o módulo de mpls modprobe mpls4 #Variaveis if2=eth2:1 IPY1=10.1.0.2 REDE2=20.1.1.0/24 key_value=`mpls nhlfe add key 0 instructions push gen 1000 nexthop $if2 ipv4 $IPY1 `; key=`echo $key_value|awk '{print $4}'`; ip route add $REDE2 via $IPY1 mpls $key echo 1 > /proc/sys/net/ipv4/ip_forward

12 2008, Edgard Jamhour Comandos para Evitar Redirecionamento sysctl net.ipv4.conf.eth2.send_redirects=0 sysctl net.ipv4.conf.eth2.accept_redirects=0 sysctl net.ipv4.conf.all.send_redirects=0 sysctl net.ipv4.conf.all.accept_redirects=0

13 2008, Edgard Jamhour Cenário 2 Host A Host B 1 LER x REDE 1 LER y L:2000 Host C REDE 2 REDE 3 L:2001 2 1 3 4 1 1 LER x1eth2:1IPX120.E.0.1/24 2eth2:2IPX210.E.0.1/30 3eth2:3IPX310.E.1.1/30 LSR z1eth2:1IPZ110.E.1.2/30 2eth2:2IPZ210.E.2.1/30 LER y1eth2:1IPY110.E.2.2/30 2eth2:2IPY210.E.0.2/30 3eth2:3IPY320.E.2.1/24 4eth2:4IPY420.E.1.1/24 HOST A1eth2:120.E.0.2/24 HOST B1eth2:120.E.1.2/24 HOST C1eth2:120.E.2.2/24 FECREDE 120.E.0.0/24 FECREDE 220.E.1.0/24 FECREDE 320.E.2.0/24 LSR z 3 L:1000 2 1 12

14 2008, Edgard Jamhour Exercício Implemente o cenário 2 de forma que os pacotes enviados pelo host A para a subrede: –REDE2 sigam o caminho vermelho –REDE3 sigam o caminho vermelho Entrega do trabalho: –script de configuração de um dos caminhos –Quadros mpls capturados em LSR X ou LER Y, conforme o caminho.

15 2008, Edgard Jamhour Configuração LER X # LER X (Rota Vermelha) –mpls nhlfe add key 0 instructions push gen 1000 nexthop eth2:2 ipv4 10.E.2.2 –ip route add 20.E.1.0/24 via 10.E.2.2 mpls 0x? # LER X (Rota Azul) –mpls nhlfe add key 0 instructions push gen 2000 nexthop eth2:3 ipv4 10.E.1.2 –ip route add 20.E.2.0/24 via 10.E.1.2 mpls 0x? # Roteamento –echo 1 > /proc/sys/net/ipv4/ip_forward

16 2008, Edgard Jamhour Configuração LSR # LSR Z (Rota Azul) –mpls labelspace set dev eth2:1 labelspace 0 –mpls ilm add label gen 2000 labelspace 0 –mpls nhlfe add key 0 instructions push gen 2001 nexthop eth2:2 ipv4 10.E.2.2 –mpls xc add ilm_label gen 2000 ilm_labelspace 0 nhlfe_key 0x? –echo 1 > /proc/sys/net/ipv4/ip_forward

17 2008, Edgard Jamhour Configuração LER Y # LER2 (Rota Vermelha) –mpls labelspace set dev eth2:2 labelspace 0 –mpls ilm add label gen 1000 labelspace 0 # LER2 (Rota Azul) –mpls labelspace set dev eth2:1 labelspace 0 –mpls ilm add label gen 2001 labelspace 0

18 2008, Edgard Jamhour Configuração Hosts # HOST A –ip route add 20.E.0.0/16 via 20.E.0.1 src 20.E.0.2 # HOST B –ip route add 20.E.0.0/16 via 20.E.1.1 src 20.E.1.2 # HOST C –ip route add 20.E.0.0/16 via 20.E.2.1 src 20.E.2.2

19 2008, Edgard Jamhour Exemplo: Script para o LSR x #!/bin/bash -x # Carrega o módulo de mpls # Caminho azul, Equipe 1 modprobe mpls4 # Variaveis IPY1=10.1.2.2/30 mpls labelspace set dev eth2 labelspace 0 mpls ilm add label gen 2000 labelspace 0 key_value=`mpls nhlfe add key 0 instructions push 2001 nexthop eth2:1 ipv4 $IPY2`; key=`echo $key_value|awk '{print $4}'`; mpls xc add ilm_label gen 2000 ilm_labelspace 0 nhlfe_key $key echo 1 > /proc/sys/net/ipv4/ip_forward

20 2008, Edgard Jamhour Cenário 3 Host A Host B 1 LER x REDE 1 LER y LSR z L:2003 Host C REDE 2 REDE 3 LSR w LSR u L:2002 L:2001 L:3003 L:3002 L:3001 2 1 2 3 1 2 12 1 2 3 4 1 1 LER x1eth2:1IPX120.E.0.1/24 2eth2:2IPX210.E.0.1/30 LER y1eth2:1IPY110.E.5.2/30 2eth2:2IPY210.E.3.2/30 3eth2:3IPY320.E.2.1/24 4eth2:4IPY420.E.1.1/24 LSR z1eth2:1IPZ110.E.0.2/30 2eth2:2IPZ210.E.1.1/30 3eth2:3IPZ310.E.4.1/30 LSR w1eth2:1IPW110.E.1.2/30 2eth2:2IPW210.E.3.1/30 LSR u1eth2:1IPU110.E.4.2/30 2eth2:2IPU210.E.5.1/30 FECREDE 120.E.0.0/24 FECREDE 220.E.1.0/24 FECREDE 320.E.2.0/24 HOST A1eth2:1IPA20.E.0.2/24 HOST B1eth2:1IPB20.E.1.2/24 HOST C1eth2:1IPC20.E.2.2/24

21 2008, Edgard Jamhour Exercício Implemente o cenário 3 de forma que os pacotes enviados pelo host A para a subrede: –192.168.0.0/25 sigam o caminho vermelho –192.168.0.128/25 sigam o caminho vermelho Entrega do trabalho: –script de configuração de um dos caminhos –Quadros mpls capturados em LSR2 ou LSR3, conforme o caminho.


Carregar ppt "2008, Edgard Jamhour MPLS Prática com Linux Edgard Jamhour."

Apresentações semelhantes


Anúncios Google