cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
745
Views
0
Helpful
3
Replies

Failing to access the internet from SG300-52 switch

rgadhula2015
Level 1
Level 1

I have an sg300-52 switch on which I can access all the vlans but am unable to access the internet. I have attached my configurations below. The default gateway is an interface on my router. I now think that my configurations are not right. May you please assist

set system mode router

 

file SSD indicator plaintext

@

port jumbo-frame

vlan database

vlan 10-17,18,20,28

exit

bonjour interface range vlan 1

hostname SwitchTest

!

interface vlan 1

ip address 172.16.1.25 255.255.255.248

ip address 192.168.1.24 255.255.255.0

no ip address dhcp

!

interface vlan 15

name PRINT

ip address 172.16.15.1 255.255.255.240

!

interface vlan 16

name TEST1

ip address 172.16.16.1 255.255.255.240

!

interface vlan 17

name TEST2

ip address 172.16.17.1 255.255.255.240

!

interface vlan 18

name TEST3

ip address 172.16.18.1 255.255.255.240

!

interface gigabitethernet2

switchport trunk allowed vlan add 10-17,18,20,28

!

interface gigabitethernet3

switchport mode access

switchport access vlan 10

!

interface gigabitethernet4

switchport mode access

switchport access vlan 10

!

interface gigabitethernet5

switchport mode access

switchport access vlan 11

!

interface gigabitethernet6

switchport mode access

switchport access vlan 18

!

interface gigabitethernet7

switchport mode access

switchport access vlan 16

!

interface gigabitethernet8

switchport mode access

switchport access vlan 17

!

interface gigabitethernet9

switchport mode access

switchport access vlan 15

!

!

exit

ip default-gateway 172.16.1.24

ip ssh-client key rsa key-pair

3 Replies 3

devils_advocate
Level 7
Level 7

The 'ip default-gateway' command is used for the Switch Management IP address to ensure the switch can be managed from other Subnets'

You need to specify a default route as well:

ip route 0.0.0.0 0.0.0.0 172.16.1.24

Assuming 172.16.1.24 is the IP address of your router.

As 172.16.1.x is Vlan 1, you need to ensure the port that connects to your router is part of this vlan.

Thanks

I'm not sure that is accurate.  If the switch is in router mode I though the two were interchangeable.

I suspect something else like the router is not connected to the correct port or the machine trying to access internet has wrong gateway or DNS/

rgadhula2015, can you try to ping 4.2.2.2 from the switch and see if it works?  Can you also confirm what port your router is connected to and what the port/ip/subnet/gateway of test machine are?

-- please remember to rate and mark answered helpful posts --

I did set the default-router and i was able to access the internet.