def create (switch_type = FakeEntity, host_type = FakeEntity, n = 2):
    DVRouter.create('student')
    BasicHost.create('dest')
    FakeEntity.create('sender', None, [dest, 10])
    FakeEntity.create('receiver', [dest, 11], None)

    topo.link(student, sender)
    topo.link(student, receiver)
    
    topo.show_ports(sender)
    topo.show_ports(receiver)
def create(switch_type=FakeEntity, host_type=FakeEntity, n=2):
    DVRouter.create('student')
    BasicHost.create('dest')
    FakeEntity.create('sender', None, [dest, 10])
    FakeEntity.create('receiver', [dest, 11], None)

    topo.link(student, sender)
    topo.link(student, receiver)

    topo.show_ports(sender)
    topo.show_ports(receiver)
def create ():

    r1 = router.create('r1')
    r2 = router.create('r2')
    r3 = router.create('r3')

    topo.link(r1, r2, 14)
    topo.link(r1, r3, 1)
    topo.link(r3, r2, 1)
Esempio n. 4
0
def create():

    r1 = router.create('r1')
    r2 = router.create('r2')
    r3 = router.create('r3')

    topo.link(r1, r2, 14)
    topo.link(r1, r3, 1)
    topo.link(r3, r2, 1)
Esempio n. 5
0
def create(switch_type=Hub, host_type=BasicHost):
    """
    Creates a topology with loops that looks like:
    h1a    s4--s5    h2a
       \  /      \  /
        s1        s2
       /  \      /  \ 
    h1b    --s3--    h2b
    """

    switch_type.create('s1')
    switch_type.create('s2')
    switch_type.create('s3')
    switch_type.create('s4')
    switch_type.create('s5')

    host_type.create('h1a')
    host_type.create('h1b')
    host_type.create('h2a')
    host_type.create('h2b')

    topo.link(s1, h1a)
    topo.link(s1, h1b)
    topo.link(s2, h2a)
    topo.link(s2, h2b)

    topo.link(s1, s3)
    topo.link(s3, s2)

    topo.link(s1, s4)
    topo.link(s4, s5)
    topo.link(s5, s2)
def create (switch_type = FakeEntity, host_type = FakeEntity, n = 2):
    DVRouter.create('A')
    DVRouter.create('B')
    FakeEntity.create('C', {A: 1}, {})
    topo.link(A, B)
    topo.link(B, C)
Esempio n. 7
0
def create(switch_type=switch, host_type=BasicHost):
    """
    Creates a topology with loops that looks like:
    h1a    s2--s3            h2a
       \  /      \          /
        s1        s4--s6--s7
       /  \      /     \    \
    h1b    --s5--       s8--s9--h2b
    """
    switch_type.create('s1')
    switch_type.create('s2')
    switch_type.create('s3')
    switch_type.create('s4')
    switch_type.create('s5')

    switch_type.create('s6')
    switch_type.create('s7')
    switch_type.create('s8')
    switch_type.create('s9')

    host_type.create('h1a')
    host_type.create('h1b')
    host_type.create('h2a')
    host_type.create('h2b')

    ReceiveEntity.create('sneakylistener', [s7, s9, s8, s6, s4, s3, s2, s1],
                         [h1a, 1], 5)

    topo.link(sneakylistener, h1a)
    topo.link(sneakylistener, s1)
    topo.link(s1, h1b)
    topo.link(s4, s6)
    topo.link(s6, s8)
    topo.link(s8, s9)
    topo.link(s9, h2b)
    topo.link(s6, s7)
    topo.link(s7, s9)
    topo.link(s7, h2a)

    topo.link(s1, s5)
    topo.link(s5, s4)

    topo.link(s1, s2)
    topo.link(s2, s3)
    topo.link(s3, s4)
def create (switch_type = switch, host_type = BasicHost):
    """
    Creates a topology with loops that looks like:
    h1a    s2--s3            h2a
       \  /      \          /
        s1        s4--s6--s7
       /  \      /     \    \
    h1b    --s5--       s8--s9--h2b
    """
    switch_type.create('s1')
    switch_type.create('s2')
    switch_type.create('s3')
    switch_type.create('s4')
    switch_type.create('s5')

    switch_type.create('s6')
    switch_type.create('s7')
    switch_type.create('s8')
    switch_type.create('s9')


    host_type.create('h1a')
    host_type.create('h1b')
    host_type.create('h2a')
    host_type.create('h2b')


    ReceiveEntity.create('sneakylistener', [s7, s9, s8, s6, s4, s3, s2, s1] , [h1a, 1], 5)

    topo.link(sneakylistener, h1a)
    topo.link(sneakylistener, s1)
    topo.link(s1, h1b)
    topo.link(s4, s6)
    topo.link(s6, s8)
    topo.link(s8, s9)
    topo.link(s9, h2b)
    topo.link(s6, s7)
    topo.link(s7, s9)
    topo.link(s7, h2a)
    

    topo.link(s1, s5)
    topo.link(s5, s4)

    topo.link(s1, s2)
    topo.link(s2, s3)
    topo.link(s3, s4)
Esempio n. 9
0
def create (switch_type = Hub, host_type = BasicHost):
    """
    Creates a topology with loops that looks like:
    h1a    s4--s5    h2a
       \  /      \  /
        s1        s2
       /  \      /  \ 
    h1b    --s3--    h2b
    """

    switch_type.create('s1')
    switch_type.create('s2')
    switch_type.create('s3')
    switch_type.create('s4')
    switch_type.create('s5')

    host_type.create('h1a')
    host_type.create('h1b')
    host_type.create('h2a')
    host_type.create('h2b')

    topo.link(s1, h1a)
    topo.link(s1, h1b)
    topo.link(s2, h2a)
    topo.link(s2, h2b)

    topo.link(s1, s3)
    topo.link(s3, s2)

    topo.link(s1, s4)
    topo.link(s4, s5)
    topo.link(s5, s2)