Author Topic: Any micros with ETH and hardware incoming packet filtering by IP?  (Read 4364 times)

0 Members and 1 Guest are viewing this topic.

Offline peter-hTopic starter

  • Super Contributor
  • ***
  • Posts: 3694
  • Country: gb
  • Doing electronics since the 1960s...
Currently I have a 32F417 whose ETH is feeding packets to LWIP and this filtering of traffic not addressed to your IP is done up in LWIP.

In the embedded world one is unlikely to get deliberately DOS'd, and most "RJ45 boxes" connect to a port of a switch, not a hub, so only packets addressed to your MAC should be reaching you, but all broadcasts will reach you and there is a possibility of overload.

This was actually a real issue with some of the RJ45-to-serial modules (intended to make adding ETH to an old style Z80-type board which can't run a TCP/IP stack) which could not deal with any significant incoming traffic not addressed to their IP.

I guess one could hook up the ETH DMA and have an ISR dumping the packets down there, which is better.

Just wondering why such an apparently obvious feature was left out.
Z80 Z180 Z280 Z8 S8 8031 8051 H8/300 H8/500 80x86 90S1200 32F417
 

Online nctnico

  • Super Contributor
  • ***
  • Posts: 26883
  • Country: nl
    • NCT Developments
Re: Any micros with ETH and hardware incoming packet filtering by IP?
« Reply #1 on: August 07, 2022, 11:22:50 pm »
Currently I have a 32F417 whose ETH is feeding packets to LWIP and this filtering of traffic not addressed to your IP is done up in LWIP.

Just wondering why such an apparently obvious feature was left out.
It isn't. The hardware seems to be perfectly capable of doing all kinds of filtering. It is just left out at the driver level  :-//.
« Last Edit: August 07, 2022, 11:27:28 pm by nctnico »
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline westfw

  • Super Contributor
  • ***
  • Posts: 4199
  • Country: us
Re: Any micros with ETH and hardware incoming packet filtering by IP?
« Reply #2 on: August 08, 2022, 12:04:49 am »
Not receiving broadcasts would be a bad thing.  ARP would break, for example (although, those aren't even IP packets.)  Multicasts are typically filterable, either as a whole, or via a table of hashes.

If your network has a large quantity of broadcast IP packets, you should probably figure our why, and maybe change things at the network level.  There used to be a thing called "broadcast storms", but they should have been eliminated a long time ago.


Quote
I guess one could hook up the ETH DMA and have an ISR dumping the packets down there
Yes, you can save many cycles and dramatically improve performance by discarding packets that are "not useful" as early as possible.
 

Offline wek

  • Frequent Contributor
  • **
  • Posts: 494
  • Country: sk
Re: Any micros with ETH and hardware incoming packet filtering by IP?
« Reply #3 on: August 08, 2022, 05:50:56 am »
Currently I have a 32F417 whose ETH is feeding packets to LWIP and this filtering of traffic not addressed to your IP is done up in LWIP.

Just wondering why such an apparently obvious feature was left out.
It isn't. The hardware seems to be perfectly capable of doing all kinds of filtering. It is just left out at the driver level  :-//.
Can you please point me to the description of IP-level filtering in RM0090? All I can see is ETH level SA/DA filtering as described in 33.5.5. MAC filtering subchapter.

Sure, in purely LAN setting, there may be a nearly 1:1 relationship between MAC and IP addresses, but I am not sure how could this apply generally.

JW
 

Offline westfw

  • Super Contributor
  • ***
  • Posts: 4199
  • Country: us
Re: Any micros with ETH and hardware incoming packet filtering by IP?
« Reply #4 on: August 08, 2022, 06:45:14 am »
Quote
The hardware seems to be perfectly capable of doing all kinds of filtering.
All sorts of MAC address filtering (multiple unicast addresses - nice!)
I don't see any filtering capabilities above the MAC layer.
 

Offline Berni

  • Super Contributor
  • ***
  • Posts: 4946
  • Country: si
Re: Any micros with ETH and hardware incoming packet filtering by IP?
« Reply #5 on: August 08, 2022, 06:45:26 am »
Handling the IP protocols on top is a lot more complicated, so it very rarely done in hardware.

What you are supposed to use is MAC filtering. If you don't want to see broadcast messages then you just disable the broadcast MAC of FF:FF:FF:FF:FF:FF

Handling large amount of traffic is not that hard if the software is well written. One test i do with ethernet on MCUs is that i set up a loopback port that sends back anything you send to it then fire full 100Mbit worth of data at that port. They seam to be able to maintain that even while doing other stuff.
 

Offline voltsandjolts

  • Supporter
  • ****
  • Posts: 2297
  • Country: gb
Re: Any micros with ETH and hardware incoming packet filtering by IP?
« Reply #6 on: August 08, 2022, 07:06:08 am »
Well, I'm no ethernet expert, but these days aren't ethernet switches used almost exclusively, rather than the old fashioned ethernet hubs? If you're connected through a switch, you already got ip filtering for free?
 

Offline westfw

  • Super Contributor
  • ***
  • Posts: 4199
  • Country: us
Re: Any micros with ETH and hardware incoming packet filtering by IP?
« Reply #7 on: August 08, 2022, 08:58:51 am »
Quote
If you're connected through a switch, you already got ip filtering for free?
Not of broadcasts.


I’ll repeat - if your  Net has a high level of broadcast IP packets, that you hoped to filter out by IP address, something is probably wrong with “other hosts” on the net.

 

Offline peter-hTopic starter

  • Super Contributor
  • ***
  • Posts: 3694
  • Country: gb
  • Doing electronics since the 1960s...
Re: Any micros with ETH and hardware incoming packet filtering by IP?
« Reply #8 on: August 08, 2022, 09:03:47 am »
Quote
Well, I'm no ethernet expert, but these days aren't ethernet switches used almost exclusively, rather than the old fashioned ethernet hubs? If you're connected through a switch, you already got ip filtering for free?

I think that's true for most LAN (e.g. factory floor) installations.

Doesn't stop a flood of broadcast packets though, which at 100mbps would pretty well finish off the ISR handling ETH RX (which is not a trivial ISR) and one needs to decide whether this vulnerability is worth addressing.

In the product I am working on this was solved by polling for RX packets, at 100Hz, resulting in a 250kbyte/sec data rate cap, which is fine for the application. I can't explain why 2500 bytes are transferred each time; it isn't a multiple of anything...

If using an RX interrupt (which everybody says you must ;) ) then this can be solved by the ISR disabling the IRQ for a bit, setting a timer, and then re-enabling the ETH IRQ from a timer ISR. Which is... hey pretty much what I am doing with polling :) Well, you could make it more cunning, like run flat out for up to 100ms and then start backing off the IRQ.

Quote
something is probably wrong with “other hosts” on the net.

For sure, but that doesn't help you :)
Z80 Z180 Z280 Z8 S8 8031 8051 H8/300 H8/500 80x86 90S1200 32F417
 

Offline Berni

  • Super Contributor
  • ***
  • Posts: 4946
  • Country: si
Re: Any micros with ETH and hardware incoming packet filtering by IP?
« Reply #9 on: August 08, 2022, 09:31:50 am »
The ethernet controller on the STM32F4 series has a specific bit for broadcast the BFD(Broadcast frames disable) inside ETH_MACFFR. You won't even get a interrupt in that case.

But if you have somehow broadcast traffic at 100Mbit directed at your own MAC address then you have a really weirdly configured network. I can always denial of service a 100Mbit device on a network by simply sending a massive amount of traffic towards it using a 1Gbit link. The switch itself won't have the capacity to fit the data into the 100Mbit link so packets will be dropped inside the switch before they even get to you.

But yes if you are worried about the ethernet ISR eating so much CPU time that your main thread stops the easy fix is to add a counter inside the ISR and disable it when it gets called too often, then later on turn it back on (by timer or in the main loop)

If you want to be more selective you could also add a "firewall" in the ISR that doesn't even pass packets over to LWIP unless they look useful. You can do a few quick checks at fixed offsets in the packet to determine it as a IPv4 TCP packet for a certain port. But you have to be careful to not block any of the other housekeeping traffic like DHCP and IP discovery packets as otherwise the network you are on might not be able to find you.
 

Online nctnico

  • Super Contributor
  • ***
  • Posts: 26883
  • Country: nl
    • NCT Developments
Re: Any micros with ETH and hardware incoming packet filtering by IP?
« Reply #10 on: August 08, 2022, 10:01:03 am »
Currently I have a 32F417 whose ETH is feeding packets to LWIP and this filtering of traffic not addressed to your IP is done up in LWIP.

Just wondering why such an apparently obvious feature was left out.
It isn't. The hardware seems to be perfectly capable of doing all kinds of filtering. It is just left out at the driver level  :-//.
Can you please point me to the description of IP-level filtering in RM0090? All I can see is ETH level SA/DA filtering as described in 33.5.5. MAC filtering subchapter.

Sure, in purely LAN setting, there may be a nearly 1:1 relationship between MAC and IP addresses, but I am not sure how could this apply generally.
I missed the 'IP' part but it wouldn't surprise me if MAC filtering has not been enabled so that would be a good first step. Still it wouldn't protect against a broadcast storm (but IP filtering doesn't protect against that either).
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Online 2N3055

  • Super Contributor
  • ***
  • Posts: 6591
  • Country: hr
Re: Any micros with ETH and hardware incoming packet filtering by IP?
« Reply #11 on: August 08, 2022, 10:54:14 am »
So much wrong information here..

IP layer is layer 3. It lives in application processor, and Ethernet controller is completely oblivious of it by design...
TCP/IP stack is software stack. Period. OSI layers and such nonsense..

TCP/IP was conceived to run on UNIX workstation... IOT was not it's design target, and it shows..

Broadcasts are nominal part of how network works,  ARP broadcasts for instance..
As said, good switch's job is to pass only packets for your MAC, which include all broadcasts.

Any cleanup of traffic needs to happen inside network equipment.

DOS will kill all equipment. Network equipment can (should) have built in tools to fight that..

Once network is complicated (or screwed up) enough you need to hire network expert to sort it out for you.. Networking is complicated and hard enough, and it is a full time job, on anything more than dozen of hosts on a home router....



 

Online nctnico

  • Super Contributor
  • ***
  • Posts: 26883
  • Country: nl
    • NCT Developments
Re: Any micros with ETH and hardware incoming packet filtering by IP?
« Reply #12 on: August 08, 2022, 11:31:17 am »
So much wrong information here..

IP layer is layer 3. It lives in application processor, and Ethernet controller is completely oblivious of it by design...
TCP/IP stack is software stack. Period. OSI layers and such nonsense..

TCP/IP was conceived to run on UNIX workstation... IOT was not it's design target, and it shows..
There are switch chips / processors aimed at routers that have handling of layer 3 in hardware. The idea is not that outlandish. A possible solution is to add a switch chip as a phy to a microcontroller and use the layer 3 handling in the switch chip as some kind of firewall / filter. A super low cost switch chip like the IP175DLF already supports some L3 filtering.

Also don't forget that tcp/ip and IPv4 where never designed with any network security in mind and that a modern day microcontroller runs circles around those old Unix workstations (from the 90's) where it comes to processing power.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Online 2N3055

  • Super Contributor
  • ***
  • Posts: 6591
  • Country: hr
Re: Any micros with ETH and hardware incoming packet filtering by IP?
« Reply #13 on: August 08, 2022, 04:32:29 pm »
So much wrong information here..

IP layer is layer 3. It lives in application processor, and Ethernet controller is completely oblivious of it by design...
TCP/IP stack is software stack. Period. OSI layers and such nonsense..

TCP/IP was conceived to run on UNIX workstation... IOT was not it's design target, and it shows..
There are switch chips / processors aimed at routers that have handling of layer 3 in hardware. The idea is not that outlandish. A possible solution is to add a switch chip as a phy to a microcontroller and use the layer 3 handling in the switch chip as some kind of firewall / filter. A super low cost switch chip like the IP175DLF already supports some L3 filtering.

Also don't forget that tcp/ip and IPv4 where never designed with any network security in mind and that a modern day microcontroller runs circles around those old Unix workstations (from the 90's) where it comes to processing power.

Yeah exactly what I said... Those are networking equipment specials, nothing to do at all with embedded microcontrollers running  LWIP.. Which is not even a full IP protocol stack.

Answer to OP question is what I said, what he wanted is NOT obvious feature to be added and it is not there by design. And all the complexity you propose would only serve his fear "it might get in problems if we get hacked"...

I'm not saying that in theory what you say is wrong (it's not) but it is shooting a fly with cannon, and not really needed. And all the complexity added is explanation why it is NOT done.

 

Offline peter-hTopic starter

  • Super Contributor
  • ***
  • Posts: 3694
  • Country: gb
  • Doing electronics since the 1960s...
Re: Any micros with ETH and hardware incoming packet filtering by IP?
« Reply #14 on: August 08, 2022, 04:37:16 pm »
Quote
"it might get in problems if we get hacked"...

I didn't say that.
Z80 Z180 Z280 Z8 S8 8031 8051 H8/300 H8/500 80x86 90S1200 32F417
 

Online 2N3055

  • Super Contributor
  • ***
  • Posts: 6591
  • Country: hr
Re: Any micros with ETH and hardware incoming packet filtering by IP?
« Reply #15 on: August 08, 2022, 04:43:33 pm »
Quote
"it might get in problems if we get hacked"...

I didn't say that.
Than I misunderstood. If you are not under DDOS or broadcast storm, no need to worry...
 

Offline wek

  • Frequent Contributor
  • **
  • Posts: 494
  • Country: sk
Re: Any micros with ETH and hardware incoming packet filtering by IP?
« Reply #16 on: August 08, 2022, 08:42:50 pm »
So much wrong information here..

IP layer is layer 3. It lives in application processor, and Ethernet controller is completely oblivious of it by design...
TCP/IP stack is software stack. Period. OSI layers and such nonsense..
Pity somebody did not tell this to Synopsys. So, they by mistake built in IP and even ICMP/UDP/TCP header checksum offload into the ETH/MAC IP which is used in the STM32s...

Given this, it would be entirely possible to add IP address (both source and destination) filtering/steering/whatnot, even TCP/UDP port-based one. Maybe in some incarnations of this IP they did (Synopsys IP are usually widely configurable when deployed), maybe even in some STM32 ('H7 perhaps?). I'm just not interested enough to look it up.

[EDIT] OK, maybe not interested but curious :-D From RM0433 ('H743):
The MAC supports Layer 3 and Layer 4 based packet filtering. The Layer 3 filtering refers to the IP Source or Destination Address filtering in the IPv4 or IPv6 packets whereas Layer 4 filtering refers to the Source or Destination Port number filtering in TCP or UDP.

OK so this answers the OP's question, I guess.
JW

« Last Edit: August 08, 2022, 08:53:18 pm by wek »
 
The following users thanked this post: nctnico, peter-h

Online 2N3055

  • Super Contributor
  • ***
  • Posts: 6591
  • Country: hr
Re: Any micros with ETH and hardware incoming packet filtering by IP?
« Reply #17 on: August 08, 2022, 10:25:17 pm »
So much wrong information here..

IP layer is layer 3. It lives in application processor, and Ethernet controller is completely oblivious of it by design...
TCP/IP stack is software stack. Period. OSI layers and such nonsense..
Pity somebody did not tell this to Synopsys. So, they by mistake built in IP and even ICMP/UDP/TCP header checksum offload into the ETH/MAC IP which is used in the STM32s...

Given this, it would be entirely possible to add IP address (both source and destination) filtering/steering/whatnot, even TCP/UDP port-based one. Maybe in some incarnations of this IP they did (Synopsys IP are usually widely configurable when deployed), maybe even in some STM32 ('H7 perhaps?). I'm just not interested enough to look it up.

[EDIT] OK, maybe not interested but curious :-D From RM0433 ('H743):
The MAC supports Layer 3 and Layer 4 based packet filtering. The Layer 3 filtering refers to the IP Source or Destination Address filtering in the IPv4 or IPv6 packets whereas Layer 4 filtering refers to the Source or Destination Port number filtering in TCP or UDP.

OK so this answers the OP's question, I guess.
JW

It does not.
There are lot of "maybes" and "coulds" in your answer. Those don't make a product.
Or shall I say, maybe that is an answer.

Unless you are volunteering to rewrite LWIP to use these features..
Like I said. Theory is one thing.
There is plenty of silicon that has these kinds of features.

None in a ready made form combination of hardware/software that OP can simply use in his scenario. This kind of filtering is not dev time setup, but run time setup. So you would not only need to make new stack that supports it, but also access table management tools etc etc. It gets complicated quick. For a concern that (normal) broadcasts on a network might overload IP stack...


Most of the time, people are trying to use development tools to make products, not spend time developing development tools, or tools in general.
 

Online nctnico

  • Super Contributor
  • ***
  • Posts: 26883
  • Country: nl
    • NCT Developments
Re: Any micros with ETH and hardware incoming packet filtering by IP?
« Reply #18 on: August 08, 2022, 10:31:30 pm »
You are overthinking it. If what wek writes is correct, then those hardware filtering options already provide a lot of possibilities to get rid of traffic that doesn't interest you. Just look what a typical Windows PC broadcasts on a network. If the hardware can already filter those ports out, then you already got rid of quite a bit of traffic. Same goes for multicast traffic that might hit your device.

And you don't need to rewrite Lwip (or whatever network stack you use) or develop tools. Just add a few lines of code that setup the filters at startup and be done with it. The network stack doesn't need to know anything about what filtering is going on.

Another possibility is to add IP and port based filtering in the network driver layer. At least you won't be feeding a lot of data into network stack that gets discarded but it depends on how the network stack is organised whether this is an improvement or not.
« Last Edit: August 08, 2022, 10:35:59 pm by nctnico »
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline mikeselectricstuff

  • Super Contributor
  • ***
  • Posts: 13727
  • Country: gb
    • Mike's Electric Stuff
Re: Any micros with ETH and hardware incoming packet filtering by IP?
« Reply #19 on: August 08, 2022, 10:36:19 pm »
Currently I have a 32F417 whose ETH is feeding packets to LWIP and this filtering of traffic not addressed to your IP is done up in LWIP.

In the embedded world one is unlikely to get deliberately DOS'd, and most "RJ45 boxes" connect to a port of a switch, not a hub, so only packets addressed to your MAC should be reaching you, but all broadcasts will reach you and there is a possibility of overload.

This was actually a real issue with some of the RJ45-to-serial modules (intended to make adding ETH to an old style Z80-type board which can't run a TCP/IP stack) which could not deal with any significant incoming traffic not addressed to their IP.

I guess one could hook up the ETH DMA and have an ISR dumping the packets down there, which is better.

Just wondering why such an apparently obvious feature was left out.
Can it actually cause an overload/overrun in practice ?
If the IP  stack is reasonably efficient, e.g. not transferring any payload of packets not of interest, I'd have thought a 168MHz processor would be able to deal with anything a 100mbit interface can throw at it. Even if it is DMAing the whole packet into double-buffered RAM with, say, a 50 byte packet, that's roughly 5uS of line-time,  so over 750 cycles to deal with it, which ought to be enough.
Youtube channel:Taking wierd stuff apart. Very apart.
Mike's Electric Stuff: High voltage, vintage electronics etc.
Day Job: Mostly LEDs
 
The following users thanked this post: 2N3055

Offline westfw

  • Super Contributor
  • ***
  • Posts: 4199
  • Country: us
Re: Any micros with ETH and hardware incoming packet filtering by IP?
« Reply #20 on: August 09, 2022, 03:11:28 am »
Quote
So much wrong information here..

Yep.

Quote
IP layer is layer 3. It lives in application processor, and Ethernet controller is completely oblivious of it by design...
TCP/IP stack is software stack. Period. OSI layers and such nonsense..
Nope.   "Upper level filtering", "Checksum offload", and other "layer violating features" have been incorporated into "advanced"  Ethernet controllers for decades now.  Frequently, they end up unused, because it would require too much effort at the driver level, and too many level-violating hacks in the OS, to make use of.


Quote
TCP/IP was conceived to run on UNIX workstation...
Nonsense.  TCP/IP was designed well before "Unix workstations" even existed.  It was designed for mainframes!
(The TCP/IP Transition of ARPANet/Milnet was 1/1/83 - "production deployment" after years of R&D.  So was the AT&T breakup that led to the easy commercialization of Unix as an OS.)

Quote
IOT was not it's design target, and it shows..
I dunno.  Wireless Packet Radio, running on relative small ("mobile", in the sense that you could put it on a smallish truck or airplane) was always a goal, and there were pre-TCP projects that ran on things like PDP11s.  Today's microcontrollers are considerably more powerful than those early networking nodes.  More changes have been added to the protocol suite to accommodate bigger, faster computers than to adapt to smaller systems.  Although I guess the stack generally assumes a "RAM Rich" environment that is less common on microcontrollers.
 

Offline peter-hTopic starter

  • Super Contributor
  • ***
  • Posts: 3694
  • Country: gb
  • Doing electronics since the 1960s...
Re: Any micros with ETH and hardware incoming packet filtering by IP?
« Reply #21 on: August 09, 2022, 06:09:40 am »
Quote
And you don't need to rewrite Lwip (or whatever network stack you use) or develop tools. Just add a few lines of code that setup the filters at startup and be done with it. The network stack doesn't need to know anything about what filtering is going on.

Yes it would be good for building a simple firewall function - one that actually works in the face of lots of incoming data. The CPU ETH hardware can deal with 100mbps data rate.

Quote
Can it actually cause an overload/overrun in practice ?
If the IP  stack is reasonably efficient, e.g. not transferring any payload of packets not of interest, I'd have thought a 168MHz processor would be able to deal with anything a 100mbit interface can throw at it. Even if it is DMAing the whole packet into double-buffered RAM with, say, a 50 byte packet, that's roughly 5uS of line-time,  so over 750 cycles to deal with it, which ought to be enough.

It depends on how long the RX ISR is. Probably 10-20us. Then you have the higher level processing in LWIP, checking whether the packet is for us. So this would hang the target pretty well.

Quote
Frequently, they end up unused, because it would require too much effort at the driver level, and too many level-violating hacks in the OS, to make use of.

LWIP has an option to use hardware checksums, and I have them all enabled in my project.
Z80 Z180 Z280 Z8 S8 8031 8051 H8/300 H8/500 80x86 90S1200 32F417
 

Offline Berni

  • Super Contributor
  • ***
  • Posts: 4946
  • Country: si
Re: Any micros with ETH and hardware incoming packet filtering by IP?
« Reply #22 on: August 09, 2022, 07:24:27 am »
Can it actually cause an overload/overrun in practice ?
If the IP  stack is reasonably efficient, e.g. not transferring any payload of packets not of interest, I'd have thought a 168MHz processor would be able to deal with anything a 100mbit interface can throw at it. Even if it is DMAing the whole packet into double-buffered RAM with, say, a 50 byte packet, that's roughly 5uS of line-time,  so over 750 cycles to deal with it, which ought to be enough.

That was my first point in the thread. I used Ethernet on STM32 chips before and i could throw 100Mbit of traffic at it while it is sending 100Mbit of traffic back at me and yet everything just kept running.

There is a different exploit if you want to intentionally bring a network device to its knees. You can send a flood of the smallest possible packets that the device might still care about. That way you can fit as many packets as possible in a given link speed. The data can be moved fast but the packet headers the device sometimes has to think about. For example you can crash most home routers (even pretty expensive ones) by sending it a huge flood of TCP SYN packets for a few seconds. It is only the real deal professional networking gear that survives that. So i don't think it is reasonable to design your device to survive this. If the network is spewing too tons of junk at you it is the network admins job to get there shit together.
 

Online nctnico

  • Super Contributor
  • ***
  • Posts: 26883
  • Country: nl
    • NCT Developments
Re: Any micros with ETH and hardware incoming packet filtering by IP?
« Reply #23 on: August 09, 2022, 03:33:20 pm »
So much wrong information here..

IP layer is layer 3. It lives in application processor, and Ethernet controller is completely oblivious of it by design...
TCP/IP stack is software stack. Period. OSI layers and such nonsense..

TCP/IP was conceived to run on UNIX workstation... IOT was not it's design target, and it shows..
There are switch chips / processors aimed at routers that have handling of layer 3 in hardware. The idea is not that outlandish. A possible solution is to add a switch chip as a phy to a microcontroller and use the layer 3 handling in the switch chip as some kind of firewall / filter. A super low cost switch chip like the IP175DLF already supports some L3 filtering.


Yeah exactly what I said... Those are networking equipment specials, nothing to do at all with embedded microcontrollers running  LWIP..
On the contrary. I have used various switch chips as a phy in several projects with a microcontroller running a network stack. As soon as there is a requirement to be able to daisy chain network devices, a switch chip is super handy to use.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline westfw

  • Super Contributor
  • ***
  • Posts: 4199
  • Country: us
Re: Any micros with ETH and hardware incoming packet filtering by IP?
« Reply #24 on: August 09, 2022, 08:00:05 pm »
Quote
This was actually a real issue with some of the RJ45-to-serial modules (intended to make adding ETH to an old style Z80-type board which can't run a TCP/IP stack) which could not deal with any significant incoming traffic not addressed to their IP.
This is becoming a pointless discussion without having more details on the original problem.  We have:
  • DoS is likely always possible.
  • Receiving broadcasts is important.
  • Broadcast density on a properly operating LAN should be low.
IIRC, there were SOME ethernet controllers that were sufficiently broken WRT to receiving some desirable packets that the fix was to operate them in promiscuous mode (receives ALL packets) and filter entirely in SW.  But that was a long time ago, and the ubiquity of switches should make even those less problematic...

(Ah, memories!  Sending broadcast pings with IP options on the InterOp show net, back when no one implemented IP options, and when that wouldn't get you kicked out of the show...)
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf