cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
53363
Views
35
Helpful
11
Replies

I can't ping vlan or pc on Switch

majid_peidaei
Level 1
Level 1

hellp

i have a problem

I can't ping vlan (192.168.1.1) from pc and inverse

this is my network

now PC0 and PC1 taken ip from dhcp server swithch and OK ,

and I have very simple config

this map is realy and I used packe trace for show you.

1-dhcp

sw(config)#ip dhcp pool ronidhcp

sw(dhcp-config)#network 192.168.1.1 255.255.255.0

sw(dhcp-config)#default-router 192.168.1.2

sw(dhcp-config)#dns-server 4.2.2.4

sw(dhcp-config)#exit

sw(config)#

sw(config)#ip dhcp excluded-address 192.168.1.1 192.168.1.100

2-Vlan

sw(config)#vlan 2

sw(config-vlan)# name soft-sw1

sw(config-vlan)#exit

sw(config)#

3-add ip to vlan

sw(config)#interface vlan 2

sw(config-if)#ip address 192.168.1.1 255.255.255.0

sw(config-if)#no shutdown

sw(config-if)#exit

sw(config)#

4-add interface to Vlan

sw(config)#interface range fastEthernet 0/1-2

sw(config-if-range)#switchport mode access

sw(config-if-range)#describtion Localsystem

sw(config-if-range)# switchport access vlan 2

sw(config-if-range)#no shutdown

sw(config-if-range)#exit

sw(config)#Ctrl+z

sw#copy running-config startup-config

Destination filename [startup-config]?

Building configuration...

[OK]

sw#

this is my config

please help

thnkas

1 Accepted Solution

Accepted Solutions

Mark Malone
VIP Alumni
VIP Alumni

Hi

default router should be the vlan ip address as its the gateway for the subnet

sw(dhcp-config)#default-router 192.168.1.2

change it to below , also each switch should have its default gateway set to in con fog , ip default-gateway x.x.x.x

192.168.1.1

View solution in original post

11 Replies 11

Mark Malone
VIP Alumni
VIP Alumni

Hi

default router should be the vlan ip address as its the gateway for the subnet

sw(dhcp-config)#default-router 192.168.1.2

change it to below , also each switch should have its default gateway set to in con fog , ip default-gateway x.x.x.x

192.168.1.1

ok

in this way

vlan ip 192.168.1.1 and gw ip 192.168.1.1

right?

Hi

yes this should be sw(dhcp-config)#default-router 192.168.1.1

this should match the vlan ip address which is already 192.168.1.1

and each switch should also have ...ip default-gateway 192.168.1.1 so traffic can get back to it

ok

now my gateway and vlan is 192.168.1.1

but i can't ping right now 

ok is the vlan up/up yes on the switch , you can also ping it locally on the switch itself ?

The pc your pinging from is set for vlan 2 and is also up/up , what its ip address

check the arp table on the switch and its mac table make sure you can see your pc mac address and ip address

this is arp picture

ok cool so it sees one pc correct the .102 address can you ping that you should be able to as its in the table unless something is blocking it software related , are these real pcs or a virtual lab setup ?

i dont have problem with this design in lab 

i hav problem in real switch and pc

i have Cisco ME 3400-24TS-A Switch and pc

ye that's what I needed to know because if you have software firewall on the pc it could be set at high strength blocking your icmp traffic on local pc going in / out

make sure your firewall is turned off while your testing on the pcs and av

is the vlan up/up yes and when your on the actual switch you can ping it ok , the oc is on the arp table so you should be able to ping the vlan unless the interface is down

i with this

ronisw(config)#interface range fastEthernet 0/1-7
ronisw(config-if-range)#port-type nni
ronisw(config-if-range)#
*Mar 1 06:16:17.803: %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan2, cha
nged state to down
*Mar 1 06:16:48.036: %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan2, cha
nged state to up

and then i fix problem and i have ping switch with pc

Reply from 192.168.1.1: bytes=32 time=1ms TTL=255
Reply from 192.168.1.1: bytes=32 time=1ms TTL=255

but you are very good help me about dafault route and vlan ip

thanks

ah cool well thanks for posting the fix it may help someone else too