OpenWrt Forum Archive

Topic: Book - Learn More About OpenWRT

The content of this topic has been archived on 30 Mar 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi there!  I have been messing with OpenWRT and some of the other open-source firmwares recently.  I am able to get around and modify config files, etc. but I sometimes get stuck when it comes to advanced concepts.  I would like to buy a book or multiple books that would help me understand what I am doing here.  I was thinking books on linux, the C programming language, TCP/IP, routing concepts, and/or iptables would be helpful here.

Could someone recommend a book or a series of books that would help me understand OpenWRT and become more involved?

Thanks
Jason

> get stuck when it comes to advanced concepts

The solution are the hundred of Linux-support forums.

> books on GNU/Linux
There is so much stuff online:
http://debiananwenderhandbuch.de/  There gotta be an english version somewhere.
http://en.wikipedia.org/wiki/Linux_From_Scratch
http://luv.asn.au/overheads/linux-startup.html

and countless other stuff.

> C programming language
1.  http://norvig.com/21-days.html

I cannot recommend one, but for C you should by a book or two. Try the local library first. Or a college or university library, there is the good stuff. The later you wont be allowed to borrow as non-student, but you can read them in situ.

> iptables
Check my article:   http://wiki.openwrt.org/doc/howto/netfi … figuration
Use together with the iptables manpage, the tutorial from frozentux and the picture from engelhardt.

> TCP/IP
read about packet based communication. The wikipedia is IMHO quite full of shit, much low quality articles with little value, but it is a start ;-)
http://en.wikipedia.org/wiki/OSI_model

Understand what a communication protocol is. IP is one. TCP another. etc. The so called Linux TCP/IP-Stack is a piece of software, that handles TCP/IP-Based communication. Meet it when you read about iptables or IPv6.

> routing concepts
start with wikipedia or simply with google.

Easiest is http://en.wikipedia.org/wiki/Static_routing.

BTW, how old may you be, and do you plan to study something?

Glad you did not link the Tanenbaum "phonebook".
I would like to add www.pronix.de for a C course. Again this is in german, but it's an openbook, and even if you grow with C it's useful as a reference.

For OpenWrt, you should do a search on youtube, I recently saw some lecture held during one of the CCC conventions(I think it was 23C3, not sure, but much of that stuff is still valid) on Openwrt, the buildroot and all that stuff. The lecture is in english, but the speaker has some really weird kind of intonation/english skills. Still, it's a recommendation.

Thanks for all the references.  I will check them out.  Do you think these are good concepts to learn or are there others that I should target?

Orca:
I am 27 years old.  I have an education and work background in business, economics and finance.  When I was a child a neighbor of mine gave me two network cards (the old coax style ones) and since then I have had a fascination with networking.  I have dabbled with linux on my computer over the past decade but continuously give it up (and try it again) because I just don't feel I understand enough about it.  I like OpenWRT because it is a very simple linux system that, for the most part, I understand (or have access to the resources to understand) how it works.  The more I play with it the more I learn, albeit it's sometimes frustrating.  So in answer to your question, this is just a hobby, a quest to learn more about linux and networking, and a chance to get involved in the open-source community.

(Last edited by jason955 on 16 Feb 2011, 22:12)

jason955 wrote:

Thanks for all the references.  I will check them out.  Do you think these are good concepts to learn or are there others that I should target?

I am 27 years old.  I have an education and work background in business, economics and finance.

Jesus, then the study of electrical engineering is not an option. ;-) You are from the states?

jason955 wrote:

When I was a child a neighbor of mine gave me two network cards (the old coax style ones) and since then I have had a fascination with networking.  I have dabbled with linux on my computer over the past decade but continuously give it up (and try it again) because I just don't feel I understand enough about it.  I like OpenWRT because it is a very simple linux system that, for the most part, I understand (or have access to the resources to understand) how it works.  The more I play with it the more I learn, albeit it's sometimes frustrating.  So in answer to your question, this is just a hobby, a quest to learn more about linux and networking, and a chance to get involved in the open-source community.

For learning C I really recommend to buy a) reference book (this will be expensive) and then other book(s) or online stuff for learning it step by step. You can read "Lern bla in 21 Days" (there is probably a copy in the library...) but I would not pay money for that. I think you can learn programming with 27.

Try to learn from the source code, but search for good documented stuff. For example, KDE is said to adopt good documented code, but it is a GUI.

To learn about Linux you can just tingle around with it, post Questions in Forums (this is not the best one), usually you meet competent and helpful people there. Learn as you go. As for learning about networking, there is no point in doing that with one machine only. With your Router you have two, but there is nothing to route. Projects like Freifunk should provide machines and expertise. If there is something like that where you live, check them out.

http://events.ccc.de/congress/2008/wiki … treamdumps
http://events.ccc.de/congress/2009/wiki … treamdumps
http://events.ccc.de/congress/2010/wiki … treamdumps

where is the rest?

The quickest way to learn about POSIX type systems and Linux in particular is to force yourself to depend on knowing it by using it as your only system and don't go running back to whatever you used before at the first sign of trouble.  That said, while there is a lot of HOWTO stuff available, there is little "why" stuff.  So to really understand this stuff almost requires some heavy reading on UNIX and its philosophy.  I've never done that myself as I too am a hobbyist but educated a little closer to this stuff in electronics.  A lot of good books exist in the O'Reilly library on all facets of Linux, POSIX (UNIX), programming, and system administration. 

As for learning C, the book "The C Programming Language" by Brian Kernighan and Dennis Ritchie is the canonical reference.  It is concise and covers a lot of ground.  Look for the Second Edition which covers the ANSI C standard.  I keep my copy handy for when I need to review a concept.  I'm self taught so that is a bit of a disadvantage but the basics of C can be picked up easily.  It's the more clever ways of doing things that start to make my eyes glaze over but that is true in any language.  My weaknesses are algebraic formulas and algorithms.

To be an effective system administrator you will need to know Bourne Shell syntax.  The GNU Bash shell is the default Bourne shell on most desktop Linux systems and a lot of the basics will apply to Busybox used in OpenWRT.  Again there is plenty of documentation out there to read on Bash.  Bash is also quite easy to work with as the programs are simply text scripts the shell interprets.

Finally, to really enjoy Linux and to be an effective sysadmin, you'll want to learn a high level language such as Perl or Python or one of the other popular "scripting" languages.  Perl borrows a lot from C and the shell so that it becomes quite easy to learn.  There is also an incredible library and community around Perl so that help or a module to do some thing is available.  Like the shell, Perl interprets your program but unlike the shell, it actually compiles it first so it will find a lot of syntax errors before the code is ever executed.  Also, for working with text, nothing beats Perl's integration of regular expressions.

At 27 you have a great opportunity to learn a lot of new things.  I've been playing with this stuff for almost 15 years and there is still much to learn.  I'm getting acquainted with IPv6 and such stuff over the past week.

Have fun!

(Last edited by Nate on 17 Feb 2011, 01:59)

Nate wrote:

The quickest way to learn about POSIX type systems and Linux in particular is to force yourself to depend on knowing it by using it as your only system and don't go running back to whatever you used before at the first sign of trouble.

I like that!

That's what I did back in mid-January of 1998!  Needless to say, I learned a lot by making that Slackware box my full-time desktop.  It also wasn't as easy back then as now.  Just getting X to work was an exercise in near black magic.  Those were the days but I don't care to relive them.  OTOH, those looking for a similar adventure can try to use the HURD.  wink

(Last edited by Nate on 17 Feb 2011, 02:09)

Nate wrote:

That's what I did back in mid-January of 1998!  Needless to say, I learned a lot by making that Slackware box my full-time desktop.

Yeah, I remember those ol' good times with Slackware. The 1st time I tried Linux Slackware was back in early 90s (when Linux kernel was still on v0.98) and it was distributed on 5 pieces of a 1.44MB disk with no GUI installation! At the time, I had a Zenith i386/20MHz with 16MB RAM configured to dual boot with Linux and Windows 3.1.

Thanks for all of your help and references!  I think I am in a little far over my head here with all of these different things I need to understand.  I guess that's why you guys get paid the big bucks.  I'll to take a trip over to the library and see what I can find and continue my learning journey.

Orca: yes, I am in the States.  California, to be precise.  It looks like you are from Germany.  I have never been but hope to visit some day!

Thanks again.

jason955 wrote:

I think I am in a little far over my head here with all of these different things I need to understand.

All the Info can be overwhelming, stick to the plan. Make Linux working, and you will learn a great deal  in the process.

jason955 wrote:

I guess that's why you guys get paid the big bucks.  I'll to take a trip over to the library and see what I can find and continue my learning journey.

Hmmm, which "big bucks" do you mean? You still have public libraries in the states? Not yet privatized?

jason955 wrote:

Orca: yes, I am in the States.  California, to be precise.  It looks like you are from Germany.  I have never been but hope to visit some day!Thanks again.

Oh, wait, no, wait, stay where you are! I am coming over. Is it true what they say? That it seldom rains in California and you can buy weed at the promenade and that hot chicks are walking by all the time? Like in the movies? ;-)

jason955 wrote:

Thanks for all of your help and references!  I think I am in a little far over my head here with all of these different things I need to understand.  I guess that's why you guys get paid the big bucks.

I get paid zip, zero, nadda for my Linux knowledge.  It's a hobby.

The discussion might have continued from here.