I have a Cisco 3750 switch and there is no default gateway set on it.
SW01#show ip route
Default gateway is not set
Host Gateway Last Use Total Uses Interface
ICMP redirect cache is empty
SW01#show cdp ne
Capability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge
S - Switch, H - Host, I - IGMP, r - Repeater, P - Phone
Device ID Local Intrfce Holdtme Capability Platform Port ID
CORE01 Gig 1/0/1 144 R S I WS-C3750G Gig 1/0/6
Gig 1/0/3 155 S I WS-C3750- Gig 1/0/3
Type escape sequence to abort.
Tracing the route to 172.24.223.113
1 172.24.175.18 1007 msec 0 msec 0 msec
2 172.24.175.35 0 msec 0 msec 0 msec
3 192.168.107.117 9 msec 16 msec 17 msec
4 192.168.247.141 17 msec 8 msec 25 msec
5 192.168.247.142 17 msec 17 msec 33 msec
6 172.24.223.113 34 msec 17 msec *
How is this possible for me to traceroute from a switch that isn't acting as a layer-3 device?
SW01#show ip int br
Interface IP-Address OK? Method Status Protocol
Vlan1 172.24.175.26 YES NVRAM up up
FastEthernet1/0/1 unassigned YES unset down down
FastEthernet1/0/2 unassigned YES unset down down
FastEthernet1/0/3 unassigned YES unset down down
GigabitEthernet1/0/1 unassigned YES unset up up
GigabitEthernet1/0/2 unassigned YES unset down down
GigabitEthernet1/0/3 unassigned YES unset up up
GigabitEthernet1/0/4 unassigned YES unset down down
172.24.175.18 has proxy-arp enabled (default setting) and it's handling any request from devices w/o gateway on that segment.
If you want to prove this concept, go to this device and disable proxy-arp then try communicating from the switch to other segments.