Difference between revisions of "DD-WRT: OLSR"
Onnowpurbo (talk | contribs) (New page: General [edit] What is mesh networking? Mesh networking is used to route data, voice and instructions between nodes (typically routers). A mesh network typically consists of 2 or (many) m...) |
Onnowpurbo (talk | contribs) |
||
Line 1: | Line 1: | ||
− | General | + | ==General== |
− | + | ||
+ | ===What is mesh networking?=== | ||
Mesh networking is used to route data, voice and instructions between nodes (typically routers). A mesh network typically consists of 2 or (many) more nodes, which exchange information about their connection-status with each other (routing updates), so that every node knows, which path he has to take to reach any other node in the mesh. When a node wants to reach another node that is not directly connected, the traffic flows over other nodes, until the final node is reached (hopping) -each node that the traffic flows through is called a hop. | Mesh networking is used to route data, voice and instructions between nodes (typically routers). A mesh network typically consists of 2 or (many) more nodes, which exchange information about their connection-status with each other (routing updates), so that every node knows, which path he has to take to reach any other node in the mesh. When a node wants to reach another node that is not directly connected, the traffic flows over other nodes, until the final node is reached (hopping) -each node that the traffic flows through is called a hop. | ||
− | + | ||
+ | ===Why mesh networking?=== | ||
Mesh networks differ from other networks in that the component parts can all connect to each other via multiple hops. Mesh networks are self-healing: the network can still operate even when a node goes down or a connection drops. The result is a very reliable network. | Mesh networks differ from other networks in that the component parts can all connect to each other via multiple hops. Mesh networks are self-healing: the network can still operate even when a node goes down or a connection drops. The result is a very reliable network. | ||
− | |||
− | + | ===Benefits of mesh networking=== | |
− | + | ||
− | + | * self organizing | |
− | + | * self-healing | |
+ | * low system maintenance needed | ||
+ | * robust due dynamic route recalculation | ||
− | + | ==Disadvantages of mesh networking== | |
additional network traffic | additional network traffic | ||
The exchange of routing information (routing updates) can produce a lot of traffic-overhead, also every device that takes part of a mesh must have enough cpu/ memory to have an overview of all other routers and how to reach them. (routing table). A full routing table can get very large - as seen in BGP-Routing: a full BGP table needs 2GB of memory (300.000 active routes). There is also a danger of routing-loops that can appear because of weak routing information. | The exchange of routing information (routing updates) can produce a lot of traffic-overhead, also every device that takes part of a mesh must have enough cpu/ memory to have an overview of all other routers and how to reach them. (routing table). A full routing table can get very large - as seen in BGP-Routing: a full BGP table needs 2GB of memory (300.000 active routes). There is also a danger of routing-loops that can appear because of weak routing information. | ||
− | + | ||
− | + | ||
+ | ==OLSR== | ||
+ | |||
+ | ===General=== | ||
OLSR is a dynamic linkstate Protocol which collects link data and dynamically calculates the best routes within the network. | OLSR is a dynamic linkstate Protocol which collects link data and dynamically calculates the best routes within the network. | ||
Line 25: | Line 31: | ||
Links: | Links: | ||
− | http://en.wikipedia.org/wiki/OLSR | + | * http://en.wikipedia.org/wiki/OLSR |
− | http://www.olsr.org | + | * http://www.olsr.org |
− | + | ===Parameters== | |
General: | General: | ||
− | + | IpVersion | |
− | + | AllowNoInt | |
− | + | Pollrate | |
− | + | TcRedundancy | |
− | + | MprCoverage | |
− | + | LinkQualityFishEye | |
− | + | LinkQualityWinSize | |
− | + | LinkQualityDijkstraLimit | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
per Interface: | per Interface: | ||
Line 72: | Line 71: | ||
IcpConnect | IcpConnect | ||
− | Plugins: | + | ===Plugins:=== |
− | olsrd OLSR (Optimized Link State Routing) daemon | + | olsrd OLSR (Optimized Link State Routing) daemon |
− | olsrd-mod-dyn-gw-plain Dynamic internet gateway plain plugin | + | olsrd-mod-dyn-gw-plain Dynamic internet gateway plain plugin |
− | olsrd-mod-bmf Basic multicast forwarding plugin, dependece: kmod-tun | + | olsrd-mod-bmf Basic multicast forwarding plugin, dependece: kmod-tun |
− | olsrd-mod-httpinfo Small informative web server plugin | + | olsrd-mod-httpinfo Small informative web server plugin |
− | olsrd-mod-quagga Quagga plugin | + | olsrd-mod-quagga Quagga plugin |
− | olsrd-mod-dyn-gw Dynamic internet gateway plugin | + | olsrd-mod-dyn-gw Dynamic internet gateway plugin |
− | olsrd-mod-txtinfo Small informative web server plugin | + | olsrd-mod-txtinfo Small informative web server plugin |
− | olsrd-mod-nameservice Lightweight hostname resolver plugin | + | olsrd-mod-nameservice Lightweight hostname resolver plugin |
− | olsrd-mod-dot-draw Dot topology information plugin | + | olsrd-mod-dot-draw Dot topology information plugin |
− | olsrd-mod-mdns Multicast DNS plugin | + | olsrd-mod-mdns Multicast DNS plugin |
− | olsrd-mod-watchdog Watchdog plugin | + | olsrd-mod-watchdog Watchdog plugin |
− | olsrd-mod-arprefresh Kernel ARP cache refresh plugin | + | olsrd-mod-arprefresh Kernel ARP cache refresh plugin |
− | olsrd-mod-p2pd Peer to Peer Discovery plugin | + | olsrd-mod-p2pd Peer to Peer Discovery plugin |
− | olsrd-mod-secure Message signing plugin to secure routing domain | + | olsrd-mod-secure Message signing plugin to secure routing domain |
− | olsrd-mod-pud Position update plugin | + | olsrd-mod-pud Position update plugin |
− | olsrd-mod-jsoninfo | + | olsrd-mod-jsoninfo |
− | olsrd-mod-sgwdynspeed Select dynamic smart gateway based on gw speed | + | olsrd-mod-sgwdynspeed Select dynamic smart gateway based on gw speed |
Sample config file: | Sample config file: | ||
− | DebugLevel 0 | + | DebugLevel 0 |
− | IpVersion 4 | + | IpVersion 4 |
− | AllowNoInt yes | + | AllowNoInt yes |
− | Pollrate 0.1 | + | Pollrate 0.1 |
− | TcRedundancy 2 | + | TcRedundancy 2 |
− | MprCoverage 7 | + | MprCoverage 7 |
− | LinkQualityFishEye 1 | + | LinkQualityFishEye 1 |
− | LinkQualityWinSize 100 | + | LinkQualityWinSize 100 |
− | LinkQualityDijkstraLimit 0 7.0 | + | LinkQualityDijkstraLimit 0 7.0 |
− | LoadPlugin "olsrd_txtinfo.so.0.1" | + | LoadPlugin "olsrd_txtinfo.so.0.1" |
− | { | + | { |
− | + | PlParam "Accept" "127.0.0.1" | |
− | } | + | } |
− | Hna4 | + | Hna4 |
− | { | + | { |
− | } | + | } |
− | IpcConnect | + | IpcConnect |
− | { | + | { |
− | + | MaxConnections 1 | |
− | + | Host 127.0.0.1 | |
− | + | Net 192.168.1.0 255.255.255.0 | |
− | } | + | } |
− | LinkQualityLevel 2 | + | LinkQualityLevel 2 |
− | UseHysteresis no | + | UseHysteresis no |
− | Interface "eth1" | + | Interface "eth1" |
− | { | + | { |
− | + | HelloInterval 5.0 | |
− | + | HelloValidityTime 90.0 | |
− | + | TcInterval 3.0 | |
− | + | TcValidityTime 270.0 | |
− | + | MidInterval 15.0 | |
− | + | MidValidityTime 270.0 | |
− | + | HnaInterval 15.0 | |
− | + | HnaValidityTime 90.0 | |
− | + | LinkQualityMult 10.100.2.5 0.5 | |
− | } | + | } |
− | Interface "vlan1" | + | Interface "vlan1" |
− | { | + | { |
− | + | HelloInterval 5.0 | |
− | + | HelloValidityTime 90.0 | |
− | + | TcInterval 3.0 | |
− | + | TcValidityTime 270.0 | |
− | + | MidInterval 15.0 | |
− | + | MidValidityTime 270.0 | |
− | + | HnaInterval 15.0 | |
− | + | HnaValidityTime 90.0 | |
− | + | LinkQualityMult 10.100.2.5 0.5 | |
− | } | + | } |
[edit] Setup | [edit] Setup |
Revision as of 13:58, 22 July 2012
General
What is mesh networking?
Mesh networking is used to route data, voice and instructions between nodes (typically routers). A mesh network typically consists of 2 or (many) more nodes, which exchange information about their connection-status with each other (routing updates), so that every node knows, which path he has to take to reach any other node in the mesh. When a node wants to reach another node that is not directly connected, the traffic flows over other nodes, until the final node is reached (hopping) -each node that the traffic flows through is called a hop.
Why mesh networking?
Mesh networks differ from other networks in that the component parts can all connect to each other via multiple hops. Mesh networks are self-healing: the network can still operate even when a node goes down or a connection drops. The result is a very reliable network.
Benefits of mesh networking
- self organizing
- self-healing
- low system maintenance needed
- robust due dynamic route recalculation
Disadvantages of mesh networking
additional network traffic
The exchange of routing information (routing updates) can produce a lot of traffic-overhead, also every device that takes part of a mesh must have enough cpu/ memory to have an overview of all other routers and how to reach them. (routing table). A full routing table can get very large - as seen in BGP-Routing: a full BGP table needs 2GB of memory (300.000 active routes). There is also a danger of routing-loops that can appear because of weak routing information.
OLSR
General
OLSR is a dynamic linkstate Protocol which collects link data and dynamically calculates the best routes within the network.
Links:
=Parameters
General:
IpVersion AllowNoInt Pollrate TcRedundancy MprCoverage LinkQualityFishEye LinkQualityWinSize LinkQualityDijkstraLimit
per Interface:
HelloInterval
HelloValidityTime
TcInterval
TcValidityTime
MidInterval
MidValidityTime
HnaInterval
HnaValidityTime
LinkQualityMult
HNA4
IcpConnect
Plugins:
olsrd OLSR (Optimized Link State Routing) daemon olsrd-mod-dyn-gw-plain Dynamic internet gateway plain plugin olsrd-mod-bmf Basic multicast forwarding plugin, dependece: kmod-tun olsrd-mod-httpinfo Small informative web server plugin olsrd-mod-quagga Quagga plugin olsrd-mod-dyn-gw Dynamic internet gateway plugin olsrd-mod-txtinfo Small informative web server plugin olsrd-mod-nameservice Lightweight hostname resolver plugin olsrd-mod-dot-draw Dot topology information plugin olsrd-mod-mdns Multicast DNS plugin olsrd-mod-watchdog Watchdog plugin olsrd-mod-arprefresh Kernel ARP cache refresh plugin olsrd-mod-p2pd Peer to Peer Discovery plugin olsrd-mod-secure Message signing plugin to secure routing domain olsrd-mod-pud Position update plugin olsrd-mod-jsoninfo olsrd-mod-sgwdynspeed Select dynamic smart gateway based on gw speed
Sample config file:
DebugLevel 0 IpVersion 4 AllowNoInt yes Pollrate 0.1 TcRedundancy 2 MprCoverage 7 LinkQualityFishEye 1 LinkQualityWinSize 100 LinkQualityDijkstraLimit 0 7.0 LoadPlugin "olsrd_txtinfo.so.0.1" { PlParam "Accept" "127.0.0.1" } Hna4 { } IpcConnect { MaxConnections 1 Host 127.0.0.1 Net 192.168.1.0 255.255.255.0 } LinkQualityLevel 2 UseHysteresis no Interface "eth1" { HelloInterval 5.0 HelloValidityTime 90.0 TcInterval 3.0 TcValidityTime 270.0 MidInterval 15.0 MidValidityTime 270.0 HnaInterval 15.0 HnaValidityTime 90.0 LinkQualityMult 10.100.2.5 0.5 } Interface "vlan1" { HelloInterval 5.0 HelloValidityTime 90.0 TcInterval 3.0 TcValidityTime 270.0 MidInterval 15.0 MidValidityTime 270.0 HnaInterval 15.0 HnaValidityTime 90.0 LinkQualityMult 10.100.2.5 0.5 }
[edit] Setup [edit] DD-WRT > v.23 SP3
You always can check the OLSRD status on the daemons web gui:
enable your prefered networking mode. OLSR can run on any interface (lan or wifi).
Try the following steps to get OLSR running: [edit] OLSR on WiFi
Under Wireless -> Basic Settings
connect your devices with the preferred WiFi mode (WDS, adhoc, etc) set your wlan mode (b,g,mixed...) set your SSID set your channel
Before you go on test that the link is working, that the devices are connected and can reach each other.
unbridge the wlan on the wireless page set an ip from a different network than the router uses already set the network mask (e.g. to 255.255.255.0 for a /24 network) set your preferred encryption
[edit] setup OLSR
Under Setup -> Advanced Routing
set Operating Mode to OLSR keep the basic olsr settings. they are ok for the first tests add the correct wlan interface to olsr dependend on your wifi chip vendor and platform (e.g. on atheros wifi based systems its athX, on broadcom its mostly eth0, on ralink its raX) keep the interface settings for testing
[edit] Enabling NAT routing
In Gateway mode the router performs NAT, while in other modes it doesn't. When you switch the Advanced Routing Operating Mode to OLSR Router, it turns off NAT. Here is how to turn the NAT back on, assuming you followed the instructions on unbridging the wlan. You must change the interfaces according to your system.
Under Administration -> Commands paste the script below into Commands and click "Save Firewall" Do this on each device.
iptables -t nat -A POSTROUTING -o $(nvram get wan_ifname) -j MASQUERADE iptables -t nat -A POSTROUTING -o $(nvram get wl0_ifname) -s $(nvram get eth1_ipaddr)/$(nvram get eth1_netmask) -d $(nvram get eth1_ipaddr)/$(nvram get eth1_netmask) -j MASQUERADE iptables -t nat -A POSTROUTING -o $(nvram get lan_ifname) -s $(nvram get lan_ipaddr)/$(nvram get lan_netmask) -d $(nvram get lan_ipaddr)/$(nvram get lan_netmask) -j MASQUERADE
Referensi
Pranala Menarik
DD-WRT OLSR
DD-WRT HotSpot
- WiFi: HotSpot - DD-WRT DNS Lokal
- WiFi: HotSpot - DD-WRT dengan 3G
- WiFi: HotSpot - DD-WRT dengan CDMA
- WiFi: HotSpot - DD-WRT File Sharing
- WiFi: HotSpot - DD-WRT NoCatSplash
- WiFi: HotSpot - DD-WRT Port Forwarding
- WiFi: HotSpot - DD-WRT Dual WAN & Load Balancing
- WiFi: HotSpot - DD-WRT Samba Server
- WiFi: HotSpot - DD-WRT Mencari Uang dari AdNetwork
- WiFi: HotSpot - DD-WRT File Sharing dengan SAMBA / Network Neighbourhood
- WiFi: HotSpot - DD-WRT Printer Sharing
- WiFi: HotSpot - DD-WRT Repository Aplikasi