Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion updateros.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
ssh_port = 22
username = None
distance = 30
ampr_source = "44.128.0.1" # replace with a 44net address which exists on your host

# blacklist BGP-announced networks with direct-routing agreements
bgp_networks = [
Expand Down Expand Up @@ -157,7 +158,7 @@ def main():
edge_router_ip, interface, entry['gatewayIP'],
"AMPR last updated %s, added %s" % (
entry['updated'].date(), date.today())))
commands.append("/ip route add dst-address=%s gateway=%s distance=%s" % (entry.network(), interface, distance))
commands.append("/ip route add dst-address=%s gateway=%s distance=%s pref-src=%s" % (entry.network(), interface, distance, ampr_source))
commands.append("/ip neighbor discovery set %s discover=no" % (interface))

if "-v" in sys.argv:
Expand Down