blob: c984acbb429f91145ea8484a54a94c4822f367d5 [file] [log] [blame]
pingping-lina7a13a82015-08-31 16:20:53 -07001#!/usr/bin/python
2
3for i in range(1, 101):
4 num= i + 100
5
6 v='quagga%d.conf' %num
7 f=open(v, 'w')
8
9 f.write('hostname bgpd\n')
10 f.write('password hello\n')
11 k=i + 65000
12 v='router bgp %d\n' % (k)
13 f.write(v)
14 v='bgp router-id 192.168.40.%d\n' %i
15 f.write(v)
16 v='neighbor 192.168.40.101 remote-as 64513\n'
17 f.write(v)
18 #print v
19
20 v='neighbor 192.168.40.101 ebgp-multihop\n'
21 f.write(v)
22 v='neighbor 192.168.40.101 update-source 192.168.40.%d\n' %i
23 f.write(v)
24 v='neighbor 192.168.40.101 timers connect 300\n'
25 f.write(v)