Roll Your Own Intranet

And understand the Internet while you're at it


When technology becomes overly complex, it becomes abstract and when it becomes abstract, it becomes more complicated than ever before. That's exactly what's happened to the Internet. It's been cut up into many confusing layers and what you see happening at one layer may have no relation to what occurs at the bottom layers. You can't really have a full understanding of the Internet by just surfing it using a browser alone. You must understand the basics. That's where we'd like to help you out, by teaching you what really goes on beneath the hood of a browser, email program or dialer.

The best way to master any new computer technology is to write code for it. It's difficult to conceptualize the enormity of the 'net in all it's glory. We can't realistically sit down and draw diagrams to explain the interaction between millions of computers, we've got to use code. So what we've done is provide you with practical programs and the explanations for them, plus a lot more.

This tutorial is for just about everybody and we're not just saying that to increase our readership! Everyone who has anything to do with the Internet should learn to write and use TCP/IP, UDP and all the other important Internet protocols. True, you may never write a browser in your life, but knowing about the technology means you can make better use of it. If you know your basics well, you'll find it much easier to pick up new concepts and understand the new developments in this field. You'll also be able to solve your own Internet related problems without calling on the expertise of the neighborhood whizkid.

Along the way, we'll dispel long standing myths about the Internet and explain commonly held misconceptions. For example, most people believe that Java has a lot to do with the Internet. In actuality, there's hardly any relationship between Java and the Internet! All that the Internet does is transfer the Java code to us, using protocols like HTTP which were established much before anyone thought about Java. The code then executes on our machine like any other program. In other words if I compile a C program and then download it from the Internet, C becomes an Internet language! As much SUN would like you to believe otherwise, the Internet doesn't have much to do with Java.

Most people however, continue to believe this fiction because they don't know enough. The Internet is the magical realm of white haired boffins and evil Satan worshipping hackers as far as they're concerned. Even well informed surfers are taken in by this piece of 'marketing'.

How can you as a programmer or as an enthusiast hope to use the Internet successfully without fully understanding it? True you may never use the code provided, but knowing these protocols and technologies you can grasp the complexities of the Internet better. It's a bit like a C programmer learning Assembler. True, he'll never write a product using tedious old assembly language, but he'll learn a lot more about the internals of the machine, making him a better C programmer.

Writing code is the best way to learn any new technology. If you want to know how Routers work, what better way to learn than to write your own Router? Of if you find DNS's confusing, what better way to clear up your doubts than by showing you how to write your own? You'll understand confusing terms like Sliding Windows better when you write the TCP code to implement it. After you've written the code to send HTML documents across the Internet you'll discover that all these protocols, HTTP, FTP, POP3, SMTP, etc. are just highly evolved file transfer protocols. There's nothing to them really!

I've said it before and I'll say it again, you'll only really understand the Internet when you see and fully understand the functions of each and every one of the forty bytes in the TCP/IP header and you can only do that by writing real programs.

A lot of programmers learn winsock programming and then sit back and proclaim that they know Internet programming. They couldn't be further from the truth! When you use a winsock, you're calling code and ready made functions from within it. In C under DOS, you may call code from the standard libraries and use it, but using printf() and knowing how to write your own variation of it are two very different things. Unless you know the raw bytes that flow across the wires, you can't really know what the connect() function in the winsock is up to. Use winsocks by all means, but also understand the code that lies beneath them. You'll understand the winsock and the Internet better.

Through these tutorials we'll be teaching you how to building an Intranet from the bottom up. All you need is a couple of computers, some Ethernet cards and a reasonable length of cable. Our emphasis will be on the actual bytes that flow across the wire and writing our own code to understand the workings of professional programs and protocols, though we will teach you how to install most of the software we'll be using.

Here's a list of what we're going to do...

The reason we've put in so much work into this project and written so much code for it is because we wanted to fully understand the workings of the Internet ourselves! We didn't originally plan to write a tutorial on this subject but after a while, when we saw the amount of misinformation floating around and the general levels of awareness about the mechanisms of the 'net, we were compelled to sit down and pen this tome. By understanding the workings of an Intranet, which is simply a scaled down version of the real thing, you can understand the Internet better. No one will let you fiddle around with their Routers on the Internet, but if you set up an Windows NT™ Router like we did, you can do anything you want!

It's a rare occasion in the short history of computing when the bulk of programmers have to radically upgrade and revamp their skills, when a paradigm shift in programming occurs. This is one of those moments and if you don't adapt to the changes brought upon by the Internet, prepare to become extinct!


The above tutorial is a joint effort of

Mr. Vijay Mukhi
Mr. Arsalan Zaidi
Ms. Sonal Kotecha


Back to the main page


Vijay Mukhi's Computer Institute
VMCI, B-13, Everest Building, Tardeo, Mumbai 400 034, India
Tel : 91-22-496 4335 /6/7/8/9     Fax : 91-22-307 28 59
e-mail : vmukhi@giasbm01.vsnl.net.in
http://www.vijaymukhi.com