LinuxDevCenter.com
oreilly.comSafari Books Online.Conferences.

advertisement


coLinux: Linux for Windows Without Rebooting
Pages: 1, 2

coLinux Networking

coLinux networking is as gentle as its console. coLinux uses the Tap32 driver to connect to the network as if it were a completely different computer.



There are mainly two different ways to connect this virtual computer to the network. One is through Network Address Translation (NAT). The other is by setting up a Native/Bridged network. For the sake of simplicity we will use the first method.

First, install the TAP-Win32 driver as explained above. Then, configure Connection Sharing on the Windows box.

For Windows 2000, navigate through Control Panel -> Network and Dialup Connections -> Select the network adapter for sharing -> Properties -> Sharing Tab -> Enable Internet connection sharing -> use the name of the TAP-Win32 adapter - > Ok.

With Windows XP, instead follow Control Panel -> Network Connections -> Select the network adapter for sharing -> Properties -> Advanced Tab -> Allow other network users -> Use TAP-Win32 Adapter -> Ok.

Your coLinux session needs an IP address on the same network as the network interface that serves as your gateway. If you have installed Debian rootfs, then check the values in the file /etc/network/interfaces. (You can use nano or vi as your editor with this image. Be warned that the console updates slowly sometimes, so you may see things that really aren't there.)

Here's the default configuration. They're also compatible with the default Windows Connection sharing settings which make the IP of your TAP-Win32 Adapter 192.168.0.1:

ifconfig eth0 inet static
address 192.168.0.40
gateway 192.168.0.1
netmask 255.255.255.0

Now change the /etc/resolv.conf file. This stores the addresses of your DNS servers. Put in the correct values for your network.

Finally, restart your Ethernet interface to activate the changes:

# ifdown eth0
# ifup eth0

If you prefer to make your changes the quick and dirty way, the following commands also work:

# ifconfig eth0 192.168.0.40 netmask 255.255.255.0
# route add default gw 192.168.0.1
# echo "nameserver [nameserver_ip] > /etc/resolv.conf

Let's now test the connection. ping is always a good place to start.

colinux:~# ping www.sun.com
PING www.sun.com (64.124.140.199) 56 data bytes

---www.sun.com ping statistics ---

Depending on the configuration of your LAN and firewall, you may not receive an answer to this ping request. The name resolution of www.sun.com to 64.124.140.199 means that you've reached DNS, so you've reached the Internet. You'll probably reach the Web and other services correctly.

What's Installed?

With a nice, networked Debian GNU/Linux box on top of a Windows computer, it's time to experiment. First let's see what we have installed. Debian's dpkg tool comes in handy:

$ dpkg --get-selections | more

Here are the basic installed programs in several categories.

  • Editors. nano and nvi will have to suffice for most of users. (Sorry, Church of Emacs!) If you are not into the arcane knowledge of vi, try nano.

  • Programming. As for the basics, you can use bash and perl scripts.

  • Pager. Well, there's more, but unfortunately no less.

  • Networking. Your options are limited. There's ping, but unfortunately no traceroute or mtr. There's also iptables, for basic needs.

There are very few programs included, which is why it's a base system that takes up only 93Mb on disk. Don't forget that you are using Debian GNU/Linux, one of the most easily updateable systems.

Adding and Upgrading Programs

The base system configuration makes it easy to add the programs you want. First, update the list of installable packages:

# apt-get update

Then, you can install any package by name with the command:

# apt-get install package_name

Of course, if you're not familiar with the Debian packaging system (of world domination), you may not know which packages you want. Never fear! You can search for packages with:

# apt-cache search search phrase

You can also read package descriptions with:

# apt-cache show package_name

For more information, see Davor Ocelic's excellent Debian Tutorial.

Now that you have a base GNU/Linux box that you can upgrade or on which you can install new software, you can experiment with anything you like.

Conclusion

The coLinux project is a still in the beta stage, though it can already boot Knoppix and do more complicated tasks. There still are glitches on the console; the screen does not update well in full screen mode, there's no command line history editing, and I could not find a way to scroll back in the console window, for example.

Possible uses include using it for networking, both experimental and for production. You can set up a coLinux network and try IDS software on it. You can extend your Windows box with GNU/Linux abilities (like Cygwin), or experiment with different Linux kernels, though UML may be a better option.

All in all, this is a very interesting concept. I predict that it will be a very good alternative to other Linux virtualization solutions in the very near future.

References

KIVILCIM Hindistan works as a full time computer security consultant with a CISSP, using Linux and Free Software as weapons of choice.


Return to LinuxDevCenter.com.


Linux Online Certification

Linux/Unix System Administration Certificate Series
Linux/Unix System Administration Certificate Series — This course series targets both beginning and intermediate Linux/Unix users who want to acquire advanced system administration skills, and to back those skills up with a Certificate from the University of Illinois Office of Continuing Education.

Enroll today!


Linux Resources
  • Linux Online
  • The Linux FAQ
  • linux.java.net
  • Linux Kernel Archives
  • Kernel Traffic
  • DistroWatch.com


  • Sponsored by: