Configuración de Routers y Servidor en Red RIP v2: Ejemplo Práctico con Subredes y VLSM
Configuración de Routers y Servidor en una Red con RIP v2
A continuación se presentan las configuraciones de los dispositivos BRANCH1, BRANCH2, HQ2 y SERVER, con sus respectivas interfaces, direccionamiento IP y protocolos de enrutamiento.
Configuración de BRANCH1
Equipo con RIP versión 2, CDP habilitado globalmente y cuatro interfaces configuradas (dos FastEthernet y dos Serial).
BRANCH1>en
BRANCH1#conf t
BRANCH1(config)#hostname BRANCH1
BRANCH1(config)#banner motd #PROPIEDAD PRIVADA#
BRANCH1(config)#cdp run
BRANCH1(config)#interface FastEthernet0/0
BRANCH1(config-if)#ip address 172.14.74.1 255.255.255.0
BRANCH1(config-if)#no cdp enable
BRANCH1(config-if)#no shutdown
BRANCH1(config-if)#exit
BRANCH1(config)#interface FastEthernet0/1
BRANCH1(config-if)#ip address 172.14.75.1 255.255.255.0
BRANCH1(config-if)#no cdp enable
BRANCH1(config-if)#no shutdown
BRANCH1(config-if)#exit
BRANCH1(config)#interface Serial0/0
BRANCH1(config-if)#ip address 172.14.76.198 255.255.255.252
BRANCH1(config-if)#cdp enable
BRANCH1(config-if)#no shutdown
BRANCH1(config-if)#exit
BRANCH1(config)#interface Serial0/1
BRANCH1(config-if)#ip address 172.14.76.205 255.255.255.252
BRANCH1(config-if)#clock rate 128000
BRANCH1(config-if)#cdp enable
BRANCH1(config-if)#no shutdown
BRANCH1(config-if)#exit
BRANCH1(config)#router rip
BRANCH1(config-router)#version 2
BRANCH1(config-router)#no auto-summary
BRANCH1(config-router)#network 172.14.76.196
BRANCH1(config-router)#network 172.14.76.204
BRANCH1(config-router)#network 172.14.74.0
BRANCH1(config-router)#network 172.14.75.0
BRANCH1(config-router)#exit
BRANCH1(config)#exit
BRANCH1#write (guarda la configuración)
Configuración de BRANCH2
Router con RIP v2 y una interfaz LAN con máscara /23, además de dos enlaces seriales hacia la red WAN.
BRANCH2>en
BRANCH2#conf t
BRANCH2(config)#hostname BRANCH2
BRANCH2(config)#banner motd #PROPIEDAD PRIVADA#
BRANCH2(config)#cdp run
BRANCH2(config)#interface FastEthernet0/0
BRANCH2(config-if)#ip address 172.14.72.1 255.255.254.0
BRANCH2(config-if)#no cdp enable
BRANCH2(config-if)#no shutdown
BRANCH2(config-if)#exit
BRANCH2(config)#interface Serial0/0
BRANCH2(config-if)#ip address 172.14.76.202 255.255.255.252
BRANCH2(config-if)#cdp enable
BRANCH2(config-if)#no shutdown
BRANCH2(config-if)#exit
BRANCH2(config)#interface Serial0/1
BRANCH2(config-if)#ip address 172.14.76.206 255.255.255.252
BRANCH2(config-if)#cdp enable
BRANCH2(config-if)#no shutdown
BRANCH2(config-if)#exit
BRANCH2(config)#router rip
BRANCH2(config-router)#version 2
BRANCH2(config-router)#no auto-summary
BRANCH2(config-router)#network 172.14.76.200
BRANCH2(config-router)#network 172.14.76.204
BRANCH2(config-router)#network 172.14.72.0
BRANCH2(config-router)#exit
BRANCH2(config)#exit
BRANCH2#write
Configuración de HQ2 (Casa Matriz)
Router de la sede central, con salida a Internet mediante ruta por defecto y rutas estáticas hacia las sucursales.
HQ2>en
HQ2#conf t
HQ2(config)#hostname HQ2
HQ2(config)#banner motd #PROPIEDAD PRIVADA#
HQ2(config)#cdp run
HQ2(config)#interface FastEthernet0/0
HQ2(config-if)#ip address 172.14.76.1 255.255.255.128
HQ2(config-if)#no cdp enable
HQ2(config-if)#no shutdown
HQ2(config-if)#exit
HQ2(config)#interface FastEthernet0/1
HQ2(config-if)#ip address 172.14.76.209 255.255.255.252
HQ2(config-if)#cdp enable
HQ2(config-if)#no shutdown
HQ2(config-if)#exit
HQ2(config)#interface Serial0/0
HQ2(config-if)#ip address 200.80.0.18 255.255.255.252
HQ2(config-if)#no cdp enable
HQ2(config-if)#no shutdown
HQ2(config-if)#exit
HQ2(config)#interface Serial0/1
HQ2(config-if)#ip address 172.14.76.194 255.255.255.252
HQ2(config-if)#cdp enable
HQ2(config-if)#no shutdown
HQ2(config-if)#exit
HQ2(config)#ip route 0.0.0.0 0.0.0.0 200.80.0.17 (ruta por defecto)
HQ2(config)#ip route 172.14.72.0 255.255.252.0 172.14.76.193
HQ2(config)#ip route 172.14.74.0 255.255.254.0 172.14.76.193
HQ2(config)#ip route 172.14.76.128 255.255.255.192 172.14.76.210
HQ2(config)#exit
HQ2#write
Configuración de SERVER
Servidor conectado a la red de la sede central, con rutas estáticas que apuntan al router HQ2.
SERVER>en
SERVER#conf t
SERVER(config)#hostname SERVER
SERVER(config)#banner motd #PROPIEDAD PRIVADA#
SERVER(config)#cdp run
SERVER(config)#interface FastEthernet0/0
SERVER(config-if)#ip address 172.14.76.129 255.255.255.192
SERVER(config-if)#no cdp enable
SERVER(config-if)#no shutdown
SERVER(config-if)#exit
SERVER(config)#interface FastEthernet0/1
SERVER(config-if)#ip address 172.14.76.210 255.255.255.252
SERVER(config-if)#cdp enable
SERVER(config-if)#no shutdown
SERVER(config-if)#exit
SERVER(config)#ip route 0.0.0.0 0.0.0.0 172.14.76.209
SERVER(config)#ip route 172.14.76.0 255.255.255.128 172.14.76.209
SERVER(config)#ip route 172.14.72.0 255.255.252.0 172.14.76.209
SERVER(config)#ip route 172.14.74.0 255.255.254.0 172.14.76.209
SERVER(config)#exit
SERVER#write (equivale a: copy running-config startup-config)
Tablas de Referencia: Máscaras de Subred
Las siguientes tablas relacionan la máscara en binario, su equivalente decimal, la notación CIDR y el número total de direcciones IP disponibles.
Máscaras de Subred (de /8 a /32)
11111111.00000000.00000000.00000000 — 255.0.0.0 — /8 — 16777216
11111111.10000000.00000000.00000000 — 255.128.0.0 — /9 — 8388608
11111111.11000000.00000000.00000000 — 255.192.0.0 — /10 — 4194304
11111111.11100000.00000000.00000000 — 255.224.0.0 — /11 — 2097152
11111111.11110000.00000000.00000000 — 255.240.0.0 — /12 — 1048576
11111111.11111000.00000000.00000000 — 255.248.0.0 — /13 — 524288
11111111.11111100.00000000.00000000 — 255.252.0.0 — /14 — 262144
11111111.11111110.00000000.00000000 — 255.254.0.0 — /15 — 131072
11111111.11111111.00000000.00000000 — 255.255.0.0 — /16 — 65536
11111111.11111111.10000000.00000000 — 255.255.128.0 — /17 — 32768
11111111.11111111.11000000.00000000 — 255.255.192.0 — /18 — 16384
11111111.11111111.11100000.00000000 — 255.255.224.0 — /19 — 8192
11111111.11111111.11110000.00000000 — 255.255.240.0 — /20 — 4096
11111111.11111111.11111000.00000000 — 255.255.248.0 — /21 — 2048
11111111.11111111.11111100.00000000 — 255.255.252.0 — /22 — 1024
11111111.11111111.11111110.00000000 — 255.255.254.0 — /23 — 512
11111111.11111111.11111111.00000000 — 255.255.255.0 — /24 — 256
11111111.11111111.11111111.10000000 — 255.255.255.128 — /25 — 128
11111111.11111111.11111111.11000000 — 255.255.255.192 — /26 — 64
11111111.11111111.11111111.11100000 — 255.255.255.224 — /27 — 32
11111111.11111111.11111111.11110000 — 255.255.255.240 — /28 — 16
11111111.11111111.11111111.11111000 — 255.255.255.248 — /29 — 8
11111111.11111111.11111111.11111100 — 255.255.255.252 — /30 — 4
11111111.11111111.11111111.11111110 — 255.255.255.254 — /31 — 2
11111111.11111111.11111111.11111111 — 255.255.255.255 — /32 — 0
Clases de Red y Número de Hosts
Las clases A, B y C son las redes tradicionales con máscaras por defecto de /8, /16 y /24 respectivamente.
Clase A — 255.0.0.0 — /8 — 16777216 direcciones
Clase B — 255.255.0.0 — /16 — 65536 direcciones
Clase C — 255.255.255.0 — /24 — 256 direcciones
Recursos Adicionales
Para practicar el cálculo de subredes y VLSM, se recomienda consultar las siguientes herramientas en línea:
Calculadora IP — aprendaredes.com
Calculadora VLSM — gtcc-it.net