Loopback device is slow

Help
2007-03-03
2013-05-09
  • Stefan Franke
    Stefan Franke
    2007-03-03

    Hi there,

    I am using colinux 0.7.1 and using this working(!) network setup:

    eth0=pcap-bridge,"LAN",DE:AD:BE:EF:00:01
    eth1=pcap-bridge,"Loopback"
    eth2=slirp

    On Windows I have

      WLAN     - DHCP       - Network for wireless lan
      Loopback - 172.16.0.1 - the MS Loopback device

    and a network bridge
      CoLinux Bridge - DHCP - MS MAC bridge
      LAN            -        Local are network
      TAP            -        TAP-Win32 adapter

    on the linux side

    iface eth0 inet dhcp
    iface eth2 inet dhcp
    iface eth1 inet static
      address 172.16.0.2
      netmask 255.255.0.0

    This allows me to use the Xserver without LAN or WLAN connection by using

    export DISPLAY=172.16.0.1:0.0

    If I have WLAN, eth2 covers this and I can connect to the internet
    If I have LAN, eth2 and eth0 covers this, and with eth0 I am also reachable and can run servers within linux.

    NOW THE PROBLEM

    ping to 127.16.0.1 is not constant. I get ping times from 0.2ms to 10.0 ms with an average of 5.0 ms.

    Any idea what might be the problem of the bad ping times?

    thanks

    Bebbo

     
    • Stefan Franke
      Stefan Franke
      2007-03-03

      OK, found a solution. Here is my configuration

      Windows:

      LAN      - dhcp - gigabit controller
      WLAN     - dhcp - intel wireless
      TAP      - dhcp - installed by colinux
      LOOP-TAP - static 172.16.0.3 - manually added

      Now create a bridged network and add LAN and TAP. Networks now look like

      LAN      - dhcp - gigabit controller
      WLAN     - dhcp - intel wireless

      coLinux bridge - dhcp - MS MAC Bridge
      - LAN
      - TAP

      Use this configuration to start coLinux:

      eth0=pcap-bridge,"LAN",DE:AD:BA:BE:00:01
      eth1=tuntap,"LOOP-TAP"
      eth2=slirp

      And configure the coLinux side (I use debian) to:

      auto eth0
      auto eth1
      auto eth2
      iface eth0 inet dhcp
      iface eth1 inet static
        address 172.16.0.2
        netmask 255.255.0.0
      iface eth2 inet dhcp

      For the X-Server the IP from LOOP-TAP is used:

      export DISPLAY=172.16.0.3:0.0

      is used.

      The ping average is now 0.2 ms - 25 times faster than before and you really sense this difference!

      Enjoy

      Bebbo

       
    • Stefan Franke
      Stefan Franke
      2007-03-03

      errata:

      Networks now look like

      LOOP-TAP - static 172.16.0.3 - TAP-Win32 adapter
      WLAN     - dhcp              - intel wireless

      coLinux bridge - dhcp - MS MAC Bridge
      - LAN - gigabit lan
      - TAP - TAP-Win32 adapter

      :)