02_network 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. #!/bin/sh
  2. #
  3. # Copyright (C) 2012-2015 OpenWrt.org
  4. #
  5. . /lib/functions/uci-defaults.sh
  6. . /lib/brcm63xx.sh
  7. board_config_update
  8. case "$(brcm63xx_board_name)" in
  9. cvg834g |\
  10. evg2000 |\
  11. rta770bw |\
  12. rta770w |\
  13. spw303v |\
  14. spw500v)
  15. ucidef_set_interface_lan "eth0"
  16. ;;
  17. ar1004g |\
  18. bcm96338gw |\
  19. bcm96338w |\
  20. cpva642 |\
  21. ct-5365 |\
  22. ct-536p_5621t |\
  23. ct-6373 |\
  24. dg834g_v4 |\
  25. dsl-2640b-b |\
  26. dsl-2640u |\
  27. fast2604 |\
  28. rta1320 |\
  29. v2110)
  30. ucidef_add_switch "switch0" \
  31. "0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "5@eth0"
  32. ;;
  33. agpf-s0 |\
  34. bcm96348gw |\
  35. bcm96348gw-10 |\
  36. bcm96348gw-11 |\
  37. bcm96358vw |\
  38. bcm96358vw2 |\
  39. cpva502p |\
  40. dg834gt |\
  41. dmv-s0 |\
  42. dsl-2650u |\
  43. dv-201amr |\
  44. f5d7633 |\
  45. fast2404 |\
  46. magic |\
  47. rg100a |\
  48. rta1025W |\
  49. td-w8900gb |\
  50. usr9108 |\
  51. v2500v_bb)
  52. ucidef_set_interfaces_lan_wan "eth1" "eth0"
  53. ucidef_add_switch "switch0" \
  54. "0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "5@eth1"
  55. ;;
  56. dsl-274xb-c |\
  57. hg553 |\
  58. hg556a_* |\
  59. homehub2a)
  60. ucidef_add_switch "switch0" \
  61. "0:lan:1" "1:lan:2" "2:lan:3" "3:lan:4" "5t@eth0"
  62. ;;
  63. dva-g3810bn |\
  64. hg520 |\
  65. neufbox4)
  66. ucidef_set_interfaces_lan_wan "eth1.1" "eth0"
  67. ucidef_add_switch "switch0" \
  68. "0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "5t@eth1"
  69. ;;
  70. a4001n1 |\
  71. a4001n |\
  72. ar-5381u |\
  73. ar-5387un |\
  74. bcm963281tan |\
  75. bcm96328avng |\
  76. bcm96368mvngr |\
  77. dsl-274xb-f |\
  78. dsl-275xb-d |\
  79. fast2504n |\
  80. fast2704v2 |\
  81. hg622 |\
  82. hg655b |\
  83. p870hw-51a_v2 |\
  84. r5010un_v2 |\
  85. vr-3025un |\
  86. vr-3025u |\
  87. vr-3026e)
  88. ucidef_add_switch "switch0" \
  89. "0:lan:1" "1:lan:2" "2:lan:3" "3:lan:4" "8t@eth0"
  90. ;;
  91. vh4032n)
  92. ucidef_add_switch "switch0" \
  93. "0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "8t@eth0"
  94. ;;
  95. bcm96368mvwg)
  96. ucidef_add_switch "switch0" \
  97. "1:lan" "2:lan" "4:lan" "5:lan" "8t@eth0"
  98. ;;
  99. wap-5813n)
  100. ucidef_add_switch "switch0" \
  101. "0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "5t@eth0"
  102. ;;
  103. fast2704n |\
  104. dgnd3700v1_dgnd3800b)
  105. ucidef_add_switch "switch0" \
  106. "1:lan:1" "2:lan:2" "3:lan:3" "4:lan:4" "0:wan" "8t@eth0"
  107. ;;
  108. neufbox6)
  109. ucidef_add_switch "switch0" \
  110. "1:lan" "2:lan" "3:lan" "4:lan" "0:wan" "9t@eth0"
  111. ;;
  112. vg50)
  113. ucidef_add_switch "switch0" \
  114. "0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "8t@eth0"
  115. ;;
  116. bcm963268bu_p300)
  117. ucidef_add_switch "switch0" \
  118. "0:lan" "3:lan" "4:lan" "5:lan" "6:lan" "7:lan" "8t@eth0"
  119. ;;
  120. livebox1)
  121. ucidef_set_interfaces_lan_wan "eth0" "eth1"
  122. ;;
  123. *)
  124. ucidef_set_interfaces_lan_wan "eth1" "eth0"
  125. ;;
  126. esac
  127. board_config_flush
  128. exit 0