Exercícios de Roteamento BackBone IP Nome dos Alunos
Pacote Quagga Utilitários: –zebra: deamon de integração com o S.O. TCP 2601 –ripd: implementa o protocolo RIP TCP 2602 –ospfd: implementa o protocolo OSPF TCP 2604 –bgpd: implementa o protocolo BGP TCP 2605
Instalação do Quagga PASSO 1: descompacte os arquivos –tar -xzf quagga-XXXX PASSO 2: cheque a configuração –cd quagga-XXXX –./configure PASSO 3: compile os deamons –make
Inicialização dos Serviços Inicialização Zebra –cd zebra –./zebra -u labredes -g labredes -f zebra.conf.sample –telnet 2601 Inicialização do Serviço RIP –cd ripd –./ripd -u labredes -g labredes -f ripd.conf.sample –telnet 2602 –enable –configure terminal
Exercício 1: BGP Ponto de Troca (IXP/ PTT) 1 AS1 2 AS2 3 AS3 4 AS4 6 AS6 5 AS5 8 AS8 7 AS / / / / / / / / / / / / / / / /24 peer transit peer transit peer 10 AS10 9 AS / / / /24 peer 11 AS / /24 peer
Arquivo de Configuração ! ! Zebra configuration saved from vty ! 2007/06/14 15:24:48 ! hostname ospfd password zebra log stdout ! router bgp 1 bgp router-id network /24 network /24 neighbor remote-as 2 neighbor remote-as 3 neighbor remote-as 5 neighbor remote-as 7 ! line vty !
Entrega do Exercício 1 Para cada bancada, crie um aquivo zip contendo os seguintes arquivos: –a) Arquivo de configuração dos dois nós da bancada enable –config term »write –b) Tabela de rotas dos dois nós da bancada: route -n >> rotasA.txt
VConfig Permite criar interfaces virtuais no linux que efetuam marcação com tags de VLANs: –modprobe 8021q –vlan add eth0 2 –ifconfig eth netmask up –vlan delete eth0.2 switch eth0.2 eth0.3 eth0.4 eth0.5 trunk vlan 2 vlan 5 vlan 3 vlan 4
Exercício 2: RIP vlan 2 vlan / vlan 3 vlan vlan 5 vlan vlan 7 vlan vlan / / / / / / / /25
Exemplo de arquivo de script #!/bin/bash if [ $# -eq 0 ]; then echo “Digite a opcao após o script” echo "1=G1, 2=G2, 3=Restaurar" exit fi if [ $1 -eq 1 ]; then echo "Configuracao de G1" vconfig eth0 add 2 vconfig eth0 add 3 ifconfig eth netmask ifconfig eth netmask elif [ $1 -eq 2]; then echo "Esqueci de configurar G2" else vconfig del eth0.2 vconfig del eth0.3 service network restart echo "Restaurar" fi
Exemplo de arquivo de configuração ! ! Zebra configuration saved from vty ! 2007/05/31 15:31:31 ! hostname ripd password zebra log stdout ! interface eth0 ip rip authentication mode text ip rip authentication string teste2 ! interface eth0.2 ip rip authentication mode text ip rip authentication string teste ! router rip redistribute kernel redistribute static network /0 ! line vty !
Entrega do Exercício 2 Para cada bancada, crie um aquivo zip contendo os seguintes arquivos: –a) Arquivo de configuração dos dois nós da bancada enable –config term »write –b) Tabela de rotas dos dois nós da bancada: route -n >> rotasA.txt
Exercício 3: OSPF vlan 2 vlan /24 (Área 0) 1 2 vlan / /24 vlan vlan / /24 Area 2 vlan vlan / /24 Area 3 vlan vlan / /24 Area 4 Area 1
Arquivo de Configuração (impares) ! ! Zebra configuration saved from vty ! 2007/06/14 15:24:48 ! hostname ospfd password zebra log stdout ! router ospf ospf router-id redistribute kernel redistribute static network /24 area ! line vty !
Arquivo de Configuração (pares) ! ! Zebra configuration saved from vty ! 2007/06/14 15:24:48 ! hostname ospfd password zebra log stdout ! router ospf ospf router-id redistribute kernel redistribute static network /24 area network /24 area area range /24 ! line vty !
Entrega do Exercício 3 Para cada bancada, crie um aquivo zip contendo os seguintes arquivos: –a) Arquivo de configuração dos dois nós da bancada enable –config term »write –b) Tabela de rotas dos dois nós da bancada: route -n >> rotasA.txt