Splitter Switch

How would i know if i am connected to a router or a switch or a hub? using a commands in cmd?

i know i am connected to an internet and the internet has been shared using something (a hub or switch or a router!) that splits connections. i want to know if there are commands [...]