Author Topic: Bizzare issue with a Linksys LGS116P "QOS" switch - fake MAC # related?  (Read 1176 times)

0 Members and 1 Guest are viewing this topic.

Online peter-h

  • Super Contributor
  • ***
  • Posts: 1120
  • Country: gb
  • Doing electronics since the 1960s...
I am developing an embedded system which has ethernet (RJ45).

It is connected to a Draytek router, via a Linksys LGS116P 16-port switch. This is an unmanaged switch. No config.

Could not get DHCP to work. In fact the board was not seeing any incoming packets. But with a simple (Netgear) switch it worked fine.

I had the mac # set to something silly like 1 2 3 4 5 6. This is normal for development work.

Changing it to the mac # of a Lenovo laptop which worked fine on the same LAN (and then obviously disconnecting that laptop) made it work!

How is this possible?

Was the switch (it does QOS but there is no documentation on what it does) looking up the mac # on some equipment website, to work out what sort of device it was, and perhaps finding it wasn't issued to any equipment manufacturer?

Replacing the Linksys switch with a dumb Netgear one (actually just replacing the router-board portion of the LAN) made it work fine even with the fake mac #.
Z80 Z180 Z280 Z8 S8 8031 8051 H8/300 H8/500 90S1200 32F417
 

Offline CJay

  • Super Contributor
  • ***
  • Posts: 3962
  • Country: gb
Re: Bizzare issue with a Linksys LGS116P "QOS" switch - fake MAC # related?
« Reply #1 on: August 07, 2021, 08:48:22 am »
More likely it's just a bug in the Linksys firmware/hardware, you could probably find other combos of MAC address that fail.
 

Online peter-h

  • Super Contributor
  • ***
  • Posts: 1120
  • Country: gb
  • Doing electronics since the 1960s...
Re: Bizzare issue with a Linksys LGS116P "QOS" switch - fake MAC # related?
« Reply #2 on: August 07, 2021, 08:53:35 am »
What surprises me is that such a bug could exist. The switch isn't supposed to care about MAC addresses, other than to use them as an index into a routing table (or some such).
Z80 Z180 Z280 Z8 S8 8031 8051 H8/300 H8/500 90S1200 32F417
 

Online nali

  • Frequent Contributor
  • **
  • Posts: 432
  • Country: gb
Re: Bizzare issue with a Linksys LGS116P "QOS" switch - fake MAC # related?
« Reply #3 on: August 07, 2021, 09:47:39 am »
I think that LSB=1 in the 1st octet signifies a multicast packet, so that's probably screwing things up.
 
The following users thanked this post: bill_c

Online peter-h

  • Super Contributor
  • ***
  • Posts: 1120
  • Country: gb
  • Doing electronics since the 1960s...
Re: Bizzare issue with a Linksys LGS116P "QOS" switch - fake MAC # related?
« Reply #4 on: August 07, 2021, 11:29:45 am »
I was using

/* MAC ADDRESS: MAC_ADDR0:MAC_ADDR1:MAC_ADDR2:MAC_ADDR3:MAC_ADDR4:MAC_ADDR5 TODO DO THIS PROPERLY*/
#define MAC_ADDR0   1
#define MAC_ADDR1   2
#define MAC_ADDR2   3
#define MAC_ADDR3   4
#define MAC_ADDR4   5
#define MAC_ADDR5   6

so yes the first byte is 00000001.

Changing it to 2 fixes it!!!

THANK YOU! :)

Z80 Z180 Z280 Z8 S8 8031 8051 H8/300 H8/500 90S1200 32F417
 

Offline CJay

  • Super Contributor
  • ***
  • Posts: 3962
  • Country: gb
Re: Bizzare issue with a Linksys LGS116P "QOS" switch - fake MAC # related?
« Reply #5 on: August 07, 2021, 02:33:50 pm »
I think that LSB=1 in the 1st octet signifies a multicast packet, so that's probably screwing things up.

Bloody hell, yes, so it does
 

Online peter-h

  • Super Contributor
  • ***
  • Posts: 1120
  • Country: gb
  • Doing electronics since the 1960s...
Re: Bizzare issue with a Linksys LGS116P "QOS" switch - fake MAC # related?
« Reply #6 on: August 09, 2021, 06:03:12 am »
The Q is why this breaks things with a switch which claims to do QOS, but works fine with any other switch tried.
Z80 Z180 Z280 Z8 S8 8031 8051 H8/300 H8/500 90S1200 32F417
 

Offline fordem

  • Regular Contributor
  • *
  • Posts: 180
  • Country: gy
Re: Bizzare issue with a Linksys LGS116P "QOS" switch - fake MAC # related?
« Reply #7 on: September 07, 2021, 01:15:04 pm »
The switch isn't supposed to care about MAC addresses, other than to use them as an index into a routing table (or some such).

That's incorrect - switching is all about MAC addresses, and which port they are connected to - and as far as routing tables go, switching is layer 2, routing is layer 3, so strictly speaking, from an OSI viewpoint switches don't route, and don't have routing tables, they have CAM tables, which are essentially a table that lists which MAC address is connected to which port.
 

Online peter-h

  • Super Contributor
  • ***
  • Posts: 1120
  • Country: gb
  • Doing electronics since the 1960s...
Re: Bizzare issue with a Linksys LGS116P "QOS" switch - fake MAC # related?
« Reply #8 on: September 13, 2021, 04:26:38 am »
Sure, but then how does QOS work (on an unmanaged switch)?

How can the switch decide which packets have priority?

One bizzare solution would be to do an online lookup on the MAC address of each device, to work out what type of device it is. Apparently this is possible, in the same way that you can check if a MAC address is a genuine paid-for one, rather than some random number; that is probably the only thing which stops a lot of chinese companies just generating MAC addresses since the risk of a collision on the same LAN segment is utterly negligible.
Z80 Z180 Z280 Z8 S8 8031 8051 H8/300 H8/500 90S1200 32F417
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf