Router>enable Router#write erase Erasing the nvram filesystem will remove all configuration files! Continue? [confirm] [OK] Erase of nvram: complete %SYS-7-NV_BLOCK_INIT: Initialized the geometry of nvram Router#reload Proceed with reload? [confirm]
Router>enable Router#configure terminal Enter configuration commands, one per line. End with CNTL/Z. Router(config)#hostname NombreRouter NombreRouter(config)#exit NombreRouter# %SYS-5-CONFIG_I: Configured from console by console NombreRouter#exit
Router>enable Router#configure terminal Enter configuration commands, one per line. End with CNTL/Z. Router(config)#interface g0/0 Router(config-if)#ip address 192.168.1.1 255.255.255.0 Router(config-if)#no shutdown Router(config-if)# %LINK-5-CHANGED: Interface GigabitEthernet0/0, changed state to up Router(config-if)#exit Router(config)#ip dhcp pool vlan1 Router(dhcp-config)#network 192.168.1.0 255.255.255.0 Router(dhcp-config)#default-router 192.168.1.1 Router(dhcp-config)#dns-server 8.8.8.8 Router(dhcp-config)#exit Router#configure terminal Enter configuration commands, one per line. End with CNTL/Z. Router(config)#ip dhcp excluded-address 192.168.1.1 Router(config)#exit Router# %SYS-5-CONFIG_I: Configured from console by console Router#exit
Router1#configure terminal Router1(config)#interface g0/0.10 Router1(config-subif)# %LINK-5-CHANGED: Interface GigabitEthernet0/0.10, changed state to up %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/0.10, changed state to up Router1(config-subif)#encapsulation dot1Q 10 Router1(config-subif)#ip add 192.168.10.1 255.255.255.0 Router1(config-subif)#exit Router1(config)#ip dhcp excluded-address 192.168.10.1 Router1(config)#ip dhcp pool vlan10 Router1(dhcp-config)#network 192.168.10.0 255.255.255.0 Router1(dhcp-config)#default-router 192.168.10.1 Router(dhcp-config)#dns-server 8.8.8.8 Router1(dhcp-config)#exit Router1(config)# Router1(config)#interface g0/0.20 Router1(config-subif)# %LINK-5-CHANGED: Interface GigabitEthernet0/0.20, changed state to up %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/0.20, changed state to up Router1(config-subif)#encapsulation dot1Q 20 Router1(config-subif)#ip address 192.168.20.1 255.255.255.0 Router1(config-subif)#exit Router1(config)#ip dhcp excluded-address 192.168.20.1 Router1(config)#ip dhcp pool vlan20 Router1(dhcp-config)#network 192.168.20.0 255.255.255.0 Router1(dhcp-config)#default-router 192.168.20.1 Router(dhcp-config)#dns-server 8.8.8.8 Router1(dhcp-config)#exit Router1(config)#
Router#copy running-config startup-config Destination filename [startup-config]? Building configuration... [OK] Router#
Switch> Switch>enable Switch#configure terminal Enter configuration commands, one per line. End with CNTL/Z. Switch(config)#hostname Switch1 Switch1(config)#
Switch1>enable Switch1#vlan database % Warning: It is recommended to configure VLAN from config mode, as VLAN database mode is being deprecated. Please consult user documentation for configuring VTP/VLAN in config mode. Switch1(vlan)#vlan 10 name Ciencias VLAN 10 added: Name: Ciencias Switch1(vlan)#vlan 20 name Matematicas VLAN 20 added: Name: Matematicas Switch1(vlan)#exit APPLY completed. Exiting.... Switch1#exit
Switch1(config)#interface g0/1 Switch1(config-if)#switchport trunk allowed vlan add 1,10,20 Switch1(config-if)#switchport mode trunk Switch1(config-if)# %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/1, changed state to down %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/1, changed state to up Switch1(config-if)#exit Switch1(config)#
Switch1(config)#interface f0/1 Switch1(config-if)#switchport access vlan 10 Switch1(config-if)#exit Switch1(config)#interface f0/2 Switch1(config-if)#switchport access vlan 20 Switch1(config-if)#exit Switch1(config)#==== Guardar la configuración del Switch ====
Switch1#copy running-config startup-config Destination filename [startup-config]? Building configuration... [OK] Switch1#
Click en el pc Pestaña Desktop IP Configuration DHCP Esperar un poco y aparecerá la ip 192.168.1.x