12-29-2015 07:37 AM
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
01-04-2016 04:08 AM
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
01-04-2016 10:02 AM
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?
04-12-2016 06:29 AM
I did set the default-router and i was able to access the internet.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide