EJERCICIOS DE SUBREDES CON CUADRO DE DATOS
Dividir la red 170.20.0.0/16 en 5 subredes y armar el cuadro de datos.
-En primer lugar , para realizar este ejercicio hay que usar la siguiente formula:
#subredes= 2 ^ n
n=Numero de bits prestados de la porcion de host
-En nuestro caso , n=3 porque el numero debe ser mayor o igual al numero de subredes que en este caso es 5.
5=2^n
n=3
-Ya tenemos el valor de los bits prestados y la division de las subredes será así:
-La mascara predeterminada de la red que nos dan es 16 bits de valor 1 , es decir :
11111111.11111111.11111111.00000000
(La porcion de red es hasta el ultimo 1 y los ceros que le siguen la porcion de host)
-Como el valor de n es 3 son los bits prestados de valor 0 que ahora serán 1 a la porcion de host. entonces:
11111111.11111111.11111111.11100000
-La nueva mascara es de 19 bits de valor 1 y convertido a decimal sería:
255.255.224.0
-Ahora , para hallar las subredes con su rango de Ip´s usamos la siguiente formula:
256-224 = 32
*La primera Subred seria la que nos dan en el ejercicio, luego va a aumentar deacuerdo a la diferencia que hemos hallado con la formula anterior,en este caso es 32 en el tercer octeto:
SUBRED RANGO DE IP
170.20.0.0 170.20.0.1-170.20.31.254
+32
170.20.32.0 170.20.32.1-170.20.63.254
+32
170.20.64.0 170.20.64.1-170.20.95.254
+32
170.20.96.0 170.20.96.1-170.20.127.254
+32
170.20.128.0 170.20.128.1-170.20.159.254
*Despues, para hacer el ejercicio con mas orden y menos confusion a la hora de asignar los datos de los dispositivos , realizaremos un cuadro de datos:
*CONFIGURACION EN PACKET TRACER:
Asignaremos los datos correspondientes a los dispodsitivos de acuerdo a nuestro cuadro de datos.
Router1:
Router>enable
Router#conf term
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#interface fastethernet 0/0
Router(config-if)#ip address 170.20.0.1 255.255.224.0
Router(config-if)#no shutdown
Router(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
Router(config-if)#exit
Router(config)#interface fastethernet 0/1
Router(config-if)#ip address 170.20.32.1 255.255.224.0
Router(config-if)#no shutdown
Router(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up
Router(config-if)#exit
Router(config)#interface serial 0/0/0
Router(config-if)#ip address 170.20.64.1 255.255.224.0
Router(config-if)#clock rate 128000
Router(config-if)#no shutdown
%LINK-5-CHANGED: Interface Serial0/0/0, changed state to down
Router(config-if)#
Router(config-if)#end
Router#
%SYS-5-CONFIG_I: Configured from console by console
Router#copy run sta
Destination filename [startup-config]?
Building configuration...
[OK]
Router#
Router2:
Router>enable
Router#conf term
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#interface fastethernet 0/0
Router(config-if)#ip address 170.20.96.1 255.255.224.0
Router(config-if)#no shutdown
Router(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
Router(config-if)#exit
Router(config)#interface fastethernet 0/1
Router(config-if)#ip address 170.20.128.1 255.255.224.0
Router(config-if)#no shutdown
Router(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up
Router(config-if)#exit
Router(config)#interface serial 0/0/0
Router(config-if)#ip address 170.20.64.2 255.255.224.0
Router(config-if)#no shutdown
Router(config-if)#
%LINK-5-CHANGED: Interface Serial0/0/0, changed state to up
Router(config-if)#end
Router#
%SYS-5-CONFIG_I: Configured from console by console
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0/0, changed state to up
Router#copy run sta
Destination filename [startup-config]?
Building configuration...
[OK]
Router#
Switch1:
Switch>enable
Switch#conf ter
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#interface VLAN1
Switch(config-if)#ip address 170.20.0.2 255.255.224.0
Switch(config-if)#no shutdown
Switch(config-if)#
%LINK-5-CHANGED: Interface Vlan1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan1, changed state to up
Switch(config-if)#exit
Switch(config)#ip default-gateway 170.20.0.1
Switch(config)#end
Switch#
%SYS-5-CONFIG_I: Configured from console by console
Switch#copy run sta
Destination filename [startup-config]?
Building configuration...
[OK]
Switch#
Switch2:
Switch>enable
Switch#conf ter
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#interface VLAN1
Switch(config-if)#ipaddress 170.20.32.2 255.255.224.0
^
% Invalid input detected at '^' marker.
Switch(config-if)#ip address 170.20.32.2 255.255.224.0
Switch(config-if)#no shutdown
Switch(config-if)#
%LINK-5-CHANGED: Interface Vlan1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan1, changed state to up
Switch(config-if)#exit
Switch(config)#ip default-gateway 170.20.32.1
Switch(config)#end
Switch#
%SYS-5-CONFIG_I: Configured from console by console
Switch#copy run sta
Destination filename [startup-config]?
Building configuration...
[OK]
Switch#
Switch3:
Switch>enable
Switch#conf ter
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#interface VLAN1
Switch(config-if)#ip address 170.20.96.2 255.255.224.0
Switch(config-if)#no shutdown
Switch(config-if)#
%LINK-5-CHANGED: Interface Vlan1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan1, changed state to up
Switch(config-if)#exit
Switch(config)#
Switch(config)#ip default-gateway 170.20.96.1
Switch(config)#end
Switch#
%SYS-5-CONFIG_I: Configured from console by console
Switch#copy run sta
Destination filename [startup-config]?
Building configuration...
[OK]
Switch#
Switch4:
Switch>enable
Switch#conf ter
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#interface fastethernet 0/0
%Invalid interface type and number
Switch(config)#interface VLAN1
Switch(config-if)#ip address 170.20.128.2 255.255.224.0
Switch(config-if)#no shutdown
Switch(config-if)#
%LINK-5-CHANGED: Interface Vlan1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan1, changed state to up
Switch(config-if)#exit
Switch(config)#ip default-gateway 170.20.128.1
Switch(config)#end
Switch#
%SYS-5-CONFIG_I: Configured from console by console
Switch#copy run sta
Destination filename [startup-config]?
Building configuration...
[OK]
Switch#
PC1:
IP:170.20.0.3
MASCARA:255.255.224.0
GATEWAY:170.20.0.1
PC2:
IP:170.20.32.3
Mascara: 255.255.224.0
Gateway: 170.20.32.1
PC3:
IP: 170.20.96.3
Mascara: 255.255.224.0
Gateway: 170.20.96.1
PC4:
IP:170.20.128.3
Mascara: 255.255.224.0
Gateway: 170.20.128.1
*Por ultimo , debemos configurar el enrutamiento en los 2 router para que las subredes se puedan comunicar:
Router1:
Router(config)#ip route 170.20.96.0 255.255.224.0 170.20.64.2
Router(config)#ip route 170.20.128.0 255.255.224.0 170.20.64.2
Router(config)#exit
Router#
%SYS-5-CONFIG_I: Configured from console by console
Router#copy run sta
Destination filename [startup-config]?
Building configuration...
[OK]
Router#
Router2:
Router(config)#ip route 170.20.0.0 255.255.224.0 170.20.64.1
Router(config)#ip route 170.20.32.0 255.255.224.0 170.20.64.1
Router(config)#end
Router#
%SYS-5-CONFIG_I: Configured from console by console
Router#copy run sta
Destination filename [startup-config]?
Building configuration...
[OK]
Router#
*Con estas configuraciones todas las subredes ya se pueden comunicar entre sí
Ejercicio2:
Dividir la red 170.20.0.0/16 en 5 subredes teniendo en cuenta el numero de host que se requieren.
Primero debemos guiarnos de esta tabla , ya que ahora no todos compartiran la misma mascara.De acuerdo al numero de host que se requiera tenrá su respectiva mascara:
Despues construimos nuestro cuadro de datos:
Configuracion en Packet Tracer:Asignaremos los datos correspondientes a los dispodsitivos de acuerdo a nuestro cuadro de datos.
Router1:
Router>enable
Router#conf ter
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#interface fastethernet 0/0
Router(config-if)#ip address 170.20.12.129 255.255.255.224
Router(config-if)#no shutdown
Router(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
Router(config-if)#exit
Router(config)#interface fastethernet 0/1
Router(config-if)#ip address 170.20.12.1 255.255.255.128
Router(config-if)#no shutdown
Router(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up
Router(config-if)#exit
Router(config)#
Router(config)#interface serial 0/0/0
Router(config-if)#ip address 170.20.12.161 255.255.255.252
Router(config-if)#clock rate 128000
Router(config-if)#no shutdown
%LINK-5-CHANGED: Interface Serial0/0/0, changed state to down
Router(config-if)#
Router(config-if)#end
Router#
%SYS-5-CONFIG_I: Configured from console by console
Router#copy run sta
Destination filename [startup-config]?
Building configuration...
[OK]
Router#
Router2:
Router>enable
Router#conf ter
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#interface fastethernet 0/0
Router(config-if)#ip address 170.20.8.1 255.255.252.0
Router(config-if)#no shutdown
Router(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
Router(config-if)#exit
Router(config)#
Router(config)#interface fastethernet 0/1
Router(config-if)#ip address 170.20.8.1 255.255.252.0
% 170.20.8.0 overlaps with FastEthernet0/0
Router(config-if)#ip address 170.20.0.1 255.255.248.0
Router(config-if)#no shutdown
Router(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up
Router(config-if)#exit
Router(config)#
Router(config)#interface serial 0/0/0
Router(config-if)#ip address 170.20.12.162 255.255.255.252
Router(config-if)#no shutdown
Router(config-if)#
%LINK-5-CHANGED: Interface Serial0/0/0, changed state to up
Router(config-if)#end
Router#
%SYS-5-CONFIG_I: Configured from console by console
Router#copy run sta
Destination filename [startup-config]?
Building configuration...
[OK]
Switch1:
Switch>enable
Switch#conf ter
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#interface VLAN1
Switch(config-if)#ip address 170.20.12.130 255.255.255.224
Switch(config-if)#no shutdown
Switch(config-if)#
%LINK-5-CHANGED: Interface Vlan1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan1, changed state to up
Switch(config-if)#exit
Switch(config)#
Switch(config)#ip default-gateway 170.20.12.129
Switch(config)#end
Switch#
%SYS-5-CONFIG_I: Configured from console by console
Switch#copy run sta
Destination filename [startup-config]?
Building configuration...
[OK]
Switch#
Switch2:
Switch>enable
Switch#conf ter
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#interface VLAN1
Switch(config-if)#ip address 170.20.12.2 255.255.255.128
Switch(config-if)#no shutdown
Switch(config-if)#
%LINK-5-CHANGED: Interface Vlan1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan1, changed state to up
Switch(config-if)#exit
Switch(config)#
Switch(config)#ip default-gateway 170.20.12.1
Switch(config)#end
Switch#
%SYS-5-CONFIG_I: Configured from console by console
Switch#copy run sta
Destination filename [startup-config]?
Building configuration...
[OK]
Switch#
Switch3:
Switch>enable
Switch#conf terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#
Switch(config)#interface fastethernet 0/0
%Invalid interface type and number
Switch(config)#interface VLAN1
Switch(config-if)#ip address 170.20.8.2 255.255.252.0
Switch(config-if)#no shutdown
Switch(config-if)#
%LINK-5-CHANGED: Interface Vlan1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan1, changed state to up
Switch(config-if)#exit
Switch(config)#
Switch(config)#ip default-gateway 170.20.8.1
Switch(config)#end
Switch#
%SYS-5-CONFIG_I: Configured from console by console
Switch#copy run sta
Destination filename [startup-config]?
Building configuration...
[OK]
Switch#
Switch4:
Switch>enable
Switch#conf term
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#interface VLAN1
Switch(config-if)#ip address 170.20.0.2 255.255.248.0
Switch(config-if)#no shutdown
Switch(config-if)#
%LINK-5-CHANGED: Interface Vlan1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan1, changed state to up
Switch(config-if)#exit
Switch(config)#ip default-gateway 170.20.0.1
Switch(config)#end
Switch#
%SYS-5-CONFIG_I: Configured from console by console
Switch#copy run sta
Destination filename [startup-config]?
Building configuration...
[OK]
Switch#
*Por ultimo , debemos configurar el enrutamiento para que las subredes se puedan comunicar:
Router1:
Router(config)#ip route 170.20.8.0 255.255.252.0 170.20.12.162
Router(config)#ip route 170.20.0.0 255.255.248.0 170.20.12.162
Router(config)#exit
Router#
%SYS-5-CONFIG_I: Configured from console by console
Router#copy run sta
Destination filename [startup-config]?
Building configuration...
[OK]
Router#
Router2:
Router(config)#ip route 170.20.12.128 255.255.255.224 170.20.12.161
Router(config)#ip route 170.20.12.0 255.255.252.0 170.20.12.161
Router(config)#exit
Router#
%SYS-5-CONFIG_I: Configured from console by console
Router#copy run sta
Destination filename [startup-config]?
Building configuration...
[OK]
Router#
*Con estas configuraciones todas las subredes ya se pueden comunicar entre sí.