|Router, PPPoE and DM9003|
|July 29, 2008|
|Many users like to ask, do you support PPPoE? It seems to be a simple and professional question, but now I understand it in a different way.
When someone asking PPPoE, you can be sure that what he really like to know is, do your IP phone has router functions?
The answer is no, AR1688 does not have router functions and we can not add it in future software due to Z80 processing power limitations.
However, we now do support PPPoE after so many false feature request on it. You can put AR1688 IP phone in the place of your router, for example, connecting to an ADSL modem by RJ45 cable.
AR1688 knows how to dial up by PPPoE and make itself online, but it can not make other device like your PC (on the other RJ45 port of the phone) online.
With RTL8019AS, the extra support of PPPoE will slow down a little network performance in theory but it can hardly be measured.
Both PPPoE and none PPPoE show almost the same performance.
One of DM9003's advanced feature is that it can compute IP, UDP and TCP checksum by hardware. It is especially useful for processing power limited controller like AR1688.
However, DM9003 hardware can not recognize PPPoE packets and compute checksum correctly for them. We have to disable hardware checksum compute when PPPoE is enabled.
Because of this, the PPPoE network performance with DM9003 is obviously worse than none PPPoE performance.
The performance difference does not have really impact with VoIP function. But with video support in the near future, we will see the difference soon.
| || |
|PoE and PPPoE|
|Updated on July 30, 2008|
|Compared with the PPPoE/Router confusion, much less user will get confused with PoE and PPPoE, but still has!
PoE: Power over ethernet.
PPPoE: PPP over ethernet. PPP is the protocol used in modem, before the broadband is built into every home.
Everything over ethernet was a dream started about 10 years ago, it is now mostly replaced by another everything wireless dream. PoE is still not widely used after so many years.
Our first PoE design was from Huawei3Com, when it was ordering PA1688 based IP phones and need extra PoE.
The extra support needs about 2 USD extra hardware cost with a few more components. Usually a manufacturer will build the PCB with PoE design on it but left PoE components unmounted until it is necessary,
because PoE request is not common at all. The design was kept and optimized into AR1688 designs. For example, Digitmat GP1266 IP phone supports it with special orders and extra 20 RMB in sales price.
GP1266 has 2 RJ45 ports, those are same functioning switch ports. With the PoE version, only LAN1 will have power supply.
| || |
|PPPoE and PPP Source Code|
|Updated on Aug 3, 2008|
|The name of AR1688 software API means that AR1688 is not a fully open source system. We kept some secrets for ourselves. PPPoE and PPP source code was part of the secrets,
until an user asked whether he can add 802.1X support based on our software API last week.
To add 802.1X EAPOL, developer need to know how to read and write raw ethernet packet and how to call MD5 function to work with RADIUS server.
Starting from 0.36 API, AR1688 developers will find 3 new files net.c, ppp.c and pppoe.c in SDCC\src,
and 2 new files, ne2000.h and dm9000.h in SDCC\include. PPPoE implementation will serve as an example of how to read and write raw socket,
and the CHAP implementation in PPP can be example of MD5. More MD5 examples can be found in IAX2 and SIP source code,
but CHAP example may be easier for those none VoIP developers.
| || |
|PPPoE and VLAN|
|Updated on Aug 4, 2008|
|A PA1688 IP phone user wrote 802.1Q and 802.1p VLAN support for RTL8019AS a few years ago. We copied the implementation to AR1688 software in early 2006.
In the software, the Z80 controller in AR1688 is responsible to remove VLAN tag in incoming packet and add VLAN tag in outgoing packet.
DM9003 switch support VLAN in a better way, the hardware knows how to remove VLAN tag in incoming packet, and if necessary, automatically add VLAN tag in outgoing packet.
It is another good feature DM9003 has to speed up network performance when 802.1Q VLAN is used.
When PPPoE is also used, it is interesting to consider which to be put right after those MAC addresses, the VLAN tag, or the PPPoE header?
In other words, VLAN inside PPPoE packet, or PPPoE inside VLAN packet, or both possible?
The answer is clear by looking up into those standard documents. And it is also quite clear just by reading DM9003 datasheet,
since VLAN tag is added or removed by hardware after we processed PPPoE packet by Z80 controller, the only possible way is PPPoE inside VLAN packet.
Which means, PPPoE can be used in VLAN environment, but you can not build a VLAN by PPPoE dial up. Looking back on the PA1688 RTL8019AS 802.1Q VLAN software, it does just the right thing!
We can not help to wonder how many network genius were playing with our little devices all those years.
When 802.1Q VLAN is used, the max 802.3 data length is increased from 1514 to 1518 bytes (without CRC), with four extra bytes for the VLAN tag.
Again, PPPoE does not has this length previlege, it will only cause 8 bytes short of data, for the PPPoE header information it is carrying.
| || |
|How to Test VLAN|
|Updated on Dec 6, 2008|
|Finally, we can now test VLAN function support, more than 4 years after Nic Bellamy wrote 802.1Q VLAN support for the RTL8019AS on PA1688 IP phones.
Both DM9003 and KSZ8842 support VLAN functions, so both AR168O and AR168P IP phones can work as VLAN switch.
In order to make user interface simple, we still only have 1 VLAN tag option in the phone settings. All those 3 ports on the VLAN switch will use the same VLAN tag.
After all, we are designing IP phones, not VLAN switch.
Normal AR168O and AR168P software will work just as those RTL8019AS based IP phones, sending data out with VLAN tag and only response to data with correct VLAN tag.
To connect to the outside none VLAN world, we need a special OEM_VLAN software to make port-1 of the phone to up-link to none VLAN switches or routers.
The command line to make those special software is like:
mk ar168o iax2 us vlan
mk ar168p sip cn vlan
Digitmat GP2268(AR168P) uses the same plastic case as its GP1260 and GP1266, the LAN1 mark (near the power jack) indicates port-1.
When using device from other manufacturers without clear indication, users can get port-1 and port-2 position by plug in and out the network cable into both RJ45,
the syslog standard based debug message will display port plug in and out status. Again, this is new function based on DM9003 and KSZ8842.
RTL8019AS can not check link status without 93C46 EEPROM on board, which we saved from the first day without hesitation to save overall cost.
The LAN1 and LAN2 interface of GP1260(AR168G)/GP1266/GP2268(AR168P) IP phones.
| || |
|Updated on Dec 15, 2012|
|Removed unsteady hardware type VER_AR168O/VER_AR168KD and related DM9003 code in software API.
| || |
|PPPoE Becomes an Option|
|Updated on Sep 9, 2015|
|Added SYS_PPPOE in version.h, the PPPoE support is only available when it is defined.
This option can help customers who do not use PPPoE to have more space for their own applications.
No comments for this page yet.