# US 7,411,908 B2 · Method and system for network emulation using bandwidth emulation techniques

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 7,411,908 B2
- Document ID: US7411908B2
- Status: Granted
- Kind: B2
- Application number: 10/955,812
- Filed: 2004-09-30
- Published: 2006-03-30
- Granted: 2008-08-12
- Earliest claimed: 2004-09-30
- Assignees: Microsoft Corporation
- Inventors: Yunxin Liu; Zheng Ni; Jian Wang; Qian Zhang; Wenwu Zhu
- Web page: https://patentgrep.com/patent/US7411908B2

## CPC

- H04L 47/30: in combination with information about buffer occupancy at either end or at transit nodes
- H04L 47/28: in relation to timing considerations
- H04L 47/50: Queue scheduling
- H04L 47/56: implementing delay-aware scheduling
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)

## Abstract

A method and system for emulating a network bandwidth condition includes maintaining a queue for holding packets that are received, maintaining a virtual time that is updated whenever a packet timer is scheduled, and, for a selected packet waiting in the queue, calculating a timer expiration time based on the virtual time. A bandwidth emulation module is controlled by an emulator link that comprises a virtual network link to which a first computer is connected. One or more computers may be linked to the first computer.

## Claims

### Claim 1

A method for emulating a network bandwidth condition, the method comprising:
maintaining a queue for holding received packets; wherein maintaining the queue further comprises maintaining the queue in one of a blocked state and an unblocked state; if the queue is in the unblocked state, calculating a time cost for transmitting a new packet in accordance with a specified bandwidth configuration; calculating a timer expiration time for the new packet based on a current time and the transmitting time cost; scheduling the packet timer based on the new packet timer expiration time; setting the queue to be in the blocked state; and recording the new packet timer expiration time as the virtual time;
maintaining a virtual time that is updated when a packet timer is scheduled; and
calculating a queued packet timer expiration time that is based on the virtual time.

### Claim 2 (depends on 1)

The method of claim 1, wherein maintaining the virtual time further comprises initializing the virtual time when an initial packet is received.

### Claim 3 (depends on 1)

The method of claim 1, wherein calculating the new packet timer expiration time further comprises calculating the new packet timer expiration time as a sum of the current time and the transmitting time cost.

### Claim 4 (depends on 1)

The method of claim 1, further comprising, when the packet timer expires:
sending a packet associated with the timer;
if the queue is not empty, for a packet in the queue:
calculating a time cost for transmitting the queued packet in accordance with a specified bandwidth configuration;
scheduling a timer for the queued packet based on the queued packet timer expiration time; and
recording the queued packet timer expiration time as the virtual time.

### Claim 5 (depends on 1)

The method of claim 1, wherein maintaining the queue further comprises maintaining the queue as a random earlier drop queue having a minimum queue size and a maximum queue size.

### Claim 6

A system for emulating a network bandwidth condition, the system comprising:
a first computer having a network interface;
an emulator link for receiving and sending packets, the emulator link comprising a virtual network link to which the first computer is connected; and
a bandwidth emulation module controlled by the emulator link, wherein the bandwidth emulation module maintains a queue for holding received packets that maintains the queue in one of a blocked stat and an unblocked state and when the queue is in the unblocked state: calculating a time cost for transmitting a new packet in accordance with a specified bandwidth configuration; calculating a timer expiration time for the new packet based on a current time and the transmitting time cost; scheduling the packet timer based on the new packet timer expiration time; setting the queue to be in the blocked state; and recording the new packet timer expiration time as the virtual time; wherein the bandwidth emulation module maintains a virtual time that is updated when a packet timer is scheduled, and wherein the bandwidth emulation module calculates a queued packet timer expiration time that is based on the virtual time.

### Claim 7 (depends on 6)

The system of claim 6, wherein the queue further comprises a FIFO queue having a specified maximum size.

### Claim 8 (depends on 6)

The system of claim 6, wherein the queue further comprises a random earlier drop queue having a minimum queue size and a maximum queue size.

### Claim 9 (depends on 6)

The system of claim 6, wherein the queue has one of a drop head mode, a drop tail mode, and a drop random mode for dropping a packet when the queue is congested.

### Claim 10

A computer-readable medium having computer-executable instructions for emulating a network bandwidth condition, the instructions comprising:
maintaining a queue for holding received packets; wherein maintaining the queue further comprises maintaining the queue in one of a blocked state and an unblocked state;
maintaining a virtual time that is updated when a packet timer is scheduled; and
calculating a queued packet timer expiration time that is based on the virtual time;
and when the packet timer expires: sending a packet associated with the timer; if the queue is not empty, for a packet in the queue: calculating a time cost for transmitting the queued packet in accordance with a specified bandwidth configuration; scheduling a timer for the queued packet based on the queued packet timer expiration time; and recording the queued packet timer expiration time as the virtual time.

### Claim 11 (depends on 10)

The computer-readable medium of claim 10, the instructions further comprising, when a new packet is received:
if the queue is in the unblocked state,
calculating a time cost for transmitting the new packet in accordance with a specified bandwidth configuration;
calculating a timer expiration time for the new packet based on a current time and the transmitting time cost;
scheduling the packet timer based on the new packet timer expiration time;
setting the queue to be in the blocked state; and
recording the new packet timer expiration time as the virtual time.

### Claim 12 (depends on 11)

The computer-readable medium of claim 11, wherein calculating the new packet timer expiration time further comprises calculating the new packet timer expiration time as a sum of the current time and the transmitting time cost.

### Claim 13 (depends on 10)

The computer-readable medium of claim 10, wherein maintaining the queue further comprises maintaining the queue as a FIFO queue having a specified maximum size.

### Claim 14 (depends on 10)

The computer-readable medium of claim 10, wherein maintaining the queue further comprises maintaining the queue as a random earlier drop queue having a minimum queue size and a maximum queue size.

### Claim 15 (depends on 10)

The computer-readable medium of claim 10, wherein maintaining the queue further comprises maintaining the queue in accordance with one of a drop head mode, a drop tail mode, and a drop random mode.
