Linux Routers and Community Networks Lloren Cerd-Alabern - - PowerPoint PPT Presentation

linux routers and community networks
SMART_READER_LITE
LIVE PREVIEW

Linux Routers and Community Networks Lloren Cerd-Alabern - - PowerPoint PPT Presentation

Summer Course at Mekelle Institute of Technology. July, 2015. Linux Routers and Community Networks Lloren Cerd-Alabern http://personals.ac.upc.edu/llorenc llorenc@ac.upc.edu Universitat Politnica de Catalunya, Barcelona, Spain


slide-1
SLIDE 1

Summer Course at Mekelle Institute of Technology. July, 2015.

Linux Routers and Community Networks

Llorenç Cerdà-Alabern

http://personals.ac.upc.edu/llorenc llorenc@ac.upc.edu

Universitat Politènica de Catalunya, Barcelona, Spain

Revision: 0e36644 (2015-07-09) Llorenç Cerdà-Alabern Linux Routers and Community Networks 1 / 191

slide-2
SLIDE 2

Lab 4: Community Networks Description Community Networks qMp Lab set up

Summer Course at Mekelle Institute of Technology.

Linux Routers and Community Networks

Parts I Introduction II Lab 1: Basic Network Configuration III Lab 2: RIP and OSPF IV Lab 3: Firewall configuration V Lab 4: Community Networks VI Lab 5: Network Management

Llorenç Cerdà-Alabern Linux Routers and Community Networks 132 / 191

slide-3
SLIDE 3

Lab 4: Community Networks Description Community Networks qMp Lab set up

Summer Course at Mekelle Institute of Technology.

Linux Routers and Community Networks

Part V Lab 4: Community Networks

Outline Description Community Networks qMp Lab set up

Llorenç Cerdà-Alabern Linux Routers and Community Networks 133 / 191

slide-4
SLIDE 4

Lab 4: Community Networks Description Community Networks qMp Lab set up

Lab 4: Community Networks

Description

Objectives

  • Introduce Community Networks.
  • Introduce Wireless Mesh Networks: qMp.
  • Configure a qMp network to be deployed at MIT.

Llorenç Cerdà-Alabern Linux Routers and Community Networks 134 / 191

slide-5
SLIDE 5

Lab 4: Community Networks Description Community Networks qMp Lab set up

Summer Course at Mekelle Institute of Technology.

Linux Routers and Community Networks

Part V Lab 4: Community Networks

Outline Description Community Networks qMp Lab set up

Llorenç Cerdà-Alabern Linux Routers and Community Networks 135 / 191

slide-6
SLIDE 6

Lab 4: Community Networks Description Community Networks qMp Lab set up

Lab 4: Community Networks

Community Networks

Community Networks

  • Networks deployed and maintained by their own users.
  • Each user is owner of a part of the total infrastructure which

builds the network.

  • These networks are normally open and free.
  • Most of them use WiFi technology because it is the easiest and

cheapest way to deploy an outdoor network.

  • A relevant example is Guifi.net.
  • Caveat: National Government Regulations! Change very much

in different countries.

Llorenç Cerdà-Alabern Linux Routers and Community Networks 136 / 191

slide-7
SLIDE 7

Lab 4: Community Networks Description Community Networks qMp Lab set up

Lab 4: Community Networks

Community Networks

What is guifi.net?

  • Community Network.
  • Started in 2004 in a rural area

(Osona) in Catalonia, Spain.

  • Hybrid (wired/wireless) links

manually set up, most network use traditional OSPF & BGP routing protocols.

  • Some communities inside guifi.net

have started using routing mesh protocols.

  • Services: Internet, P2P

, Voice, NTP ...

  • Sustained growth: at the time of

writing 28,741 working nodes.

http://guifi.net/en

Llorenç Cerdà-Alabern Linux Routers and Community Networks 137 / 191

slide-8
SLIDE 8

Lab 4: Community Networks Description Community Networks qMp Lab set up

Lab 4: Community Networks

Community Networks

Keys of success of guifi.net

  • Web page with doc. and soft.
  • Distribution of IP addresses.
  • Confederation of networks.
  • Mailing lists, events (guifi-labs,

annual meeting (SAX)...

  • Legal aspects:
  • Wireless Commons License.
  • Foundation and Telco

Operator.

Llorenç Cerdà-Alabern Linux Routers and Community Networks 138 / 191

slide-9
SLIDE 9

Lab 4: Community Networks Description Community Networks qMp Lab set up

Lab 4: Community Networks

Community Networks

How to connect to guifi.net? 1 Register to guifi.net and get IPv4 addresses 2 Take measurements on the roof (scanning): 3 Install the antenna.

Llorenç Cerdà-Alabern Linux Routers and Community Networks 139 / 191

slide-10
SLIDE 10

Lab 4: Community Networks Description Community Networks qMp Lab set up

Lab 4: Community Networks

Community Networks

What is a mesh network, and a mesh routing protocol?

  • Mesh network: have some sort of infrastructure with and use

some self-forming, self-healing routing protocol.

  • Mesh routing protocol: Discover mesh nodes, adapts to links

that can automatically set up and down and set up routes.

  • Traditional routing protocols: RIP

, OSPF , BGP , ...

  • Mesh routing protocols: Ad hoc On-Demand Distance Vector (AODV),

Optimized Link State Routing protocol (OLSR), Dynamic Source Routing (DSR), Better Approach To Mobile Adhoc Networking (BATMAN), BMX6, ...

Llorenç Cerdà-Alabern Linux Routers and Community Networks 140 / 191

slide-11
SLIDE 11

Lab 4: Community Networks Description Community Networks qMp Lab set up

Lab 4: Community Networks

Community Networks

Ad-Hoc Mode

Infrastructure BSS (infrastructure mode). Independent BSS, IBSS (ad-hoc mode).

  • Mesh network wireless nodes are configured in ad-hoc mode:
  • BSSID: All stations share a common BSSID. In qMp this is

02:CA:FF:EE:BA:BE.

  • Beacons: A random delay rotates the responsibility for sending

beacons among the stations.

Llorenç Cerdà-Alabern Linux Routers and Community Networks 141 / 191

slide-12
SLIDE 12

Lab 4: Community Networks Description Community Networks qMp Lab set up

Summer Course at Mekelle Institute of Technology.

Linux Routers and Community Networks

Part V Lab 4: Community Networks

Outline Description Community Networks qMp Lab set up

Llorenç Cerdà-Alabern Linux Routers and Community Networks 142 / 191

slide-13
SLIDE 13

Lab 4: Community Networks Description Community Networks qMp Lab set up

Lab 4: Community Networks

qMp

What is qMp?

  • Quick Mesh Project

(qMp) is an OpenWrt distribution is being developed using BMX6 as mesh routing protocol.

  • Native IPv6.
  • It is used in some

guifi.net zones, e.g. in Guifisants, in the quarter of Sants in Barcelona, Spain.

http://dsg.ac.upc.edu/qmpsu

Llorenç Cerdà-Alabern Linux Routers and Community Networks 143 / 191

slide-14
SLIDE 14

Lab 4: Community Networks Description Community Networks qMp Lab set up

Lab 4: Community Networks

qMp

BMX6 features

  • Open-source mesh routing protocol.
  • Originated from a branch of the mesh routing protocol called

BATMAN.

  • Designed to optimize the communication between neighbor

nodes for minimal overhead.

  • It uses UDP messages (port 6240) to discover other nodes and

disseminate node and routing information.

  • Proactive protocol: nodes maintain routes to all destination

nodes running BMX6 proactively.

  • Distance-vector: nodes don’t have a global topology

information, but choose next hop to each destination based on aggregated information, similarly to RIP and BGP .

Llorenç Cerdà-Alabern Linux Routers and Community Networks 144 / 191

slide-15
SLIDE 15

Lab 4: Community Networks Description Community Networks qMp Lab set up

Lab 4: Community Networks

qMp

BMX6 daemon

  • /usr/sbin/bmx6 automatically started by qMp.
  • Furthermore, qMp starts the crontab job

/etc/qmp/bmx6health.sh to to check that the BMX6 daemon.

  • The BMX6 can be requested from the CLI:

~# bmx6 -c status version compat name primaryIp tun6Address tun4Address BMX6-0.1-alpha 16 GSgV-rb-fc89 fd66:66:66:7:4e5e:cff:fee9:fc8a 2012:0:0:fc89::1/64 10.1.24.97/27 ~# bmx6 -c originators name blocked primaryIp routes viaIp BCN-GS-CanBruixa20-NSM5-e48b fd66:66:66:f8:227:22ff:feb9:e48b 1 fe80::227:22ff:fe9b:65ab ... ~# bmx6 -c tunnels name net min max hyst rating minBw tunName tunRoute remoteName cloud 10.0.0.0/8 24 128 20 100 960 bmxC4tmain 10.139.95.254/32 GSmVictoria-RK8da9 ... ~# bmx6 -c interfaces devName state type rateMin rateMax llocalIp globalIp eth1.1 UP ethernet 1000M 1000M fe80::4e5e:cff:fee9:fc8a/64 fd66:66:66:7:4e5e:cff:fee9:fc8a/64 eth1.2 UP ethernet 1000M 1000M fe80::4e5e:cff:fee9:fc8a/64 fd66:66:66:6:4e5e:cff:fee9:fc8a/64 ~# bmx6 -c links name llocalIp viaDev rxRate txRate bestTxLink routes wantsOgms UPCc6-65ab fe80::227:22ff:fe9b:65ab eth1.1 100 93 1 13 1 ... ~# bmx6 -c parameters plugin bmx6_config.so ... Llorenç Cerdà-Alabern Linux Routers and Community Networks 145 / 191

slide-16
SLIDE 16

Lab 4: Community Networks Description Community Networks qMp Lab set up

Summer Course at Mekelle Institute of Technology.

Linux Routers and Community Networks

Part V Lab 4: Community Networks

Outline Description Community Networks qMp Lab set up

Llorenç Cerdà-Alabern Linux Routers and Community Networks 146 / 191

slide-17
SLIDE 17

Lab 4: Community Networks Description Community Networks qMp Lab set up

Lab 4: Community Networks

Lab set up

Objectives:

  • We want to set up

this network.

  • Using qMp.
  • Following the

guidelines in the next slides.

200.0.0.0/24 .1 PC3 PC2 PC1 G1 PC3 PC2 PC1 PC3 PC3 PC3 PC2 PC2 PC2 PC1 PC1 PC1 PC3 PC2 PC1 PC3 PC2 PC1 G2 PC3 PC2 PC1 G3 PC3 PC2 PC1 G4 PC2 G5 G6 G8 G9 G10 G7 CH1 CH6 Internet R1 R10 R2 R9 R5 R6 R4 R7 R3 R8 CH100 CH132 CH124

Llorenç Cerdà-Alabern Linux Routers and Community Networks 147 / 191

slide-18
SLIDE 18

Lab 4: Community Networks Description Community Networks qMp Lab set up

Lab 4: Community Networks

Lab set up

Create a node in Guifi.net

  • Register in https://guifi.net
  • Create a node: Create content -> guifi.net node
  • Add a device to the node (you need to provide the MAC address).
  • We will use the addresses obtained from Guifi.net.

Llorenç Cerdà-Alabern Linux Routers and Community Networks 148 / 191

slide-19
SLIDE 19

Lab 4: Community Networks Description Community Networks qMp Lab set up

Lab 4: Community Networks

Lab set up

Flashing qMp

1 Download the image http://fw.qmp.cat 2 Flash qMp from OpenWrt System -> Backup/Flash:

  • 1. Choose File -> Flash
  • 2. Proceed
  • 3. Wait...

3 Default IP address: 172.30.22.1 4 Default root password: 13f

Llorenç Cerdà-Alabern Linux Routers and Community Networks 149 / 191

slide-20
SLIDE 20

Lab 4: Community Networks Description Community Networks qMp Lab set up

Lab 4: Community Networks

Lab set up

Configure qMp

1 Connect to the qMp node using the IPv6 link local. 2 Configure the qMp node going through the WI menus:

  • qMp easy setup
  • qMp node basic settings
  • qMp network settings
  • Advanced network settings

3 Activate the mesh protocol in all links where there are other

qMp devices.

4 WiFi interfaces in 2.4 GHz are configured as APs. 5 LAN and WiFi in 2.4 GHz interfaces are bridged. 6 Hosts are configured by DHCP from the indoor qMp routers. 7 Configure the qMp node having Internet access to advertize a

default route: sub-menu qMp gateways, section INET4_OFFER

type offer network 0.0.0.0/0.

Llorenç Cerdà-Alabern Linux Routers and Community Networks 150 / 191

slide-21
SLIDE 21

Lab 4: Community Networks Description Community Networks qMp Lab set up

Lab 4: Community Networks

Lab set up

Verification

  • Check that all nodes are reachable.
  • Verify BMX6 using the CLI.
  • Use mtr -n @IPv6 to figure out the path to node @IPv6 (for

different nodes). IPv6 addresses can be found in Mesh -> Nodes. Note that the path cannot be discovered using IPv4, since it is an IPv4

  • ver IPv6 tunnel.
  • Check that nodes can access the Internet.

Llorenç Cerdà-Alabern Linux Routers and Community Networks 151 / 191