diff --git a/examples/blogpost.md b/examples/blogpost.md index b6c7f326..4de78545 100644 --- a/examples/blogpost.md +++ b/examples/blogpost.md @@ -1,76 +1,71 @@ --- layout: blog -title: Exploring Commotion with Wireshark - a Tutorial -categories: [development,wireshark,debugging] +title: Your title goes here. Do not use the colon character. +categories: [list of, comma-separated, tags] created: 2014-02-04 changed: 2014-02-04 teaser_image: styles/large/public/ws_olsr_traffic.png -post_author: stuohy +post_author: Author Name lang: en --- -

The program Wireshark, a network analyzer for Windows and Linux, allows you to monitor network traffic to see the actual packets of data being sent around you. This will allow us to look at the difference between encrypted and unencrypted traffic on a router running Commotion to see if encryption is working. This guide is written for Wireshark running on a Linux device, but can be applied to wireshark debugging on any compatible device.

-

Setting up your Devices

+## Introduction +This file serves as an example for new content creators creating a blog post. Formatting examples are provided showing a mix of markdown syntax and HTML, and a brief overview of the file's metadata is covered. -

Before you start you should follow one of the Commotion Installing & Configuring guides to set up the device you will monitor. If you want to follow along make sure that you DON'T set a mesh encryption password just yet. We will need an unencrypted packet to help us find the encrypted packets that we create later.

+### How to use this file +When writing a new blog post, copy this file and save the copy in the _posts folder, using the following naming convention: -

NOTE: If you will be examining a linux computer running the commotion client these instructions should be run from a DIFFERENT COMPUTER. You can use wireshark to monitor your own device as well, but these instructions are about passively monitoring the airwaves. Following these instructions WILL interfere with your devices ability to mesh if used on the device running Commotion.

+ YYYY-MM-DD-title-of-this-post.md -

Before you get started monitoring wireless traffic you must prepare the radio on the computer running wireshark. These Debian based instructions should work on most Linux systems with only minor modification. If you want to copy and paste the following commands in your device copy the lines without the dollar sign. Replace <CHANNEL> with the channel the wireless device you will be monitoring is using for its mesh.

+## Metadata +At the top of this file is a section of text with some variables. It looks like this: - $ sudo service network-manager stop - $ sudo iwconfig wlan0 channel <CHANNEL> - $ sudo ifconfig wlan0 down - $ sudo iwconfig wlan0 mode Monitor - $ sudo wireshark - -

Now that our radio is ready and wireshark is opened we need to configure it. To set your wireless interface to listen to all traffic, and not just traffic between it and devices it is talking to we need to set it to “monitor” the airwaves. Double click on wlan0 and check the "use monitor mode" box.

- -

- -

Click "OK" and then click on the start button in the main window to begin monitoring the wifi around you.

- -

- -

Monitoring Commotion Mesh Traffic

- -

Commotion currently uses the mesh networking protocol OLSR to mesh. One of the many reasons I love Wireshark is because they have created a series of filters for various types of traffic. We will be using the OLSR filters to make sure we only see Commotion mesh traffic. To filter the packets you are seeing on the airwaves to only show OLSR Traffic you type olsr in the filter section. This will slow down the number of packets you see significantly. You will only see traffic that contains olsr packets sent by devices around you. This will look something like this...

- -

- -

Clicking on a line in this list will select a single packet of information. Once you click on one of these packets it will fill the bottom frame with information about that packet.

- -

- -

Each packet will be broken up into a series of expandable sections. There is a lot of data under these sections. For this post we will only be looking at the few important pieces of data we need to prove that encryption works. First, we need to make sure we are looking at our device, and not the dozens, if not hundreds, of other Commotion devices that are being put up in your neighborhood every day. The "IEEE 802.11 Data" section will hold information about the device that sent the message.

- -

- -

The "Source Address" value will be the MAC address of your router. If you connect to your router and run $ ifconfig on it you can compare the " HWaddr" of the mesh interfaces with this address. If they match, then the packet you are seeing was sent by your device. Make sure you write down the source information of your node here. We are going to need it later. You will also notice that the "Destination address" is set to "Broadcast (ff:ff:ff:ff:ff:ff)." OLSR messages are broadcast for any other mesh device to hear so they use a shared "Broadcast" address so they know where to look for OLSR messages.

+ +--- +layout: blog +title: Your title goes here. Do not use the colon character. +categories: [list of, comma-separated, tags] +created: 2014-02-04 +changed: 2014-02-04 +teaser_image: posts/041814-Cover-Page.png +post_author: Author Name +lang: en +--- + -

Lastly, lets look at the actual data that is being sent. The "Optimized Link State Routing Protocol" section contains the data that your router is sending to the mesh network. In this example it is sending a HELLO message that lets other mesh devices know it exists.

+Most of this should look fairly self-explanatory, but for reference they are explained below: -

+* layout - Defines the page layout for this file. Layouts are defined in the folder "_layouts". For blog posts, your layout should be 'blog'. +* title - The title of your post. One item to note is that using the colon character (:) in the title will cause an error when the site is built. +* categories - Within a set of square brackets, enter the tags you wish to use for this post. +* created and changed - Both of these dates should use the format YYYY-MM-DD +* teaser_image - Specify the image to be used for blog post teasers. All images should be saved within the files directory and the value entered here is relative to that folder. Current practice is to place images for blog posts in the folder: files/posts/ and to name the images used in the post using the posts publication date in the image filename, as shown in the example. +* post author - The name of the post's author(s). You can have multiple authors. +* lang - The two character language code that identifies the language this post is written in. "en" for English is the default. If you are authoring blog posts in other languages, please check with the site maintainer. -

Looking at these packets we can see all the nodes in the area that are running OLSR without encryption. To see encrypted packets we need to turn on mesh encryption on your device. You can add a mesh encryption password on your routers menu under Basic Config -> Network Settings -> Mesh Network . I would show you a photo of it on my router, but I am in the middle of testing translation so it is half in french.

+## Writing Content -

If you are still looking at wireshark you will see that all of a sudden your device's OLSR traffic stopped dead. The data that makes an olsr packet easily sortable by wireshark is now encrypted. Remove your olsr filter and click the clear button. Take the source address you captured earlier and see if you can find your device broadcasting a packet. You can use wlan.addr == SOURCE_ADDRESS with the MAC address you captured earlier in the filter bar to only show your router's packets. The reason you are using your source address instead of the ip address that was listed under source earlier is that the ipaddress is now also encrypted.

+Content for your blog post can be written using a combination of Markdown formatting and HTML. So you could write a numbered list using either of the following: -

If you are also running an Access Point on your device you will see packets coming from your source address broadcasting invitations to join that access point. Make sure you are looking at a broadcast packet with a "Data" section within it. This will differentiate the OLSR packet from advertisements for the routers access point, shown below. By the way if you are not having fun yet you don't know how to live.

+1. list item 1 +2. list item 2 -

+or -

If you saved your old packet, or took a picture, you will notice that in the IEEE 802.11 Data -> Frame Control -> Flags sub-section that on our encrypted packet shows as .1.. .... = Protected flag: Data is protected. An un-encrypted packet shows as .0.. .... = Protected flag: Data is not protected. This bit of "header" information lets other devices know that the data below is encrypted.

+
    +
  1. list item 1
  2. +
  3. list item 2
  4. +
-

As stated by the "protected flag" the encrypted packet's "Data" section is simply a long encrypted string and a value specifying its length. This is where the un-encrypted "header" information stops and the encrypted packet begins. All the data in the packet is encrypted as the string of gibberish you see below. Seeing this lets us be sure that our mesh network is actually encrypting the data it sends.

+### Headings -

+### Code blocks -

Wireshark can do much more than just show that you have encrypted your traffic. With wireshark and a few unencrypted mesh nodes you can watch the elaborate dance required to make mesh-networking work. If you add a gateway and a user to this you can even see what user data looks like over an encrypted vs. unencrypted mesh network. This is a journey for another day though. Before I leave you, lets get your wireless interface back to normal. First stop the scan and close wireshark down. Make sure you save your capture files if you want to look back at them later. Once it is closed down do the following.

+Indented blocks of text will be formatted as a code block: $ sudo ifconfig wlan0 down $ sudo iwconfig wlan0 mode Managed $ sudo ifconfig wlan0 up $ sudo service network-manager restart -

I hope you enjoyed this little detour into examining you mesh device from the data it sends to the world. Please let us know if you want us to show you other mesh-network debugging techniques or concepts in our comments section below or over e-mail.

+You can also place code blocks in-line with text using text inside of a \ \ tag set. diff --git a/examples/cckmodule.md b/examples/cckmodule.md index ac0bff71..e89d2d8c 100644 --- a/examples/cckmodule.md +++ b/examples/cckmodule.md @@ -1,154 +1,98 @@ --- layout: cck -title: Inventory the Neighborhood +title: New CCK module title site_section: help sub_section: [cck,cck-planning] -pdf: cck/planning/5-Inventory_the_Neighborhood.pdf +pdf: cck/planning/name-of-pdf-for-this-module.pdf pdf-all: true categories: created: 2013-11-02 changed: 2013-11-27 -post_author: critzo +post_author: Author Name lang: en --- -

-

Introduction

+This example document illustrates how to create a new CCK module within an existing section. By using additional metadata variables, we tell the website build system what layout to use, what section the new files is in, what sub-section as well, and specify additional options for PDFs, specific to the CCK. -

Although we spend time in our neighborhoods every day, we are not always looking at and thinking about our neighborhood from the perspective of building a network. In this activity you will learn how to look at your neighborhood through the lens of a community organizer, handy-person and techie. Through these lenses you will be able evaluate the the social, physical and technical challenges and opportunities of potential sites.

- -

In this activity you will develop a list of important neighborhood characteristics, walk around your community, and record information to help you in picking sites for your first installations. These are important first steps for planning any network.

- -

The more information you have about your sites, the more useful your network planning will be.

- -

Creating an inventory of your entire neighborhood takes time. You may start your inventory with a few potential sites or a small area in your neighborhood. You can repeat these steps as you continue to grow and plan the network.

- -

You may want to do the Every Network Tells a Story and “Wireless Challenges” activities before you inventory areas of your neighborhood.

- -

Time required: 2 to 3 hours, depending on the size of the area you want to inventory.

-
- -
-

MATERIALS + SUPPLIES NEEDED

- -

- -

Printouts of the Site Worksheets you can take with you into the neighborhood to collect information about places that might make good installation sites. You will need one for each location.

- -

- -

Neighborhood Inventory Spreadsheet you can use to organize, store, and use the information you gathered out in the neighborhood. You can copy this example spreadsheet or make your own.

- -

Pens

+## Using this file to create a new CCK page +Let's say you're using this example to create a new CCK module in the Planning section. -

Clipboards

+### Create a new folder for the new module. -

Camera

+Currently in the planning section we have these folders: + +design-your-network-construction-elements +identify-neighborhood-skills +design-your-network-every-network-tells-story +survey-your-neighbors +get-word-out-flyer-design +inventory-the-neighborhood +wireless-challenges + -

Printed map for walking around your neighborhood (you can use OpenStreetMap, Google Maps, or other online resource if you don’t have an up-to-date paper map)

+If we need a new module called "Planning Essentials", we would first create a folder in /docs/cck/planning/ called: planning-essentials. This will ensure our new URL conforms to the syntax for others. -

Computer for entering information into a digital version of the "Neighborhood Inventory Spreadsheet" (optional)

+### Make a copy of this sample file -

Flyers about your network project (optional)

-
+You can now save a copy of this file into the folder you just created. Be sure to name it index.md -
-

Wireless Inventory Basics

+### Edit the Metadata +Here's what the metadata for this new CCK module page looks like: -

Networks have social, physical and technical challenges. When planning a network and identifying potential sites, you will need to understand each site through the lens of a community organizer, a handy-person and a techie (see Identify Neighborhood Skills).

- -

When identifying potential sites for the network, each of these roles evaluates different aspects of the site:

- - - - - - - - - - - - - - - - -

- Organizer
Evaluate the Social Opportunities and Challenges: -
    -
  1. What are the important community institutions (places of worship, recreation centers, community organizations, etc.)?
  2. -
  3. Who are the active members of the community that could spread the word?
  4. -
  5. Which local business might be interested in participating?
  6. -
  7. Who owns each specific site or building?
  8. -
  9. Who is willing to put equipment on their roof or in their window?
  10. -
-

- Handy-Person
Evaluate the Mounting and Power Options: -
    -
  1. Does the building have power nearby? How can power be provided?
  2. -
  3. Are there places to safely mount equipment?
  4. -
  5. What kind of roof does the building have? Is the roof safe to work on?
  6. -
  7. Are the windows tinted with glass that blocks wireless signals?
  8. -
-

- Techie
Evaluate the Wireless Networking Potential: -
    -
  1. What are the tallest buildings in the area?
  2. -
  3. How many stories/floors does a building have?
  4. -
  5. What buildings have good line of sight to other buildings?
  6. -
  7. Are there hills, trees or inaccessible buildings that block line of sight?
  8. -
  9. What other buildings does each possible building see?
  10. -
  11. Are there other large installations of wireless equipment at the site that might cause interference problems?
  12. -
-
- -

Is there anything missing? Are there additional questions that should be added to this list?

-
+ +--- +layout: cck +title: New CCK module title +site_section: help +sub_section: [cck,cck-planning] +pdf: cck/planning/name-of-pdf-for-this-module.pdf +pdf-all: true +categories: +created: 2013-11-02 +changed: 2013-11-27 +post_author: Author Name +lang: en +--- + -
-

Inventory Steps

+Most of this should look fairly self-explanatory, but for reference they are explained below. Note that for CCK modules, there are additional metadata variables not found in other types of content. These are note in italics in the list below. -

1. List sites and/or areas you would like to inventory. Use the questions above to guide the selection of potential sites or areas. Identify why you are selecting each location and what questions you want to answer during the inventory. For example, how many stories is the building? Can you see the library from the community center? Think of questions each role needs to answer.

+* layout - Defines the page layout for this file. Layouts are defined in the folder "_layouts". For blog posts, your layout should be 'blog'. +* title - The title of your post. One item to note is that using the colon character (:) in the title will cause an error when the site is built. +* site_section - This variable sets the section of the website where this page lives, corresponding to the menu items at the top of the page. Setting the appropriate site_section tells the website build system what menus to place on the page. +* sub_section - Because CCK pages have multiple menu levels, this variable is needed to identify what sub-section the page is in, so that the appropriate sub-menu will be displayed. Note that this variable has both the top level section and it's sub-section inside of square brackets. Look at existing files for the appropriate section and sub-section names to use. +* pdf - If a PDF version of this module is available, enter the path to this PDF here. Note that this path is relative to the files folder. If this value is set, the "Download PDF" button in the right menu will link to it. +* pdf-all - Either set this value to true or false. If "true" the button for downloading a zip file of all CCK PDFs will be placed on the page. +* categories - Within a set of square brackets, enter the tags you wish to use for this post. +* created and changed - Both of these dates should use the format YYYY-MM-DD +* teaser_image - Specify the image to be used for blog post teasers. All images should be saved within the files directory and the value entered here is relative to that folder. Current practice is to place images for blog posts in the folder: files/posts/ and to name the images used in the post using the posts publication date in the image filename, as shown in the example. +* post author - The name of the post's author(s). You can have multiple authors. +* lang - The two character language code that identifies the language this post is written in. "en" for English is the default. If you are authoring blog posts in other languages, please check with the site maintainer. -

2. Find or create a detailed map of the area. You can use an up-to-date paper map, or a map from an online platform like OpenStreetMap or Google Maps.

+## Writing Content -

3. Review and discuss the Site Worksheet. You will need one Site Worksheet for each site to keep track of what you learn. You may end up inventorying more sites than you planned, so bring extra copies.

+Content for your blog post can be written using a combination of Markdown formatting and HTML. So you could write a numbered list using either of the following: -

4. Split into groups (if you have enough people) and split the neighborhood or area into different areas to visit. In each group, specify the organizer, handy-person and techie so that everyone knows which types of questions they are responsible for asking and answering. Bring your map and Site Worksheet to write notes and keep track of where you visited.

+1. list item 1 +2. list item 2 -

5. Set a time to finish and meet up with your group, and then go inventory the area! It might be good to have some information about your network project with you, like a flyer, in case you meet people while you are walking around.

+or -

6. As you walk the neighborhood, fill out the Site Worksheet and mark the places on your map. Note any details about the items or places that might be helpful for later, such as details about the height of the building, the amount of trees in the area or people that you talked with and include them on the Site Worksheet. Photos are very helpful for capturing many details about buildings.

+
    +
  1. list item 1
  2. +
  3. list item 2
  4. +
-

7. Meet back together and collect all the Site Worksheets and add the information to the Neighborhood Inventory Spreadsheet. Make sure the information is simple, clear, and consistent. You want this worksheet to be useful to anyone who might read it, even if they were not a part of the inventory process.

+### Headings -

8. Review the site options and prioritize them as a group. Decide what locations might be good places to do a detailed Site Assessment.

-
+### Code blocks -
-

Definitions

+Indented blocks of text will be formatted as a code block: -
-
Site
-
A location for the wireless equipment.
-
Inventory (v)
-
Make a detailed list.
-
-
+ $ sudo ifconfig wlan0 down + $ sudo iwconfig wlan0 mode Managed + $ sudo ifconfig wlan0 up + $ sudo service network-manager restart - - +You can also place code blocks in-line with text using text inside of a \ \ tag set. diff --git a/examples/ccksectionlandingpage.md b/examples/ccksectionlandingpage.md index 434dc732..5c10238f 100644 --- a/examples/ccksectionlandingpage.md +++ b/examples/ccksectionlandingpage.md @@ -10,6 +10,13 @@ changed: 2013-09-28 post_author: critzo lang: en --- +## Introduction +This example illustrates how a top level section page for the CCK looks. It basically includes a section menu at the top of the page, in addition to content that is placed based on the metadata. The existing Planning section page, for example, simply has the following text: + +
{% include help_cck_planning_menu.html %}
+
+ +Menus and other content files that get included in the site pages are stored in the _includes directory, and need to be updated when new pages, site sections or sub pages are added. You can explore the content of included files in the _incldues folder, but it's appropriate to just ask teh site maintainer to update the menus with new pages when you submit new content in a pull request on Github.