25

I was wondering if it's at all possible to make a Dell Powerconnect 2848 switch show when running internal traceroutes. This would help with diagnosing issues and make it far easier to see where issues occur.

According to the datasheet, this particular switch is Layer 2 and 3 aware. I'm not completely sure what that means.

Is this possible?

Skyhawk
  • 14,149
  • 3
  • 52
  • 95
dannymcc
  • 2,677
  • 10
  • 46
  • 72

3 Answers3

27

No. The hops shown by traceroute show the path that an IP packet follows on a routed (layer 3) network. Routers will show up, and switches will not.

Switches are by their nature a layer 2 device: they receive and forward Ethernet frames, using the destination MAC address to determine the correct destination port. Some switches are also able to function as routers. We call such devices "layer 3 switches." Even a layer 3 switch will not necessarily show up on a traceroute, because much of the traffic passing through such a switch is layer 2 traffic within its own subnet.

In any event, the PowerConnect 2848 is not a layer 3 switch. It is "layer 3 aware" for QoS purposes only.

Skyhawk
  • 14,149
  • 3
  • 52
  • 95
  • Spot on. A device only shows up on traceroute when the forwarding is done by routing across subnets. One way to identify a switch that could be made to show up on your traceroute is one that can operate routing protocols such as OSPF. – Patrick Mar 01 '13 at 18:36
  • @Patrick: Not precisely true - a device shows up on traceroute if it decrements TTL (and then sends ICMP TTL exceeded messages). Obviously that's mostly devices that do routing across subnets, but it doesn't have to be. – Nick Bastin Jun 29 '17 at 04:33
  • @Skyhawk, So how do you debug switches? – Pacerier Nov 04 '17 at 04:11
7

A layer 2 switch won't show up in a tracert because it's a layer 2 device (a switch) and simply forwards (switches) traffic from one switch port to another based on the layer 2 address of the destination device. Tracert (ICMP) works at layer 3. In order for the switch to show up in tracert it has to be in use as a layer 3 device (a router) and has to be in the layer 3 path between the source and the destination devices.

joeqwerty
  • 108,377
  • 6
  • 80
  • 171
  • I thought that might be the case, but wondered if there was a way of forcing this kind of function. Thanks! – dannymcc Dec 13 '12 at 14:39
  • 1
    Have it actually route between different subnets on different VLANs. Anything else will mean clandestine layer3 functionality applied to the same subnet (aka bridge style firewall), which traceroute would and should not notice (it might notice if you mangle TTL fields in IP headers, which would probably confuse the living daylight out of it :) – rackandboneman Dec 13 '12 at 14:43
  • Based on what I see, I guess the rule is, "If you can't ping it, you won't be able to see it, either". – gbarry Dec 14 '12 at 07:49
  • @gbarry - That's not quite right. A switch could certainly have an ip address (for management purposes or for inter-VLAN routing) but a layer 2 switch operates at Layer 2 while tracert and ping (ICMP) operate at Layer 3. Only if the switch is acting as a router (a Layer 3 device) will it show up in tracert and/or ping. For example, a Layer 3 switch configured with multiple VLAN's and inter-VLAN routing will switch Ethernet frames between hosts in the same VLAN and won't show up in a tracert, but it will route IP packets between hosts in different VLAN's and will show up in a tracert. – joeqwerty Dec 14 '12 at 15:25
5

Not with the default traceroute program which by definition uses a response from a gateway (see man page):

traceroute tracks the route packets taken from an IP network on their way to a given host. It utilizes the IP protocol's time to live (TTL) field and attempts to elicit an ICMP TIME_EXCEEDED response from each gateway along the path to the host.

If there is not a gateway on the traced path, only Layer 2 devices, the IP will not be reported.

But Cisco has a utility that works on Layer 2. But this utility is dependent on CDP protocol which :

Cisco Discovery Protocol (CDP) must be enabled on all the devices in the network. For the Layer 2 traceroute utility to function properly, do not disable CDP. If any devices in the Layer 2 path are transparent to CDP, the Layer 2 traceroute utility cannot identify these devices on the path.

Check additional information here:
Cisco Layer 2 Traceroute Utility

Eduard Florinescu
  • 831
  • 5
  • 24
  • 39