Advertisement
Guest User

vlans on openwrt TP-Link WNDR4300

a guest
Jul 13th, 2015
490
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.66 KB | None | 0 0
  1. # This is on a TP-Link WDR4300
  2. # eth0 is connected to port 0 of the switch, WAN is port 1,
  3. # and ports 0 - 3 are the LAN ports 2 - 5.
  4. #
  5. # The WAN port is connected to a gateway server that has LAN traffic
  6. # tagged as VLAN 2, and a guest network tagged as VLAN 3. Both also go
  7. # tagged to the CPU (port 0, hence the "0t").
  8. # VLAN 2 is available untagged on the LAN ports, and on wlan0 and wlan1
  9. # (2.4GHz and 5GHz)
  10. # VLAN 3 is available on wlan0-1 and wlan1-1.
  11.  
  12. # /etc/config/network :
  13.  
  14. config interface 'loopback'
  15. option ifname 'lo'
  16. option proto 'static'
  17. option ipaddr '127.0.0.1'
  18. option netmask '255.0.0.0'
  19.  
  20. config globals 'globals'
  21. option ula_prefix 'fd53:b60b:e960::/48'
  22.  
  23. config switch
  24. option name 'switch0'
  25. option reset '1'
  26. option enable_vlan '1'
  27.  
  28. config switch_vlan
  29. option device 'switch0'
  30. option vlan '1'
  31. option vid '1'
  32. option ports '0t 1'
  33.  
  34. config switch_vlan
  35. option device 'switch0'
  36. option vlan '2'
  37. option vid '2'
  38. option ports '0t 1t 2 3 4 5'
  39.  
  40. config switch_vlan
  41. option device 'switch0'
  42. option vlan '3'
  43. option vid '3'
  44. option ports '0t 1t'
  45.  
  46. config interface 'vlan2'
  47. option type 'bridge'
  48. option _orig_ifname 'wlan0 wlan1'
  49. option _orig_bridge 'true'
  50. option proto 'static'
  51. option ifname 'eth0.2'
  52. option ipaddr '192.168.28.252'
  53. option netmask '255.255.255.0'
  54. option gateway '192.168.28.1'
  55. option broadcast '192.168.28.255'
  56. option dns '192.168.28.1'
  57.  
  58. config interface 'vlan3'
  59. option proto 'none'
  60. option type 'bridge'
  61. option _orig_ifname 'wlan0-1 wlan1-1'
  62. option _orig_bridge 'true'
  63. option ifname 'eth0.3'
  64.  
  65. # part of /etc/config/wireless :
  66.  
  67. config wifi-iface
  68. option device 'radio0'
  69. option mode 'ap'
  70. option network 'vlan2'
  71. option ssid 'myssidname'
  72. option encryption 'psk2'
  73. option key 'secret'
  74.  
  75. config wifi-iface
  76. option device 'radio1'
  77. option mode 'ap'
  78. option network 'vlan2'
  79. option ssid 'myssidname'
  80. option encryption 'psk2'
  81. option key 'secret'
  82.  
  83. config wifi-iface
  84. option device 'radio0'
  85. option mode 'ap'
  86. option ssid 'guest access'
  87. option encryption 'psk2'
  88. option key 'welcome'
  89. option network 'vlan3'
  90.  
  91. config wifi-iface
  92. option device 'radio1'
  93. option mode 'ap'
  94. option ssid 'guest access'
  95. option encryption 'psk2'
  96. option key 'welcome'
  97. option network 'vlan3'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement