cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2230
Views
7
Helpful
17
Replies

Cannot ping from one network to another when using two switches

undercloud
Level 1
Level 1

Hello,
I am trying to ping from network 192.168.0.0 to network 172.162.0.0 with no success. It relates to an exercise, for a back-up network connection. does anyone have any idea why I can't ping from one network to another? Thank you

PC1: Network 192.168.0.0 vlan 10

interface FastEthernet0/1
switch port access vlan 10

interface Gigabit Ethernet0/1
switch port trunk allowed vlan 10
switch port mode trunk
!
interface Gigabit Ethernet0/2
!
interface Vlan1
no ip address
shutdown
!
interface Vlan10
ip address 192.168.0.1 255.255.255.0

PC2: Network 172.162.0.0 vlan 20

interface FastEthernet0/1

switchport access vlan 20

interface GigabitEthernet0/1

switchport trunk allowed vlan 20

switchport mode trunk

!

interface GigabitEthernet0/2

!

interface Vlan1

no ip address

shutdown

!

interface Vlan20

ip address 172.162.0.1 255.255.0.0

 

afb1.png

2 Accepted Solutions

Accepted Solutions

then put all devices in the 10.0.0.0/8 network and on the same vlan.  Anytime you have different vlans and/or different networks, you must have L3 device to do routing between them.  Note: usually same vlan = same network, aka network/subnet x is on vlan x; subnet y is on vlan y.

.

Regards, ML
**Please Rate All Helpful Responses **

View solution in original post

I run lab using the SW model you mention and as @Martin L  suggest before you need to change the SW this SW not support L3 (can not config ip routing on it) and this cut the inter-vlan. 
so lab can not done as you like with this SW.

View solution in original post

17 Replies 17

Hello

Make sure you created the vlans on the switches. Use the command

switch4

conf t

vlan 10

and on the switch 3

conf t

vlan 20

Also make sure the PC has gateway configured on it.

Hello, i changed some settings and both networks can ping to their gateway, but I have not yet managed to ping from one network to the other one, even with adding the vlans.

PC1: Network 192.168.0.0 vlan 10

interface FastEthernet0/1
switchport access vlan 10
interface GigabitEthernet0/1
switchport trunk allowed vlan 10,20
switchport mode trunk
interface Vlan1
no ip address
shutdown
interface Vlan10
ip address 192.168.0.1 255.255.255.0
interface Vlan20
ip address 172.162.0.1 255.255.0.0

PC2: Network 172.162.0.0 vlan 20

interface FastEthernet0/1
switchport access vlan 20
interface GigabitEthernet0/1
switchport trunk allowed vlan 10,20
switchport mode trunk
interface Vlan1
no ip address
shutdown
interface Vlan10
ip address 192.168.0.1 255.255.255.0
interface Vlan20
ip address 172.162.0.1 255.255.0.0

 

 

In order  tp ping between network you need to enable routing by using the command

conf t

ip routing

 If you are using a Layer 2 switch , you need to replace to a Layer3 switch.

As per your config, you are using the same IP address on both sides, which is also wrong.  If you used .1 in one side, you need to use another IP on the other side.

But, on this case either you use a Layer3 switch or a Router.

Add vlan 10 and vlan 20 to both switch

Then allow both vlan in trunk connect two sw' I see you allow only one in each side 

Hello, i changed some settings and both networks can ping to their gateway, but I have not yet managed to ping from one network to the other one, even with adding the vlans.

PC1: Network 192.168.0.0 vlan 10

interface FastEthernet0/1
switchport access vlan 10
interface GigabitEthernet0/1
switchport trunk allowed vlan 10,20
switchport mode trunk
interface Vlan1
no ip address
shutdown
interface Vlan10
ip address 192.168.0.1 255.255.255.0
interface Vlan20
ip address 172.162.0.1 255.255.0.0

PC2: Network 172.162.0.0 vlan 20

interface FastEthernet0/1
switchport access vlan 20
interface GigabitEthernet0/1
switchport trunk allowed vlan 10,20
switchport mode trunk
interface Vlan1
no ip address
shutdown
interface Vlan10
ip address 192.168.0.1 255.255.255.0
interface Vlan20
ip address 172.162.0.1 255.255.0.0

 

The SVI of vlan have same IP in both SW'

That wrong you need diff IP for SVI in each SW.

Martin L
VIP
VIP

you can attach your PT file here but it must be in zip format

Regards, ML
**Please Rate All Helpful Responses **

 

I send it, thanks a lot. 

Martin L
VIP
VIP

Those are L2 switches; you need L3 switches in order to ping between different networks or router (or router on a-stick).  Just replace your switches with c3560 or c3650 and copy config. Note that one of those models has no ip routing set; just enable it with ip routing command.

Regards, ML
**Please Rate All Helpful Responses **

the problem is i am not allowed to use any switch other than the 2960 as i have an exercise on this.

IMG_20230426_185230_778.jpg

Interesting..... what are other restrictions ?  I think ,in that case, they have to be on the same network, like 10.0.0.0/8. I mean PC and Server have to be on the same network and if you want to ping switches, add IPs to SVI and those must be on the same network as well (different IPs)

Regards, ML
**Please Rate All Helpful Responses **

only two restrictions is that i have to use network 10.0.0.0 and use two 2960 switch. And that PC can ping up to the server and vice versa. Is there any way to give me the settings I should use? thanks in advance

then put all devices in the 10.0.0.0/8 network and on the same vlan.  Anytime you have different vlans and/or different networks, you must have L3 device to do routing between them.  Note: usually same vlan = same network, aka network/subnet x is on vlan x; subnet y is on vlan y.

.

Regards, ML
**Please Rate All Helpful Responses **

Review Cisco Networking for a $25 gift card