4 ms·
Any reason this type of work couldn't be done with mininet (http://mininet.org/ http://mininet.org/)? I can see this was developed for NRL research, so not try
by nonameiguess 6y ago
Any reason this type of work couldn't be done with mininet (http://mininet.org/ http://mininet.org/)?
I can see this was developed for NRL research, so not trying to say it's a knock off or anything. Seems to have been developed a few years later, but close to the same time, one of those things like Deep Impact and Armageddon both coming out at the same time.
Anyway, having used mininet quite a bit back in the day in grad school, this kind of thing is great. Not sure exactly the extent of networking you can simulate with this toolset, but mininet lets you put entire simulated autonomous systems on a single laptop and you can mess around with BGP policies. It's really cool, stuff you would normally need to work for AT&T with access to millions of miles of fiber to have a chance to do.
- sunsetMurk 6y agosounds fun - any links handy on how to have fun w/ this sort of thing on a 'hello world' level?
- sporksmith 6y agoThe in-repo docs have a general walk-through for getting started: https://github.com/shadow/shadow/tree/main/docs https://github.com/shadow/shadow/tree/main/docs. Shadow's primary use-case is simulating the Tor network. Shadow's tor plugin has a step-by-step for getting a tor network simulation in particular running: https://github.com/shadow/shadow-plugin-tor/wiki https://github.com/shadow/shadow-plugin-tor/wiki
- sporksmith 6y agoShadow developer here! Disclaimer - I joined the project a little over a year ago. I'm not as well versed in some of the related work as my colleagues, but I can take a shot - Mininet looks cool! It looks like Mininet lets programs run pretty close to natively, using network namespaces to pipe data over its simulated network, and some other lightweight techniques for isolation and some extent of reproducibility (e.g. using the fifo scheduler). Shadow intercepts the libc API via LD_PRELOAD, allowing finer grained control over the process's view of the world. In particular it lets us emulate time - we can run simulations with tens of thousands of endpoints on a single physical machine; even if we don't have the CPU power to run it in real-time, the simulation behaves as if we do. Conversely, small simulations can be run faster than real-time. The down-side is that it's more difficult to support arbitrary software, since there are various ways of "escaping" LD_PRELOAD, and we don't support the full libc API. We're in the process of switching to a ptrace-based approach that is more robust, at the cost of some additional runtime overhead. > Not sure exactly the extent of networking you can simulate with this toolset, but mininet lets you put entire simulated autonomous systems on a single laptop and you can mess around with BGP policies. It sounds like mininet has a lower-level model of the network itself. Shadow simulates links between endpoints, including bandwidth limitations and drop rates. It doesn't model individual routers along the path, so yeah I don't think you could use it to simulate BGP.
- exikyut 6y agoA question: I tried poking around with `tc` (qdisc) a while back to limit speed and emulate latency, and I found the implementation seemed to simulate delay by waiting a bunch of time then dumping all the data at once, for example if I asked for 5s of latency I'd be sitting at 0 bytes/sec for 5 seconds then it'd be like INCOMING and I'd get a giant pile of data all at once. I do absolutely have horrendously little networking experience :) so I was probably fiddling with the knobs wrong (and fiddling with wrong expectations from the mechanics), but I didn't see any tunables for ramp-up et al. For a while I've been idly curious how to iterate on applications that need to respond favorably to everything from 10Gbps and "what latency?" to flaky 3.5G with "give up" latency and worse jitter. At the end of the day I know I need real networks to play with, but I've been curious what software will get me the closest approximation in terms of microsecond-to-microsecond network behavior. TBH this question is me being somewhat lazy :) - I'm not yet ready to start working on the above ideas, so I'm yet to actually sit down and do some basic prerequisite research... but I thought I'd jump on the opportunity to ask while I could.
- sporksmith 6y agoSorry, I'm not well versed in the network model; most of my work has been on the new ptrace-based syscall interposition. That sure sounds like a bug, though. We recently added a discussion section to Shadow's GH repo: https://github.com/shadow/shadow/discussions https://github.com/shadow/shadow/discussions. That'd be a good place for your questions. More knowledgeable folks are pretty responsive there, but aren't on HN :)
- exikyut 6y agoApologies for the ambiguity and lack of context - to clarify, I fiddled around with raw tc/qdisc (part of Linux's network stack) a while back, and was wondering if Shadow had more accurate timing simulation. The discussion section sounds like exactly the place to follow up on this sort of thing, thanks for the reference. (Once I verify what I'm looking for is actually exotic :P) Thanks for replying!
- 6y ago
- tediousdemise 6y agoGlad to see mininet mentioned here. I used mininet academically for a graduate level course in computer networks, in combination with Pyretic (http://frenetic-lang.org/pyretic/ http://frenetic-lang.org/pyretic/), and it was a pleasure. Spinning up a network topology simulation using mininet was effortless, and it proved to be an invaluable tool for network research. It's good to see other projects such as Shadow being developed in this space as well.
- nomadiccoder 6y agoBoth Emulation and Simulation are valid tools to perform network research. Mininet is a network emulator designed to run real network software. It emerged as a leading tool to evaluate software defined networking solutions. Mininet leverages openvswitch which is the same software that would run on the networking boxes. So the TCP/IP stacks are emulated. This means that the system has very high fidelity making it behave close to the real system. Mininet runs in 'wall-clock' time. (or real-time) On the other hand, simulation has a more difficult time achieving the same fidelity due to the difference in the execution modes. Discrete event simulation works by maintaining a queue of events. Each event has a timestamp that advances the simulation clock forward. Each event can create 0 or more events. The behavior of the network (adding delays / dropped packets / etc.) are simulated with models. This simulation allows a process to run real application code by invoking it from an event handler. A discrete event simulation uses virtual clocks which can be faster or slower than wall-clock time. As a general rule we can say that simulation is more scalable than emulation (10s vs 1000000s of nodes) while emulation has higher fidelity (more accurately captures behavior of real system).