Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
#!/usr/bin/env python
import sys
import time
msgs = [
'announce route 1.0.0.0/24 origin IGP as-path [2914 13335 ] med 10 aggregator (13335:172.68.188.1) community [2914:410 2914:1008 2914:2000 2914:3000] next-hop 198.32.176.14',
'announce route 1.0.4.0/22 origin IGP as-path [2914 15412 4826 38803 56203 ] med 22001 community [2914:410 2914:1405 2914:2406 2914:3400] next-hop 198.32.176.14',
'announce route 1.0.4.0/24 origin IGP as-path [2914 15412 4826 38803 56203 ] med 22001 community [2914:410 2914:1405 2914:2406 2914:3400] next-hop 198.32.176.14',
'announce route 1.0.5.0/24 origin IGP as-path [2914 15412 4826 38803 56203 ] med 22001 community [2914:410 2914:1405 2914:2406 2914:3400] next-hop 198.32.176.14',
'announce route 223.255.248.0/24 origin IGP as-path [2914 6453 63199 ] med 23 community [2914:420 2914:1008 2914:2000 2914:3000 6453:3000 6453:3100 6453:3103] next-hop 198.32.176.14',
'announce route 223.255.249.0/24 origin IGP as-path [2914 6453 63199 ] med 23 community [2914:420 2914:1008 2914:2000 2914:3000 6453:3000 6453:3100 6453:3103] next-hop 198.32.176.14',
'announce route 223.255.250.0/24 origin IGP as-path [2914 6453 63199 ] med 23 community [2914:420 2914:1008 2914:2000 2914:3000 6453:3000 6453:3100 6453:3103] next-hop 198.32.176.14',
'announce route 223.255.251.0/24 origin IGP as-path [2914 6453 63199 ] med 23 community [2914:420 2914:1008 2914:2000 2914:3000 6453:3000 6453:3100 6453:3103] next-hop 198.32.176.14',
'announce route 223.255.252.0/24 origin IGP as-path [2914 4134 58519 ] med 21 community [2914:420 2914:1008 2914:2000 2914:3000] next-hop 198.32.176.14',
'announce route 223.255.253.0/24 origin IGP as-path [2914 4134 58519 ] med 21 community [2914:420 2914:1008 2914:2000 2914:3000] next-hop 198.32.176.14',
'announce route 223.255.254.0/24 origin IGP as-path [2914 4657 55415 55415 55415 55415 55415 55415 55415 ] med 21990 community [2914:410 2914:1405 2914:2406 2914:3400] next-hop 198.32.176.14'
]
# while msgs:
# msg = msgs.pop(0)
# if isinstance(msg, str):
# sys.stdout.write(msg + '\n')
# sys.stdout.flush()
# else:
# time.sleep(msg)
messages = [
'announce route 100.10.0.0/24 next-hop self',
'announce route 200.20.0.0/24 next-hop self',
]
time.sleep(1)
#Iterate through messages
for message in messages:
sys.stdout.write(message + '\n')
sys.stdout.flush()
time.sleep(1)
while True:
time.sleep(1)