Wikia

coLinux

Bebbo's Configuration

Talk0
234pages on
this wiki

coLinux + XMing with full networking on a laptop Edit

The idea behind this configuration is

  • support TCP/IP server applications running on coLinux
  • use the WLAN to connect to the internet if available
  • have a working X server using XMing even if there is neither LAN nor WLAN.

The approach: I use 3 different network interfaces

  • eth0 = bridged connection attached to the LAN adapter
  • eth1 = tuntap connection for local loopback, using a 172.16.0.0 network
  • eth2 = slirp connection to utilize WLAN

To achieve this we have to define the

coLinux configuration Edit

The network configuration for coLinux looks like

  eth0=pcap-bridge,"TAP-LAN",80:11:22:33:44:55
  eth1=tuntap,"TAP-LOOP"
  eth2=slirp

My recommendation is to use the MAC address of your LAN adapter plus inverting the highest bit(s) to get an unique MAC address. This is the MAC address visible on you network for the coLinux server applications. So if your MAC address is 00:11:22:33:44:55 use 80:11:22:33:44:55.

Linux configuration Edit

Using Debian the network configuration is kept in /etc/network/interfaces. The file contains the information for eth0, eth1 and eth1:

  auto eth0
  iface eth0 inet dhcp

  auto eth2
  iface eth2 inet dhcp

  auto eth1
  iface eth1 static 
    address 172.16.0.2
    netmask 255.255.0.0

Other Linux distribution use different ways to store that information, but the scheme is the same:

  • eth0 and eth2 are using DHCP
  • eth1 uses the static IP address 172.16.0.2

Also modify your environment (e.g. .bashrc) and set the DISPLAY variable

  export DISPLAY=172.16.0.3:0.0

Windows configuration Edit

This is maybe the trickiest part, but it's worth the effort!

First you need 2 TAP Adapters which is pure software (no hardware required). Usually you install one TAP adapter while running the installer for coLinux. If you have no TAP adapter installed you have to do the next step twice.

  1. Open the control panel and start the hardware wizard (or start hdwwiz.cpl directly).
  2. The welcome dialog opens, press continue and it starts searching new hardware
  3. If you are asked whether the hardware is already connected, mark the selection yes, the hardware is already connected and press continue
  4. The hardware assistent now displays a list of devices, scroll down and select add new hardware and press continue
  5. Mark the choice for manually selecting the hardware and press continue
  6. Select network adapters and press continue
  7. Select TAP-Win32 Provider (coLinux) and then TAP-Win32 Adapter (coLinux) and press continue
  8. Now confirm all following dialogs.

After succeeding with that step open all network connections. There should be

  • Wireless Lan Connection - Your wireless chip set
  • Local Area Connection - You LAN chip set
  • Local Area Connection 2 - TAP-Win32 Adapter (coLinux)
  • Local Area Connection 3 - TAP-Win32 Adapter (coLinux) #2

Now simply rename the local area connections using the TAP-Win32 adapter, one into TAP-LAN and the 2nd into TAP-LOOP. Your connections look like:

  • Wireless Lan Connection - Your wireless chip set
  • Local Area Connection - You LAN chip set
  • TAP-LAN - TAP-Win32 Adapter (coLinux)
  • TAP-LOOP - TAP-Win32 Adapter (coLinux) #2

Open the property pages for the TAP-LOOP connection and set the IP properties to

  • address 172.16.0.3
  • netmask 255.255.0.0

Now create a network bridge for your local area connection and the TAP-LAN device: Hold the SHIFT key and select

  • Local Area Connection - You LAN chip set
  • TAP-LAN - TAP-Win32 Adapter (coLinux)

Right click and select create network bridge


Xming configuration Edit

Locate the file X0.hosts in the program folder of Xming and add the line

  172.16.0.2

to allow connections from your local coLinux.

That's it!

Test your configuration Edit

From coLinux you should be able to ping 172.16.0.3 at any time with 0ms response time.

Running Xming allows you to open all X windows in your Windows environment.

If your LAN is not connected during startup of coLinux, it will hang a bit and decide to continue to start with disabled eth0. So use ifconfig eth0 once you connect the LAN to bring the coLinux side up.

Enjoy

Bebbo

Around Wikia's network

Random Wiki