Páginas

sábado, 27 de febrero de 2021

Configurar VLAN Trunks y Routing Cisco

Packet Tracer 7


1.- En todos los Switches de Valencia, configurar Trunk utilizando trunk encapsulation, y asegúrese de que el trunk no se convierta dinámicamente en un puerto de acceso.

2.- Crear VLANs 10 (STATIC) 10.16.0.0/24, 20 (VoIP) 10.16.2.0/24, 30 (PUBLIC) 10.16.4.0/23, 40 (CLIENT) 10.16.6.0/23 en todos los Switches manualmente o utilizando VTP.

3.- Limitar todos los Trunks para llevar sólo VLANs 1, 10, 20.

4.- Configurar R1-AS como un Router on a Stick (ROAS) que proporcione enrutamiento entre clientes en VLAN 10 y VLAN 20.

Configuración inicial

R1#wrt
Translating "wit"...domain server (255.255.255.255)
% Unknown command or computer name, or unable to find computer address

Si no necesita tener un servidor DNS configurado para su router, utilice el comando no ip domain-lookup para deshabilitar el proceso de traducción de DNS:

Enter configuration commands, one per line.  End with CNTL/Z.
RT01-VA(config)#no ip domain-lookup 
RT01-VA(config)#do wri
Building configuration...
[OK]
RT01-VA(config)#

MAN#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
MAN(config)#no ip domain-lookup
MAN(config)#do wri
Building configuration...
[OK]
MAN(config)#

RT02-BCN#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
RT02-BCN(config)#no ip domain-lookup 
RT02-BCN(config)#do wri
Building configuration...
[OK]

TR03-ZA#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
TR03-ZA(config)#no ip domain-lookup 
TR03-ZA(config)#do wri

Core2#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Core2(config)#no ip domain-lookup 
Core2(config)#do wri

Core1#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Core1(config)#no ip domain-l
Core1(config)#no ip domain-lookup 
Core1(config)#do wri

Access#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Access(config)#no ip domain-l
Access(config)#no ip domain-lookup 
Access(config)#do wri

En todos los Switches de Valencia, configurar Trunk utilizando trunk encapsulation, y asegúrese de que el trunk no se convierta dinámicamente en un puerto de acceso.

Core1#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Core1(config)#interface gigabitEthernet 1/0/1
Core1(config-if)#switchport trunk encapsulation dot1q 
Core1(config-if)#switchport mode trunk 

Core1(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet1/0/1, changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet1/0/1, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan10, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan20, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan30, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan40, changed state to up

Core1(config-if)#exit
Core1(config)#interface gigabitEthernet 1/0/2
Core1(config-if)#switchport trunk encapsulation dot1q 
Core1(config-if)#switchport mode trunk 

Core1(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet1/0/2, changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet1/0/2, changed state to up

Core1(config-if)#exit
Core1(config)#sw
Core1(config)#inter
Core1(config)#interface g
Core1(config)#interface gigabitEthernet 1/0/23
Core1(config-if)#switchport trunk encapsulation dot1q 
Core1(config-if)#switchport mode trunk 

Core1(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet1/0/23, changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet1/0/23, changed state to up

Core1(config-if)#exit
Core1(config)#interface gigabitEthernet 1/0/24
Core1(config-if)#switchport trunk encapsulation dot1q 
Core1(config-if)#switchport mode trunk 

Core1(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet1/0/24, changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet1/0/24, changed state to up

Core1(config-if)#do wri
Building configuration...
Compressed configuration from 7383 bytes to 3601 bytes[OK]
[OK]
Core1(config-if)#

Core2(config)#inter
Core2(config)#interface g
Core2(config)#interface gigabitEthernet 1/0/1
Core2(config-if)#switchport trunk encapsulation dot1q 
Core2(config-if)#switchport mode trunk 

Core2(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet1/0/1, changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet1/0/1, changed state to up

Core2(config-if)#exit
Core2(config)#interface gigabitEthernet 1/0/23
Core2(config-if)#switchport trunk encapsulation dot1q 
Core2(config-if)#switchport mode trunk 
Core2(config-if)#exit
Core2(config)#interface gigabitEthernet 1/0/24
Core2(config-if)#switchport trunk encapsulation dot1q 
Core2(config-if)#switchport mode trunk 
Core2(config-if)#exit
Core2(config)#do wri
Building configuration...
Compressed configuration from 7383 bytes to 3601 bytes[OK]
[OK]
Core2(config)#

Access#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Access(config)#inter
Access(config)#interface fa
Access(config)#interface fastEthernet 0/1
Access(config-if)#sw
Access(config-if)#switchport mode
Access(config-if)#switchport mode tr
Access(config-if)#switchport mode trunk 
Access(config-if)#exit
Access(config)#interface fastEthernet 0/2
Access(config-if)#switchport mode trunk 

Crear las VLANs en los Switches: Core1, Core2 y Access:

Core1(config)#vlan 10
Core1(config-vlan)#name STATIC
Core1(config-vlan)#exit
Core1(config)#vlan 20
Core1(config-vlan)#name VoIP
Core1(config-vlan)#exit
Core1(config)#vlan 30
Core1(config-vlan)#name PUBLIC
Core1(config-vlan)#exit
Core1(config)#vlan 40 
Core1(config-vlan)#name CLIENT
Core1(config-vlan)#exit
Core1(config)#inter
Core1(config)#interface vlan 10
Core1(config-if)#
%LINK-5-CHANGED: Interface Vlan10, changed state to up

Core1(config-if)#exit
Core1(config)#interface vlan 20
Core1(config-if)#
%LINK-5-CHANGED: Interface Vlan20, changed state to up

Core1(config-if)#exit
Core1(config)#interface vlan 30
Core1(config-if)#
%LINK-5-CHANGED: Interface Vlan30, changed state to up

Core1(config-if)#exit
Core1(config)#interface vlan 40
Core1(config-if)#
%LINK-5-CHANGED: Interface Vlan40, changed state to up

Core2#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Core2(config)#vlan 10
Core2(config-vlan)#name STATIC
Core2(config-vlan)#exit
Core2(config)#vlan 20
Core2(config-vlan)#name VoIP
Core2(config-vlan)#exit
Core2(config)#vlan 30
Core2(config-vlan)#name PUBLIC
Core2(config-vlan)#exit
Core2(config)#vlan 40
Core2(config-vlan)#name CLIENT
Core2(config-vlan)#exit
Core2(config)#interface vlan 10
Core2(config-if)#
%LINK-5-CHANGED: Interface Vlan10, changed state to up

Core2(config-if)#exit
Core2(config)#interface vlan 20
Core2(config-if)#
%LINK-5-CHANGED: Interface Vlan20, changed state to up

Core2(config-if)#exit
Core2(config)#interface vlan 30
Core2(config-if)#
%LINK-5-CHANGED: Interface Vlan30, changed state to up

Core2(config-if)#exit
Core2(config)#interface vlan 40
Core2(config-if)#
%LINK-5-CHANGED: Interface Vlan40, changed state to up

Core2(config-if)#exit

Access>en
Access#conf t
Access(config)#vlan 10
Access(config-vlan)#name STATIC
Access(config-vlan)#exit
Access(config)#vlan 20
Access(config-vlan)#name VoIP
Access(config-vlan)#exit
Access(config)#vlan 30
Access(config-vlan)#name PUBLIC
Access(config-vlan)#exit
Access(config)#vlan 40
Access(config-vlan)#name CLIENT
Access(config-vlan)#exit
Access(config)#inter
Access(config)#interface vlan 10
Access(config-if)#
%LINK-5-CHANGED: Interface Vlan10, changed state to up

Access(config-if)#exit
Access(config)#inter
Access(config)#interface vlan 20
Access(config-if)#
%LINK-5-CHANGED: Interface Vlan20, changed state to up

Access(config-if)#exit
Access(config)#inter
Access(config)#interface vlan 30
Access(config-if)#
%LINK-5-CHANGED: Interface Vlan30, changed state to up

Access(config-if)#exit
Access(config)#inter
Access(config)#interface vlan 40
Access(config-if)#
%LINK-5-CHANGED: Interface Vlan40, changed state to up

Access(config-if)#exit
Access(config)#do wri
Building configuration...
[OK]

Access(config)#do sh vlan

VLAN Name                             Status    Ports
---- ------------------- --------- -------------------------------
1    default              active    Fa0/1, Fa0/2, Fa0/3, Fa0/4
                                    Fa0/5, Fa0/6, Fa0/7, Fa0/8
                                    Fa0/9, Fa0/10, Fa0/11, Fa0/12
                                    Fa0/13, Fa0/14, Fa0/15, Fa0/16
                                    Fa0/17, Fa0/18, Fa0/19, Fa0/20
                                    Fa0/21, Fa0/22, Fa0/23, Fa0/24
                                    Gig0/1, Gig0/2
10   STATIC                  active    
20   VoIP                    active    
30   PUBLIC                  active    
40   CLIENT                  active    
1002 fddi-default            act/unsup 
1003 token-ring-default      act/unsup 
1004 fddinet-default         act/unsup 
1005 trnet-default           act/unsup 

VLAN Type  SAID       MTU   Parent RingNo BridgeNo Stp  BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
1    enet  100001     1500  -      -      -        -    -        0      0

Access(config)#do wri
Building configuration...
[OK]
Access(config)#

Limitar todos los Trunks para llevar sólo las VLANs 1, 10, 20.

Core1#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Core1(config)#interface gigabitEthernet 1/0/1
Core1(config-if)#switchport trunk allowed vlan 1,10,20

Core1(config-if)#exit
Core1(config)#interface gigabitEthernet 1/0/2
Core1(config-if)#switchport trunk allowed vlan 1,10,20
Core1(config-if)#exit
Core1(config)#interface gigabitEthernet 1/0/23
Core1(config-if)#switchport trunk allowed vlan 1,10,20
Core1(config-if)#exit
Core1(config)#interface gigabitEthernet 1/0/24
Core1(config-if)#switchport trunk allowed vlan 1,10,20
Core1(config-if)#exit
Core1(config)#^Z
Core1#
%SYS-5-CONFIG_I: Configured from console by console

Core1#wri
Building configuration...
Compressed configuration from 7383 bytes to 3601 bytes[OK]
[OK]
Core1#sh inter
Core1#sh interfaces tr
Core1#sh interfaces trunk 
Port        Mode         Encapsulation  Status        Native vlan
Gig1/0/1    on           802.1q         trunking      1
Gig1/0/2    on           802.1q         trunking      1
Gig1/0/23   on           802.1q         trunking      1
Gig1/0/24   on           802.1q         trunking      1

Port        Vlans allowed on trunk
Gig1/0/1    1,10,20
Gig1/0/2    1,10,20
Gig1/0/23   1,10,20
Gig1/0/24   1,10,20

Port        Vlans allowed and active in management domain
Gig1/0/1    1,10,20
Gig1/0/2    1,10,20
Gig1/0/23   1,10,20
Gig1/0/24   1,10,20

Port        Vlans in spanning tree forwarding state and not pruned
Gig1/0/1    1,10,20
Gig1/0/2    1,10,20
Gig1/0/23   none
Gig1/0/24   none

Core1#

Core2#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Core2(config)#interface gigabitEthernet 1/0/1
Core2(config-if)#switchport trunk allowed vlan 1,10,20
Core2(config-if)#exit
Core2(config)#interface gigabitEthernet 1/0/23
Core2(config-if)#switchport trunk allowed vlan 1,10,20
Core2(config-if)#exit
Core2(config)#interface gigabitEthernet 1/0/24
Core2(config-if)#exit
Core2(config)#interface gigabitEthernet 1/0/24
Core2(config-if)#switchport trunk allowed vlan 1,10,20
Core2(config-if)#


Core2#sh interfaces trunk 
Port        Mode         Encapsulation  Status        Native vlan
Gig1/0/1    on           802.1q         trunking      1
Gig1/0/23   on           802.1q         trunking      1
Gig1/0/24   on           802.1q         trunking      1

Port        Vlans allowed on trunk
Gig1/0/1    1,10,20
Gig1/0/23   1,10,20
Gig1/0/24   1,10,20

Port        Vlans allowed and active in management domain
Gig1/0/1    1,10,20
Gig1/0/23   1,10,20
Gig1/0/24   1,10,20

Port        Vlans in spanning tree forwarding state and not pruned
Gig1/0/1    1,10,20
Gig1/0/23   1,10,20
Gig1/0/24   1,10,20

Core2#

Access#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Access(config)#interface fastEthernet 0/1
Access(config-if)#switchport trunk allowed vlan 1,10,20
Access(config-if)#exit
Access(config)#interface fastEthernet 0/2
Access(config-if)#switchport trunk allowed vlan 1,10,20
Access(config-if)#end
Access#
%SYS-5-CONFIG_I: Configured from console by console

Access#wri
Building configuration...
[OK]

Access#sh interfaces trunk 
Port        Mode         Encapsulation  Status        Native vlan
Fa0/1       on           802.1q         trunking      1
Fa0/2       on           802.1q         trunking      1

Port        Vlans allowed on trunk
Fa0/1       1,10,20
Fa0/2       1,10,20

Port        Vlans allowed and active in management domain
Fa0/1       1,10,20
Fa0/2       1,10,20

Port        Vlans in spanning tree forwarding state and not pruned
Fa0/1       20
Fa0/2       20

Access#

Configurar R1-AS como un Router on a Stick (ROAS), que proporcione enrutamiento entre clientes en VLAN 10 y VLAN 20.

RT01-VA#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
RT01-VA(config)#interface vlan 10
RT01-VA(config-if)#ip address 10.16.0.1 255.255.255.0
%LINK-5-CHANGED: Interface Vlan10, changed state to up

RT01-VA(config-if)#exit
RT01-VA(config)#interface vlan 20
RT01-VA(config-if)#ip address 10.16.2.1 255.255.255.0
%LINK-5-CHANGED: Interface Vlan20, changed state to up

RT01-VA(config-if)exit
RT01-VA(config)#interface vlan 30
RT01-VA(config-if)#ip address 10.16.4.1 255.255.254.0
%LINK-5-CHANGED: Interface Vlan30, changed state to up

RT01-VA(config-if)exit
RT01-VA(config)#interface vlan 40
RT01-VA(config-if)#ip address 10.16.6.1 255.255.254.0
%LINK-5-CHANGED: Interface Vlan30, changed state to up

RT01-VA(config-if)#end
RT01-VA#WRI

RT01-VA#sh ip interface b
Interface              IP-Address      OK? Method Status                Protocol 
GigabitEthernet0/0     unassigned      YES unset  administratively down down 
GigabitEthernet0/1     unassigned      YES unset  administratively down down 
GigabitEthernet0/2     unassigned      YES unset  administratively down down 
FastEthernet0/0/0      unassigned      YES unset  up                    up 
FastEthernet0/0/1      unassigned      YES unset  up                    down 
FastEthernet0/0/2      unassigned      YES unset  up                    down 
FastEthernet0/0/3      unassigned      YES unset  up                    down 
Vlan1                  unassigned      YES unset  administratively down down 
Vlan10                 10.16.0.1       YES manual up                    down 
Vlan20                 10.16.2.1       YES manual up                    down 
Vlan30                 10.16.4.1       YES manual up                    down 
Vlan40                 10.16.6.1       YES manual up                    down

La interfaz el Router RT01-VA tiene que estar up y configurada en mode Trunk 
RT01-VA#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
RT01-VA(config)#interface fastEthernet 0/0/0 
RT01-VA(config-if)#no shut
RT01-VA(config-if)#switchport mode trunk 

RT01-VA(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0/0, changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0/0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan10, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan20, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan30, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan40, changed state to up

RT01-VA(config-if)#^Z
RT01-VA#
%SYS-5-CONFIG_I: Configured from console by console

RT01-VA#wri
Building configuration...
[OK]
RT01-VA#sh ip inter
RT01-VA#sh ip interface b
Interface              IP-Address      OK? Method Status                Protocol 
GigabitEthernet0/0     unassigned      YES unset  administratively down down 
GigabitEthernet0/1     unassigned      YES unset  administratively down down 
GigabitEthernet0/2     unassigned      YES unset  administratively down down 
FastEthernet0/0/0      unassigned      YES unset  up                    up 
FastEthernet0/0/1      unassigned      YES unset  up                    down 
FastEthernet0/0/2      unassigned      YES unset  up                    down 
FastEthernet0/0/3      unassigned      YES unset  up                    down 
Vlan1                  unassigned      YES unset  administratively down down 
Vlan10                 10.16.0.1       YES manual up                    up 
Vlan20                 10.16.2.1       YES manual up                    up 
Vlan30                 10.16.4.1       YES manual up                    up 
Vlan40                 10.16.6.1       YES manual up                    up
RT01-VA#

Sólo dejaremos pasar las VLANs 1, 10, 20:

RT01-VA(config)#interface fastEthernet 0/0/0
RT01-VA(config-if)#switchport trunk allowed vlan 1,10,20

RT01-VA(config-if)#do sh inter trunk
Port        Mode         Encapsulation  Status        Native vlan
Fa0/0/0     on           802.1q         trunking      1

Port        Vlans allowed on trunk
Fa0/0/0     1,10,20

Port        Vlans allowed and active in management domain
Fa0/0/0     1,10,20

Port        Vlans in spanning tree forwarding state and not pruned
Fa0/0/0     20

Configurar las interfaces fa0/3 y fa0/4 en modo access, vlan 10 (PC1) y vlan 20 (PC2) respectivamente:

Access(config)#interface fastEthernet 0/3
Access(config-if)#switchport mode access 
Access(config-if)#switchport access vlan 10
Access(config-if)#exit
Access(config)#interface fastEthernet 0/4
Access(config-if)#switchport mode access 
Access(config-if)#switchport access vlan 20
Access(config-if)#^Z
Access#
%SYS-5-CONFIG_I: Configured from console by console

Access#wri
Building configuration...
[OK]
Access#

Comprobamos la comunicación entre PC1 y PC2



Asignar direcionamiento IP Metropolitan Area Network (MAN), subred 172.16.0.0/28:


RT02-BCN#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
RT02-BCN(config)#interface gigabitEthernet 0/0
RT02-BCN(config-if)#ip address 172.16.0.6 255.255.255.240
RT02-BCN(config-if)#no shut

RT02-BCN(config-if)#
%LINK-5-CHANGED: Interface GigabitEthernet0/0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/0, changed state to up

RT01-VA#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
RT01-VA(config)#interface gigabitEthernet 0/0
RT01-VA(config-if)#ip address 172.16.0.5 255.255.255.240
RT01-VA(config-if)#no shut

RT01-VA(config-if)#
%LINK-5-CHANGED: Interface GigabitEthernet0/0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/0, changed state to up

RT01-VA(config-if)#

TR03-ZA#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
TR03-ZA(config)#inter
TR03-ZA(config)#interface g
TR03-ZA(config)#interface gigabitEthernet 0/0
TR03-ZA(config-if)#ip add
TR03-ZA(config-if)#ip address 172.16.0.7 255.255.255.240
TR03-ZA(config-if)#no shut

TR03-ZA(config-if)#
%LINK-5-CHANGED: Interface GigabitEthernet0/0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/0, changed state to up

Hacer ping para comprobar conectividad entre los Routers:

TR03-ZA#ping 172.16.0.6

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.0.6, timeout is 2 seconds:
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 0/1/2 ms

TR03-ZA#ping 172.16.0.6

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.0.6, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 0/0/1 ms

TR03-ZA#ping 172.16.0.5

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.0.5, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 0/0/1 ms

Cisco es genial!.

No hay comentarios:

Publicar un comentario