cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
509
Views
0
Helpful
3
Replies

Switch unable to ping router

NaderHussain
Level 1
Level 1

I have a switch and router on Packet Tracer and I cannot ping the router from the switch. Below, is the interface script on the switch and the router's f0/0 configuration.

 

Configs:

 

Router:

 

 interface FastEthernet0/0
ip address 192.168.20.1 255.255.255.0
duplex auto
speed auto
!

 

(f0/0 is Up)

 

Switch:

interface FastEthernet0/1

switchport trunk native vlan 99

switchport trunk allowed vlan 1,20

switchport mode trunk

switchport nonegotiate

!

 

Why is the switch unable to connect to the router?

 

interface Vlan1
ip address 192.168.20.2 255.255.255.0
!
ip default-gateway 192.168.20.1
!

3 Replies 3

 

Please share the output of the following commands:  sh vlan bri, sh int trunk and sh int vlan1. I guess the SVI (interface vlan1) is up/down because there is nothing connected to the switch.

 

HTH,

Meheretab

HTH,
Meheretab

jalejand
Cisco Employee
Cisco Employee
Your trunk link towards the Router is using vlan 99 as native vlan. This means that frames from vlan 99 will become untagged and frames from vlan 1 will have a dot1q tag on it.

The router interface expects untagged packets on fa0/0, configure a subinterface matching dot1q to accept packets from vlan 1.
interface fa0/0.1
encapsulation dot1q 1
ip add 192.168.20.1 255.255.255.0
no shut

and then leave fa0/0 with no Ip address.

jalejand
Cisco Employee
Cisco Employee
Your trunk link towards Fa0/0 is using native vlan as 99, frames from vlan 99 are now untagged while vlan 1 frames will have a dot1q tag of 1.

Fa0/0 interface on the router side will process untagged frames as it has no encapsulation configured.
* Remove the native vlan 99 command from the switch to keep vlan 1 frames as untagged again
* Create a subinterface in for fa0/0 in the router matching encapsulation dot1q for vlan 1 tagged packets.
Review Cisco Networking for a $25 gift card