/system identity set name="Router 1-JHB"
/interface bridge add name="OSPF Loopback"
/interface ethernet
set 0 name="ether1: Public"
set 1 name="ether2: Private"
set 2 name="ether3: LAN"
/ip address
add address=1.1.1.1/27 interface="ether1: Public" network=1.1.1.0
add address=172.16.0.1/24 interface="ether2: Private" network=172.16.0.0
add address=196.168.1.10/24 interface="ether3: LAN" network=196.168.1.0
add address=10.0.0.1/32 interface="OSPF Loopback" network=10.0.0.1
/ip pool add name=PPTP-VPN ranges=10.0.1.1-10.0.1.30
/interface pptp-server server set enabled=yes
/ppp profile add change-tcp-mss=yes local-address=10.0.0.1 name="VPN PPTP" remote-address=PPTP-VPN use-encryption=yes
/ppp secret
add disabled=yes name="JHB-USA" password=test123 profile="VPN PPTP" remote-address=10.0.1.5
add disabled=yes name="JHB-UK" password=test123 profile="VPN PPTP" remote-address=10.0.1.6
add disabled=yes name="JHB-NZ" password=test123 profile="VPN PPTP" remote-address=10.0.1.7
add disabled=yes name="JHB-CPT" password=test123 profile="VPN PPTP" remote-address=10.0.1.2
/routing ospf instance set [ find default=yes ] router-id=10.0.0.1
/routing ospf area add area-id=0.0.0.1 name=area1
/routing ospf network
add area=area1 disabled=yes network=196.168.1.0/24
add area=area1 disabled=yes network=172.16.0.0/24
add area=area1 disabled=yes network=10.0.1.0/27
/queue simple
add max-limit=50M/50M name="Limit Public to 50Mbps" target="ether1: Public"
add max-limit=100M/100M name="Limit Private to 100Mbps" target="ether2: Private"
/system identity set name="Router 2-CPT"
/interface bridge add name="OSPF Loopback"
/interface ethernet
set 0 name="ether1: Public"
set 1 name="ether2: Private"
set 2 name="ether3: LAN"
/ip address
add address=1.1.1.2/27 interface="ether1: Public" network=1.1.1.0
add address=172.16.0.2/24 interface="ether2: Private" network=172.16.0.0
add address=196.168.2.10/24 interface="ether3: LAN" network=196.168.2.0
add address=10.0.0.2/32 interface="OSPF Loopback" network=10.0.0.2
/ip pool add name=PPTP-VPN ranges=10.0.2.1-10.0.2.30
/interface pptp-server server set enabled=yes
/ppp profile add change-tcp-mss=yes local-address=10.0.0.2 name="VPN PPTP" remote-address=PPTP-VPN use-encryption=yes
/ppp secret
add disabled=yes name="CPT-USA" password=test123 profile="VPN PPTP" remote-address=10.0.2.5
add disabled=yes name="CPT-UK" password=test123 profile="VPN PPTP" remote-address=10.0.2.6
add disabled=yes name="CPT-NZ" password=test123 profile="VPN PPTP" remote-address=10.0.2.7
/interface pptp-client
add connect-to=1.1.1.1 disabled=no name=CPT-JHB password=test123 user=JHB-CPT
/routing ospf instance set [ find default=yes ] router-id=10.0.0.2
/routing ospf area add area-id=0.0.0.1 name=area1
/routing ospf network
add area=area1 disabled=yes network=196.168.2.0/24
add area=area1 disabled=yes network=172.16.0.0/24
add area=area1 disabled=yes network=10.0.2.0/27
add area=area1 disabled=yes network=10.0.0.0/27
/queue simple
add max-limit=20M/20M name="Limit Public to 20Mbps" target="ether1: Public"
add max-limit=100M/100M name="Limit Private to 100Mbps" target="ether2: Private"
/system identity set name="Router 3-NAM"
/interface bridge add name="OSPF Loopback"
/interface ethernet
set 0 name="ether1: Private"
set 1 name="ether2: LAN"
/ip address
add address=172.16.0.3/24 interface="ether1: Private" network=172.16.0.0
add address=196.168.3.10/24 interface="ether2: LAN" network=196.168.3.0
add address=10.0.0.3/32 interface="OSPF Loopback" network=10.0.0.3
/routing ospf instance set [ find default=yes ] router-id=10.0.0.3
/routing ospf area add area-id=0.0.0.1 name=area1
/routing ospf network
add area=area1 network=196.168.3.0/24
add area=area1 network=172.16.0.0/24
/queue simple
add max-limit=40M/40M name="Limit Private to 40Mbps" target="ether1: Private"
/system identity set name="Router 4-LES"
/interface bridge add name="OSPF Loopback"
/interface ethernet
set 0 name="ether1: Private"
set 1 name="ether2: LAN"
/ip address
add address=172.16.0.4/24 interface="ether1: Private" network=172.16.0.0
add address=196.168.4.10/24 interface="ether2: LAN" network=196.168.4.0
add address=10.0.0.4/32 interface="OSPF Loopback" network=10.0.0.4
/routing ospf instance set [ find default=yes ] router-id=10.0.0.4
/routing ospf area add area-id=0.0.0.1 name=area1
/routing ospf network
add area=area1 network=196.168.4.0/24
add area=area1 network=172.16.0.0/24
/queue simple
add max-limit=1M/1M name="Limit Private to 1Mbps" target="ether1: Private"
/system identity set name="Router 5-USA"
/interface bridge add name="OSPF Loopback"
/interface ethernet
set 0 name="ether1: Public"
set 1 name="ether2: LAN"
/ip address
add address=1.1.1.5/27 interface="ether1: Public" network=1.1.1.0
add address=196.168.5.10/24 interface="ether2: LAN" network=196.168.5.0
add address=10.0.0.5/32 interface="OSPF Loopback" network=10.0.0.5
/interface pptp-client
add connect-to=1.1.1.2 disabled=no name=USA-CPT password=test123 user=CPT-USA
add connect-to=1.1.1.1 disabled=no name=USA-JHB password=test123 user=JHB-USA
/routing ospf instance set [ find default=yes ] router-id=10.0.0.5
/routing ospf area add area-id=0.0.0.1 name=area1
/routing ospf network
add area=area1 network=196.168.5.0/24
add area=area1 network=10.0.0.0/27
/queue simple
add max-limit=5M/5M name="Limit Public to 5Mbps" target="ether1: Public"
/system identity set name="Router 6-UK"
/interface bridge add name="OSPF Loopback"
/interface ethernet
set 0 name="ether1: Public"
set 1 name="ether2: LAN"
/ip address
add address=1.1.1.6/27 interface="ether1: Public" network=1.1.1.0
add address=196.168.6.10/24 interface="ether2: LAN" network=196.168.6.0
add address=10.0.0.6/32 interface="OSPF Loopback" network=10.0.0.6
/interface pptp-client
add connect-to=1.1.1.2 disabled=no name=UK-CPT password=test123 user=CPT-UK
add connect-to=1.1.1.1 disabled=no name=UK-JHB password=test123 user=JHB-UK
/routing ospf instance set [ find default=yes ] router-id=10.0.0.6
/routing ospf area add area-id=0.0.0.1 name=area1
/routing ospf network
add area=area1 network=196.168.6.0/24
add area=area1 network=10.0.0.0/27
/queue simple
add max-limit=1M/1M name="Limit Public to 1Mbps" target="ether1: Public"
/system identity set name="Router 7-NZ"
/interface bridge add name="OSPF Loopback"
/interface ethernet
set 0 name="ether1: Public"
set 1 name="ether2: LAN"
/ip address
add address=1.1.1.7/27 interface="ether1: Public" network=1.1.1.0
add address=196.168.7.10/24 interface="ether2: LAN" network=196.168.7.0
add address=10.0.0.7/32 interface="OSPF Loopback" network=10.0.0.7
/interface pptp-client
add connect-to=1.1.1.2 disabled=no name=NZ-CPT password=test123 user=CPT-NZ
add connect-to=1.1.1.1 disabled=no name=NZ-JHB password=test123 user=JHB-NZ
/routing ospf instance set [ find default=yes ] router-id=10.0.0.7
/routing ospf area add area-id=0.0.0.1 name=area1
/routing ospf network
add area=area1 network=196.168.7.0/24
add area=area1 network=10.0.0.0/27
/queue simple
add max-limit=10M/10M name="Limit Public to 10Mbps" target="ether1: Public"
Example:
Have a question about something in this article? You can receive help directly from the article author. Sign up for a free trial to get started.
Comments (0)