Exercícios de Roteamento BackBone IP

Post on 14-Jan-2016

16 views 3 download

description

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. - PowerPoint PPT Presentation

Transcript of Exercícios de Roteamento BackBone IP

Exercícios de RoteamentoBackBone 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: inicializa e máquina virtual– linux32.redes nome_vm

• PASSO 2: na máquina local– login: root – senha: vazio– ifconfig eth0 20.0.etiqueta

• PASSO 3: cheque a configuração– wget 20.0.0.1/~jamhour/pacotes/quagga_rpm.tar.gz – tar -xzf quagga_rpm.tar.gz– cd quagga_rpm– ./install.sh

Inicialização dos Serviços

• Inicialização Zebra– cd /etc/quagga– zebra -d– telnet 2601

• Inicialização do Serviço RIP– cd /etc/quagga– ripd -d -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

AS7

11.0.0.0/2411.0.1.0/24

12.0.0.0/2412.0.1.0/24

13.0.0.0/2413.0.1.0/24

14.0.0.0/2414.0.1.0/24

16.0.0.0/2416.0.1.0/24

15.0.0.0/2415.0.1.0/24

18.0.0.0/2418.0.1.0/24

17.0.0.0/2417.0.1.0/24

peer

peer

peer

peer

transit

peer

transit

peer

10

AS10

9

AS9

20.0.0.0/2420.0.1.0/24

19.0.0.0/2419.0.1.0/24

peer

peer11

AS11

21.0.0.0/2421.0.1.0/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 10.26.1235.17

• network 11.0.0.0/24

• network 11.0.1.0/24

• neighbor 10.26.135.18 remote-as 2

• neighbor 10.26.135.19 remote-as 3

• neighbor 10.26.135.20 remote-as 5

• neighbor 10.26.135.21 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 eth0.2 192.168.1.0 netmask 255.255.255.0 up– vlan delete eth0.2

switch

eth0.2eth0.3

eth0.3eth0.4

eth0.4eth0.5

trunk trunk

vlan 2

vlan 5

vlan 3

vlan 4

Exercício 2: RIP

1 2

192.168.1.0/25 192.168.1.128/25

VLAN 2 VLAN 3

3 4

192.168.2.0/25 192.168.2.128/25

VLAN 4 VLAN 5

5 6

192.168.3.0/25 192.168.3.128/25

VLAN 6 VLAN 7

7 8

192.168.4.0/25 192.168.4.128/25

VLAN 8 VLAN 9

10 11

192.168.5.64/26 192.168.5.128/25

VLAN 11 VLAN 12

20.0.0.0/8

9VLAN 10

192.168.5.0/26

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 eth0.2 192.168.1.1 netmask 255.255.255.128

ifconfig eth0.3 192.168.1.129 netmask 255.255.255.128

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.0.0.0/0• !• line vty• !

Entrega do Exercício 2

• Para cada bancada, crie um arquivo zip contendo os seguintes arquivos:– a) Arquivo de configuração ripd.conf– b) Tabela de rotas

• route -n >> rotasrip.txt

Exercício 3: OSPF

1 2

192.168.1.0/25 192.168.1.128/25

VLAN 2 VLAN 3

3 4

192.168.2.0/25 192.168.2.128/25

VLAN 4 VLAN 5

5 6

192.168.3.0/25 192.168.3.128/25

VLAN 6 VLAN 7

7 8

192.168.4.0/25 192.168.4.128/25

VLAN 8 VLAN 9

10 11

192.168.5.64/26 192.168.5.128/25

VLAN 11 VLAN 12

20.0.0.0/8

9VLAN 10

192.168.5.0/26

Area 1

Area 2

Area 3

Area 4

Area 5

Arquivo de Configuração (impares)

• !

• ! Zebra configuration saved from vty

• ! 2007/06/14 15:24:48

• !

• hostname ospfd

• password zebra

• log stdout

• !

• !interface eth0

• ! ip ospf cost 100

• !

• router ospf

• ospf router-id 192.168.1.1

• redistribute kernel

• redistribute static

• network 192.168.1.0/24 area 0.0.0.1

• !

• 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 10.0.0.1

• redistribute kernel

• redistribute static

• network 20.0.0.0/8 area 0.0.0.0

• network 192.168.1.0/24 area 0.0.0.1

• area 0.0.0.1 range 192.168.1.0/24

• !

• line vty

• !

Alterando o custo da Interface

• telnet IP_VM 2604– senha zebra– enable– configure terminal

• interface eth0– ospf cost 100

– exit

– write file– show ip opsf database– show ip ospf neighbor

Entrega do Exercício 3

• Para cada bancada, crie um aquivo zip contendo os seguintes arquivos:– a) Arquivo de configuração ospfd.conf– b) Tabela de rotas

• route -n >> rotasA.txt