cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3446
Views
70
Helpful
38
Replies

Can't ping Switch from PC (using VLANS)

Gugolsan
Level 1
Level 1

Hello, I'm using Cisco Packet Tracer and trying to configure VLANs and routing between them. Here are two tables, which I have used for configuring:

Device

Interface

IP address

Subnet mask

Default gateway

R1

G0/1.1

192.168.1.1

255.255.255.0

-

 

G0/1.10

192.168.10.1

255.255.255.0

-

 

G0/1.20

192.168.20.1

255.255.255.0

-

 

Lo0

209.165.200.225

255.255.255.224

-

S1

VLAN 1

192.168.1.11

255.255.255.0

192.168.1.1

S2

VLAN 1

192.168.1.12

255.255.255.0

192.168.1.1

PC-A

Fa0

192.168.10.3

255.255.255.0

192.168.10.1

PC-B

Fa0

192.168.20.3

255.255.255.0

192.168.20.1

PC-F

Fa0

192.168.20.2

255.255.255.0

192.168.20.1

PC-S

Fa0

192.168.10.2

255.255.255.0

192.168.10.1

 

PortsAttachmentNet

S1 F0/1

802.1Q Trunk

N/A

S2 F0/1

802.1Q Trunk

N/A

S1 F0/5

802.1Q Trunk

N/A

S1 F0/2

VLAN 20 – Faculty

192.168.20.0/24

S2 F0/2

VLAN 10 – Students

192.168.10.0/24

S1 F0/6

VLAN 10 – Students

192.168.10.0/24

S2 F0/18

VLAN 20 – Faculty

192.168.20.0/24

My ,pkt file looks like:

Gugolsan_0-1668909082155.png

I have connected and customized devices, customized VLANs and trunks on switches, customized routing between VLAN based on trunk. Then I have been pinging from PC-A to gateway VLAN 10 with address 192.168.10.0, from PC-A to PC-B, from PC-A to Lo0, from PC-F to PC-S and from PC-S to S2. Everything has been succeded except last: ping from PC-S to switch S2. Where can be the problem? Any ideas?

38 Replies 38

ping from PC-S to SVI VLAN1 in SW1 and SW2, are ping success ??

No, I have used ping 192.168.1.11 and 192.168.1.12. In both cases request timeout.

last commend 
add below command in both SW (SW1 & SW2)


ip default-gateway 192.168.1.1

Done.

 

it ping now ?

 

Unfortunately, not, maybe you can take a look by yourself using my .pkt file? Maybe you will see something missing?

the file is not open ,
one more thing PC-S connect to SW2 port, are the port assign with VLAN 10?

What do you mean not open? Yes, there are allowed VLAN 1,10,20,123 and the port is assign with VLAN 20.

assing with VLAN 20 but some PC like PC-A and PC-S must assing to VLAN 10 

can you copy paste the config of SW and router here ?

I have pasted previously two times, but it has dissappered...

S1: 

Building configuration...

Current configuration : 1542 bytes

!

version 15.0

no service timestamps log datetime msec

no service timestamps debug datetime msec

no service password-encryption

!

hostname S1

!

enable secret 5 $1$mERr$zHnlwK/VLygd7R8v28o.s.

!

!

!

no ip domain-lookup

!

!

!

spanning-tree mode pvst

spanning-tree extend system-id

!

interface FastEthernet0/1

switchport trunk native vlan 123

switchport trunk allowed vlan 1,10,20,123

switchport mode trunk

!

interface FastEthernet0/2

switchport access vlan 20

switchport mode access

!

interface FastEthernet0/3

!

interface FastEthernet0/4

!

interface FastEthernet0/5

switchport trunk native vlan 123

switchport trunk allowed vlan 1,10,20,123

switchport mode trunk

!

interface FastEthernet0/6

switchport access vlan 10

switchport mode access

!

interface FastEthernet0/7

!

interface FastEthernet0/8

!

interface FastEthernet0/9

!

interface FastEthernet0/10

!

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

!

interface GigabitEthernet0/2

!

interface Vlan1

ip address 192.168.1.11 255.255.255.0

!

ip default-gateway 192.168.1.1

!

!

!

!

line con 0

password ciscoVLAN

logging synchronous

login

!

line vty 0 4

login

line vty 5 15

login

!

!

!

!

end

S2:

Building configuration...

Current configuration : 1466 bytes

!

version 15.0

no service timestamps log datetime msec

no service timestamps debug datetime msec

no service password-encryption

!

hostname S2

!

enable secret 5 $1$mERr$zHnlwK/VLygd7R8v28o.s.

!

!

!

no ip domain-lookup

!

!

!

spanning-tree mode pvst

spanning-tree extend system-id

!

interface FastEthernet0/1

switchport trunk native vlan 123

switchport trunk allowed vlan 1,10,20,123

switchport mode trunk

switchport nonegotiate

!

interface FastEthernet0/2

switchport access vlan 10

switchport mode access

!

interface FastEthernet0/3

!

interface FastEthernet0/4

!

interface FastEthernet0/5

!

interface FastEthernet0/6

!

interface FastEthernet0/7

!

interface FastEthernet0/8

!

interface FastEthernet0/9

!

interface FastEthernet0/10

!

interface FastEthernet0/11

!

interface FastEthernet0/12

!

interface FastEthernet0/13

!

interface FastEthernet0/14

!

interface FastEthernet0/15

!

interface FastEthernet0/16

!

interface FastEthernet0/17

!

interface FastEthernet0/18

switchport access vlan 20

switchport mode access

!

interface FastEthernet0/19

!

interface FastEthernet0/20

!

interface FastEthernet0/21

!

interface FastEthernet0/22

!

interface FastEthernet0/23

!

interface FastEthernet0/24

!

interface GigabitEthernet0/1

!

interface GigabitEthernet0/2

!

interface Vlan1

ip address 192.168.1.12 255.255.255.0

!

ip default-gateway 192.168.1.1

!

!

!

!

line con 0

password ciscoVLAN

logging synchronous

login

!

line vty 0 4

login

line vty 5 15

login

!

!

!

!

end

Native vlan in sw trunk is vlan 123 and it in router vlan1?

That sure issue here. 

How can then i fix it?

Review Cisco Networking for a $25 gift card