Configuramos routers
R1,R2,R3:enable
conf term
no ip domain-lookup
enable secret class
banner motd "Acceso No Autorizado"
line con 0
(excec-timeout 0 0)
logging synchronous
password cisco
login
line vty 0 4 (Router)
line vty 0 15 (Switch)
hostname R1/R2/R3/S1/S2/S3
Configuramos interfaces
R1,
!
interface FastEthernet0/1
no ip address
no shutdown
!
interface FastEthernet0/1.10
encapsulation dot1Q 10
ip address 192.168.10.1 255.255.255.0
!
interface FastEthernet0/1.12
encapsulation dot1Q 12
ip address 10.12.12.1 255.255.255.0
!
interface FastEthernet0/1.13
encapsulation dot1Q 13
ip address 10.13.13.1 255.255.255.0
!
interface Serial0/0/0
ip address 10.1.1.1 255.255.255.252
no shutdown
clock rate 64000
!
R2,
!
interface FastEthernet0/1
no ip address
no shutdown
!
interface FastEthernet0/1.12
encapsulation dot1Q 12
ip address 10.12.12.2 255.255.255.0
!
interface FastEthernet0/1.20
encapsulation dot1Q 20
ip address 192.168.20.1 255.255.255.0
!
interface Serial0/0/0
ip address 10.1.1.2 255.255.255.252
no shutdown
!
interface Serial0/0/1
ip address 10.2.2.1 255.255.255.252
clock rate 64000
no shutdown
R3,
interface FastEthernet0/1
no ip address
no shutdown
!
interface FastEthernet0/1.13
encapsulation dot1Q 13
ip address 10.13.13.3 255.255.255.0
!
interface FastEthernet0/1.30
encapsulation dot1Q 30
ip address 192.168.30.1 255.255.255.0
!
interface Serial0/0/1
ip address 10.2.2.2 255.255.255.252
no shutdown
!
Creamos VLANs
S1(config)# vlan 10,12,13,20,30Configuramos el mantenimiento de VLANs
S1(config)#interface vlan10S1(config-if)#ip address 192.168.10.2 255.255.255.0
S2(config)#interface vlan20
S2(config-if)#ip address 192.168.20.2 255.255.255.0
S3(config)#interface vlan30
S3(config-if)#ip address 192.168.30.2 255.255.255.0
Configuramos el STP
en S1(config)# spanning-tree vlan 1-1000 root primary
(Tambien podemos poner priority 4096)
Verificamos que S1 es root con el comando:
S1#show spanning-tree summary
"Root bridge for: VLAN0001"
(Tambien podemos poner priority 4096)
Verificamos que S1 es root con el comando:
S1#show spanning-tree summary
"Root bridge for: VLAN0001"
Configuramos el VTP
S1
vtp mode server
vtp domain cisco
vtp password cisco
S2, S3:
vtp mode client
vtp domain cisco
vtp password cisco
Asignamos puertos a las VLANs y configuramos access y trunks
S1:
interface FastEthernet0/1
switchport trunk allowed vlan 10,12,13
switchport mode trunk
interface FastEthernet0/2
switchport access vlan 10
switchport mode access
interface GigabitEthernet0/1
switchport trunk allowed vlan 1,12
switchport mode trunk
interface GigabitEthernet0/2
switchport trunk allowed vlan 1,13
switchport mode trunk
S2:
interface FastEthernet0/1
switchport trunk allowed vlan 12,20
switchport mode trunk
interface FastEthernet0/2
switchport access vlan 20
switchport mode access
interface GigabitEthernet0/1
switchport trunk allowed vlan 12
switchport mode trunk
S3:
interface FastEthernet0/1
switchport trunk allowed vlan 13,30
switchport mode trunk
interface FastEthernet0/2
switchport access vlan 30
switchport mode access
interface GigabitEthernet0/1
switchport trunk allowed vlan 13
switchport mode trunk
interface FastEthernet0/1
switchport trunk allowed vlan 10,12,13
switchport mode trunk
interface FastEthernet0/2
switchport access vlan 10
switchport mode access
interface GigabitEthernet0/1
switchport trunk allowed vlan 1,12
switchport mode trunk
interface GigabitEthernet0/2
switchport trunk allowed vlan 1,13
switchport mode trunk
S2:
interface FastEthernet0/1
switchport trunk allowed vlan 12,20
switchport mode trunk
interface FastEthernet0/2
switchport access vlan 20
switchport mode access
interface GigabitEthernet0/1
switchport trunk allowed vlan 12
switchport mode trunk
S3:
interface FastEthernet0/1
switchport trunk allowed vlan 13,30
switchport mode trunk
interface FastEthernet0/2
switchport access vlan 30
switchport mode access
interface GigabitEthernet0/1
switchport trunk allowed vlan 13
switchport mode trunk
Configuramos RIP
R1
router rip
version 2
no auto-summary
network 10.0.0.0
network 192.168.10.0
R2
router rip
version 2
no auto-summary
network 10.0.0.0
network 192.168.20.0
R3
router rip
version 2
not auto-summary
network 10.0.0.0
network 192.168.30.0
Existirán entonces tantas VLANs como SUB.INTERFACES.
Si hacemos IP ROUTING en R1:
Vemos cómo se routea y cómo recibe la información de:
R3 fa
R2 fa
R2 serial
*****Recomendable hacerse esta práctica varias veces sin mirar
Configuramos OSPF
R1
router ospf 1
network 10.1.1.0 0.0.0.3 area 0
network 10.12.12.0 0.0.0.255 area 0
network 10.13.13.0 0.0.0.255 area 0
network 192.168.10.0 0.0.0.255 area 0
R2
router ospf 1
network 10.1.1.0 0.0.0.3 area 0
network 10.2.2.0 0.0.0.3 area 0
network 10.12.12.0 0.0.0.255 area 0
network 192.168.20.0 0.0.0.255 area 0
R3
router ospf 1
network 10.2.2.0 0.0.0.3 area 0
network 10.13.13.0 0.0.0.255 area 0
network 192.168.30.0 0.0.0.255 area 0
Configuramos EIGRP
R1
router eigrp 10
no auto-summary
network 10.1.1.0 0.0.0.3
network 10.12.12.0 0.0.0.255
network 10.13.13.0 0.0.0.255
network 192.168.10.0 0.0.0.255
R2
router eigrp 10
no auto-summary
network 10.1.1.0 0.0.0.3
network 10.2.2.0 0.0.0.3
network 10.12.12.0 0.0.0.255
network 192.168.20.0 0.0.0.255
R3
router eigrp 10
no auto-summary
network 10.2.2.0 0.0.0.3
network 10.13.13.0 0.0.0.255
network 192.168.30.0 0.0.0.255CONCLUSIÓN:
Al añadir sub.interfaces al router "es" como si añadieramos IPs al switch, es una manera de decirlo. En realidad el ROUTER,majena IPs que el SWITCH las recibe como VLANs si se configuran.Existirán entonces tantas VLANs como SUB.INTERFACES.
Si hacemos IP ROUTING en R1:
Vemos cómo se routea y cómo recibe la información de:
R3 fa
R2 fa
R2 serial
*****Recomendable hacerse esta práctica varias veces sin mirar