TP-Link TL-WDR4300
From DD-WRT Wiki
Revision as of 20:04, 5 June 2014 (edit) Eisbaer (Talk | contribs) ← Previous diff |
Revision as of 21:11, 5 June 2014 (edit) (undo) Eisbaer (Talk | contribs) (→Multiple VLAN and SSID Configuration) Next diff → |
||
Line 51: | Line 51: | ||
;ath0: the radio for 2,4 GHz - is not used as layer 3 interface (has no ip-address). | ;ath0: the radio for 2,4 GHz - is not used as layer 3 interface (has no ip-address). | ||
;ath1: the radio for 5 GHz - is not used as layer 3 interface (has no ip-address). | ;ath1: the radio for 5 GHz - is not used as layer 3 interface (has no ip-address). | ||
- | ;eth0: the interface on which the switch is connected - is not used as layer 3 interface (has no ip-address). | + | ;eth0: the interface on which the switch is connected - is not used as layer 3 interface (has no ip-address). This interface is also used to configure the switch using the swconfig command. |
;vlan1: the logical interface that represents the LAN - is not used as layer 3 interface (has no ip-address). | ;vlan1: the logical interface that represents the LAN - is not used as layer 3 interface (has no ip-address). | ||
;vlan2: the logical interface that represents the WAN | ;vlan2: the logical interface that represents the WAN | ||
;br0: the logical interface for the complete LAN. This is the interface has the LAN-IP-Address. | ;br0: the logical interface for the complete LAN. This is the interface has the LAN-IP-Address. | ||
+ | |||
+ | If you configure additional SSIDs they will be named ath0.1 or ath1.1 depending of the radio. | ||
+ | If you decided to "add the WAN Port to the LAN Switch" the vlan2 Interface will be added to the bridge br0. | ||
+ | |||
+ | to properly configure the Layer 2 environment you will need the following commands: | ||
+ | ;ifconfig: to view or alter interface settings (up/down) as well as IP-Adress Configuration | ||
+ | ;swconfig: to configure the built-in switch. | ||
+ | ;vconfig: to add additional vlans | ||
+ | ;brctl: to configure the logical switch (or bridge) | ||
+ | |||
+ | === Howto/Example: Additional SSID bridged to a tagged vlan === | ||
+ | Let's say you want to use your TL-WDR4300 as a multi SSID parallel band Access Point. | ||
+ | You've already got two IP-Networks (Internal and Guest) up and running. | ||
+ | Internal Network had no VLAN-ID (is untagged) and the guestnetwork has the VLAN ID 6. | ||
+ | Both networks arrive on a cable that are connected to the Port labelled "Port 1" on the Chassis. | ||
+ | |||
+ | * you add an additional SSID on both radios. This will give you two additional interfaces ath0.1 and ath1.1 | ||
+ | * Next you configure the built-in switch to accept a vlan 6: | ||
+ | swconfig dev eth0 set enable_vlan 6 | ||
+ | * Next you tell the switch to add the ports to the cpu (0) and the "Port1" (2) to vlan6 in tagged mode: | ||
+ | swconfig dev eth0 vlan 6 set ports "0t 2t" | ||
+ | swconfig dev eth0 set apply | ||
+ | * Next you crate a "Vlan 6" on the eth0 Interface | ||
+ | vconfig add eth0 6 | ||
+ | * Next you need to connect all the interfaces together in one new bridge: | ||
+ | brctl addbr br1 | ||
+ | brctl addif br1 vlan6 | ||
+ | brctl addif br1 ath0.1 | ||
+ | brctl addif br1 ath1.1 | ||
+ | * just to make sure eveything is up: | ||
+ | ifconfig br1 up | ||
+ | ifconfig ath0.1 up | ||
+ | ifconfig ath1.1 up | ||
+ | ifconfig vlan6 up | ||
+ | |||
+ | Since this configuration is based on the CLI you have to use the "Administration->Commands" Tab in the web GUI to save your script as a startup script. | ||
== How to replace OpenWrt with DD-WRT == | == How to replace OpenWrt with DD-WRT == |
Revision as of 21:11, 5 June 2014
Place holder for TP-Link TL-WDR4300, please add useful infos!
Contents |
TL-WDR4300 hardware info
CPU | Atheros AR9344 |
---|---|
CPU Speed | 560 MHz |
Flash ROM | 8 MB |
RAM | 128 MB |
Radios | 1x 2.4 GHz / 1x 5Ghz |
WLAN Support | A/B/G/N |
WLAN Max Speed | 300mbps on 2.4Ghz and 450mpbs on 5Ghz |
Antenna Location | 3x removable external |
Switch | 4x Gigabit ethernet + 1 Gigabit ethernet WAN |
USB | 2x USB 2.0 |
Multiple VLAN and SSID Configuration
To properly configure multiple Bridges and multiple VLANs it's necessary to get the Interfaces names and Port IDs right. The confusing thing is that there are three different naming schemes present:
- 1st the printed labels on the chassis
- 2nd the labels used in the web frontend
- 3rd the names used on the CLI
Since most of the Layer 2 (switching and bridging) features are only configurable through the CLI the Diagram and the following descriptions refer to the names used in the CLI. Once configured properly though the CLI the names appear in the WEB frontend as well.
The 4300 has a powerful 5 Port Switch which is capable to use the ports in Tagged Mode (802.1Q) as well as Port Based VLAN mode. Even mixed Mode is possible.
The default configuration as seen in the diagram shows the following interfaces:
- ath0
- the radio for 2,4 GHz - is not used as layer 3 interface (has no ip-address).
- ath1
- the radio for 5 GHz - is not used as layer 3 interface (has no ip-address).
- eth0
- the interface on which the switch is connected - is not used as layer 3 interface (has no ip-address). This interface is also used to configure the switch using the swconfig command.
- vlan1
- the logical interface that represents the LAN - is not used as layer 3 interface (has no ip-address).
- vlan2
- the logical interface that represents the WAN
- br0
- the logical interface for the complete LAN. This is the interface has the LAN-IP-Address.
If you configure additional SSIDs they will be named ath0.1 or ath1.1 depending of the radio. If you decided to "add the WAN Port to the LAN Switch" the vlan2 Interface will be added to the bridge br0.
to properly configure the Layer 2 environment you will need the following commands:
- ifconfig
- to view or alter interface settings (up/down) as well as IP-Adress Configuration
- swconfig
- to configure the built-in switch.
- vconfig
- to add additional vlans
- brctl
- to configure the logical switch (or bridge)
Howto/Example: Additional SSID bridged to a tagged vlan
Let's say you want to use your TL-WDR4300 as a multi SSID parallel band Access Point. You've already got two IP-Networks (Internal and Guest) up and running. Internal Network had no VLAN-ID (is untagged) and the guestnetwork has the VLAN ID 6. Both networks arrive on a cable that are connected to the Port labelled "Port 1" on the Chassis.
- you add an additional SSID on both radios. This will give you two additional interfaces ath0.1 and ath1.1
- Next you configure the built-in switch to accept a vlan 6:
swconfig dev eth0 set enable_vlan 6
- Next you tell the switch to add the ports to the cpu (0) and the "Port1" (2) to vlan6 in tagged mode:
swconfig dev eth0 vlan 6 set ports "0t 2t" swconfig dev eth0 set apply
- Next you crate a "Vlan 6" on the eth0 Interface
vconfig add eth0 6
- Next you need to connect all the interfaces together in one new bridge:
brctl addbr br1 brctl addif br1 vlan6 brctl addif br1 ath0.1 brctl addif br1 ath1.1
- just to make sure eveything is up:
ifconfig br1 up ifconfig ath0.1 up ifconfig ath1.1 up ifconfig vlan6 up
Since this configuration is based on the CLI you have to use the "Administration->Commands" Tab in the web GUI to save your script as a startup script.
How to replace OpenWrt with DD-WRT
- Set up an HTTP server.
- Download the firmware file "/tplink_tl-wdr4300v1/factory-to-ddwrt.bin" from the build folder, and save the firmware file to the root of the public web server folder. You must use the "factory-to-ddwrt.bin" file when writing with
mtd
. Do not use the "tl-wdr4300-webflash.bin" file, which will brick your router. - Login by SSH.
- View the partitions.
-
cat /proc/mtd
-
- Verify that you have a "firmware" partition for
mtd
to write. - You must download the firmware file in the "/tmp" directory.
-
cd /tmp
-
wget http://192.168.1.100/factory-to-ddwrt.bin
-
- Write the firmware.
-
mtd -r write /tmp/factory-to-ddwrt.bin firmware
-