Hi there,
Try the below config. The trunk link will be between the first port on both switches. I have configured a DHCP pool for VLAN10, so that if you connect a device to Gi1/0/2 on the 2960 you should pick up a lease in the 192.168.10.0/24 subnet.
SG300:
!
set system mode router
!
vlan 10
vlan 20
!
int vlan 10
ip address 192.168.10.254 255.255.255.0
!
int vlan 20
ip address 192.168.20.254 255.255.255.0
!
int gi0
description "TRUNK TO 2960"
switchport trunk allowed vlan add 10,20
!
ip dhcp server
ip dhcp pool network DHCP_POOL10
address 192.168.10.0 /24
default-router 192.168.10.254
dns-server 1.1.1.1
!
ip dhcp excluded-address 192.168.10.254
!
2960:
!
vlan 10
vlan 20
!
int gi1/0/1
desc TRUNK_TO_SG300
switchport mode trunk
switchport trunk allowed vlan add 10,20
!
int gi1/0/2
switchport mode access
switchport access vlan 10
spanning-tree portfast
!
cheers,
Seb.