cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
684
Views
0
Helpful
2
Replies

Routing

r71296231
Level 1
Level 1

 

I cannot ping router interface from switch

I have connected router and a layer 2 switch

Configuration of router

#int gig0/0/0

#ip add 192.168.1.1 255.255.255.0

#no sh

Configuration of switch

#int f0/1

#switchport mode trunk

ip default-gateway 192.168.1.1

*encapsulation are done correctly

*interfaces are correctly mentioned

* cables are straight

Still the switch cannot ping the router

Please help at the earliest

1 Accepted Solution

Accepted Solutions

Hello @r71296231 

  You can not ping from a layer2 switch. It does not matter if you have default gateway or not. The only way to ping is the switch to have a interface vlan.

Do like this:

Switch.

conf t

vlan 100

int vlan 100

ip add 192.168.1.2 255.255.255.0

int f0/1

switch  mode trunk

 

Router:

int gig0/0/0

no ip add

int gig0/0/0.100

encapsulatio dot1q 100

ip add 192.168.1.1 255.255.255.0

 

then ping from switch to router.

View solution in original post

2 Replies 2

r71296231
Level 1
Level 1

Please help guys

Hello @r71296231 

  You can not ping from a layer2 switch. It does not matter if you have default gateway or not. The only way to ping is the switch to have a interface vlan.

Do like this:

Switch.

conf t

vlan 100

int vlan 100

ip add 192.168.1.2 255.255.255.0

int f0/1

switch  mode trunk

 

Router:

int gig0/0/0

no ip add

int gig0/0/0.100

encapsulatio dot1q 100

ip add 192.168.1.1 255.255.255.0

 

then ping from switch to router.