08-04-2025 05:26 AM - edited 08-04-2025 05:28 AM
Hi everyone, can anyone help me configure this? I've configured the VLANs on the 2960 switch, but why can't I communicate with other VLANs?
thank you
Solved! Go to Solution.
08-05-2025 12:21 AM
Got it working:
Port needs to be in Access Mode
1.If you want to ping from the switch its needs a Default Gateway and a Management IP
2.Also other Host (End-devices) don't have their IP set other than PC0
08-05-2025 12:29 AM - edited 08-05-2025 12:33 AM
core_switch#show run
Building configuration...
Current configuration : 2201 bytes
!
version 15.0
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname core_switch
!
!
!
!
!
!
spanning-tree mode pvst
spanning-tree extend system-id
!
interface FastEthernet0/1
switchport access vlan 4
switchport trunk allowed vlan 4,16,32-33,65
switchport mode access
!
interface FastEthernet0/2
switchport access vlan 4
switchport trunk allowed vlan 4,16,32-33,65
switchport mode access
!
interface FastEthernet0/3
switchport access vlan 16
switchport trunk allowed vlan 4,16,32-33,65
switchport mode access
!
interface FastEthernet0/4
switchport access vlan 16
switchport trunk allowed vlan 4,16,32-33,65
switchport mode access
!
interface FastEthernet0/5
switchport access vlan 32
switchport trunk allowed vlan 4,16,32-33,65
switchport mode access
!
interface FastEthernet0/6
switchport access vlan 32
switchport trunk allowed vlan 4,16,32-33,65
switchport mode access
!
interface FastEthernet0/7
switchport access vlan 33
switchport trunk allowed vlan 4,16,32-33,65
switchport mode access
!
interface FastEthernet0/8
switchport access vlan 33
switchport trunk allowed vlan 4,16,32-33,65
switchport mode access
!
interface FastEthernet0/9
switchport access vlan 65
switchport trunk allowed vlan 4,16,32-33,65
switchport mode access
!
interface FastEthernet0/10
switchport access vlan 65
switchport trunk allowed vlan 4,16,32-33,65
switchport mode trunk
!
interface FastEthernet0/11
!
interface FastEthernet0/12
!
interface FastEthernet0/13
!
interface FastEthernet0/14
!
interface FastEthernet0/15
!
interface FastEthernet0/16
!
interface FastEthernet0/17
!
interface FastEthernet0/18
!
interface FastEthernet0/19
!
interface FastEthernet0/20
!
interface FastEthernet0/21
!
interface FastEthernet0/22
!
interface FastEthernet0/23
!
interface FastEthernet0/24
!
interface GigabitEthernet0/1
switchport trunk allowed vlan 4,16,32-33,65
switchport mode trunk
!
interface GigabitEthernet0/2
!
interface Vlan1
no ip address
shutdown
!
interface Vlan4
ip address 172.25.4.100 255.255.255.0
!
ip default-gateway 172.25.4.254
!
!
!
!
line con 0
!
line vty 0 4
login
line vty 5 15
login
!
!
!
!
end
CORE_ROUTER#show run
Building configuration...
Current configuration : 1172 bytes
!
version 15.4
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname CORE_ROUTER
!
!
!
!
!
!
!
!
no ip cef
no ipv6 cef
!
!
!
!
!
!
!
!
!
!
no ip domain-lookup
!
!
spanning-tree mode pvst
!
!
!
!
!
!
interface GigabitEthernet0/0/0
no ip address
duplex auto
speed auto
!
interface GigabitEthernet0/0/0.4
encapsulation dot1Q 4
ip address 172.25.4.254 255.255.255.0
!
interface GigabitEthernet0/0/0.16
encapsulation dot1Q 16
ip address 172.22.16.254 255.255.255.0
!
interface GigabitEthernet0/0/0.32
encapsulation dot1Q 32
ip address 172.22.32.254 255.255.255.0
!
interface GigabitEthernet0/0/0.33
encapsulation dot1Q 33
ip address 172.22.33.254 255.255.255.0
!
interface GigabitEthernet0/0/0.65
encapsulation dot1Q 65
ip address 172.22.65.254 255.255.255.0
!
interface GigabitEthernet0/0/1
no ip address
duplex auto
speed auto
shutdown
!
interface GigabitEthernet0/0/2
no ip address
duplex auto
speed auto
shutdown
!
interface Vlan1
no ip address
shutdown
!
router rip
!
ip classless
!
ip flow-export version 9
!
!
!
!
!
!
!
line con 0
!
line aux 0
!
line vty 0 4
login
!
!
!
end
08-04-2025 05:36 AM
hello. Since ur 2960 is a Layer 2 switch, it can't route between VLANs by itself, even with IPs on interfaces. You need either: 1) A router with subinterfaces (router-on-a-stick), 2) A Layer 3 switch to handle routing, or 3) VLAN interfaces (SVIs) with IPs on a different device that can route. The switch ports can have IPs, but without VLAN interfaces or a router doing the inter-VLAN routing, traffic won't cross VLANs.
but u can share here ur PT topology and I will check that my Cisco friend...
hope it helps and PEACE!
-Enes
08-04-2025 05:47 AM
08-04-2025 06:26 AM - edited 08-04-2025 11:14 AM
You're likely problem is, (within your PT attachment) interfaces to your hosts are trunk interfaces
Try making them access ports, in the desired host VLANs, and see if it works better.
08-04-2025 04:05 PM
hello sir, yes... the reason why i made and use trunk is i want each devices in each segments can be communicate. example PC in segment 4(172.25.4.55) can be ping to other segment like PC in segment 16 or 32
08-04-2025 05:14 PM - edited 08-04-2025 05:15 PM
Unless your host devices use (the correct) VLAN tags, and most often they don't (except for VoIP phones), they won't exchange frames with a trunk port.
You can have each host within a different VLAN, and, again, their switch ports configured as access ports in the VLAN you desire. The switch will then exchange those different VLANs with the router, where you (correctly, it appears) have that switch port configured as a trunk and the router port defined with subinterfaces. The router would transfer frames between the VLANs.
08-04-2025 11:03 PM
i see, i try using access instead of trunk and it works
08-04-2025 09:21 AM
u good man DW. If u can send the topology gain, because it opens blank .... SO u need to send the topology as a .pkt
08-04-2025 04:03 PM
08-05-2025 12:09 AM
If your trying to configure Router-on-a-stick you need to have the Router configured and the trunk to the router configured correctly too.
Switch:
1. Make sure all Ports on their VLAN are in access mode (swithport mode access)
2. Trunk to the router carring all VLANs (Swithport mode trunk
Router:
1. Gigabit0/0/0 (no ip add & no shut)
2. Gigigbit0/0/0.4 (encapsulation dot1q 4 & ip add 172.125.4.254 255.255.255.0
08-05-2025 12:21 AM
08-05-2025 12:29 AM - edited 08-05-2025 12:33 AM
core_switch#show run
Building configuration...
Current configuration : 2201 bytes
!
version 15.0
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname core_switch
!
!
!
!
!
!
spanning-tree mode pvst
spanning-tree extend system-id
!
interface FastEthernet0/1
switchport access vlan 4
switchport trunk allowed vlan 4,16,32-33,65
switchport mode access
!
interface FastEthernet0/2
switchport access vlan 4
switchport trunk allowed vlan 4,16,32-33,65
switchport mode access
!
interface FastEthernet0/3
switchport access vlan 16
switchport trunk allowed vlan 4,16,32-33,65
switchport mode access
!
interface FastEthernet0/4
switchport access vlan 16
switchport trunk allowed vlan 4,16,32-33,65
switchport mode access
!
interface FastEthernet0/5
switchport access vlan 32
switchport trunk allowed vlan 4,16,32-33,65
switchport mode access
!
interface FastEthernet0/6
switchport access vlan 32
switchport trunk allowed vlan 4,16,32-33,65
switchport mode access
!
interface FastEthernet0/7
switchport access vlan 33
switchport trunk allowed vlan 4,16,32-33,65
switchport mode access
!
interface FastEthernet0/8
switchport access vlan 33
switchport trunk allowed vlan 4,16,32-33,65
switchport mode access
!
interface FastEthernet0/9
switchport access vlan 65
switchport trunk allowed vlan 4,16,32-33,65
switchport mode access
!
interface FastEthernet0/10
switchport access vlan 65
switchport trunk allowed vlan 4,16,32-33,65
switchport mode trunk
!
interface FastEthernet0/11
!
interface FastEthernet0/12
!
interface FastEthernet0/13
!
interface FastEthernet0/14
!
interface FastEthernet0/15
!
interface FastEthernet0/16
!
interface FastEthernet0/17
!
interface FastEthernet0/18
!
interface FastEthernet0/19
!
interface FastEthernet0/20
!
interface FastEthernet0/21
!
interface FastEthernet0/22
!
interface FastEthernet0/23
!
interface FastEthernet0/24
!
interface GigabitEthernet0/1
switchport trunk allowed vlan 4,16,32-33,65
switchport mode trunk
!
interface GigabitEthernet0/2
!
interface Vlan1
no ip address
shutdown
!
interface Vlan4
ip address 172.25.4.100 255.255.255.0
!
ip default-gateway 172.25.4.254
!
!
!
!
line con 0
!
line vty 0 4
login
line vty 5 15
login
!
!
!
!
end
CORE_ROUTER#show run
Building configuration...
Current configuration : 1172 bytes
!
version 15.4
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname CORE_ROUTER
!
!
!
!
!
!
!
!
no ip cef
no ipv6 cef
!
!
!
!
!
!
!
!
!
!
no ip domain-lookup
!
!
spanning-tree mode pvst
!
!
!
!
!
!
interface GigabitEthernet0/0/0
no ip address
duplex auto
speed auto
!
interface GigabitEthernet0/0/0.4
encapsulation dot1Q 4
ip address 172.25.4.254 255.255.255.0
!
interface GigabitEthernet0/0/0.16
encapsulation dot1Q 16
ip address 172.22.16.254 255.255.255.0
!
interface GigabitEthernet0/0/0.32
encapsulation dot1Q 32
ip address 172.22.32.254 255.255.255.0
!
interface GigabitEthernet0/0/0.33
encapsulation dot1Q 33
ip address 172.22.33.254 255.255.255.0
!
interface GigabitEthernet0/0/0.65
encapsulation dot1Q 65
ip address 172.22.65.254 255.255.255.0
!
interface GigabitEthernet0/0/1
no ip address
duplex auto
speed auto
shutdown
!
interface GigabitEthernet0/0/2
no ip address
duplex auto
speed auto
shutdown
!
interface Vlan1
no ip address
shutdown
!
router rip
!
ip classless
!
ip flow-export version 9
!
!
!
!
!
!
!
line con 0
!
line aux 0
!
line vty 0 4
login
!
!
!
end
08-05-2025 01:23 AM
i have reconfigure it, and yeah.. my mistake not set the switch as access mode, instead trunk to each interface
thank you
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide