8

Suppose an ADSL2 Annex A device had a upload speed of 300kbps; tested using a TCP connection. Now suppose I want to send 8-byte UDP keep-alive packets at the maximum possible rate*.

Would the effective packet forwarding rate be 4,800 p/s or considerably less than this due to the tiny size of the packets?

Is the packet forwarding rate for UDP strictly linear to packet size? (i.e. Half the size, twice the rate.)

* The application's objective being to notify as many different known peers as possible that this peer is "alive and open for business" without requiring a centralised tracker. The maximum packet forwarding rate defines the maximum decentralised size of the application's P2P (sparse) mesh network.

Mike Pennington
  • 29,876
  • 11
  • 78
  • 152
  • Are you assuming that 300Kbps was the bandwidth of TCP payload alone (i.e. not including IP / ADSL overhead)? What is the encapsulation used on the ADSL line? – Mike Pennington Oct 11 '13 at 06:32
  • @MikePennington Let's assume this is 300kbps at the Layer 4 TCP level. I don't know enough about Layer 1 / 2 networking to know the default ADSL encapsulation for internet traffic. – LateralFractal Oct 11 '13 at 06:50

1 Answers1

10

Is ADSL's UDP packet forwarding rate strictly linear to packet size?

The answer is "no, because of the variable nature of ATM AAL5 padding used in ADSL lines".

Since you aren't sure what encapsulation is used on the ADSL modem, I'll assume it's PPPoE, most providers use PPPoE for customer connections. I also assume that you've measured the full ATM bandwidth available to the modem. I made several other assumptions... see below for all of them.

Would the effective packet forwarding rate be 4,800 p/s or considerably less than this due to the tiny size of the packets?

It is considerably less than 4800 pps because PPPoE requires the ADSL modem to encapsulate the entire ethernet frame in the ADSL payload. To find the forwarding rate of 8-byte UDP packets on this ADSL line...

  1. First we have to find how many packets per second of PPPoE you're sending when you measured the download speed. Given the assumption of 300Kbps (1452-byte TCP payloads) in the question, calculate the PPPoE packets per second (pps)...

    (300*1000 bps) / (1452 Bytes/packet * 8 bits/Byte) = 25.826 1452-byte TCP pps

  2. Now we need to calculate the number of ATM cells per second required for 300Kbps of 1452-byte TCP payloads over PPPoE... Assume the AAL5 MUX PDU is 1536 Bytes including padding, which equates to 32 ATM Cells per PPPoE packet (at 1452 byte TCP payloads).

    (25.826 PPPoE pps) * (32 ATM Cells per PPPoE packet) = 826.45 ATM Cells per second (826.45 ATM Cells per second) * (53 bytes per ATM cell) * (8 bits per Byte) = 350413.22 bps

  3. Finally, we can use this number to derive the number of 8-byte UDP payloads... each 8-byte UDP packet encapsulated in PPPoE is 2 ATM cells...

Answer:

(826.45 cells per second) / (2 cells per UDP packet) = 413.22 8-byte UDP pps

References & Assumptions

Informational references:

I am assuming:

  • You have 1518 byte Ethernet II frames on your LAN...
  • You have a constant bit rate upload at the ATM layer (ADSL uses ATM cells)
  • Your provider requires PPPoE encapsulation
  • You have no rate-limiting on your LAN
  • You measured 100% of your ADSL modem's ATM cell capacity when you measured 300Kbps of TCP payload

A generic Ethernet UDP packet with an 8-byte payload, inside PPPoE looks like this...

+------------------------------+
| Ethernet II Header: 14 Bytes |
+------------------------------+
|     PPP Header: 2 Bytes      |
+------------------------------+
|    PPPoE Header: 6 Bytes     |
+------------------------------+
|    IPv4 Header: 20 Bytes     |
+------------------------------+
|      UDP Header: 8 Bytes     |
+------------------------------+
|      UDP Payload: 8 Bytes    |  <------ Payload here
+------------------------------+
| Ethernet padding to 64 Bytes |
|     This pad is 2 Bytes      |
+------------------------------+
|   Ethernet CRC32: 4 Bytes    |
+------------------------------+

A generic AAL5 MUX PDU with PPPoE and a 8-byte UDP payload looks like this... With AAL5 padding, the total PDU is 96 bytes, which is 2 ATM cells.

+------------------------------+
| Ethernet II Header: 14 Bytes |
+------------------------------+
|     PPP Header: 2 Bytes      |
+------------------------------+
|    PPPoE Header: 6 Bytes     |
+------------------------------+
|    IPv4 Header: 20 Bytes     |
+------------------------------+
|      UDP Header: 8 Bytes     |
+------------------------------+
|      UDP Payload: 8 Bytes    |
+------------------------------+
| Ethernet padding to 64 Bytes |
|     This pad is 2 Bytes      |
+------------------------------+
|   Ethernet CRC32: 4 Bytes    |
+------------------------------+
| AAL5 Padding: Up to 47 Bytes |  <------ Used to keep the PDU at even 48-byte ATM payloads
|     This pad is 24 Bytes     |
+------------------------------+
|  AAL5 CPCS Trailer: 8 Bytes  |
+------------------------------+

A generic Ethernet MTU-sized TCP packet inside PPPoE looks like this...

+------------------------------+
| Ethernet II Header: 14 Bytes |
+------------------------------+
|     PPP Header: 2 Bytes      |
+------------------------------+
|    PPPoE Header: 6 Bytes     |
+------------------------------+
|    IPv4 Header: 20 Bytes     |
+------------------------------+
|     TCP Header: 20 Bytes     |
+------------------------------+
|   TCP Payload: 1452 Bytes    |  <------ Payload here
+------------------------------+
|   Ethernet CRC32: 4 Bytes    |
+------------------------------+

A generic AAL5 MUX PDU with PPPoE and a 1452-byte TCP payload looks like this... with AAL5 padding the total PDU is 1536 bytes, which is 32 ATM cells.

+------------------------------+
| Ethernet II Header: 14 Bytes |
+------------------------------+
|     PPP Header: 2 Bytes      |
+------------------------------+
|    PPPoE Header: 6 Bytes     |
+------------------------------+
|    IPv4 Header: 20 Bytes     |
+------------------------------+
|     TCP Header: 20 Bytes     |
+------------------------------+
|   TCP Payload: 1452 Bytes    |
+------------------------------+
|   Ethernet CRC32: 4 Bytes    |
+------------------------------+
| AAL5 Padding: Up to 47 Bytes |  <------ Used to keep the PDU at even 48-byte ATM payloads
|     This pad is 10 Bytes     |
+------------------------------+
|  AAL5 CPCS Trailer: 8 Bytes  |
+------------------------------+
Mike Pennington
  • 29,876
  • 11
  • 78
  • 152