Hi,

Im in my final year of an honours degree entitled software development and computer networking. For my final year project I have decided to implement a bandwidth management system for a small network.

The plan would be to develop something to run on a server on the network, implemented in php and having a web based ui for administration. Im a bit behind at the moment due to assignments in other subjects, its all just getting on top of me a bit.

Looking for a bit of guidance on using snmp to implement it and how I would actually do this with php. I need to hand up a 5000 - 10000 word research document in two weeks and dont have much done as i said. Im just all over the place atm tbh and dont know where to start.

Any advice much appreciated.

Thanks,
mossy464

Dani AI

Generated

Short, practical plan that builds on the thread: wanted a PHP web UI; pointed toward an OS-level shaping approach; and raised similar “how to start” questions. A small, phased architecture gives the best chance to finish and to write a rigorous project report: (1) measurement pipeline, (2) a minimal privileged enforcement agent, (3) a PHP administration UI, (4) repeatable tests and evaluation.

Separate the UI from the enforcement process. The enforcement agent runs with the fewest required privileges, exposes a tiny authenticated API over a Unix domain socket or localhost HTTPS, and is the only component that touches kernel-level shaping. The PHP UI sends short JSON commands to that agent; the agent validates input, logs every change, and applies rules via the OS shaping subsystem. Example command format:

{
  "action": "limit",
  "target": "192.168.1.0/24",
  "rate_kbps": 600,
  "burst_bytes": 10000
}

Measurement and decision logic should be driven by counters and flows, not by ad-hoc guesses. Use per-interface octet counters (and their 64-bit variants where available) or flow-export data to compute per-host/ subnet rates. Poll at a sensible cadence (for example, 5–15s) and compute rolling averages (30s–60s) to avoid reacting to microbursts. Store samples in a simple table so short-term history and percentiles can be computed; a minimal schema:

CREATE TABLE host_usage (
  ip VARCHAR(45) PRIMARY KEY,
  last_seen TIMESTAMP,
  bytes_in BIGINT,
  bytes_out BIGINT,
  avg_bps INT
);

Testing and write-up: build a minimal proof-of-concept first (enforcement + one rule type), then a test harness that generates controlled traffic (multiple concurrent streams, long vs bursty). Measure throughput, latency, fairness and CPU overhead. In the report, document design decisions, security model for privileged actions, test methodology, results (graphs + percentile tables), and known limitations. Common pitfalls to call out: counter wrap/rollover, race conditions when multiple rules touch the same flow, and avoiding running the webserver as root.

Recommended Answers

All 4 Replies

Use iptables and LARTC. The "tc" command is what you're looking for when it comes to packet shaping. Regarding php you need to author a mechanism for running certain commands with elevated privelages (root) so you can modify the firewall and traffic control rules. It will essentially be a wrapper for the command line unless you want to tackle native calls ;)

This will police the inbound traffic from the given subnet to 0.6mbit.

tc qdisc add dev eth1 handle ffff: ingress
tc filter add dev eth1 parent ffff: protocol ip prio 50 u32 match ip src 216.196.0.0/16 police rate 0.6mbit burst 10k drop flowid :1

Thanks for the reply. A friend of mine advised developing using net-snmp and perl.

Will this allow me to have a web based ui.

Hi mossy,
I am in the same situation as you, however i am advised not to use any packages, like squid, but to implement the bandwidth management system by myself. Can u advise how you did it and which tools u used. My submission deadline is in two weeks and i've not started yet.
thanks and kind regards

Hi,

Im in my final year of an honours degree entitled software development and computer networking. For my final year project I have decided to implement a bandwidth management system for a small network.

The plan would be to develop something to run on a server on the network, implemented in php and having a web based ui for administration. Im a bit behind at the moment due to assignments in other subjects, its all just getting on top of me a bit.

Looking for a bit of guidance on using snmp to implement it and how I would actually do this with php. I need to hand up a 5000 - 10000 word research document in two weeks and dont have much done as i said. Im just all over the place atm tbh and dont know where to start.

Any advice much appreciated.

Thanks,
mossy464

Hi,
I need help to make bandwith management system use linux in the my office but i don't know how to started.

Thank's,
yohanes

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.