Today at lunch Prof. Valaee asked if there are any Matlab toolboxes or packages for modeling computer network activity, comparable to the ns-2 and OPNET packages.
Here are a few links I found that offer various approaches to this in Matlab. There seem to be several for wireless but not so many for wired. I have no info on the quality or usefulness of these, but I've linked them here for ease of reference if anyone wants to explore this. (When searching, a lot more matches come up talking about "neural network" simulation - for this purpose, those are false positives. You could try adding "-neural" to the query to exclude these.)
The Mathworks, Inc. has a series of instructional videos covering Matlab features and their applications. Here's a brief one on using SimEvents and StateFlow (both included in our R2011 and newer) to model ethernet traffic in an event-based format. This may be the closest to what Prof. Valaee had in mind.
Wireless Matlab is an open-source project from 2006 hosted at sourceforge. The blurb specifically compares this effort to ns-2 and OPNET.
10Base-T Ethernet is a user-contributed model of four NICs using CSMA/CD on a segment.
LTE Simulators (for non-commercial academic use) simulates an LTE wireless network in Matlab.
Prowler attempts to simulate distributed embedded systems and sensors, and the impact of wireless channel congestion on their performance. Probably more specialised than what we'd use in ECE.
This paper covers simulating network congestion and its impact on real-time systems control, using an additional toolbox called TrueTime.
This 2004 IEEE paper covers linking together multiple simulators, using ModelSim, Matlab, and ns-2 together Using ModelSim, Matlab/Simulink and NS for Simulation of Distributed Systems