Anda di halaman 1dari 12

Questo 1

Para resolver as questes foi utilizado o roteador cuja a imagem c7200-advipservicesk9-mz.152-4.S5.image


Para resolver a questo 1, foram utilizados os seguintes passos:
Passo 1(Atribuindo os Ips da Interface)
Passo 2(Atribuindo a loopback)
Passo 3(Configurando o MPLS)
Passo 4(Configurando o protocolo de roteamento)
Para o passo 1, temos:
//Configurando a interface de R1
enable
configure terminal
interface f0/0
ip address 10.0.1.1 255.255.255.0
no shutdown
end
write

//Configurando a interface de R2
enable
configure terminal
interface f0/0
ip address 10.0.1.2 255.255.255.0
no shutdown
interface f0/1
ip address 10.0.2.1 255.255.255.0
no shutdown
end
write

//Configurando a interface de R3
enable
configure terminal
interface f0/0
ip address 10.0.2.2 255.255.255.0
no shutdown
interface f0/1
ip address 10.0.3.1 255.255.255.0
no shutdown
end
write

//Configurando a interface de R4
enable
configure terminal
interface f0/0
ip address 10.0.3.2 255.255.255.0
no shutdown
interface f0/1
ip address 10.0.4.1 255.255.255.0
no shutdown
end
write
//Configurando a interface de R5
enable
configure terminal
interface f0/0
ip address 10.0.4.2 255.255.255.0
no shutdown
interface f0/1
ip address 1.0.5.1 255.255.255.0
no shutdown
end
write

//Configurando a interface de R6
enable
configure terminal
interface f0/0
ip address 1.0.5.2 255.255.255.0
no shutdown
end
write

//Para checar se os IPs foram atribuidos corretamente....


show ip interface brief
show running-config

Para o passo 2, temos:


//Configurando o loopback de R1
enable
configure terminal
interface loopback 0
ip address 10.0.101.1 255.255.255.255
end
write

//Configurando o loopback de R2
enable
configure terminal
interface loopback 0
ip address 10.0.102.1 255.255.255.255
end
write

//Configurando o loopback de R3
enable
configure terminal
interface loopback 0
ip address 10.0.103.1 255.255.255.255
end
write

//Configurando o loopback de R4
enable
configure terminal
interface loopback 0
ip address 10.0.104.1 255.255.255.255
end
write

//Configurando o loopback de R5
enable
configure terminal
interface loopback 0
ip address 10.0.105.1 255.255.255.255
end
write
//Configurando o loopback de R6
enable
configure terminal
interface loopback 0
ip address 10.0.106.1 255.255.255.255
end
write

Para o passo 3, temos:


//Configurando o MPLS no roteador R1
enable
configure terminal
interface f0/0
mpls ip
end
write

//Configurando o MPLS no roteador R2


enable
configure terminal
interface f0/0
mpls ip
interface f0/1
mpls ip
end
write

//Configurando o MPLS no roteador R3


enable
configure terminal
interface f0/0
mpls ip
interface f0/1
mpls ip
end
write

//Configurando o MPLS no roteador R4


enable
configure terminal
interface f0/0
mpls ip
interface f0/1
mpls ip
end
write

//Configurando o MPLS no roteador R5


enable
configure terminal
interface f0/0
mpls ip
end
write
Para o passo 4, temos:
//Configurando o OSPF no roteador 1
enable
configure terminal
interface f0/0
ip ospf 1 area 0
interface loopback 0
router ospf 1
network 0.0.0.0 255.255.255.255 area 0
end
write

//Configurando o OSPF no roteador 2


enable
configure terminal
interface f0/0
ip ospf 1 area 0
interface f0/1
ip ospf 1 area 0
interface loopback 0
router ospf 1
network 0.0.0.0 255.255.255.255 area 0
end
write

//Configurando o OSPF no roteador 3


enable
configure terminal
interface f0/0
ip ospf 1 area 0
interface f0/1
ip ospf 1 area 0
interface loopback 0
router ospf 1
network 0.0.0.0 255.255.255.255 area 0
end
write

//Configurando o OSPF no roteador 4


enable
configure terminal
interface f0/0
ip ospf 1 area 0
interface f0/1
ip ospf 1 area 0
interface loopback 0
router ospf 1
network 0.0.0.0 255.255.255.255 area 0
end
write

//Configurando o OSPF no roteador 5


enable
configure terminal
interface f0/0
ip ospf 1 area 0
interface f0/1
ip ospf 1 area 0
interface loopback 0
router ospf 1
network 0.0.0.0 255.255.255.255 area 0
end
write
//Configurando o OSPF no roteador 6
enable
configure terminal
interface f0/0
ip ospf 1 area 0
interface loopback 0
router ospf 1
network 0.0.0.0 255.255.255.255 area 0
end
write

Questo 2
//Para o Roteador CE1
enable
configure terminal
interface fastEthernet 0/0
ip address 10.0.1.1 255.255.255.0
no shutdown
end
write

//Para o Roteador CE-1


enable
configure terminal
interface fastEthernet 0/0
ip address 10.0.2.1 255.255.255.0
no shutdown
end
write

//Para o Roteador PE1


enable
configure terminal
interface fastEthernet 0/0
ip address 10.0.1.2 255.255.255.0
no shutdown
exit
interface fastEthernet 0/1
ip address 10.0.2.2 255.255.255.0
no shutdown
exit
interface fastEthernet 1/0
ip address 10.0.3.1 255.255.255.0
no shutdown
end
write

//Para o Roteador P1
enable
configure terminal
interface fastEthernet 0/0
ip address 10.0.3.2 255.255.255.0
no shutdown
exit
interface fastEthernet 0/1
ip address 10.0.8.1 255.255.255.0
no shutdown
exit
interface fastEthernet 1/0
ip address 10.0.6.1 255.255.255.0
no shutdown
end
write
//Para o Roteador PE2
enable
configure terminal
interface fastEthernet 0/0
ip address 10.0.6.2 255.255.255.0
no shutdown
exit
interface fastEthernet 0/1
ip address 10.0.7.2 255.255.255.0
no shutdown
end
write

//Para o Roteador CE3


enable
configure terminal
interface fastEthernet 0/0
ip address 10.0.7.1 255.255.255.0
no shutdown
end
write

//Para o Roteador PE3


enable
configure terminal
interface fastEthernet 0/0
ip address 10.0.8.2 255.255.255.0
no shutdown
exit
interface fastEthernet 0/1
ip address 10.0.4.2 255.255.255.0
no shutdown
exit
interface fastEthernet 1/0
ip address 10.0.5.2 255.255.255.0
no shutdown
end
write

//Para o Roteador CE-2


enable
configure terminal
interface fastEthernet 0/0
ip address 10.0.4.1 255.255.255.0
no shutdown
end
write

//Para o Roteador CE2


enable
configure terminal
interface fastEthernet 0/0
ip address 10.0.5.1 255.255.255.0
no shutdown
end
write

//Habilitando ospf no provedor P1


enable
configure terminal
interface loopback0
ip address 10.10.70.1 255.255.255.255
router ospf 1
network 0.0.0.0 255.255.255.255 area 0
end
write
//Habilitando ospf no provedor PE1
enable
configure terminal
interface f1/0
ip ospf 1 area 0
interface loopback0
ip address 10.10.60.1 255.255.255.255
ip ospf 1 area 0
end
write

//Habilitando ospf no provedor PE2


enable
configure terminal
interface f0/0
ip ospf 1 area 0
interface loopback0
ip address 10.10.90.1 255.255.255.255
ip ospf 1 area 0
end
write

//Habilitando ospf no provedor PE3


enable
configure terminal
interface f0/0
ip ospf 1 area 0
interface loopback0
ip address 10.10.80.1 255.255.255.255
ip ospf 1 area 0
end
write

//Habilitando ospf no CE1


enable
configure terminal
interface loopback 0
ip address 10.10.10.1 255.255.255.255
no shutdown
router ospf 2
network 0.0.0.0 255.255.255.255 area 0
end
write

//Habilitando ospf no CE-1


enable
configure terminal
interface loopback 0
ip address 10.10.20.1 255.255.255.255
no shutdown
router ospf 3
network 0.0.0.0 255.255.255.255 area 0
end
write

//Habilitando ospf no CE-2


enable
configure terminal
interface loopback 0
ip address 10.10.30.1 255.255.255.255
no shutdown
router ospf 3
network 0.0.0.0 255.255.255.255 area 0
end
write
//Habilitando ospf no CE2
enable
configure terminal
interface loopback 0
ip address 10.10.40.1 255.255.255.255
no shutdown
router ospf 2
network 0.0.0.0 255.255.255.255 area 0
end
write

//Habilitando ospf no CE3


enable
configure terminal
interface loopback 0
ip address 10.10.50.1 255.255.255.255
no shutdown
router ospf 2
network 0.0.0.0 255.255.255.255 area 0
end
write

//Habilitando o MPLS no P1
enable
configure terminal
interface f0/0
mpls ip
exit
interface f0/1
mpls ip
exit
interface f1/0
mpls ip
do show mpls interfaces
end
write

//Habilitando o MPLS no PE1


enable
configure terminal
interface f1/0
mpls ip
end
write

//Habilitando o MPLS no PE2


enable
configure terminal
interface f0/0
mpls ip
end
write

//Habilitando o MPLS no PE3


enable
configure terminal
interface f0/0
mpls ip
end
write
//Criando e atribuindo as VRFS no PE1
enable
configure terminal
ip vrf Cliente_A
rd 2000:1
route-target both 2000:1
ip vrf Cliente_B
rd 2000:2
route-target both 2000:2
end
write

//Criando e atribuindo as VRFS no PE2


enable
configure terminal
ip vrf Cliente_A
rd 2000:1
route-target both 2000:1
end
write

//Criando e atribuindo as VRFS no PE3


enable
configure terminal
ip vrf Cliente_A
rd 2000:1
route-target both 2000:1
ip vrf Cliente_B
rd 2000:2
route-target both 2000:2
end
write

//Atribuindo as interfaces a cada VRF (PE1)


enable
configure terminal
interface f0/0
ip vrf forwarding Cliente_A
ip address 10.0.1.2 255.255.255.0
interface f0/1
ip vrf forwarding Cliente_B
ip address 10.0.2.2 255.255.255.0
end
write

//Atribuindo as interfaces a cada VRF (PE2)


enable
configure terminal
interface f0/1
ip vrf forwarding Cliente_A
ip address 10.0.7.2 255.255.255.0
end
write

//Atribuindo as interfaces a cada VRF (PE3)


enable
configure terminal
interface f1/0
ip vrf forwarding Cliente_A
ip address 10.0.5.2 255.255.255.0
interface f0/1
ip vrf forwarding Cliente_B
ip address 10.0.4.2 255.255.255.0
end
write
//Configurar o MP-BGP no PE1
enable
configure terminal
router bgp 2000
neighbor 10.10.90.1 remote-as 2000
neighbor 10.10.90.1 update-source loopback 0
address-family vpnv4
neighbor 10.10.90.1 activate
exit
neighbor 10.10.80.1 remote-as 2000
neighbor 10.10.80.1 update-source loopback 0
address-family vpnv4
neighbor 10.10.80.1 activate
end
write

//Configurar o MP-BGP no PE2


enable
configure terminal
router bgp 2000
neighbor 10.10.80.1 remote-as 2000
neighbor 10.10.80.1 update-source loopback 0
address-family vpnv4
neighbor 10.10.80.1 activate
exit
neighbor 10.10.60.1 remote-as 2000
neighbor 10.10.60.1 update-source loopback 0
address-family vpnv4
neighbor 10.10.60.1 activate
end
write

//Configurar o MP-BGP no PE3


enable
configure terminal
router bgp 2000
neighbor 10.10.90.1 remote-as 2000
neighbor 10.10.90.1 update-source loopback 0
address-family vpnv4
neighbor 10.10.90.1 activate
exit
neighbor 10.10.60.1 remote-as 2000
neighbor 10.10.60.1 update-source loopback 0
address-family vpnv4
neighbor 10.10.60.1 activate
end
write

//Configurando o OSPF entre PE1-CE1 e PE1-CE-1


enable
configure terminal
router ospf 2 vrf Cliente_A
router-id 10.0.1.2
interface f0/0
ip ospf 2 area 0
router ospf 3 vrf Cliente_B
router-id 10.0.2.2
interface f0/1
ip ospf 3 area 0
end
write
//Configurando o OSPF entre PE2-CE3
enable
configure terminal
router ospf 2 vrf Cliente_A
router-id 10.0.7.2
interface f0/1
ip ospf 2 area 0
end
write

//Configurando o OSPF entre PE3-CE2 e PE3-CE-2


enable
configure terminal
router ospf 2 vrf Cliente_A
router-id 10.0.5.2
interface f1/0
ip ospf 2 area 0
router ospf 3 vrf Cliente_B
router-id 10.0.4.2
interface f0/1
ip ospf 3 area 0
end
write

//Redistribuio das rotas CE1 e CE-1 em cada VRF no MP-BGP (PE1)


enable
configure terminal
router bgp 2000
address-family ipv4 vrf Cliente_A
redistribute ospf 2
address-family ipv4 vrf Cliente_B
redistribute ospf 3
end
write

//Redistribuio das rotas CE3 em cada VRF no MP-BGP (PE2)


enable
configure terminal
router bgp 2000
address-family ipv4 vrf Cliente_A
redistribute ospf 2
end
write

//Redistribuio das rotas CE2 e CE-2 em cada VRF no MP-BGP (PE3)


enable
configure terminal
router bgp 2000
address-family ipv4 vrf Cliente_A
redistribute ospf 2
address-family ipv4 vrf Cliente_B
redistribute ospf 3
end
write

//Redistribuio das rotas BGP no processo OSPF de cada Cliente (PE1)


enable
configure terminal
router ospf 2
redistribute bgp 2000 subnets
router ospf 3
redistribute bgp 2000 subnets
end
write
//Redistribuio das rotas BGP no processo OSPF de cada Cliente (PE2)
enable
configure terminal
router ospf 2
redistribute bgp 2000 subnets
end
write

// Redistribuio das rotas BGP no processo OSPF de cada Cliente (PE3)


enable
configure terminal
router ospf 2
redistribute bgp 2000 subnets
router ospf 3
redistribute bgp 2000 subnets
end
write

Anda mungkin juga menyukai