Beispiel #1
0
    # The nexthop is not re-written as it is on a common subnet.
    epacket = packet % ("127.0.0.2", "2", "2,1")

    coord("peer1 expect %s" % epacket)
    coord("peer2 expect %s" % epacket)
    coord("peer3 expect %s" % epacket)

    delay(2)

    coord("peer2 send %s" % spacket)

    delay(10)

    coord("peer1 assert established")
    coord("peer2 assert established")
    coord("peer3 assert established")

    coord("peer1 assert queue 1")
    coord("peer2 assert queue 1")
    coord("peer3 assert queue 0")

    return True


test_main(TESTS, 'test_bgp_config', 'test_bgp_policy1')

# Local Variables:
# mode: python
# py-indent-offset: 4
# End:
Beispiel #2
0
    delay(2)

    coord("peer1 send dump mrtd update ../../data/bgp/icsi1.mrtd", \
          noblock=True)

    bgp_peer_unchanged("peer1")

    coord("target 127.0.0.1 10002")
    coord("initialise attach peer2")

    for i in range(10):
        os.system("date")
        print "Iteration: ", i
        coord("peer2 establish AS 65001 holdtime 0 id 1.1.1.1 keepalive false",
              noblock=True)
        delay(2)
        bgp_peer_unchanged("peer2")

        coord("peer2 assert established")
        coord("peer2 disconnect")

    return True


test_main(TESTS, 'test_bgp_config', 'test_bgp_dump1')

# Local Variables:
# mode: python
# py-indent-offset: 4
# End:
Beispiel #3
0
    coord("peer2 assert established")

    coord("peer1 assert queue 1")
    coord("peer2 assert queue 0")

    # The release of the damped packet.
    coord("peer2 expect %s" % epacket2)
    
    sleep = 5 * 60

    print 'Sleeping for %d seconds, waiting for damped route' % sleep

    delay(sleep)

    # Make sure that at the end of the test all the connections still exist.

    coord("peer1 assert established")
    coord("peer2 assert established")

    coord("peer1 assert queue 1")
    coord("peer2 assert queue 0")

    return True

test_main(TESTS, 'test_bgp_config', 'test_unh1')

# Local Variables:
# mode: python
# py-indent-offset: 4
# End:
    This test triggers a simple problem when there is both an import
    and an export policy. If the import policy uses the neighbor
    statement then BGP fails. The connection is established to verify
    that BGP is still alive.
    """

    # Make a connection just to see if BGP is still alive
    coord("reset")

    coord("target 127.0.0.1 10001")
    coord("initialise attach peer1")

    # Put an extra delay here so the TCP connection doesn't occur at the same
    # time as the peer is bounced due to the interface address changing.
    delay(2)

    coord("peer1 establish AS 75 holdtime 0 id 75.75.75.75 keepalive false")
    
    delay(2)

    coord("peer1 assert established");

    return True

test_main(TESTS, 'test_bgp_config', 'test_bgp_reports1')

# Local Variables:
# mode: python
# py-indent-offset: 4
# End:
Beispiel #5
0
    coord("peer1 assert queue 1")
    coord("peer2 assert queue 0")

    # The release of the damped packet.
    coord("peer2 expect %s" % epacket2)

    sleep = 5 * 60

    print 'Sleeping for %d seconds, waiting for damped route' % sleep

    delay(sleep)

    # Make sure that at the end of the test all the connections still exist.

    coord("peer1 assert established")
    coord("peer2 assert established")

    coord("peer1 assert queue 1")
    coord("peer2 assert queue 0")

    return True


test_main(TESTS, 'test_bgp_config', 'test_unh1')

# Local Variables:
# mode: python
# py-indent-offset: 4
# End:
Beispiel #6
0
    delay(2)

    coord("peer1 send dump mrtd update ../../data/bgp/icsi1.mrtd", \
          noblock=True)

    bgp_peer_unchanged("peer1")

    coord("target 127.0.0.1 10002")
    coord("initialise attach peer2")

    for i in range(10):
        os.system("date")
        print "Iteration: ", i
        coord("peer2 establish AS 65001 holdtime 0 id 1.1.1.1 keepalive false",noblock=True)
        delay(2)
        bgp_peer_unchanged("peer2")
            
        coord("peer2 assert established")
        coord("peer2 disconnect")

    return True


test_main(TESTS, 'test_bgp_config', 'test_bgp_dump1')

# Local Variables:
# mode: python
# py-indent-offset: 4
# End:
Beispiel #7
0
    # The nexthop is not re-written as it is on a common subnet.
    epacket = packet % ("127.0.0.2", "2", "2,1")

    coord("peer1 expect %s" % epacket)
    coord("peer2 expect %s" % epacket)
    coord("peer3 expect %s" % epacket)

    delay(2)

    coord("peer2 send %s" % spacket)

    delay(10)

    coord("peer1 assert established")
    coord("peer2 assert established")
    coord("peer3 assert established")

    coord("peer1 assert queue 1")
    coord("peer2 assert queue 1")
    coord("peer3 assert queue 0")

    return True


test_main(TESTS, "test_bgp_config", "test_bgp_policy1")

# Local Variables:
# mode: python
# py-indent-offset: 4
# End:
Beispiel #8
0
    and an export policy. If the import policy uses the neighbor
    statement then BGP fails. The connection is established to verify
    that BGP is still alive.
    """

    # Make a connection just to see if BGP is still alive
    coord("reset")

    coord("target 127.0.0.1 10001")
    coord("initialise attach peer1")

    # Put an extra delay here so the TCP connection doesn't occur at the same
    # time as the peer is bounced due to the interface address changing.
    delay(2)

    coord("peer1 establish AS 75 holdtime 0 id 75.75.75.75 keepalive false")

    delay(2)

    coord("peer1 assert established")

    return True


test_main(TESTS, 'test_bgp_config', 'test_bgp_reports1')

# Local Variables:
# mode: python
# py-indent-offset: 4
# End: