cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
11348
Views
0
Helpful
11
Replies

Unable to ping vlan ip address on a layer2 switch

Hello,

I have 2 routers, r2 and r3 which are connected via serial. R2's s3/0 and R3's s2/0 belong to 10.1.1.0/30 network. A switch (S3) is connected to R3  via trunk link on R3's fa0/0 port with an Ip add of 192.168.2.129/25 which belongs to 192.168.2.128/25 network. It has another interface, an SVI, fa0/0.10 with an ip add of 192.168.3.1/24 which belongs to 192.168.3.0/24 network. On S3, i created vlan 10 which i assigned an ip of 192.168.3.2/24 into which i assigned PC3. Note that I implemented OSPF on the network. I can successfully ping pc3 from R2 and R3. And from R3, I can successfully ping 192.168.3.2 which is the ip of vlan10 that i created. But wheneer i try to ping vlan10 on the switch from R2, it fails? How come? How to resolve this? Can you help me guys, I will very much appreciate you thoughts..thankyou

P.s. pardon my image, i dont know why it is flipped

2 Accepted Solutions

Accepted Solutions

Based on the symptoms given my guess at the problem would be that the switch does not have a default gateway configured.

HTH

Rick

HTH

Rick

View solution in original post

Jon

Thank you. Yes the posted switch configuration shows that the vlan logic is ok and the trunking logic is ok. The routing is ok (especially proven by the fact that r2 can successfully ping the PC). But there is no default gateway for the switch.

HTH

Rick

HTH

Rick

View solution in original post

11 Replies 11

Hi

Have you advertised the networks of Switch 2 into the OSPF of R2? Could you please provide your configuration?

R2 shoud advertise into OSPF

network 10.1.1.0/30
network 192.168.2.0/25

R3 shoud advertise into OSPF

network 10.1.1.0/30
network 192.168.2.128/25
network 192.168.3.0/24

it should fix the inconvenience, remember ping is reciprocal, if you send a packet to a destination, the remote device must know how to send a response back.

:-)




>> Marcar como útil o contestado, si la respuesta resolvió la duda, esto ayuda a futuras consultas de otros miembros de la comunidad. <<

Thankyou for your response sir. Sorry, my laptop is not currently with me...but i did advertise those networks for OSPF on  both rouyers respectively. Actually I can ping from R2 to the terminal of 192.168.3.0/24 network which is PC3 and it is successful. But how come when i try to ping 192.168.3.2 which i assigned to the logical interface of Switch3 (the one connected to R3) the result is unsuccessful. I did:

S3(config)#int vlan10

S3(config-if)#ip address 192.168.3.2 255.255.255.0

S3(config-if)#no shut

I also created a vlan 10 in the vlan database...

Hi

Thank you, could you please share the packet tracer file?




>> Marcar como útil o contestado, si la respuesta resolvió la duda, esto ayuda a futuras consultas de otros miembros de la comunidad. <<

Hi 

You should have the config like:

R2

int fa0/0
description TO-SWITCH-R2
ip add 192.168.2.1 255.255.255.128
no shut

int s3/0
no shut
clock rate 64000
ip add 10.1.1.2 255.255.255.252
no shut

router ospf 100
net 192.168.2.0 0.0.0.127 area 0
net 10.1.1.0 0.0.0.3 area 0


R3

int fa0/0
no shut


int fa0/0.2
encapsulation dot1q 2
ip add 192.168.2.129 255.255.255.128
no shut

int fa0/0.3
encapsulation dot1q 3
ip add 192.168.3.1 255.255.255.0
no shut

int s2/0
no shut
ip add 10.1.1.1 255.255.255.252
no shut

router ospf 100
net 192.168.2.128 0.0.0.127 area 0
net 192.168.3.0 0.0.0.255 area 0
net 10.1.1.0 0.0.0.3 area 0


SWitch (R2)

vlan 20

int fa0/1
description TO-R2
switchport
switchport access vlan 20
switchport mode access
no shut

int fa0/2
description TO-PC1
switchport
switchport access vlan 20
switchport mode access
no shut


Switch (R3)

vlan 2
vlan 3

int fa0/1
description TO-R3
switchport mode trunk
no shut

int fa0/2
description TO-PC2
switchport
switchport access vlan 2
switchport mode access
no shut

int fa0/4
description TO-PC3
switchport
switchport access vlan 3
switchport mode access
no shut

Hope it is useful

:-)




>> Marcar como útil o contestado, si la respuesta resolvió la duda, esto ayuda a futuras consultas de otros miembros de la comunidad. <<

Based on the symptoms given my guess at the problem would be that the switch does not have a default gateway configured.

HTH

Rick

HTH

Rick

Thankyou Sir, I tried to put a default gateway and it worked...thanks again

Thanks for confirming that the problem has been solved. I am glad that our suggestions pointed you in the right direction.  Thank you for using the rating system to mark the question as answered. This will help other readers in the forum to identify discussions that have helpful information.

HTH

Rick

HTH

Rick

I have attached my configurations r2.txt for router2, r3.txt for router3, s3.txt for switch3

Did you see Rick's response ie. on the switch -

"ip default-gateway 192.168.3.1"

Jon

Jon

Thank you. Yes the posted switch configuration shows that the vlan logic is ok and the trunking logic is ok. The routing is ok (especially proven by the fact that r2 can successfully ping the PC). But there is no default gateway for the switch.

HTH

Rick

HTH

Rick

That is so correct Sir, thank you very much

Review Cisco Networking for a $25 gift card