Advertisement
Guest User

Untitled

a guest
Dec 13th, 2015
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.18 KB | None | 0 0
  1. root@TestgeraetWA860RE:~# ifconfig
  2. bat0 Link encap:Ethernet HWaddr A2:9B:4C:A4:D3:17
  3. inet6 addr: fe80::a09b:4cff:fea4:d317/64 Scope:Link
  4. UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
  5. RX packets:5907 errors:0 dropped:0 overruns:0 frame:0
  6. TX packets:2800 errors:0 dropped:5 overruns:0 carrier:0
  7. collisions:0 txqueuelen:0
  8. RX bytes:7415232 (7.0 MiB) TX bytes:215151 (210.1 KiB)
  9.  
  10. br-mesh Link encap:Ethernet HWaddr F4:F2:6D:42:E6:18
  11. inet6 addr: fe80::f6f2:6dff:fe42:e618/64 Scope:Link
  12. UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
  13. RX packets:393 errors:0 dropped:0 overruns:0 frame:0
  14. TX packets:85 errors:0 dropped:0 overruns:0 carrier:0
  15. collisions:0 txqueuelen:0
  16. RX bytes:29197 (28.5 KiB) TX bytes:13208 (12.8 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:2 errors:0 dropped:0 overruns:0 frame:0
  31. TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
  32. collisions:0 txqueuelen:0
  33. RX bytes:288 (288.0 B) TX bytes:288 (288.0 B)
  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:2718 errors:0 dropped:0 overruns:0 frame:0
  39. TX packets:5452 errors:0 dropped:0 overruns:0 carrier:0
  40. collisions:0 txqueuelen:1000
  41. RX bytes:203333 (198.5 KiB) TX bytes:7477006 (7.1 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:15032 errors:0 dropped:4 overruns:0 frame:0
  47. TX packets:5358 errors:0 dropped:0 overruns:0 carrier:0
  48. collisions:0 txqueuelen:1000
  49. RX bytes:8650649 (8.2 MiB) TX bytes:675689 (659.8 KiB)
  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=w2mesh
  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.  
  86. config interface 'loopback'
  87. option ifname 'lo'
  88. option proto 'static'
  89. option ipaddr '127.0.0.1'
  90. option netmask '255.0.0.0'
  91.  
  92. config interface 'w2mesh'
  93. option mtu '1532'
  94. option proto 'batadv'
  95. option mesh 'bat0'
  96.  
  97. config interface 'mesh'
  98. option type 'bridge'
  99. option auto '1'
  100. option ifname 'bat0'
  101. option macaddr 'f4:f2:6d:42:e6:18'
  102.  
  103. config interface 'wan'
  104. option proto 'dhcp'
  105. option ifname 'eth1'
  106.  
  107. config interface 'ethmesh'
  108. option mtu '1532'
  109. option proto 'batadv'
  110. option mesh 'bat0'
  111. option ifname 'eth0'
  112.  
  113. config interface 'bat'
  114. option ifname 'bat0'
  115. option mtu '1500'
  116.  
  117. config interface 'eth0'
  118. option ifname 'eth0'
  119.  
  120.  
  121.  
  122. root@TestgeraetWA860RE:~#
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement