LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 10-30-2008, 06:55 AM   #1
memo007
Member
 
Registered: Feb 2005
Distribution: Debian, Kanotix, Kubuntu
Posts: 117

Rep: Reputation: 15
Good books on TCP/IP


I am looking to learn tcp/ip in and out.
Basicly for programming concepts to have a full understanding on how to socket program. I was looking at some books from W Richard Stevens; however they seem not to cover the newer stuff. I was leaning towars
"The TCP/IP Guide: A Comprehensive, Illustrated Internet Protocols"
Any comments or thoughts on this are welcome.
 
Old 10-30-2008, 07:14 AM   #2
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 741Reputation: 741Reputation: 741Reputation: 741Reputation: 741Reputation: 741Reputation: 741
I always look first at O'Reilly. They have many books free online and they also have the Safari subscription service.
 
Old 10-30-2008, 07:15 AM   #3
pinniped
Senior Member
 
Registered: May 2008
Location: planet earth
Distribution: Debian
Posts: 1,732

Rep: Reputation: 50
Personally I'd read the manual pages and various notes on the internet - and if I feel really daring I'd try to read through an RFC. Unless the book explains the Transport Control Protocol and Internet Protocol in detail, all you need to know about TCP socket programming would fit into a very small book. You open a socket, maybe set it to listen, maybe ask it to connect to another socket, maybe set it for non-blocking operation. If you're given a name, pass it on to the resolver (which uses sockets, but as an end-user you will not have anything to do with the resolver's communications), determine what type of address(es) were returned (IPv4 or IPv6) and select an address from the list. Writing code which will work for both IPv4 and IPv6 is slightly complicated but not terribly difficult to do. So I think the best way to learn is just read the man pages and do it. Also take a peek at the source code for, say, a dhcp client or even a resolver to see the various tricks used and how they deal with IPv4 + IPv6.
 
Old 10-31-2008, 01:28 AM   #4
chort
Senior Member
 
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 69
Anyone trying to understand TCP/IP should definitely start with TCP/IP Illustrated, Volume 1. After that proceed in whatever direction makes the most sense.
 
Old 10-31-2008, 01:38 AM   #5
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 678Reputation: 678Reputation: 678Reputation: 678Reputation: 678Reputation: 678
I see the third edition of Unix Network Programming covers XTI, which someone recently asked about in a post.
http://www.amazon.com/Unix-Network-P.../dp/0131411551
 
Old 10-31-2008, 03:45 AM   #6
KornFire
LQ Newbie
 
Registered: Oct 2008
Location: Bangalore, India.
Posts: 8

Rep: Reputation: 0
For Socket Programming, you don't need to learn any lengthy books. i think googling will be sufficient. Well, here is a short Video which gives nice primary info abt socket programming and its working.
 
Old 10-31-2008, 07:28 AM   #7
xiyoubbs
LQ Newbie
 
Registered: Oct 2008
Posts: 3

Rep: Reputation: 0
unix network programing,i think it`s a good book for beginning student!
 
Old 10-31-2008, 07:48 AM   #8
memo007
Member
 
Registered: Feb 2005
Distribution: Debian, Kanotix, Kubuntu
Posts: 117

Original Poster
Rep: Reputation: 15
The manuals are kind of scattered all over and not as organized as a book would be. I am interested in a light introduction, since my knowledge on ip/tcp is very limited. Before diving into the actual socket/remote programming.

Quote:
Originally Posted by pinniped View Post
Personally I'd read the manual pages and various notes on the internet - and if I feel really daring I'd try to read through an RFC. Unless the book explains the Transport Control Protocol and Internet Protocol in detail, all you need to know about TCP socket programming would fit into a very small book. You open a socket, maybe set it to listen, maybe ask it to connect to another socket, maybe set it for non-blocking operation. If you're given a name, pass it on to the resolver (which uses sockets, but as an end-user you will not have anything to do with the resolver's communications), determine what type of address(es) were returned (IPv4 or IPv6) and select an address from the list. Writing code which will work for both IPv4 and IPv6 is slightly complicated but not terribly difficult to do. So I think the best way to learn is just read the man pages and do it. Also take a peek at the source code for, say, a dhcp client or even a resolver to see the various tricks used and how they deal with IPv4 + IPv6.
 
Old 10-31-2008, 10:16 PM   #9
chort
Senior Member
 
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 69
Quote:
Originally Posted by KornFire View Post
For Socket Programming, you don't need to learn any lengthy books. i think googling will be sufficient. Well, here is a short Video which gives nice primary info abt socket programming and its working.
Completely wrong. I know tons of developers who went straight from non-networked applications into networked applications with no understanding of TCP/IP. They took your approach, and the result was terrible applications that failed in all kinds of horrible ways once they were released into the real world.

Unless you know how internetworking happens at an operational level, there's absolutely zero chance that your application will be robust enough for real use. You cannot just learn a few new library calls and think you're an expert (or even sufficient beginner).

Those of us who actually have to support and debug applications in the field really, really, really hate developers who treat networking as "just one more library", because they always get it wrong.
 
Old 10-31-2008, 10:34 PM   #10
pinniped
Senior Member
 
Registered: May 2008
Location: planet earth
Distribution: Debian
Posts: 1,732

Rep: Reputation: 50
Quote:
Originally Posted by chort View Post
Those of us who actually have to support and debug applications in the field really, really, really hate developers who treat networking as "just one more library", because they always get it wrong.
Well, there will always be useless people who call themselves "programmers" even though they have no clue what they are doing; books or no books, they'll churn out awful code. I really don't see any great distinction between network failures and any other system call failure in a program. It is useful to understand how the network works, and for that it is probably more convenient to read someone's explanation of the system rather than attempt to decipher the various RFCs, but in this day and age I really don't see the use of a book on the subject except as a quick reference when you already know the system pretty well. I've got a lot of network code that has been running without problems for years and I don't have any network books; personally, when I was looking for books, I found that they were either written by idiots for idiots or else most of the book was irrelevant to what I wanted and I didn't think it was worth the money.
 
Old 11-01-2008, 11:08 AM   #11
chort
Senior Member
 
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 69
It's not a question of bad code; it's a question of code that does exactly what it was written to do, but what it was written to do didn't take into account how networks are actually designed and implemented. Someone who doesn't understand the difference in bandwidth and latency between their test system and real networks, doesn't understand how firewalls work, doesn't understand NAT, doesn't understand split-view DNS, etc is never going to be able to develop a robust networked application.

There are a multitude of other real-world problems I've seen, but the above are the most frequent.

There's a huge difference between "no bugs" and "well-designed". You can have technically flawless code that makes really, really stupid assumptions.
 
Old 11-02-2008, 04:25 AM   #12
KornFire
LQ Newbie
 
Registered: Oct 2008
Location: Bangalore, India.
Posts: 8

Rep: Reputation: 0
Smile

Dear Chort, pls again read my last message in this thread. I was talking abt socket programming not basic TCP/IP concepts. i agree with u that one has to learn TCP/IP and many books are written on it. But, i dont think any book that cover fundamental of tcp/ip also talk abt socket programming in detail. One book as 'jschiwal' point it out here, is the best book i have seen so for in socket programming, still i wont refer it since it's too complicate for a newbie ( if u dont believe, give this book to any one new and show its first program ( that is 'day-time server' i remember) to understand). many books are written in a very stupid manner. Best way to learn socket programming is from goolge and manuals. Again, i'm NOT laking about tcp/ip fundamentals.
 
Old 11-03-2008, 10:37 PM   #13
chort
Senior Member
 
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 69
And I was pointing out you need to know TCP/IP fundamentals before you can hope to write an application that uses it effectively.
 
Old 11-03-2008, 11:11 PM   #14
KornFire
LQ Newbie
 
Registered: Oct 2008
Location: Bangalore, India.
Posts: 8

Rep: Reputation: 0
I appreciate ur concern.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Opinion on TCP/IP Illustrated Books dsuratman Linux - Networking 1 01-09-2006 01:28 PM
good books jtravnick General 2 07-15-2005 05:58 PM
Tcp/ip protocal books... r_squared Programming 7 03-10-2005 09:02 AM
any good books? mafia7 Linux - Newbie 4 07-28-2004 11:37 AM
any good books out there for slack? sirpelidor Slackware 5 12-05-2003 02:56 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:05 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration