Hi, Is there a way that I could check if the rules that I pushed are being applied?
I have a really simple topology (the mininet config file is attached to the email) and I try to ping h2 from h1 but it seems that the rule that I pushed to h2 is not working :/. Do you have an idea why it's not working? And how I could figure it out? H1 --- S1 ---- S2 --- H2 ------------------ mininet> h1 ip route 11.0.0.0/24 dev h1-eth0 proto kernel scope link src 11.0.0.1 mininet> h2 ip route 11.0.0.0/24 dev h2-eth0 proto kernel scope link src 11.0.0.2 mininet> h1 ping s1 PING 127.0.0.1 (127.0.0.1) 56(84) bytes of data. 64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.019 ms 64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.032 ms --- 127.0.0.1 ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 1000ms rtt min/avg/max/mdev = 0.019/0.025/0.032/0.008 ms mininet> h1 ping s2 PING 127.0.0.1 (127.0.0.1) 56(84) bytes of data. 64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.023 ms 64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.032 ms --- 127.0.0.1 ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 1001ms rtt min/avg/max/mdev = 0.023/0.027/0.032/0.006 ms mininet> h1 ping h2 PING 11.0.0.2 (11.0.0.2) 56(84) bytes of data. >From 11.0.0.1 icmp_seq=1 Destination Host Unreachable >From 11.0.0.1 icmp_seq=2 Destination Host Unreachable >From 11.0.0.1 icmp_seq=3 Destination Host Unreachable --- 11.0.0.2 ping statistics --- 4 packets transmitted, 0 received, +3 errors, 100% packet loss, time 3002ms Thanks, Best, Clément
#!/usr/bin/python
"""Topology with 3 switches and 3 hosts
"""
from mininet.cli import CLI
from mininet.topo import Topo
from mininet.net import Mininet
from mininet.link import TCLink
from mininet.log import setLogLevel
from mininet.node import RemoteController
class MyTopo( Topo ):
def __init__( self ):
"Create Topology"
# Initialize topology
Topo.__init__( self )
# Add hosts
h1 = self.addHost( 'h1' )
h2 = self.addHost( 'h2' )
h3 = self.addHost( 'h3' )
# Add switches
s1 = self.addSwitch( 's1')
s2 = self.addSwitch( 's2')
s3 = self.addSwitch( 's3')
# Add links between hosts and switches
self.addLink( h1, s1 )
self.addLink( h2, s2 )
self.addLink( h3, s3 )
# Add links between switches
self.addLink( s1, s2, bw=100 )
self.addLink( s1, s3, bw=100 )
self.addLink( s2, s3, bw=100 )
def run():
"Create and configure network"
topo = MyTopo()
net = Mininet( topo=topo, link=TCLink, controller=RemoteController )
net.start()
h1 = net.get( 'h1' )
h1.intf( 'h1-eth0' ).setIP( '11.0.0.1', 24 )
h1.intf( 'h1-eth0' ).setMAC( '0A:00:01:02:00:00' )
h2 = net.get( 'h2' )
h2.intf( 'h2-eth0' ).setIP( '11.0.0.2', 24 )
h2.intf( 'h2-eth0' ).setMAC( '0A:00:02:02:00:00' )
h3 = net.get( 'h3' )
h3.intf( 'h3-eth0' ).setIP( '11.0.0.3', 24 )
h3.intf( 'h3-eth0' ).setMAC( '0A:00:03:02:00:00' )
s1 = net.get( 's1' )
s1.intf( 's1-eth1' ).setMAC( '0A:00:01:01:00:01' )
s1.intf( 's1-eth2' ).setMAC( '0A:00:0A:FE:00:02' )
s1.intf( 's1-eth3' ).setMAC( '0A:00:0C:01:00:03' )
s2 = net.get( 's2' )
s2.intf( 's2-eth1' ).setMAC( '0A:00:02:01:00:01' )
s2.intf( 's2-eth2' ).setMAC( '0A:00:0B:FE:00:02' )
s2.intf( 's2-eth3' ).setMAC( '0A:00:0D:01:00:03' )
s3 = net.get( 's3' )
s3.intf( 's3-eth1' ).setMAC( '0A:00:03:01:00:01' )
s3.intf( 's3-eth2' ).setMAC( '0A:00:0D:FE:00:02' )
s3.intf( 's3-eth3' ).setMAC( '0A:00:0E:01:00:03' )
h1.cmd( 'ip route add 11.0.0.4/24 dev h1-eth0' )
h2.cmd( 'ip route add 11.0.0.5/24 dev h2-eth0' )
h3.cmd( 'ip route add 11.0.0.6/24 dev h3-eth0' )
h1.cmd( 'arp -s 11.0.0.4 0A:00:01:01:00:01 -i h1-eth0' )
h2.cmd( 'arp -s 11.0.0.5 0A:00:02:01:00:01 -i h2-eth0' )
h3.cmd( 'arp -s 11.0.0.6 0A:00:03:01:00:01 -i h3-eth0' )
# Open Mininet Command Line Interface
CLI(net)
# Teardown and cleanup
net.stop()
if __name__ == '__main__':
setLogLevel('info')
run()
fowarding
Description: Binary data
------------------------------------------------------------------------------ Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration & more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________ Ryu-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ryu-devel
