WRT54g for MANET
     Ian Chakeres
Outline

Linksys WRT54g
OpenWRT
Installation and configuration
Creating a custom image
Open discussion
Resources
DEMOs thro...
Hardware
Linksys WRT54g - retail approx. $70
Wired: 5 ports - ADMtek
Wireless: IEEE 802.11g - Broadcom
   Dual RP-TNC ante...
Default Configuration


           vlan0


                   vlan1
           vlan0




       Ian Chakeres
Configuration


              eth0
       br0


              vlan1
       eth1




   Ian Chakeres
New Box

WAN: DHCP
LAN: 192.168.1.1
http administration
  DEMO
WAN setup required for certain operations
  boot_wait=on, l...
boot_wait

boot_wait=on
  safe boot mode - 3 to 5 seconds
  eth0 responds ARP and tftp requests
  allows firmware loading
b...
Setting boot_wait=on

  Management page ping exploit
;cp${IFS}*/*/nvram${IFS}/tmp/n
;*/n${IFS}set${IFS}boot_wait=on
;*/n${...
Distributions

Linksys GPL
  Preinstalled firmware
SveaSoft
 The Sveasoft firmware adds a host of new features to your
 Lin...
OpenWRT

Minimal base provides
  squashfs and jffs2
  network initialization
  firewall
  dhcp
  telnet
  busybox environme...
OpenWRT

Building a the image
 > wget http://openwrt.org/cgi-bin/
 viewcvs.cgi/buildroot/buildroot.tar.gz
 > tar xzvf buil...
Loading the New Image
 Configure the WAN interface
 Configure your interface
 TFTP always 192.168.1.1
  >tftp   192.168.1.1
...
firstboot


Wait for firstboot to complete - IMPORTANT
  Power light will stop blinking
  DMZ light will turn OFF
  DO NOT I...
Filesystem Layout


Two filesystems
  squashfs - read-only
  jffs2
4MB flash
2MB usable



                 Ian Chakeres
Logging In


Configure your interface
Telnet 192.168.1.1
  DEMO - login, filesystem
  If already configured, IP might be diff...
Filesystem Manipulation

jffs2 points to squashfs
   saves space
Editing files
   remove link
   copy file from /rom
   edit...
NVRAM
Non Volatile RAM
   Important things live here
nvram
   show
   get name
   set name=value
   commit
   DEMO - nvram...
after_firstboot.nvram
after_firstboot.nvram NODEID
  192.168.10.NODEID wired uplink
  192.168.16.NODEID wireless
  192.168.1...
Basic Custom Image
Lots of modifications and additions
Configuration
  dns, routing tables, startup
Modules
  ipv6, netfilter...
Package Management
ipkg
  update
  install, upgrade
  remove
  list
  status
  DEMO - ipkg
dropbear (ssh), tcpdump, olsrd ...
Creating a Custom Image

 Important locations
    build_mipsel/root
    build_mipsel/release/src/linux/linux
    use find ....
Installing and
Configuring New Image

Same process as new box

  TFTP 192.168.1.1 unplug/plugin

  IP address after load wi...
NRL and the WRT54g

NRL-OLSR, MNE, MGEN, ssh, IPv6, WEP
Cheap laptop replacement
Quick demos
Large scale tests
Easy setup
...
Problems

Ad-hoc mode
Failed installation
   always set boot_wait=on
   attempt reinstall using tftp
   WARNING - RESET bu...
Discussion



Questions

Comments




              Ian Chakeres
Resources
Lots of content verbatim from below
OpenWRT
   http://openwrt.org
   user guide, NVRAM, faq, forums, wiki
Linksy...
Upcoming SlideShare
Loading in...5
×

WRT54g for MANET

3,003

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
3,003
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
10
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

WRT54g for MANET

  1. 1. WRT54g for MANET Ian Chakeres
  2. 2. Outline Linksys WRT54g OpenWRT Installation and configuration Creating a custom image Open discussion Resources DEMOs throughout Ian Chakeres
  3. 3. Hardware Linksys WRT54g - retail approx. $70 Wired: 5 ports - ADMtek Wireless: IEEE 802.11g - Broadcom Dual RP-TNC antenna ports Adjustable transmit power FLASH: 4MB, 2MB usable RAM: 16MB CPU: 200MHz MIPS OS: Linux Open Source Ian Chakeres
  4. 4. Default Configuration vlan0 vlan1 vlan0 Ian Chakeres
  5. 5. Configuration eth0 br0 vlan1 eth1 Ian Chakeres
  6. 6. New Box WAN: DHCP LAN: 192.168.1.1 http administration DEMO WAN setup required for certain operations boot_wait=on, loading new firmware Ian Chakeres
  7. 7. boot_wait boot_wait=on safe boot mode - 3 to 5 seconds eth0 responds ARP and tftp requests allows firmware loading boot_wait=off by default Ian Chakeres
  8. 8. Setting boot_wait=on Management page ping exploit ;cp${IFS}*/*/nvram${IFS}/tmp/n ;*/n${IFS}set${IFS}boot_wait=on ;*/n${IFS}commit ;*/n${IFS}show>tmp/ping.log DEMO Ian Chakeres
  9. 9. Distributions Linksys GPL Preinstalled firmware SveaSoft The Sveasoft firmware adds a host of new features to your Linksys WRT54G or WAP54G router - including increased performace. Ad-hoc mode OpenWRT Ian Chakeres
  10. 10. OpenWRT Minimal base provides squashfs and jffs2 network initialization firewall dhcp telnet busybox environment Everything else is a package Ian Chakeres
  11. 11. OpenWRT Building a the image > wget http://openwrt.org/cgi-bin/ viewcvs.cgi/buildroot/buildroot.tar.gz > tar xzvf buildroot.tar.gz > cd buildroot > make Takes about one hour requires internet access Ian Chakeres
  12. 12. Loading the New Image Configure the WAN interface Configure your interface TFTP always 192.168.1.1 >tftp 192.168.1.1 tftp> binary tftp> rexmt 1 tftp> trace tftp> put openwrt-g-code.bin Unplug-plugin WRT DEMO Ian Chakeres
  13. 13. firstboot Wait for firstboot to complete - IMPORTANT Power light will stop blinking DMZ light will turn OFF DO NOT INTERRUPT OR REBOOT Ian Chakeres
  14. 14. Filesystem Layout Two filesystems squashfs - read-only jffs2 4MB flash 2MB usable Ian Chakeres
  15. 15. Logging In Configure your interface Telnet 192.168.1.1 DEMO - login, filesystem If already configured, IP might be different Ian Chakeres
  16. 16. Filesystem Manipulation jffs2 points to squashfs saves space Editing files remove link copy file from /rom edit DEMO - unlink, copy, edit file Ian Chakeres
  17. 17. NVRAM Non Volatile RAM Important things live here nvram show get name set name=value commit DEMO - nvram WARNING - RESET button Ian Chakeres
  18. 18. after_firstboot.nvram after_firstboot.nvram NODEID 192.168.10.NODEID wired uplink 192.168.16.NODEID wireless 192.168.17.NODEID wired backplane DEMO - after_firstboot.nvram Sets up lots of NVRAM variables wl0, wifi, wan, lan, etc REBOOT - causes variables to take effect Ian Chakeres
  19. 19. Basic Custom Image Lots of modifications and additions Configuration dns, routing tables, startup Modules ipv6, netfilter Software mne, nrlolsr, mgen DEMO - modules, config, software Ian Chakeres
  20. 20. Package Management ipkg update install, upgrade remove list status DEMO - ipkg dropbear (ssh), tcpdump, olsrd (unik) Ian Chakeres
  21. 21. Creating a Custom Image Important locations build_mipsel/root build_mipsel/release/src/linux/linux use find . -name “x” -print Building and rebuilding pre_recompile_kernel.sh make Some files/directories get overwritten Ian Chakeres
  22. 22. Installing and Configuring New Image Same process as new box TFTP 192.168.1.1 unplug/plugin IP address after load will be configured after_firstboot.nvram may be unnecessary Ian Chakeres
  23. 23. NRL and the WRT54g NRL-OLSR, MNE, MGEN, ssh, IPv6, WEP Cheap laptop replacement Quick demos Large scale tests Easy setup Customizable Ian Chakeres
  24. 24. Problems Ad-hoc mode Failed installation always set boot_wait=on attempt reinstall using tftp WARNING - RESET button de-bricking instructions available Ian Chakeres
  25. 25. Discussion Questions Comments Ian Chakeres
  26. 26. Resources Lots of content verbatim from below OpenWRT http://openwrt.org user guide, NVRAM, faq, forums, wiki Linksys GPL http://www.linksys.com/support/gpl.asp Seattle Wireless http://www.seattlewireless.net/index.cgi/LinksysWrt54g SveaSoft De-brick - http://openwrt.org/forum/viewtopic.php?t=17 Ian Chakeres
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×