1 Cenário
1.1 Objetivo
Quatro roteadores (R1, R2, R3 e R4) são conectados da seguinte forma:
· O R1 se conecta ao R2 por 3 links seriais com encapsulamento PPP e se conecta ao R3 usando um link MFR com 2 interfaces seriais;
· O R2 se conecta ao R3 através de um link Fast Ethernet e se conecta ao R4 pelos links Fast Ethernet, link ATM e link serial PPP;
· O R3 se conecta ao R4 através de 2 links seriais com encapsulamento PPP.
Para o roteamento, todos os roteadores deverão possui OSPF em todas as suas interfaces e inclusive nas interfaces loopbacks.
Os links seriais deverão ter custo 5, o link ATM deverá ter custo 1 e os links Fast Ethernet deverão ter custo 3.
1.2 Topologia
Figure-01: Topologia
1.3 IOS utilizados
· C1, C2, C3, R3, R4, R5, R6 – c7200-js-mz.123-7.T.bin
1.4 Configuração dos Roteadores
Em todos os roteadores configura-se o roteamento OSPF pelo comando “router ospf ” onde o “processo” é um numero do processo OSPF. O roteador também possui um router ID único que geralmente é a interface loopback ou então o maior endereço IP do roteador.
Para adicionar interfaces deve-se usar o comando “network
área ”. Um roteador pode ter interfaces em áreas distintas, define-se cada área pelo comando network.
Para o roteador fazer vizinhança OSPF é necessário que a rede da interface esteja no comando “network” e a interface não esteja configurada como “passive-interface”.
A configuração de custo de OSPF é feita na interface para um determinado link e pode ser feita nas interfaces loopbacks também. Usa-se o comando “ip ospf cost ”.
A configuração da rota default é feita usando o comando “default-information originate always”.
1.5 Observações e Bugs
1.6 Comentários
O OSPF calcula o caminho baseado no custo de cada link. O link que possuir menor custo até o destino é o link que ele vai usar.
Custo = Largura de Banda de referencia / Largura de Banda da interface (bps)
Largura de Banda de Referencia = 10^8 (pode ser modificada pelo Cisco IOS)
Largura de Banda da Interface – Dependente da portadora do meio de transmissão. Por exemplo, em um Link Ethernet (100 mbps = 100×10^6 = 100000000). Então, o custo será: Custo = 100000000 / 100000000 = 1
Observe que a única rota que possui custo = 1 é a rota default. As demais rotas sempre começam com 2.
Os links seriais possuem BW de 1544.000bps, por isso o custo é 64. No OSPF aparece 65 para as loopbacks do vizinho por causa do +1 adicionado ao roteamento da loopback.
1.7 Comandos Importantes de Verificação
R2#sh ip ospf interface brief
Interface PID Area IP Address/Mask Cost State Nbrs F/C
Fa4/0 1 0 24.24.24.1/30 3 P2P 1/1
AT3/0.1 1 0 22.22.22.9/30 1 P2P 1/1
Se2/1 1 0 22.22.22.5/30 5 P2P 1/1
Fa0/0 1 0 22.22.22.1/30 3 P2P 1/1
Se1/2 1 0 12.12.12.10/30 5 P2P 1/1
Se1/1 1 0 12.12.12.6/30 5 P2P 1/1
Se1/0 1 0 12.12.12.2/30 5 P2P 1/1
Lo0 1 0 2.2.2.2/32 1 LOOP 0/0
R2#show ip route
Gateway of last resort is 24.24.24.2 to network 0.0.0.0
34.0.0.0/30 is subnetted, 2 subnets
O 34.34.34.0 [110/6] via 22.22.22.10, 00:05:53, ATM3/0.1
O 34.34.34.4 [110/6] via 22.22.22.10, 00:05:53, ATM3/0.1
1.0.0.0/32 is subnetted, 1 subnets
O 1.1.1.1 [110/6] via 12.12.12.9, 00:05:53, Serial1/2
[110/6] via 12.12.12.5, 00:05:53, Serial1/1
[110/6] via 12.12.12.1, 00:05:53, Serial1/0
2.0.0.0/32 is subnetted, 1 subnets
C 2.2.2.2 is directly connected, Loopback0
3.0.0.0/32 is subnetted, 1 subnets
O 3.3.3.3 [110/2] via 22.22.22.10, 00:05:53, ATM3/0.1
4.0.0.0/32 is subnetted, 1 subnets
O 4.4.4.4 [110/4] via 24.24.24.2, 00:05:53, FastEthernet4/0
22.0.0.0/8 is variably subnetted, 4 subnets, 2 masks
C 22.22.22.6/32 is directly connected, Serial2/1
C 22.22.22.4/30 is directly connected, Serial2/1
C 22.22.22.0/30 is directly connected, FastEthernet0/0
C 22.22.22.8/30 is directly connected, ATM3/0.1
24.0.0.0/30 is subnetted, 1 subnets
C 24.24.24.0 is directly connected, FastEthernet4/0
12.0.0.0/8 is variably subnetted, 6 subnets, 2 masks
C 12.12.12.8/30 is directly connected, Serial1/2
C 12.12.12.9/32 is directly connected, Serial1/2
C 12.12.12.4/30 is directly connected, Serial1/1
C 12.12.12.5/32 is directly connected, Serial1/1
C 12.12.12.0/30 is directly connected, Serial1/0
C 12.12.12.1/32 is directly connected, Serial1/0
14.0.0.0/30 is subnetted, 1 subnets
O 14.14.14.0 [110/8] via 24.24.24.2, 00:05:54, FastEthernet4/0
O*E2 0.0.0.0/0 [110/1] via 24.24.24.2, 00:05:54, FastEthernet4/0
2 Configuração
2.1 R1
interface Loopback0 ip address 1.1.1.1 255.255.255.255 ! interface MFR1 no ip address frame-relay intf-type dce ! interface MFR1.1 point-to-point ip address 14.14.14.1 255.255.255.252 ip ospf cost 5 frame-relay interface-dlci 104 ! interface Serial1/0 ip address 12.12.12.1 255.255.255.252 encapsulation ppp ip ospf network point-to-point ip ospf cost 5 ! interface Serial1/1 ip address 12.12.12.5 255.255.255.252 encapsulation ppp ip ospf network point-to-point ip ospf cost 5 ! interface Serial1/2 ip address 12.12.12.9 255.255.255.252 encapsulation ppp ip ospf network point-to-point ip ospf cost 5 ! interface Serial2/0 no ip address encapsulation frame-relay MFR1 ip ospf cost 5 ! interface Serial2/1 no ip address encapsulation frame-relay MFR1 ip ospf cost 5 ! ! router ospf 1 network 1.1.1.1 0.0.0.0 area 0 network 12.12.12.0 0.0.0.3 area 0 network 12.12.12.4 0.0.0.3 area 0 network 12.12.12.8 0.0.0.3 area 0 network 14.14.14.0 0.0.0.3 area 0 ! |
2.2 R2
! interface Loopback0 ip address 2.2.2.2 255.255.255.255 ! interface FastEthernet0/0 ip address 22.22.22.1 255.255.255.252 ip ospf network point-to-point ip ospf cost 3 duplex full ! interface Serial1/0 ip address 12.12.12.2 255.255.255.252 encapsulation ppp ip ospf network point-to-point ip ospf cost 5 ! interface Serial1/1 ip address 12.12.12.6 255.255.255.252 encapsulation ppp ip ospf network point-to-point ip ospf cost 5 ! interface Serial1/2 ip address 12.12.12.10 255.255.255.252 encapsulation ppp ip ospf network point-to-point ip ospf cost 5 ! interface Serial2/1 ip address 22.22.22.5 255.255.255.252 encapsulation ppp ip ospf network point-to-point ip ospf cost 5 ! interface ATM3/0 ! interface ATM3/0.1 point-to-point ip address 22.22.22.9 255.255.255.252 ip ospf network point-to-point ip ospf cost 1 pvc 0/203 encapsulation aal5snap ! ! interface FastEthernet4/0 ip address 24.24.24.1 255.255.255.252 ip ospf network point-to-point ip ospf cost 3 duplex full ! router ospf 1 router-id 2.2.2.2 network 2.2.2.2 0.0.0.0 area 0 network 12.12.12.0 0.0.0.3 area 0 network 12.12.12.4 0.0.0.3 area 0 network 12.12.12.8 0.0.0.3 area 0 network 22.22.22.0 0.0.0.3 area 0 network 22.22.22.4 0.0.0.3 area 0 network 22.22.22.8 0.0.0.3 area 0 network 24.24.24.0 0.0.0.3 area 0 ! |
2.3 R3
! interface Loopback0 ip address 3.3.3.3 255.255.255.255 ! interface FastEthernet0/0 ip address 22.22.22.2 255.255.255.252 ip ospf network point-to-point ip ospf cost 3 duplex full ! interface Serial2/1 ip address 22.22.22.6 255.255.255.252 encapsulation ppp ip ospf network point-to-point ip ospf cost 5 ! interface Serial2/3 ip address 34.34.34.1 255.255.255.252 encapsulation ppp ip ospf network point-to-point ip ospf cost 5 ! interface Serial2/4 ip address 34.34.34.5 255.255.255.252 encapsulation ppp ip ospf network point-to-point ip ospf cost 5 ! interface ATM3/0 ! interface ATM3/0.1 point-to-point ip address 22.22.22.10 255.255.255.252 ip ospf cost 1 pvc 0/203 encapsulation aal5snap ! ! router ospf 1 router-id 3.3.3.3 network 3.3.3.3 0.0.0.0 area 0 network 22.22.22.0 0.0.0.3 area 0 network 22.22.22.4 0.0.0.3 area 0 network 22.22.22.8 0.0.0.3 area 0 network 34.34.34.0 0.0.0.3 area 0 network 34.34.34.4 0.0.0.3 area 0 ! |
2.4 R4
! interface Loopback0 ip address 4.4.4.4 255.255.255.255 ! interface MFR1 no ip address ! interface MFR1.1 point-to-point bandwidth 500 ip address 14.14.14.2 255.255.255.252 ip ospf network point-to-point ip ospf cost 5 frame-relay interface-dlci 104 ! interface Serial2/0 no ip address encapsulation frame-relay MFR1 ! interface Serial2/1 no ip address encapsulation frame-relay MFR1 ! interface Serial2/3 ip address 34.34.34.2 255.255.255.252 encapsulation ppp ip ospf network point-to-point ip ospf cost 5 ! interface Serial2/4 ip address 34.34.34.6 255.255.255.252 encapsulation ppp ip ospf network point-to-point ip ospf cost 5 ! interface FastEthernet4/0 ip address 24.24.24.2 255.255.255.252 ip ospf network point-to-point ip ospf cost 3 duplex full ! router ospf 1 router-id 4.4.4.4 network 4.4.4.4 0.0.0.0 area 0 network 14.14.14.0 0.0.0.3 area 0 network 24.24.24.0 0.0.0.3 area 0 network 34.34.34.0 0.0.0.3 area 0 network 34.34.34.4 0.0.0.3 area 0 default-information originate always ! |
Nenhum comentário:
Postar um comentário