Add routing stuff
This commit is contained in:
parent
897787d649
commit
b8c12cd55f
|
@ -0,0 +1,32 @@
|
|||
# This file describes the network interfaces available on your system
|
||||
# and how to activate them. For more information, see interfaces(5).
|
||||
|
||||
# The loopback network interface
|
||||
auto lo
|
||||
iface lo inet loopback
|
||||
|
||||
# The routes added here will not be visible to the 'route' command; you
|
||||
# should use 'ip route show table foo' instead.
|
||||
|
||||
auto eth0
|
||||
iface eth0 inet static
|
||||
address 129.97.134.42
|
||||
netmask 255.255.255.0
|
||||
gateway 129.97.134.1
|
||||
up ip rule add from all lookup campus prio 1
|
||||
down ip rule del from all lookup campus prio 1
|
||||
up ip rule add from all lookup orion prio 2
|
||||
down ip rule del from all lookup orion prio 2
|
||||
up ip route add 129.97.0.0/16 via 129.97.134.1 dev eth0 table campus realm campus
|
||||
down ip route del 129.97.0.0/16 via 129.97.134.1 dev eth0 table campus realm campus
|
||||
up ip route add 10.0.0.0/8 via 129.97.134.1 dev eth0 table campus realm campus
|
||||
down ip route del 10.0.0.0/8 via 129.97.134.1 dev eth0 table campus realm campus
|
||||
up ip route add 172.16.0.0/20 via 129.97.134.1 dev eth0 table campus realm campus
|
||||
down ip route del 172.16.0.0/20 via 129.97.134.1 dev eth0 table campus realm campus
|
||||
up ip route add 192.168.0.0/16 via 129.97.134.1 dev eth0 table campus realm campus
|
||||
down ip route del 192.168.0.0/16 via 129.97.134.1 dev eth0 table campus realm campus
|
||||
|
||||
auto eth0:mirror
|
||||
iface eth0:mirror inet static
|
||||
address 129.97.134.71
|
||||
netmask 255.255.255.0
|
|
@ -1,5 +1,8 @@
|
|||
#!/usr/bin/python
|
||||
|
||||
# This file updates the orion routing table.
|
||||
# Put it at /usr/local/sbin/orionroutes.py
|
||||
|
||||
# Configuration
|
||||
ORION_TABLE = 1 # from /etc/iproute2/rt_tables
|
||||
ORION_REALMS = 1 # from /etc/iproute2/rt_realms
|
|
@ -0,0 +1,10 @@
|
|||
# This file configures the packet scheduler
|
||||
|
||||
tc qdisc del dev eth0 parent root
|
||||
tc qdisc add dev eth0 parent root handle 1: htb default 2 r2q 10000
|
||||
tc class add dev eth0 parent 1: classid 1:1 htb rate 1000Mbit
|
||||
tc class add dev eth0 parent 1:1 classid 1:2 htb rate 100Mbit
|
||||
tc class add dev eth0 parent 1:1 classid 1:3 htb rate 200Mbit
|
||||
tc class add dev eth0 parent 1:1 classid 1:4 htb rate 700Mbit ceil 1000Mbit
|
||||
tc filter add dev eth0 parent 1: protocol ip pref 2 route to orion flowid 1:3
|
||||
tc filter add dev eth0 parent 1: protocol ip pref 1 route to campus flowid 1:4
|
|
@ -0,0 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
# This file updates the orion routing table.
|
||||
# Put it at /usr/local/sbin/update-orion-routes.
|
||||
|
||||
wget --quiet -O - http://noc.uwaterloo.ca/~ns-owner/ext-routes.txt | /usr/local/sbin/orionroutes.py
|
Loading…
Reference in New Issue