OpenWrt Forum Archive

Topic: hardware nat absence performance impact?

The content of this topic has been archived on 27 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hithere,

I have a question about the 'hardware nat' feature that some routers have nowadays.

I am aware that open source router firmwares currently don't support this feature. I am curious on how this impacts performance of a router, but haven't been able to find much information on this.

Is there something that can be said generally on this?

And more specifically:
I might have to choose between a TP-Link TL-WDR4900 with open-source firmware (so no HW nat), or a TL-WDR4300 with stock fw, thus with HW nat.
Most important usage is surfing and downloading (torrent/emule/newsgroups)

Any light in the dark and some advice is much appreciated!

Since router CPUS are relatively slow and uni core, expect 2 to 4 times performance gain if you were to use Hardware NAT.
Open source gives you freedom to shape your router any way you like. You can even do your own coding in C, BASH, LUA etc and make the router dance on your tune i.e if you know how to program. Even if you don't know programming, you can still use open source packages to customize your router any way you like.

HW nat as advertised by TPLINK may offer upto 800 Mbps throughput on WAN port. This could be useful if you have Gigabit internet connection. However for rest of the world who don't even have 100 Mbps internet connection (Including myself, most I get is 20Mbps), hardware NAT  will offer no advantage. Yes it will reduce the load of your router's CPU but to do what? If  you are using TPLINK firmware, you wont be able to do much with the CPU saving any way.

So in summary, HW nat would be helpful once Gigabit internet is commonly available and if router CPUs are pathetically slow. However HW nat can be substituted with faster multicore CPU  (some companies have already started dual core routers) routers. I would prefer a faster CPU since I can do more than just NAT with it. The resistance to HW NAT seems to come from the fact that it does not fit the existing netfilter model. So I don't see any thing happening on the HW NAT side, unless the HW NAT would adjust to the existing software model or the need of speed forces programmers to change the netfilter model. I hope I was able to  shed some light for you and others as well.

(Last edited by ron on 9 Jul 2013, 18:58)

I have a wdr4900 and running openwrt makes 0 difference on my 60 Mbit (downstream) compared to stock firmware with HW NAT (in terms of WAN > LAN throughput as least)

ron is absolutely right

(I've read that with HW NAT the wdr4900 does about 900, without it roughly half - so still plenty)

Thank you guys, that's very good information.

I had some vague assumption that with hardware nat maybe surfing the web might feel snappier while simultaneously doing some downloading, but I guess I can now rest assure that this hw nat can go somewhere to the very bottom of my list of required features.

I don't now what router CPUS are, but AFAIK the "hardware NAT" is a feature which is integrated into the switch and not the SoC/CPU-Block!
It was discussed somewhere: possible in OpenWrt but very "hacky".

Edit: But feel free to add information about hardware NAT to the wiki, e.g. switch!

(Last edited by kirschwasser on 10 Jul 2013, 17:21)

The discussion might have continued from here.