0

Good day, I am simulating a setup as below:enter image description here

The configurations as below:

  • 3 switches are joined with fibre optics in TRUNK mode.

  • PC0 joined to gigabit port of switch in VLAN 20 (192.168.2.55/24), gateway 192.168.2.254

  • PC1 joined to gigabit port of switch in VLAN 10 (192.168.1.55/24), gateway 192.168.1.254

  • A router plugged to switch with TRUNK connection having configuration of ip of port Fa0/0 with encapsulation.

The configurations as below:

**ROUTER**
hostname Router
!
!
!
!
!
!
!
!
ip cef
no ipv6 cef
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface FastEthernet0/0
 no ip address
 duplex auto
 speed auto
!
interface FastEthernet0/0.1
 encapsulation dot1Q 10
 ip address 192.168.1.254 255.255.255.0
!
interface FastEthernet0/0.2
 encapsulation dot1Q 20
 ip address 192.168.2.254 255.255.255.0
!
interface FastEthernet1/0
 no ip address
 duplex auto
 speed auto
 shutdown
!
interface Serial2/0
 no ip address
 clock rate 2000000
 shutdown
!
interface Serial3/0
 no ip address
 clock rate 2000000
 shutdown
!
interface FastEthernet4/0
 no ip address
 shutdown
!
interface FastEthernet5/0
 no ip address
 shutdown
!
ip classless
!
ip flow-export version 9
!
!
!
!
!
!
!
!
line con 0
!
line aux 0
!
line vty 0 4
 login
!
!
!
end

CENTRAL SWITCH

hostname CentralSwitch
!
!
!
!
!
spanning-tree mode pvst
spanning-tree extend system-id
!
interface FastEthernet0/1
!
interface FastEthernet1/1
!
interface FastEthernet2/1
!
interface FastEthernet3/1
!
interface FastEthernet4/1
!
interface FastEthernet5/1
!
interface FastEthernet6/1
!
interface FastEthernet7/1
 switchport mode trunk
!
interface FastEthernet8/1
!
interface FastEthernet9/1
!
interface Vlan1
 no ip address
 shutdown
!
!
!
!
line con 0
!
line vty 0 4
 login
line vty 5 15
 login
!
!
!
!
end

SWITCH LVL 1

hostname SwitchL1
!
!
!
!
!
spanning-tree mode pvst
spanning-tree extend system-id
!
interface FastEthernet0/1
 switchport mode trunk
!
interface FastEthernet1/1
!
interface GigabitEthernet2/1
!
interface GigabitEthernet3/1
!
interface GigabitEthernet4/1
!
interface GigabitEthernet5/1
!
interface GigabitEthernet6/1
 switchport access vlan 10
!
interface FastEthernet7/1
!
interface FastEthernet8/1
!
interface FastEthernet9/1
!
interface Vlan1
 no ip address
 shutdown
!
!
!
!
line con 0
!
line vty 0 4
 login
line vty 5 15
 login
!
!
!
!
end

SWITCH LVL2

hostname SwitchL2
!
!
!
!
!
spanning-tree mode pvst
spanning-tree extend system-id
!
interface FastEthernet0/1
 switchport mode trunk
!
interface FastEthernet1/1
!
interface GigabitEthernet2/1
!
interface GigabitEthernet3/1
!
interface GigabitEthernet4/1
!
interface GigabitEthernet5/1
!
interface GigabitEthernet6/1
 switchport access vlan 20
!
interface FastEthernet7/1
!
interface FastEthernet8/1
!
interface FastEthernet9/1
!
interface Vlan1
 no ip address
 shutdown
!
!
!
!
line con 0
!
line vty 0 4
 login
line vty 5 15
 login
!
!
!
!
end

PC1

FastEthernet0 Connection:(default port)

   Link-local IPv6 Address.........: FE80::205:5EFF:FE9A:28D8
   IP Address......................: 192.168.1.55
   Subnet Mask.....................: 255.255.255.0
   Default Gateway.................: 192.168.1.254

PC2

FastEthernet0 Connection:(default port)

   Link-local IPv6 Address.........: FE80::290:CFF:FE04:E01C
   IP Address......................: 192.168.2.55
   Subnet Mask.....................: 255.255.255.0
   Default Gateway.................: 192.168.2.254

But . I cannot ping the gateway from each PC and my intention is to join 2 PC with diff VLAN to be able to communicate with each other.

RSVP

  • 1
    Please edit the question to include the full configurations of the network devices. We cannot simply guess where you may have gone wrong. – Ron Maupin Jul 27 at 11:35
  • Updated. Please Check, TQ. – joshua Jul 27 at 13:39
1

You haven't configured either VLAN 10 or 20 on any of the switches...

You need to set up the VLANs at least on the center switch to enable trunking to the router. If you don't set up VLANs on the edge switches you can't set up their downlinks as trunks.

Also, you need to use faster interfaces towards the network center and may use slower ones towards the edge. A gigabit downlink to a PC is useless when the switch's uplink is only 100M.

  • Hi, It works and thanks for the advice. – joshua Jul 28 at 11:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.