From 79f5d39db56ada3d10dcb5bf67b66734427129c9 Mon Sep 17 00:00:00 2001 From: Bob Lantz Date: Sat, 17 Jan 2015 13:56:37 -0800 Subject: [PATCH] Comment edits and pass code check --- examples/linuxrouter.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/examples/linuxrouter.py b/examples/linuxrouter.py index be9fdb0..de2c359 100755 --- a/examples/linuxrouter.py +++ b/examples/linuxrouter.py @@ -20,9 +20,11 @@ a single switch: r0-eth3 - s3-eth1 - h3-eth0 (IP: 10.0.0.100) The example relies on default routing entries that are -automatically created for each interface. Additional -routes may be added to the router or hosts by executing -'ip route' or 'route' commands on the router or hosts. +automatically created for each router interface, as well +as 'defaultRoute' parameters for the host interfaces. + +Additional routes may be added to the router or hosts by +executing 'ip route' or 'route' commands on the router or hosts. """ from mininet.topo import Topo @@ -49,7 +51,7 @@ class NetworkTopo( Topo ): def build( self, **_opts ): - defaultIP='192.168.1.1/24' # IP address for r0-eth1 + defaultIP = '192.168.1.1/24' # IP address for r0-eth1 router = self.addNode( 'r0', cls=LinuxRouter, ip=defaultIP ) s1, s2, s3 = [ self.addSwitch( s ) for s in 's1', 's2', 's3' ] @@ -68,7 +70,7 @@ class NetworkTopo( Topo ): h3 = self.addHost( 'h3', ip='10.0.0.100/8', defaultRoute='via 10.0.0.1' ) - for h, s in [ (h1,s1), (h2,s2), (h3,s3) ]: + for h, s in [ (h1, s1), (h2, s2), (h3, s3) ]: self.addLink( h, s )