Compare commits
22 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 1d4fd471ff | |||
| 6b3b3062c0 | |||
| 176870d586 | |||
| 17dbc7e055 | |||
| 312c386cda | |||
| 96952b92f8 | |||
| c7e86f9374 | |||
| 5da9376222 | |||
| bee06cf264 | |||
| cd238fe567 | |||
| e771239608 | |||
| e5380d646c | |||
| 621c3eebf3 | |||
| 4a94f76ec3 | |||
| c0ddd5c5d8 | |||
| a6e55e3528 | |||
| 8f80f875b5 | |||
| 2941bbae2d | |||
| 8842e450db | |||
| f5737aa3cc | |||
| b8fd3d2d8e | |||
| 387250cd83 |
@@ -2,7 +2,7 @@
|
||||
Mininet Installation/Configuration Notes
|
||||
----------------------------------------
|
||||
|
||||
Mininet 2.1.0
|
||||
Mininet 2.1.0p2
|
||||
---
|
||||
|
||||
The supported installation methods for Mininet are 1) using a
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
Mininet 2.1.0 License
|
||||
Mininet 2.1.0p2 License
|
||||
|
||||
Copyright (c) 2013 Open Networking Laboratory
|
||||
Copyright (c) 2013-2014 Open Networking Laboratory
|
||||
Copyright (c) 2009-2012 Bob Lantz and The Board of Trustees of
|
||||
The Leland Stanford Junior University
|
||||
|
||||
|
||||
@@ -12,6 +12,8 @@ MANDIR = /usr/share/man/man1
|
||||
DOCDIRS = doc/html doc/latex
|
||||
PDF = doc/latex/refman.pdf
|
||||
|
||||
CFLAGS += -Wall -Wextra
|
||||
|
||||
all: codecheck test
|
||||
|
||||
clean:
|
||||
|
||||
@@ -3,7 +3,7 @@ Mininet: Rapid Prototyping for Software Defined Networks
|
||||
|
||||
*The best way to emulate almost any network on your laptop!*
|
||||
|
||||
Version 2.1.0
|
||||
Version 2.1.0p2
|
||||
|
||||
### What is Mininet?
|
||||
|
||||
@@ -66,9 +66,9 @@ Mininet includes:
|
||||
|
||||
`mn -c`
|
||||
|
||||
### New features in 2.1.0
|
||||
### New features in 2.1.0p2
|
||||
|
||||
Mininet 2.1.0 provides a number of bug fixes as well as
|
||||
Mininet 2.1.0p2 provides a number of bug fixes as well as
|
||||
several new features, including:
|
||||
|
||||
* Convenient access to `Mininet()` as a dict of nodes
|
||||
@@ -127,7 +127,7 @@ Mininet to change the networking world!
|
||||
|
||||
### Credits
|
||||
|
||||
The Mininet 2.1.0 Team:
|
||||
The Mininet 2.1.0p2 Team:
|
||||
|
||||
* Bob Lantz
|
||||
* Brian O'Connor
|
||||
|
||||
+3
-3
@@ -63,9 +63,9 @@ def fixNetworkManager( root, intf ):
|
||||
print '*** Adding', line.strip(), 'to', cfile
|
||||
with open( cfile, 'a' ) as f:
|
||||
f.write( line )
|
||||
# Probably need to restart network-manager to be safe -
|
||||
# hopefully this won't disconnect you
|
||||
root.cmd( 'service network-manager restart' )
|
||||
# Probably need to restart network-manager to be safe -
|
||||
# hopefully this won't disconnect you
|
||||
root.cmd( 'service network-manager restart' )
|
||||
|
||||
def connectToInternet( network, switch='s1', rootip='10.254', subnet='10.0/8'):
|
||||
"""Connect the network to the internet
|
||||
|
||||
+1
-1
@@ -55,7 +55,7 @@ def sshd( network, cmd='/usr/sbin/sshd', opts='-D',
|
||||
if not switch:
|
||||
switch = network[ 's1' ] # switch to use
|
||||
if not routes:
|
||||
routes = [ '10.0.0.0/24' ]
|
||||
routes = [ '10.0.0.0/24' ]
|
||||
connectToRootNS( network, switch, ip, routes )
|
||||
for host in network.hosts:
|
||||
host.cmd( cmd + ' ' + opts + '&' )
|
||||
|
||||
+2
-1
@@ -331,7 +331,8 @@ class CLI( Cmd ):
|
||||
node = self.mn[ first ]
|
||||
rest = args.split( ' ' )
|
||||
# Substitute IP addresses for node names in command
|
||||
rest = [ self.mn[ arg ].defaultIntf().updateIP()
|
||||
# If updateIP() returns None, then use node name
|
||||
rest = [ self.mn[ arg ].defaultIntf().updateIP() or arg
|
||||
if arg in self.mn else arg
|
||||
for arg in rest ]
|
||||
rest = ' '.join( rest )
|
||||
|
||||
+1
-1
@@ -57,7 +57,7 @@ class StreamHandlerNoNewline( logging.StreamHandler ):
|
||||
|
||||
class Singleton( type ):
|
||||
"""Singleton pattern from Wikipedia
|
||||
See http://en.wikipedia.org/wiki/SingletonPattern#Python
|
||||
See http://en.wikipedia.org/wiki/Singleton_Pattern
|
||||
|
||||
Intended to be used as a __metaclass_ param, as shown for the class
|
||||
below."""
|
||||
|
||||
+1
-1
@@ -102,7 +102,7 @@ from mininet.util import macColonHex, ipStr, ipParse, netParse, ipAdd
|
||||
from mininet.term import cleanUpScreens, makeTerms
|
||||
|
||||
# Mininet version: should be consistent with README and LICENSE
|
||||
VERSION = "2.1.0"
|
||||
VERSION = "2.1.0p2"
|
||||
|
||||
class Mininet( object ):
|
||||
"Network emulation with hosts spawned in network namespaces."
|
||||
|
||||
@@ -1094,6 +1094,7 @@ class IVSSwitch(Switch):
|
||||
|
||||
logfile = '/tmp/ivs.%s.log' % self.name
|
||||
|
||||
self.cmd( 'ifconfig lo up' )
|
||||
self.cmd( ' '.join(args) + ' >' + logfile + ' 2>&1 </dev/null &' )
|
||||
|
||||
def stop( self ):
|
||||
|
||||
@@ -9,7 +9,6 @@ TODO: missing xterm test
|
||||
import unittest
|
||||
import pexpect
|
||||
import os
|
||||
from time import sleep
|
||||
from mininet.util import quietRun
|
||||
|
||||
class testWalkthrough( unittest.TestCase ):
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
* Partially based on public domain setsid(1)
|
||||
*/
|
||||
|
||||
#define _GNU_SOURCE
|
||||
#include <stdio.h>
|
||||
#include <linux/sched.h>
|
||||
#include <unistd.h>
|
||||
@@ -20,8 +21,8 @@
|
||||
#include <syscall.h>
|
||||
#include <fcntl.h>
|
||||
#include <stdlib.h>
|
||||
#include <limits.h>
|
||||
#include <sched.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#if !defined(VERSION)
|
||||
#define VERSION "(devel)"
|
||||
@@ -62,7 +63,7 @@ void validate(char *path)
|
||||
}
|
||||
|
||||
/* Add our pid to cgroup */
|
||||
int cgroup(char *gname)
|
||||
void cgroup(char *gname)
|
||||
{
|
||||
static char path[PATH_MAX];
|
||||
static char *groups[] = {
|
||||
@@ -176,4 +177,6 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
usage(argv[0]);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
+1
-1
@@ -555,7 +555,7 @@ function cbench {
|
||||
$install libsnmp-dev libpcap-dev libconfig-dev
|
||||
fi
|
||||
cd $BUILD_DIR/
|
||||
git clone git://openflow.org/oflops.git
|
||||
git clone git://gitosis.stanford.edu/oflops.git
|
||||
cd oflops
|
||||
sh boot.sh || true # possible error in autoreconf, so run twice
|
||||
sh boot.sh
|
||||
|
||||
@@ -8,7 +8,7 @@ version = 'Mininet ' + co( 'PYTHONPATH=. bin/mn --version', shell=True )
|
||||
version = version.strip()
|
||||
|
||||
# Find all Mininet path references
|
||||
lines = co( "grep -or 'Mininet \w\.\w\.\w\w*' *", shell=True )
|
||||
lines = co( "grep -or 'Mininet \w\+\.\w\+\.\w\+[+]*' *", shell=True )
|
||||
|
||||
error = False
|
||||
|
||||
|
||||
+3
-4
@@ -140,8 +140,7 @@ def depend():
|
||||
run( 'sudo apt-get -y update' )
|
||||
run( 'sudo apt-get install -y'
|
||||
' kvm cloud-utils genisoimage qemu-kvm qemu-utils'
|
||||
' e2fsprogs '
|
||||
' landscape-client'
|
||||
' e2fsprogs dnsmasq'
|
||||
' python-setuptools mtools zip' )
|
||||
run( 'sudo easy_install pexpect' )
|
||||
|
||||
@@ -581,8 +580,8 @@ OVFTemplate = """<?xml version="1.0"?>
|
||||
</References>
|
||||
<DiskSection>
|
||||
<Info>Virtual disk information</Info>
|
||||
<Disk ovf:capacity="%d" ovf:capacityAllocationUnits="byte"
|
||||
ovf:diskId="vmdisk1" ovf:fileRef="file1"
|
||||
<Disk ovf:capacity="%d" ovf:capacityAllocationUnits="byte"
|
||||
ovf:diskId="vmdisk1" ovf:fileRef="file1"
|
||||
ovf:format="http://www.vmware.com/interfaces/specifications/vmdk.html"/>
|
||||
</DiskSection>
|
||||
<NetworkSection>
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
# This script is intended to install Mininet into
|
||||
# a brand-new Ubuntu virtual machine,
|
||||
# to create a fully usable "tutorial" VM.
|
||||
#
|
||||
# optional argument: Mininet branch to install
|
||||
set -e
|
||||
echo `whoami` ALL=NOPASSWD: ALL | sudo tee -a /etc/sudoers > /dev/null
|
||||
sudo sed -i -e 's/Default/#Default/' /etc/sudoers
|
||||
@@ -25,11 +27,16 @@ fi
|
||||
if [ -e /etc/rc.local.backup ]; then
|
||||
sudo mv /etc/rc.local.backup /etc/rc.local
|
||||
fi
|
||||
# Install Mininet
|
||||
# Fetch Mininet
|
||||
sudo apt-get -y install git-core openssh-server
|
||||
git clone git://github.com/mininet/mininet
|
||||
cd mininet
|
||||
cd
|
||||
# Optionally check out branch
|
||||
if [ "$1" != "" ]; then
|
||||
pushd mininet
|
||||
git checkout -b $1 $1
|
||||
popd
|
||||
fi
|
||||
# Install Mininet
|
||||
time mininet/util/install.sh
|
||||
# Finalize VM
|
||||
time mininet/util/install.sh -tc
|
||||
@@ -38,4 +45,3 @@ time mininet/util/install.sh -tc
|
||||
# echo "export NOX_CORE_DIR=~/noxcore/build/src/" >> .bashrc
|
||||
#fi
|
||||
echo "Done preparing Mininet VM."
|
||||
|
||||
|
||||
Reference in New Issue
Block a user