summaryrefslogtreecommitdiff
path: root/templates/interfaces/bridge
diff options
context:
space:
mode:
authorStig Thormodsrud <stig@vyatta.com>2007-12-16 14:58:48 -0800
committerStig Thormodsrud <stig@vyatta.com>2007-12-16 14:58:48 -0800
commit36af5914de982f2770fba137c4beea9077cc6adb (patch)
tree544c78988797f948fb13b9f4eb5da0147e1906d6 /templates/interfaces/bridge
parentcd2a6a06133ed9c7d7a5e8fb64d0f1e0c1ea7edf (diff)
downloadvyatta-cfg-quagga-36af5914de982f2770fba137c4beea9077cc6adb.tar.gz
vyatta-cfg-quagga-36af5914de982f2770fba137c4beea9077cc6adb.zip
Add ethernet bridging.
Diffstat (limited to 'templates/interfaces/bridge')
-rw-r--r--templates/interfaces/bridge/node.def7
-rw-r--r--templates/interfaces/bridge/node.tag/aging/node.def5
-rw-r--r--templates/interfaces/bridge/node.tag/description/node.def2
-rw-r--r--templates/interfaces/bridge/node.tag/disable/node.def8
-rw-r--r--templates/interfaces/bridge/node.tag/forwarding-delay/node.def5
-rw-r--r--templates/interfaces/bridge/node.tag/hello-time/node.def5
-rw-r--r--templates/interfaces/bridge/node.tag/max-age/node.def5
-rw-r--r--templates/interfaces/bridge/node.tag/node.def1
-rw-r--r--templates/interfaces/bridge/node.tag/priority/node.def5
-rw-r--r--templates/interfaces/bridge/node.tag/stp/node.def9
10 files changed, 52 insertions, 0 deletions
diff --git a/templates/interfaces/bridge/node.def b/templates/interfaces/bridge/node.def
new file mode 100644
index 00000000..d85c9afc
--- /dev/null
+++ b/templates/interfaces/bridge/node.def
@@ -0,0 +1,7 @@
+tag:
+type: txt
+help: "Enter bridge interface name (br0 - br9)"
+syntax: $(@) in "br0", "br1", "br2", "br3", "br4", "br5", "br6", "br7", "br8", "br9" ; "Must be (br0 - br9)"
+create: "sudo brctl addbr $(@)"
+delete: "sudo brctl delbr $(@)"
+
diff --git a/templates/interfaces/bridge/node.tag/aging/node.def b/templates/interfaces/bridge/node.tag/aging/node.def
new file mode 100644
index 00000000..0b1dcd03
--- /dev/null
+++ b/templates/interfaces/bridge/node.tag/aging/node.def
@@ -0,0 +1,5 @@
+type: u32
+help: "Set the number of seconds a MAC address will be kept in the forwarding database"
+default: 300
+update: "sudo brctl setageing $(../@) $(@)"
+delete: "sudo brctl setageing $(../@) $(@)"
diff --git a/templates/interfaces/bridge/node.tag/description/node.def b/templates/interfaces/bridge/node.tag/description/node.def
new file mode 100644
index 00000000..481dce47
--- /dev/null
+++ b/templates/interfaces/bridge/node.tag/description/node.def
@@ -0,0 +1,2 @@
+type: txt
+help: "Add a human-readable description of an interface"
diff --git a/templates/interfaces/bridge/node.tag/disable/node.def b/templates/interfaces/bridge/node.tag/disable/node.def
new file mode 100644
index 00000000..f72b8af3
--- /dev/null
+++ b/templates/interfaces/bridge/node.tag/disable/node.def
@@ -0,0 +1,8 @@
+type: bool
+help: "Disable the bridge interface"
+default: false
+update: "if [ x$(@) == xtrue ]; then \
+ sudo ip link set $(../@) down; \
+ else \
+ sudo ip link set $(../@) up; \
+ fi; "
diff --git a/templates/interfaces/bridge/node.tag/forwarding-delay/node.def b/templates/interfaces/bridge/node.tag/forwarding-delay/node.def
new file mode 100644
index 00000000..6634a7cc
--- /dev/null
+++ b/templates/interfaces/bridge/node.tag/forwarding-delay/node.def
@@ -0,0 +1,5 @@
+type: u32
+help: "Set the forwarding delay"
+default: 15
+update: "sudo brctl setfd $(../@) $(@)"
+delete: "sudo brctl setfd $(../@) $(@)"
diff --git a/templates/interfaces/bridge/node.tag/hello-time/node.def b/templates/interfaces/bridge/node.tag/hello-time/node.def
new file mode 100644
index 00000000..e7b59ab3
--- /dev/null
+++ b/templates/interfaces/bridge/node.tag/hello-time/node.def
@@ -0,0 +1,5 @@
+type: u32
+help: "Set the hello packet advertisment interval"
+default: 2
+update: "sudo brctl sethello $(../@) $(@)"
+delete: "sudo brctl sethello $(../@) $(@)"
diff --git a/templates/interfaces/bridge/node.tag/max-age/node.def b/templates/interfaces/bridge/node.tag/max-age/node.def
new file mode 100644
index 00000000..7fa3ecbe
--- /dev/null
+++ b/templates/interfaces/bridge/node.tag/max-age/node.def
@@ -0,0 +1,5 @@
+type: u32
+help: "Set the interval at which neighbor bridges are removed"
+default: 20
+update: "sudo brctl setmaxage $(../@) $(@)"
+delete: "sudo brctl setmaxage $(../@) $(@)"
diff --git a/templates/interfaces/bridge/node.tag/node.def b/templates/interfaces/bridge/node.tag/node.def
new file mode 100644
index 00000000..07e13e91
--- /dev/null
+++ b/templates/interfaces/bridge/node.tag/node.def
@@ -0,0 +1 @@
+help: "Set bridge parameters"
diff --git a/templates/interfaces/bridge/node.tag/priority/node.def b/templates/interfaces/bridge/node.tag/priority/node.def
new file mode 100644
index 00000000..650958ef
--- /dev/null
+++ b/templates/interfaces/bridge/node.tag/priority/node.def
@@ -0,0 +1,5 @@
+type: u32
+help: "Set the priority for this bridge"
+default: 0
+update: "sudo brctl setbridgeprio $(../@) $(@)"
+delete: "sudo brctl setbridgeprio $(../@) $(@)"
diff --git a/templates/interfaces/bridge/node.tag/stp/node.def b/templates/interfaces/bridge/node.tag/stp/node.def
new file mode 100644
index 00000000..eb87287b
--- /dev/null
+++ b/templates/interfaces/bridge/node.tag/stp/node.def
@@ -0,0 +1,9 @@
+type: bool
+help: "Enable spanning tree protocol"
+default: false
+update: "if [ x$(@) == xtrue ]; then \
+ sudo brctl stp $(../@) on; \
+ else \
+ sudo brctl stp $(../@) off; \
+ fi; "
+delete: "sudo brctl stp $(../@) off"