mininet 실행시 자동으로 스크립트 실행
글쓴이: mandugukbap / 작성시간: 금, 2015/07/31 - 10:36오후
Mininet을 처음 시작하게 되었습니다. 대충 1개의 스위치/콘트롤러와 5개의 호스트를 생성하는 연습을 해 보았습니다. 궁금한 것은 mininet 실행시 각각의 호스트들에게 특정한 스크립트를 실행하도록 하려면 어떻게 해야 할까요?
즉, 미니넷이 실행될 때, 5개의 호스트들의 터미널(xterm)이 뜨면서 각각의 호스트들이 서로 다른 프로그램(예, tcpdump, iperf, 혹은 직접 작성한 스크립트)들을 실행하도록 하고 싶습니다.
에뮬레이션 데모를 위해서 이런식으로 많이 사용한다고 들었는데 자세한 방법을 잘 모르겠네요. 경험자님들의 답변 부탁 드려봅니다.
Forums:
refresh
refresh
Running Programs in
Running Programs in Hosts
One of the most important things you will need to do in your experiments is run programs in hosts, so that you can run more tests than the simple
pingAll()
andiperf()
tests which are provided by Mininet itself.Each Mininet host is essentially a bash shell process attached to one or more network interfaces, so the easiest way to interact with it is to send input to the shell using the cmd() method.
To run a command in a host and get the output, use the
cmd()
method.In many cases, you will wish to run a command in the background for a while, stop the command, and save its output to a file:
https://github.com/mininet/mininet/wiki/Introduction-to-Mininet저도 관련 내용 찾고있었는데 여기 있네요.
댓글 달기