Ejercicio BGP
Este es un nuevo ejercicio CISCO, ahora del protocolo BGP. Está desarrollado según la imagen que está inserta a continuación.
1.- Direccionar las interface físicas y lógicas.
ESTA PARTE ES SOLO ASIGNAR LAS IPs Y LEVANTAR LAS INTERFACES
R1#conf t R1(config)#int s1/0 R1(config-if)#ip address 10.1.102.1 255.255.255.248 R1(config-if)#clock rate 128000 R1(config-if)#no shutdown R1(config-if)#exit R1(config)#int s1/2 R1(config-if)#ip address 10.1.103.1 255.255.255.248 R1(config-if)#no shutdown R1(config-if)#exit R1(config)#int f0/0 R1(config-if)#ip address 192.168.14.1 255.255.255.252 R1(config-if)#no shutdown R1(config-if)#exit R1(config)#int lo 1 R1(config-if)#ip address 10.1.1.1 255.255.255.0 R1(config-if)#no shutdown R1(config-if)#exit R2#conf t R2(config)#int s1/0 R2(config-if)#ip address 10.1.102.2 255.255.255.248 R2(config-if)#no shutdown R2(config-if)#exit R2(config)#int s1/1 R2(config-if)#ip address 10.1.203.2 255.255.255.248 R2(config-if)#clock rate 128000 R2(config-if)#no shutdown R2(config-if)#exit R2(config)#int lo 2 R2(config-if)#ip address 10.2.2.2 255.255.255.0 R2(config-if)#no shutdown R2(config-if)#exit R3#conf t R3(config)#int s1/1 R3(config-if)#ip address 10.1.203.3 255.255.255.248 R3(config-if)#no shutdown R3(config-if)#exit R3(config)#int s1/2 R3(config-if)#ip address 10.1.103.3 255.255.255.248 R3(config-if)#clock rate 128000 R3(config-if)#no shutdown R3(config-if)#exit R3(config)#int s1/3 R3(config-if)#ip address 192.168.34.1 255.255.255.252 R3(config-if)#clock rate 128000 R3(config-if)#no shutdown R3(config-if)#exit R3(config)#int lo 3 R3(config-if)#ip address 10.3.3.3 255.255.255.0 R3(config-if)#no shutdown R3(config-if)#exit R4#conf t R4(config)#int s1/3 R4(config-if)#ip address 192.168.34.2 255.255.255.252 R4(config-if)#no shutdown R4(config-if)#exit R4(config)#int f0/0 R4(config-if)#ip address 192.168.14.2 255.255.255.252 R4(config-if)#no shutdown R4(config-if)#exit R4(config)#int lo 4 R4(config-if)#ip address 172.16.4.1 255.255.252.0 R4(config-if)#no shutdown R4(config-if)#exit R4(config)#int lo 8 R4(config-if)#ip address 172.16.8.1 255.255.252.0 R4(config-if)#no shutdown R4(config-if)#exit
2.- Configurar EIGRP SA 65001 en ITA. No informar las redes 192.168.14.0/ 30 y 192.168.34.0/30.
ACA CONFIGURAMOS EIGRP CON LA RED 10.0.0.0 O CON CADA RED CONECTADA DIRECTAMENTE.
LO HICE DE ESTA MANERA PORQUE ES MAS RAPIDO
OJO, ES SOLO EN LAS REDES DE ITA, LAS INTERFACES QUE VAN HACIA TDP NO SE INCLUYEN.
R1(config)#router eigrp 65001 R1(config-router)#no auto-summary R1(config-router)#network 10.0.0.0 R1(config-router)#exit R2(config)#router eigrp 65001 R2(config-router)#no auto-summary R2(config-router)#network 10.0.0.0 R2(config-router)#exit R3(config)#router eigrp 65001 R3(config-router)#no auto-summary R3(config-router)#network 10.0.0.0 R3(config-router)#exit
3.- Configurar IBGP en el SA 65001 en ITA (malla completa).
Usar la dirección de las interfaces loopback para la relación de vecindad.
Informar las direcciones de las redes de las loopback.
ESTA ES LA CONFIGURACION DE IBGP:
- SE AGREGAN LAS NEIGHBOR CON EL AS
- SE AGREGAN LAS NEIGHBOR CON EL LOOPBACK DE LA RED
- SE AGREGAN LAS NEIGHBOR INFORMANDO LA RED CON NEXT-HOP-SELF
R1(config)#router bgp 65001 R1(config-router)#neighbor 10.2.2.2 remote-as 65001 R1(config-router)#neighbor 10.2.2.2 update-source lo 1 R1(config-router)#neighbor 10.2.2.2 next-hop-self R1(config-router)#neighbor 10.3.3.3 remote-as 65001 R1(config-router)#neighbor 10.3.3.3 update-source lo 1 R1(config-router)#neighbor 10.3.3.3 next-hop-self R1(config-router)#exit R2(config)#router bgp 65001 R2(config-router)#neighbor 10.1.1.1 remote-as 65001 R2(config-router)#neighbor 10.1.1.1 update-source lo 2 R2(config-router)#neighbor 10.1.1.1 next-hop-self R2(config-router)#neighbor 10.3.3.3 remote-as 65001 R2(config-router)#neighbor 10.3.3.3 update-source lo 2 R2(config-router)#neighbor 10.3.3.3 next-hop-self R2(config-router)#exit R3(config)#router bgp 65001 R3(config-router)#neighbor 10.1.1.1 remote-as 65001 R3(config-router)#neighbor 10.1.1.1 update-source lo 3 R3(config-router)#neighbor 10.1.1.1 next-hop-self R3(config-router)#neighbor 10.2.2.2 remote-as 65001 R3(config-router)#neighbor 10.2.2.2 update-source lo 3 R3(config-router)#neighbor 10.2.2.2 next-hop-self R3(config-router)#exit
4.- Configurar EBGP entre el SA 650001 y el SA 65002. Todos los routers deben estar participando en el proceso BGP.
CONFIGURACION DE EBGP:
- SE AGREGAN LAS NEIGHBOR CON EL AS DEL VECINO
- SE AGREGAN LAS NETWORK DE CADA ROUTER
- ES POSIBLE AGREGAR LAS REDES DE LAS SERIALES, PERO NO ES NECESARIO (NO LAS AGREGUE)
R1(config)#router bgp 65001 R1(config-router)#neighbor 192.168.14.2 remote-as 65002 R1(config-router)#network 10.1.1.0 mask 255.255.255.0 R1(config-router)#exit
OJO CON ESTA PARTE. EL R2 NO TIENE NEIGHBOR CON TDP, PERO IGUAL SE INGRESA SU NETWORK A BGP O NO SERA VISTA ESA RED.
R2(config-router)#network 10.2.2.0 mask 255.255.255.0 R3(config)#router bgp 65001 R3(config-router)#neighbor 192.168.34.2 remote-as 65002 R3(config-router)#network 10.3.3.0 mask 255.255.255.0 R3(config-router)#exit R4(config)#router bgp 65002 R4(config-router)#neighbor 192.168.14.1 remote-as 65001 R4(config-router)#neighbor 192.168.34.1 remote-as 65001 R4(config-router)#network 172.16.4.0 mask 255.255.252.0 R4(config-router)#network 172.16.8.0 mask 255.255.252.0 R4(config-router)#exit
5.- Revisar la información de las tablas BGP y las tablas de enrutamiento.
R1(config)#do sh ip route 192.168.14.0/30 is subnetted, 1 subnets C 192.168.14.0 is directly connected, FastEthernet0/0 172.16.0.0/22 is subnetted, 2 subnets B 172.16.8.0 [20/0] via 192.168.14.2, 00:06:32 B 172.16.4.0 [20/0] via 192.168.14.2, 00:06:32 10.0.0.0/8 is variably subnetted, 6 subnets, 2 masks D 10.3.3.0/24 [90/2297856] via 10.1.103.3, 00:44:55, Serial1/2 D 10.2.2.0/24 [90/2297856] via 10.1.102.2, 00:44:55, Serial1/0 C 10.1.1.0/24 is directly connected, Loopback1 C 10.1.103.0/29 is directly connected, Serial1/2 C 10.1.102.0/29 is directly connected, Serial1/0 D 10.1.203.0/29 [90/2681856] via 10.1.103.3, 00:44:56, Serial1/2 [90/2681856] via 10.1.102.2, 00:44:56, Serial1/0 R1(config)#do sh ip bgp Network Next Hop Metric LocPrf Weight Path *> 10.1.1.0/24 0.0.0.0 0 32768 i r>i10.2.2.0/24 10.2.2.2 0 100 0 i r>i10.3.3.0/24 10.3.3.3 0 100 0 i * i172.16.4.0/22 10.3.3.3 0 100 0 65002 i *> 192.168.14.2 0 0 65002 i * i172.16.8.0/22 10.3.3.3 0 100 0 65002 i *> 192.168.14.2 0 0 65002 i *> 192.168.14.0/30 0.0.0.0 0 32768 i R2(config)#do sh ip route 192.168.14.0/30 is subnetted, 1 subnets B 192.168.14.0 [200/0] via 10.1.1.1, 00:07:43 172.16.0.0/22 is subnetted, 2 subnets B 172.16.8.0 [200/0] via 10.1.1.1, 00:07:12 B 172.16.4.0 [200/0] via 10.1.1.1, 00:07:12 10.0.0.0/8 is variably subnetted, 6 subnets, 2 masks D 10.3.3.0/24 [90/2297856] via 10.1.203.3, 00:45:36, Serial1/1 C 10.2.2.0/24 is directly connected, Loopback2 D 10.1.1.0/24 [90/2297856] via 10.1.102.1, 00:45:36, Serial1/0 D 10.1.103.0/29 [90/2681856] via 10.1.203.3, 00:45:36, Serial1/1 [90/2681856] via 10.1.102.1, 00:45:36, Serial1/0 C 10.1.102.0/29 is directly connected, Serial1/0 C 10.1.203.0/29 is directly connected, Serial1/1 R2(config)#do sh ip bgp Network Next Hop Metric LocPrf Weight Path r>i10.1.1.0/24 10.1.1.1 0 100 0 i *> 10.2.2.0/24 0.0.0.0 0 32768 i r>i10.3.3.0/24 10.3.3.3 0 100 0 i * i172.16.4.0/22 10.3.3.3 0 100 0 65002 i *>i 10.1.1.1 0 100 0 65002 i * i172.16.8.0/22 10.3.3.3 0 100 0 65002 i *>i 10.1.1.1 0 100 0 65002 i *>i192.168.14.0/30 10.1.1.1 0 100 0 i R3(config)#do sh ip route 192.168.14.0/30 is subnetted, 1 subnets B 192.168.14.0 [200/0] via 10.1.1.1, 00:08:25 172.16.0.0/22 is subnetted, 2 subnets B 172.16.8.0 [20/0] via 192.168.34.2, 00:07:54 B 172.16.4.0 [20/0] via 192.168.34.2, 00:07:54 10.0.0.0/8 is variably subnetted, 6 subnets, 2 masks C 10.3.3.0/24 is directly connected, Loopback3 D 10.2.2.0/24 [90/2297856] via 10.1.203.2, 00:46:18, Serial1/1 D 10.1.1.0/24 [90/2297856] via 10.1.103.1, 00:46:18, Serial1/2 C 10.1.103.0/29 is directly connected, Serial1/2 D 10.1.102.0/29 [90/2681856] via 10.1.203.2, 00:46:18, Serial1/1 [90/2681856] via 10.1.103.1, 00:46:18, Serial1/2 C 10.1.203.0/29 is directly connected, Serial1/1 192.168.34.0/30 is subnetted, 1 subnets C 192.168.34.0 is directly connected, Serial1/3 R3(config)#do sh ip bgp Network Next Hop Metric LocPrf Weight Path r>i10.1.1.0/24 10.1.1.1 0 100 0 i r>i10.2.2.0/24 10.2.2.2 0 100 0 i *> 10.3.3.0/24 0.0.0.0 0 32768 i * i172.16.4.0/22 10.1.1.1 0 100 0 65002 i *> 192.168.34.2 0 0 65002 i * i172.16.8.0/22 10.1.1.1 0 100 0 65002 i *> 192.168.34.2 0 0 65002 i *>i192.168.14.0/30 10.1.1.1 0 100 0 i R4(config)#do sh ip route 192.168.14.0/30 is subnetted, 1 subnets C 192.168.14.0 is directly connected, FastEthernet0/0 172.16.0.0/22 is subnetted, 2 subnets C 172.16.8.0 is directly connected, Loopback8 C 172.16.4.0 is directly connected, Loopback4 10.0.0.0/24 is subnetted, 3 subnets B 10.3.3.0 [20/0] via 192.168.34.1, 00:09:18 B 10.2.2.0 [20/0] via 192.168.14.1, 00:07:14 B 10.1.1.0 [20/0] via 192.168.14.1, 00:09:18 192.168.34.0/30 is subnetted, 1 subnets C 192.168.34.0 is directly connected, Serial1/3 R4(config)#do sh ip bgp Network Next Hop Metric LocPrf Weight Path * 10.1.1.0/24 192.168.34.1 0 65001 i *> 192.168.14.1 0 0 65001 i * 10.2.2.0/24 192.168.34.1 0 65001 i *> 192.168.14.1 0 65001 i * 10.3.3.0/24 192.168.14.1 0 65001 i *> 192.168.34.1 0 0 65001 i *> 172.16.4.0/22 0.0.0.0 0 32768 i *> 172.16.8.0/22 0.0.0.0 0 32768 i r 192.168.14.0/30 192.168.34.1 0 65001 i r> 192.168.14.1 0 0 65001 i
6.- Probar conectividad desde la red ITA a la red TDP, usar el comando ping y el comando traceroute.
LAS PRUEBAS DE PING Y TRACEROUTE SIEMPRE DEBEN SER HECHAS CON EL COMANDO SOURCE.
R1(config)#do ping 172.16.4.1 source 10.1.1.1 !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 12/32/60 ms R1(config)#do traceroute 172.16.4.1 source 10.1.1.1 1 192.168.14.2 44 msec 40 msec 28 msec R2(config)#do ping 172.16.4.1 source 10.2.2.2 !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 40/61/104 ms R2(config)#do traceroute 172.16.4.1 source 10.2.2.2 1 10.1.102.1 48 msec 36 msec 24 msec 2 192.168.14.2 124 msec 72 msec 64 msec R3(config)#do ping 172.16.4.1 source 10.3.3.3 !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 16/26/36 ms R3(config)#do traceroute 172.16.4.1 source 10.3.3.3 1 192.168.34.2 24 msec 40 msec 32 msec
7.- Probar conectividad desde la red TDP a la red ITA, usar el comando ping y el comando traceroute.
R4(config)#do ping 10.1.1.1 source 172.16.4.1 !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 24/36/52 ms R4(config)#do traceroute 10.1.1.1 source 172.16.4.1 1 192.168.14.1 24 msec 44 msec 12 msec R4(config)#do ping 10.2.2.2 source 172.16.4.1 !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 32/70/108 ms R4(config)#do traceroute 10.2.2.2 source 172.16.4.1 1 192.168.14.1 16 msec 28 msec 40 msec 2 10.1.102.2 124 msec 88 msec 52 msec R4(config)#do ping 10.3.3.3 source 172.16.4.1 !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 20/40/72 ms R4(config)#do traceroute 10.3.3.3 source 172.16.4.1 1 192.168.34.1 24 msec 40 msec 8 msec
8.- Si todo lo anterior se ha cumplido, entonces aplicar el atributo Weight para que la red TDP
se conecte a ITA por el enlace 192.168.14.0.
PARA DAR PRIORIDAD, SE DEBE DAR UN WEIGHT MAYOR.
R4(config-router)#neighbor 192.168.34.1 weight 100 R4(config-router)#neighbor 192.168.14.1 weight 200
OJO CON ESTO. SI REALIZAMOS UN CAMBIO EN BGP Y VEMOS QUE NO APARECEN, DEBEMOS APLICAR ESTE COMANDO: clear ip bgp *
ESTO BORRA LA INFORMACIÓN BGP Y SE DEBE ESPERAR UNOS SEGUNDOS PARA QUE LAS TABLAS DE BGP TENGAN CONVERGENCIA.
R4(config-router)#do clear ip bgp *
9.- Modificar el atributo Local Preference para que la red ITA prefiera el enlace 192.168.34.0 para conectarse con la red TPD.
PARA DAR PRIORIDAD, SE DEBE DAR UNA PREFERENCIA MAYOR.
R1(config)#route-map SECUNDARIO permit 10 R1(config-route-map)#set local-preference 150 R1(config-route-map)#exit R1(config)#router bgp 65001 R1(config-router)#neighbor 192.168.14.2 route-map SECUNDARIO in R1(config-router)#exit R3(config)#route-map PRIMARIO permit 10 R3(config-route-map)#set local-preference 125 R3(config-route-map)#exit R3(config)#router bgp 65001 R3(config-router)#neighbor 192.168.34.2 route-map PRIMARIO in R3(config-router)#exit R3(config)#do clear ip bgp * R3(config)#do sh ip route 192.168.14.0/30 is subnetted, 1 subnets B 192.168.14.0 [200/0] via 10.1.1.1, 00:02:43 172.16.0.0/22 is subnetted, 2 subnets B 172.16.8.0 [20/0] via 192.168.34.2, 00:03:44 B 172.16.4.0 [20/0] via 192.168.34.2, 00:03:44 10.0.0.0/8 is variably subnetted, 6 subnets, 2 masks C 10.3.3.0/24 is directly connected, Loopback3 D 10.2.2.0/24 [90/2297856] via 10.1.203.2, 01:59:25, Serial1/1 D 10.1.1.0/24 [90/2297856] via 10.1.103.1, 01:59:25, Serial1/2 C 10.1.103.0/29 is directly connected, Serial1/2 D 10.1.102.0/29 [90/2681856] via 10.1.203.2, 01:59:25, Serial1/1 [90/2681856] via 10.1.103.1, 01:59:25, Serial1/2 C 10.1.203.0/29 is directly connected, Serial1/1 192.168.34.0/30 is subnetted, 1 subnets C 192.168.34.0 is directly connected, Serial1/3