1

I'm using packet tracer. I have the following configuration :

On switch 2950-24

  • VLAN 99

    • .

    • interface assigned to it is fa 0/1

    • PC 1 has ip 10.10.10.2 with default gateway 10.10.10.3. PC 1 is connected to fa 0/1.
  • VLAN 100

    • .

    • interface assigned to it is fa 0/2

      • PC 2 has ip 10.100.100.2 with default gateway 10.100.100.3. PC 2 is connected to fa 0/2.
  • On the switch, interface fa 0/3 is set to trunk mode

  • Routeur 2621-XM

    • Interface fa 0/0 is up and connected to switch fa 0/3
    • sub interface fa 0/0.2 has ip 10.10.10.3
    • sub interface fa 0/0.3 has ip 10.100.100.3

With all those settings, all lights are green. BUT the problem is that PC1 cannot ping PC 2

Below is an image of the configuration

Immage of my configuration

Below is my Router and switch configuration

Current configuration : 1167 bytes
!
version 12.1
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Switch
!
!
!
spanning-tree mode pvst
!
interface FastEthernet0/1
 switchport access vlan 99
 switchport mode access
!
interface FastEthernet0/2
 switchport access vlan 100
 switchport mode access
!
interface FastEthernet0/3
 switchport mode trunk

!
interface Vlan1
 no ip address
 shutdown
!
interface Vlan99
 mac-address 0060.2fbb.3401
 no ip address
!
!
!
!
line con 0
!
line vty 0 4
 login
line vty 5 15
 login
!
!
!
end

And now my router configuration

Current configuration : 752 bytes
!
version 12.2
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname ROUTER
!
!
!
!
!
!
!
!
no ip cef
no ipv6 cef
!
!

interface FastEthernet0/0
 no ip address
 duplex auto
 speed auto
!
interface FastEthernet0/0.2
 encapsulation dot1Q 2
 ip address 10.10.10.3 255.255.255.0
!
interface FastEthernet0/0.3
 encapsulation dot1Q 3
 ip address 10.100.100.3 255.255.255.0
!
interface FastEthernet0/1
 no ip address
 duplex auto
 speed auto
 shutdown
!
interface Serial0/0
 no ip address
 shutdown
!
interface Serial0/1
 no ip address
 shutdown
!
ip classless
!
ip flow-export version 9
!
!
!
!
!
!
!
line con 0
!
line aux 0
!
line vty 0 4
 login
!
!
!
end

3 Answers 3

1

You have mistake in sub-interfaces configuration. As your VLAN ID's is 99 and 100 you should change interface configs respectively:

interface FastEthernet0/0.2
 encapsulation dot1Q 99
 ip address 10.10.10.3 255.255.255.0
!
interface FastEthernet0/0.3
 encapsulation dot1Q 100
 ip address 10.100.100.3 255.255.255.0

And also verify, that you've created VLAN's on switch by entering in enable mode

show vlan

on switch and paste output here.

2
  • YES !!!!!!! You are the best in the world Andrey.... It works properly now... I don't know why encapsulation dot1Q 99 and encapsulation dot1Q 100 changes made it work though... Commented Aug 1, 2017 at 11:54
  • You have vlans 99 and 100 on your switch, therefore you should use same numbers as dot1q values for your L3 interfaces. In your config was specified id 2 and 3. It might work if you create VLAN 2 and 3 on switch and configure pc's access ports for accessing in vlan 2 and 3. Commented Aug 1, 2017 at 12:16
1

may you need to assign the sub-interface on the router to the proper VLAN

int g0/0.2  
encapsulation dot1Q 2

int g0/0.3  
encapsulation dot1Q 3

and so you may not need to interface vlans on the switch

2
  • I did that already.....If you want I'll post my configs so you can see what is wrong.... An I removed ip's from Vlan on the switch... SAme result Commented Aug 1, 2017 at 11:06
  • Please see my updated post with my configs Commented Aug 1, 2017 at 11:30
0

Sub-interfaces configuration is wrong in router . Need to modify subinterface configuration in router as below.

Router(config)#interface FastEthernet0/0.99

Router(config)# encapsulation dot1Q 99

Router(config)# ip address 10.10.10.3 255.255.255.0

Router(config)#interface FastEthernet0/0.100

Router(config)#encapsulation dot1Q 100

Router(config)# ip address 10.100.100.3 255.255.255.0

1
  • Hi. This was a school project 3 years ago. Thanks for your answer. Hopefully it will help someone in the community Commented Dec 14, 2020 at 20:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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