cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3455
Views
0
Helpful
6
Replies

Can't ping internet from switch

Solanin19
Level 1
Level 1

 

Hello,

I set up a lab with a switch and a isp routeur connected to it. I can't ping internet from the switch but i can ping the router internal interface (192.168.1.1).


set up: SW2960X   -------> ISP routeur ( no access to it, no modification can be done).

Routeur know information: 

ip dhcp pool lan-intra1
default-router 192.168.1.1
network range 192.168.1.10 192.168.1.189
ip address 192.168.1.1 255.255.255.0

 

2960x configuration:


!
no aaa new-model
clock timezone BE 2 0
switch 1 provision ws-c2960x-48ts-l
!
ip dhcp pool vlan15
network 192.168.15.0 255.255.255.0
default-router 192.168.15.1
!
vlan 15
name cisco
!
vlan 66
name mgmt
!
vlan 310
name test-wifi
!
interface GigabitEthernet1/0/15
description uplink_wlc_int1
switchport mode trunk
spanning-tree portfast disable
!
interface GigabitEthernet1/0/16
description uplink_PC
switchport access vlan 15
switchport mode access
spanning-tree portfast
!
interface GigabitEthernet1/0/17
description uplink_AP
switchport access vlan 15
switchport mode access
spanning-tree portfast
!
interface GigabitEthernet1/0/18
description uplink_wlc_int2
switchport trunk allowed vlan 42
switchport mode trunk
shutdown
spanning-tree portfast disable
!
interface GigabitEthernet1/0/19
description uplink_internet
switchport access vlan 310
switchport mode access
!
interface Vlan1
!
interface Vlan15
ip address 192.168.15.1 255.255.255.0
!
interface Vlan66
description mgmt
ip address 192.168.166.53 255.255.255.0
!
interface Vlan310
ip address 192.168.1.2 255.255.255.0

!
ip default-gateway 192.168.166.1
ip http server
ip http secure-server
!
ip route 0.0.0.0 0.0.0.0 192.168.1.1
!

end

 

 

 

 

6 Replies 6

Samer R. Saleem
Level 4
Level 4

can you post output from switch

 

#show vlan br

# show cdp nei

 

also if possible to show router configs 

which IP you are trying to reach?

if this is a lab, why you want to reach internet?

Abzal
Level 7
Level 7

Hi,

 

I'm assuming you're doing NAT on your Internet edge router. Possible issue here that subnet 192.168.1.0/24 is not NATed. Try to ping with source 192.168.1.1:

ping x.x.x.x source 192.168.1.2

Best regards,
Abzal

Thank you for answer: if i connect directly my laptop to the routeur, he recieve an ip from the range 192.168.1.0/24 and can access internet. I don't understand why i can't do the same with the switch interface when i ping from the same range.

Samer R. Saleem
Level 4
Level 4

there might be filtration on ISP router that you cant access to check

r_m
Level 1
Level 1

I seem to have noticed in the configuration of the switch that you have set as default-gateway the address "192.168.166.1" but you said that your router with WAN access is on class 192.168.1.1!

 

Try to set " ip default-gateway 192.168.1.1" also I think that at parity of distance, default-gateway has priority over the static routing "ip route 0.0.0.0 0.0.0.0 192.168.1.1" that you have set.

 

Greetings

Review Cisco Networking products for a $25 gift card