Advertisement
Guest User

Untitled

a guest
Dec 13th, 2015
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.02 KB | None | 0 0
  1. root@TestgeraetWA860RE:~# ifconfig
  2. bat0 Link encap:Ethernet HWaddr 0A:9F:86:82:EB:5B
  3. inet6 addr: fe80::89f:86ff:fe82:eb5b/64 Scope:Link
  4. UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
  5. RX packets:5075 errors:0 dropped:0 overruns:0 frame:0
  6. TX packets:883 errors:0 dropped:0 overruns:0 carrier:0
  7. collisions:0 txqueuelen:0
  8. RX bytes:1912725 (1.8 MiB) TX bytes:126496 (123.5 KiB)
  9.  
  10. br-mesh Link encap:Ethernet HWaddr 0A:9F:86:82:EB:5B
  11. inet6 addr: fe80::f4f2:6dff:fe42:e618/64 Scope:Link
  12. UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
  13. RX packets:1328 errors:0 dropped:0 overruns:0 frame:0
  14. TX packets:31 errors:0 dropped:0 overruns:0 carrier:0
  15. collisions:0 txqueuelen:0
  16. RX bytes:101636 (99.2 KiB) TX bytes:2762 (2.6 KiB)
  17.  
  18. eth0 Link encap:Ethernet HWaddr F4:F2:6D:42:E6:18
  19. UP BROADCAST MULTICAST MTU:1532 Metric:1
  20. RX packets:0 errors:0 dropped:0 overruns:0 frame:0
  21. TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
  22. collisions:0 txqueuelen:1000
  23. RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
  24. Interrupt:4
  25.  
  26. lo Link encap:Local Loopback
  27. inet addr:127.0.0.1 Mask:255.0.0.0
  28. inet6 addr: ::1/128 Scope:Host
  29. UP LOOPBACK RUNNING MTU:65536 Metric:1
  30. RX packets:21 errors:0 dropped:0 overruns:0 frame:0
  31. TX packets:21 errors:0 dropped:0 overruns:0 carrier:0
  32. collisions:0 txqueuelen:0
  33. RX bytes:1908 (1.8 KiB) TX bytes:1908 (1.8 KiB)
  34.  
  35. w2ap Link encap:Ethernet HWaddr F6:F2:6D:42:E6:18
  36. inet6 addr: fe80::f4f2:6dff:fe42:e618/64 Scope:Link
  37. UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
  38. RX packets:854 errors:0 dropped:0 overruns:0 frame:0
  39. TX packets:2677 errors:0 dropped:0 overruns:0 carrier:0
  40. collisions:0 txqueuelen:1000
  41. RX bytes:123898 (120.9 KiB) TX bytes:1734099 (1.6 MiB)
  42.  
  43. w2mesh Link encap:Ethernet HWaddr F4:F2:6D:42:E6:18
  44. inet6 addr: fe80::f6f2:6dff:fe42:e618/64 Scope:Link
  45. UP BROADCAST RUNNING MULTICAST MTU:1532 Metric:1
  46. RX packets:49960 errors:0 dropped:127 overruns:0 frame:0
  47. TX packets:14545 errors:0 dropped:0 overruns:0 carrier:0
  48. collisions:0 txqueuelen:1000
  49. RX bytes:7580518 (7.2 MiB) TX bytes:2113976 (2.0 MiB)
  50.  
  51. root@TestgeraetWA860RE:~# cat /etc/network.tl-wa860re
  52. WANDEV=eth0
  53. SWITCHDEV=eth0
  54. CLIENT_PORTS=""
  55. WAN_PORTS=""
  56. BATMAN_PORTS=""
  57.  
  58. . /etc/network.mode
  59.  
  60. CLIENTIF="w2ap"
  61. ETHMESHMAC=
  62. ROUTERMAC=
  63.  
  64. uci set network.$SWITCHDEV=interface
  65. uci set network.$SWITCHDEV.ifname=$SWITCHDEV
  66. uci set network.mesh.ifname="bat0"
  67.  
  68. if [ "$ETHMODE" = "WAN" ] ; then
  69. ## Activate for WAN:
  70. echo "net.ipv6.conf.$WANDEV.accept_ra_defrtr = 1" >> /etc/sysctl.conf
  71. echo "net.ipv6.conf.$WANDEV.accept_ra_pinfo = 1" >> /etc/sysctl.conf
  72. echo "net.ipv6.conf.$WANDEV.autoconf = 1" >> /etc/sysctl.conf
  73. echo "net.ipv6.conf.$WANDEV.accept_ra_rtr_pref = 1" >> /etc/sysctl.conf
  74. uci set network.wan.ifname=$WANDEV
  75. elif [ "$ETHMODE" = "CLIENT" ] ; then
  76. ## Activate Client:
  77. CLIENTIF="w2ap eth0"
  78. uci set network.mesh.ifname="bat0 $SWITCHDEV"
  79. else
  80. ## Activate BATMAN:
  81. uci set network.ethmesh.ifname="$SWITCHDEV"
  82.  
  83. fi
  84. root@TestgeraetWA860RE:~# cat /etc/config/network
  85. config interface 'loopback'
  86. option ifname 'lo'
  87. option proto 'static'
  88. option ipaddr '127.0.0.1'
  89. option netmask '255.0.0.0'
  90.  
  91. config interface 'w2mesh'
  92. option mtu '1532'
  93. option proto 'batadv'
  94. option mesh 'bat0'
  95.  
  96. config interface 'mesh'
  97. option type 'bridge'
  98. option auto '1'
  99.  
  100. config interface 'wan'
  101. option proto 'dhcp'
  102. option ifname 'eth1'
  103.  
  104. config interface 'ethmesh'
  105. option mtu '1532'
  106. option proto 'batadv'
  107. option mesh 'bat0'
  108.  
  109. config interface 'bat'
  110. option ifname 'bat0'
  111. option mtu '1500'
  112. root@TestgeraetWA860RE:~#
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement