diff --git a/src/packages/fff/fff-network/arm/network.tplink,c2600 b/src/packages/fff/fff-network/arm/network.tplink,c2600
index 3535c62d..8c3fc205 100644
--- a/src/packages/fff/fff-network/arm/network.tplink,c2600
+++ b/src/packages/fff/fff-network/arm/network.tplink,c2600
@@ -1,5 +1,3 @@
-PORTORDER="5 4 3 2 1"
-
 WANDEV=eth0
 SWITCHDEV=eth0
 CLIENT_PORTS="0t 1 2"
diff --git a/src/packages/fff/fff-network/files/lib/functions/fff/portorder b/src/packages/fff/fff-network/files/lib/functions/fff/portorder
new file mode 100644
index 00000000..f2ea5962
--- /dev/null
+++ b/src/packages/fff/fff-network/files/lib/functions/fff/portorder
@@ -0,0 +1,45 @@
+# Copyright 2019 Adrian Schmutzler
+# License GPLv3
+
+get_port_order() {
+	BOARD="$(uci get board.model.name)"
+
+	case "$BOARD" in
+		glinet,gl-ar150)
+			PORTORDER="1"
+			;;
+		r6220)
+			PORTORDER="4 3 2 1 0"
+			;;
+		tplink,archer-c25-v1|\
+		tplink,archer-c60-v1|\
+		tplink,archer-c60-v2|\
+		tplink,tl-wr841-v10|\
+		tplink,tl-wr841-v11|\
+		tplink,tl-wr841-v12)
+			PORTORDER="4 3 2 1"
+			;;
+		tplink,archer-c7-v2|\
+		tplink,archer-c7-v5|\
+		tplink,tl-wdr4300-v1)
+			PORTORDER="1 2 3 4 5"
+			;;
+		tplink,c2600|\
+		tplink,tl-wr1043nd-v4|\
+		tplink,tl-wr1043n-v5)
+			PORTORDER="5 4 3 2 1"
+			;;
+		cpe210|\
+		cpe510)
+			PORTORDER="5 4"
+			;;
+		tplink,tl-wr841-v8)
+			PORTORDER="2 3 4 1"
+			;;
+		tl-wr841n-v13)
+			PORTORDER="0 1 2 3 4"
+			;;
+	esac
+
+	echo "$PORTORDER"
+}
diff --git a/src/packages/fff/fff-network/mips/network.cpe210 b/src/packages/fff/fff-network/mips/network.cpe210
index 7b009946..a690d54a 100644
--- a/src/packages/fff/fff-network/mips/network.cpe210
+++ b/src/packages/fff/fff-network/mips/network.cpe210
@@ -1,7 +1,5 @@
 . /lib/functions/fff/network
 
-PORTORDER="5 4"
-
 WANDEV=eth0
 SWITCHDEV=eth0
 CLIENT_PORTS="0t"
diff --git a/src/packages/fff/fff-network/mips/network.cpe510 b/src/packages/fff/fff-network/mips/network.cpe510
index 7b009946..a690d54a 100644
--- a/src/packages/fff/fff-network/mips/network.cpe510
+++ b/src/packages/fff/fff-network/mips/network.cpe510
@@ -1,7 +1,5 @@
 . /lib/functions/fff/network
 
-PORTORDER="5 4"
-
 WANDEV=eth0
 SWITCHDEV=eth0
 CLIENT_PORTS="0t"
diff --git a/src/packages/fff/fff-network/mips/network.glinet,gl-ar150 b/src/packages/fff/fff-network/mips/network.glinet,gl-ar150
index 49bffebe..cb1ce84c 100644
--- a/src/packages/fff/fff-network/mips/network.glinet,gl-ar150
+++ b/src/packages/fff/fff-network/mips/network.glinet,gl-ar150
@@ -1,7 +1,5 @@
 . /lib/functions/fff/network
 
-PORTORDER="1"
-
 WANDEV=eth1
 SWITCHDEV=eth0
 WAN_PORTS=
diff --git a/src/packages/fff/fff-network/mips/network.tplink,archer-c25-v1 b/src/packages/fff/fff-network/mips/network.tplink,archer-c25-v1
index 59149cf7..13355d53 100644
--- a/src/packages/fff/fff-network/mips/network.tplink,archer-c25-v1
+++ b/src/packages/fff/fff-network/mips/network.tplink,archer-c25-v1
@@ -1,5 +1,3 @@
-PORTORDER="4 3 2 1"
-
 WANDEV=eth1
 SWITCHDEV=eth0
 CLIENT_PORTS="1 2 0t"
diff --git a/src/packages/fff/fff-network/mips/network.tplink,archer-c60-v1 b/src/packages/fff/fff-network/mips/network.tplink,archer-c60-v1
index 6d2578f6..aafc5af3 100644
--- a/src/packages/fff/fff-network/mips/network.tplink,archer-c60-v1
+++ b/src/packages/fff/fff-network/mips/network.tplink,archer-c60-v1
@@ -1,5 +1,3 @@
-PORTORDER="4 3 2 1"
-
 WANDEV=eth1
 SWITCHDEV=eth0
 CLIENT_PORTS="1 2 0t"
diff --git a/src/packages/fff/fff-network/mips/network.tplink,archer-c60-v2 b/src/packages/fff/fff-network/mips/network.tplink,archer-c60-v2
index 6d2578f6..aafc5af3 100644
--- a/src/packages/fff/fff-network/mips/network.tplink,archer-c60-v2
+++ b/src/packages/fff/fff-network/mips/network.tplink,archer-c60-v2
@@ -1,5 +1,3 @@
-PORTORDER="4 3 2 1"
-
 WANDEV=eth1
 SWITCHDEV=eth0
 CLIENT_PORTS="1 2 0t"
diff --git a/src/packages/fff/fff-network/mips/network.tplink,archer-c7-v2 b/src/packages/fff/fff-network/mips/network.tplink,archer-c7-v2
index f774a53e..9a8f8614 100644
--- a/src/packages/fff/fff-network/mips/network.tplink,archer-c7-v2
+++ b/src/packages/fff/fff-network/mips/network.tplink,archer-c7-v2
@@ -1,5 +1,3 @@
-PORTORDER="1 2 3 4 5"
-
 WANDEV=eth1
 SWITCHDEV=eth1
 CLIENT_PORTS="4 5 0t"
diff --git a/src/packages/fff/fff-network/mips/network.tplink,archer-c7-v5 b/src/packages/fff/fff-network/mips/network.tplink,archer-c7-v5
index 493134a1..1a217e8b 100644
--- a/src/packages/fff/fff-network/mips/network.tplink,archer-c7-v5
+++ b/src/packages/fff/fff-network/mips/network.tplink,archer-c7-v5
@@ -1,7 +1,5 @@
 . /lib/functions/fff/network
 
-PORTORDER="1 2 3 4 5"
-
 WANDEV=eth0
 SWITCHDEV=eth0
 CLIENT_PORTS="4 5 0t"
diff --git a/src/packages/fff/fff-network/mips/network.tplink,tl-wr1043n-v5 b/src/packages/fff/fff-network/mips/network.tplink,tl-wr1043n-v5
index c52e74e6..734922ae 100644
--- a/src/packages/fff/fff-network/mips/network.tplink,tl-wr1043n-v5
+++ b/src/packages/fff/fff-network/mips/network.tplink,tl-wr1043n-v5
@@ -1,5 +1,3 @@
-PORTORDER="5 4 3 2 1"
-
 WANDEV=eth0
 SWITCHDEV=eth0
 CLIENT_PORTS="1 2 0t"
diff --git a/src/packages/fff/fff-network/mips/network.tplink,tl-wr1043nd-v4 b/src/packages/fff/fff-network/mips/network.tplink,tl-wr1043nd-v4
index c52e74e6..734922ae 100644
--- a/src/packages/fff/fff-network/mips/network.tplink,tl-wr1043nd-v4
+++ b/src/packages/fff/fff-network/mips/network.tplink,tl-wr1043nd-v4
@@ -1,5 +1,3 @@
-PORTORDER="5 4 3 2 1"
-
 WANDEV=eth0
 SWITCHDEV=eth0
 CLIENT_PORTS="1 2 0t"
diff --git a/src/packages/fff/fff-network/mips/network.tplink,tl-wr841-v10 b/src/packages/fff/fff-network/mips/network.tplink,tl-wr841-v10
index 44054065..498708b0 100644
--- a/src/packages/fff/fff-network/mips/network.tplink,tl-wr841-v10
+++ b/src/packages/fff/fff-network/mips/network.tplink,tl-wr841-v10
@@ -1,5 +1,3 @@
-PORTORDER="4 3 2 1"
-
 WANDEV=eth1
 SWITCHDEV=eth0
 CLIENT_PORTS="1 2 0t"
diff --git a/src/packages/fff/fff-network/mips/network.tplink,tl-wr841-v11 b/src/packages/fff/fff-network/mips/network.tplink,tl-wr841-v11
index 44054065..498708b0 100644
--- a/src/packages/fff/fff-network/mips/network.tplink,tl-wr841-v11
+++ b/src/packages/fff/fff-network/mips/network.tplink,tl-wr841-v11
@@ -1,5 +1,3 @@
-PORTORDER="4 3 2 1"
-
 WANDEV=eth1
 SWITCHDEV=eth0
 CLIENT_PORTS="1 2 0t"
diff --git a/src/packages/fff/fff-network/mips/network.tplink,tl-wr841-v12 b/src/packages/fff/fff-network/mips/network.tplink,tl-wr841-v12
index 44054065..498708b0 100644
--- a/src/packages/fff/fff-network/mips/network.tplink,tl-wr841-v12
+++ b/src/packages/fff/fff-network/mips/network.tplink,tl-wr841-v12
@@ -1,5 +1,3 @@
-PORTORDER="4 3 2 1"
-
 WANDEV=eth1
 SWITCHDEV=eth0
 CLIENT_PORTS="1 2 0t"
diff --git a/src/packages/fff/fff-network/mips/network.tplink,tl-wr841-v8 b/src/packages/fff/fff-network/mips/network.tplink,tl-wr841-v8
index ace93630..541fb3d3 100644
--- a/src/packages/fff/fff-network/mips/network.tplink,tl-wr841-v8
+++ b/src/packages/fff/fff-network/mips/network.tplink,tl-wr841-v8
@@ -1,5 +1,3 @@
-PORTORDER="2 3 4 1"
-
 WANDEV=eth1
 SWITCHDEV=eth0
 CLIENT_PORTS="1 4 0t"
diff --git a/src/packages/fff/fff-network/mipsel/network.r6220 b/src/packages/fff/fff-network/mipsel/network.r6220
index 800dcb40..f1f77bfe 100644
--- a/src/packages/fff/fff-network/mipsel/network.r6220
+++ b/src/packages/fff/fff-network/mipsel/network.r6220
@@ -1,7 +1,5 @@
 . /lib/functions/fff/network
 
-PORTORDER="4 3 2 1 0"
-
 WANDEV=eth0
 SWITCHDEV=eth0
 CLIENT_PORTS="6t 0 1"
diff --git a/src/packages/fff/fff-network/mipsel/network.tl-wr841n-v13 b/src/packages/fff/fff-network/mipsel/network.tl-wr841n-v13
index 602b77e1..273381a9 100644
--- a/src/packages/fff/fff-network/mipsel/network.tl-wr841n-v13
+++ b/src/packages/fff/fff-network/mipsel/network.tl-wr841n-v13
@@ -1,7 +1,5 @@
 . /lib/functions/system.sh
 
-PORTORDER="0 1 2 3 4"
-
 WANDEV=eth0
 SWITCHDEV=eth0
 CLIENT_PORTS="6t 3 4"
diff --git a/src/packages/fff/fff-support/Makefile b/src/packages/fff/fff-support/Makefile
index 76ca26c8..32c91dda 100644
--- a/src/packages/fff/fff-support/Makefile
+++ b/src/packages/fff/fff-support/Makefile
@@ -1,7 +1,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=fff-support
-PKG_RELEASE:=5
+PKG_RELEASE:=6
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
 
diff --git a/src/packages/fff/fff-support/files/usr/sbin/show_info b/src/packages/fff/fff-support/files/usr/sbin/show_info
index cd3b4d2e..5024daa7 100755
--- a/src/packages/fff/fff-support/files/usr/sbin/show_info
+++ b/src/packages/fff/fff-support/files/usr/sbin/show_info
@@ -171,9 +171,8 @@ else
 	echo "simple-tc nicht installiert."
 fi
 
-if grep -q 'PORTORDER=' /etc/network.$board_name ; then
-	portorder=$(awk -F= '/PORTORDER=/ { print $2 }' /etc/network.$board_name | sed "s/\"//g")
-fi
+. /lib/functions/fff/portorder
+portorder="$(get_port_order)"
 
 echo ""
 if swconfig list | grep -q switch0 ; then
diff --git a/src/packages/fff/fff-web/Makefile b/src/packages/fff/fff-web/Makefile
index c0783b7b..139cd24d 100644
--- a/src/packages/fff/fff-web/Makefile
+++ b/src/packages/fff/fff-web/Makefile
@@ -1,7 +1,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=fff-web
-PKG_RELEASE:=11
+PKG_RELEASE:=12
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
 
diff --git a/src/packages/fff/fff-web/files/www/ssl/cgi-bin/ports.html b/src/packages/fff/fff-web/files/www/ssl/cgi-bin/ports.html
index 01506fce..9bbd68db 100755
--- a/src/packages/fff/fff-web/files/www/ssl/cgi-bin/ports.html
+++ b/src/packages/fff/fff-web/files/www/ssl/cgi-bin/ports.html
@@ -108,9 +108,8 @@ format_port() {
 					echo "</td>"
 				fi
 				
-				if grep -q 'PORTORDER=' /etc/network.$board_name ; then
-					portorder=$(awk -F= '/PORTORDER=/ { print $2 }' /etc/network.$board_name | sed "s/\"//g")
-				fi
+				. /lib/functions/fff/portorder
+				portorder="$(get_port_order)"
 				for internalport in $portorder
 				do
 					line=$(swconfig dev switch0 port "$internalport" show | tr -d '\n' | tr -d '\t')
