1

I am new to computer networking and am reading Chapter 1 of Computer Networking (by James F. Kurose and Keith W.Ross). They have mentioned that the nodal delay is a sum of queuing, transmission, propagation and processing delay. I had the following doubt - if a packet 1 is currently being processed at a router (and say it has 10ms of processing time remaining). At that time, Another packet 2 arrives at this router. Will processing of this packet begin immediately? Or will this packet be stored for 10ms (till packet 1 has finished processing) and then begin to be processed?

3 Answers 3

3

There is a lot of interaction between the hardware and the CPU, so there is no simple answer, and it depends on the capability of the specific router. Many routers can forward packets in hardware, so the CPU isn't involved at all.

Remember interfaces are serial devices, so you can only send/receive one packet at a time on a single interface.

Also, "processing" can mean many things. A packet can go through several "steps" before it's transmitted on the outgoing interface.

On high end routers, if packets arrive on two interface simultaneously, yes they can be "processed" at the same time. But if they both need to be sent out the same interface, one will have to wait (be put into a queue) until the other is finished sending.

1
  • Don't forget multicore CPUs. ;-)
    – Zac67
    Commented Feb 1, 2021 at 17:40
1

Basically there is no one right answer and it depends on the implementation. As computer networks evolve, the need for speed becomes essential so everyone implementing a packet processing dataplane thrives to provide maximum throughput. Some routers data plane is implemented using dedicated hardware (e.g. BCM chip series, EZ chip etc) I'm most familiar with BCM chip which has a packet processing pipeline with dedicated blocks for handling Ethernet termination, routing, egress packet processing where every clock cycle a packet advances to the next stage in pipeline and a new packet can enter the pipeline to begin processing. This means also that every clock cycle a new packet is egressing the final pipeline stage into the wire. Some routers data plane is implemented completely in software. I know of a new improved software implementation that supports processing of multiple packets at (almost) the same time on general purpose CPUs using a software called VPP (Vector Packet Processing) which usually takes advantage of a special NIC driver software called DPDK (Data Plane Development Kit) to override kernel interrupt mode processing and instead poll the NIC continuously to get ingress packets directly to user space to begin their processing as fast as possible.

0
0

Generally yes, a router may be able process multiple packets simultaneously. Usually, there are multiple interfaces, so a number of packets can even be received and transmitted at the same moment.

However, not all routers can actually forward multiple packets simultaneously. The resources for doing so may be limited, so that effectively only a single packet is processed at any given time. If processing is done by the CPU and there is only a single core (=a single thread in execution at any given moment) then processing is limited to a single packet.

Note that packet processing is very often not an atomic process and may happen in several stages. These stages can overlap for different packets, so it heavily depends on your definition of "simultaneous processing".

By the way, 10 milliseconds is ages for any current hardware, even very low end. Even consumer-grade hardware forwards with a delay far below 1 ms, serious hardware easily runs in the microsecond range (e.g. a routing L3 switch with a latency below 2 µs).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.