Announcement

Collapse
No announcement yet.

Puzzling problem with two network interfaces

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Puzzling problem with two network interfaces

    I've been wrestling with this and I'm really stuck. Under 8.04 I had this /etc/network/interfaces

    auto lo eth0 eth0:1

    iface lo inet loopback

    iface eth0 inet static
    address 10.166.8.211
    netmask 255.0.0.0
    gateway 10.166.8.209

    iface eth0:1 inet static
    address 192.168.2.3
    netmask 255.255.255.0

    The purpose of this is to be able to watch the TV streams from my ADSL in my PC (network 10.x.x.x) while at the same time being able to keep my local network (network 192.168.x.x) TV is delivered via UDP data streams from the 10.x.x.x network.

    Under 8.04 I had to remove kde-network-manager for this to work but it worked. It even allowed me to watch a different TV "channel" (they are really UPD streams) than the one that was being watched in the TV.

    Now under 9.04, after booting I'm only able to watch on my PC the very same TV channel that is being watched on the TV. But ifconfig reports both eth0 and eth0:1 as usual without any indication of a problem What is even more strange, if I do from the console

    sudo /etc/init.d/networking stop
    sudo /etc/init.d/networking start
    [sudo] password for xxxxx ......
    * Reconfiguring network interfaces...
    RTNETLINK answers: No such process

    Then I'm able to wathc in the PC a different TV channel (read UDP://@ip adddressort) than the one the decoder is displaying!! What's puzzling is that I don't understand the message (I'm no networking expert) but what I'm doing is essentially what is done at boot time, except of course stopping the network. Yet it works even declaring that there is an error! This is very frustrating to diagnose since I have to reboot the machine to reproduce it.

    Any ideas?

    #2
    Re: Puzzling problem with two network interfaces

    This looks like an order issue, as in after boot something is up that is not up yet when the network comes up on boot. I would also make sure that network-manager did not get reinstalled during the upgrade.

    There are some scripts in /etc/network/if-up.d that get run after an interface comes up. Could one of those be changing the environment in which the network comes up after a restart?

    Comment


      #3
      Re: Puzzling problem with two network interfaces

      mando_hacker, you were right, the network-manager package has been reinstalled during the upgrade. I removed it, but the problem persists.

      I've dig the /etc/init.d/networking script. What it does at start/stop time is essentially ifup/down -a --exclude=lo. The ifup/down commands have a verbose switch. Running with that switch gives these results:

      ifdown:

      Configuring interface eth0=eth0 (inet)
      run-parts --verbose /etc/network/if-down.d
      run-parts: executing /etc/network/if-down.d/avahi-autoipd
      run-parts: executing /etc/network/if-down.d/wpasupplicant
      route del default gw 10.166.8.209 metric 100 eth0
      ifconfig eth0 down
      run-parts --verbose /etc/network/if-post-down.d
      run-parts: executing /etc/network/if-post-down.d/avahi-daemon
      run-parts: executing /etc/network/if-post-down.d/virtualbox-ose
      run-parts: executing /etc/network/if-post-down.d/wireless-tools
      run-parts: executing /etc/network/if-post-down.d/wpasupplicant
      Configuring interface eth0:1=eth0:1 (inet)
      run-parts --verbose /etc/network/if-down.d
      run-parts: executing /etc/network/if-down.d/avahi-autoipd
      RTNETLINK answers: No such process
      run-parts: executing /etc/network/if-down.d/wpasupplicant

      ifconfig eth0:1 down
      run-parts --verbose /etc/network/if-post-down.d
      run-parts: executing /etc/network/if-post-down.d/avahi-daemon
      run-parts: executing /etc/network/if-post-down.d/virtualbox-ose
      run-parts: executing /etc/network/if-post-down.d/wireless-tools
      run-parts: executing /etc/network/if-post-down.d/wpasupplicant

      ifup:

      Configuring interface eth0=eth0 (inet)
      run-parts --verbose /etc/network/if-pre-up.d
      run-parts: executing /etc/network/if-pre-up.d/dhclient3-apparmor
      run-parts: executing /etc/network/if-pre-up.d/virtualbox-ose
      run-parts: executing /etc/network/if-pre-up.d/wireless-tools
      run-parts: executing /etc/network/if-pre-up.d/wpasupplicant

      ifconfig eth0 10.166.8.211 netmask 255.0.0.0 up
      route add default gw 10.166.8.209 metric 100 eth0
      run-parts --verbose /etc/network/if-up.d
      run-parts: executing /etc/network/if-up.d/avahi-autoipd
      run-parts: executing /etc/network/if-up.d/avahi-daemon
      run-parts: executing /etc/network/if-up.d/mountnfs
      * if-up.d/mountnfs[eth0]: waiting for interface eth0:1 before doing NFS mounts
      run-parts: executing /etc/network/if-up.d/ntpdate
      run-parts: executing /etc/network/if-up.d/openssh-server
      run-parts: executing /etc/network/if-up.d/wpasupplicant
      Configuring interface eth0:1=eth0:1 (inet)
      run-parts --verbose /etc/network/if-pre-up.d
      run-parts: executing /etc/network/if-pre-up.d/dhclient3-apparmor
      run-parts: executing /etc/network/if-pre-up.d/virtualbox-ose
      run-parts: executing /etc/network/if-pre-up.d/wireless-tools
      run-parts: executing /etc/network/if-pre-up.d/wpasupplicant

      ifconfig eth0:1 192.168.2.3 netmask 255.255.255.0 up

      run-parts --verbose /etc/network/if-up.d
      run-parts: executing /etc/network/if-up.d/avahi-autoipd
      run-parts: executing /etc/network/if-up.d/avahi-daemon
      run-parts: executing /etc/network/if-up.d/mountnfs
      run-parts: executing /etc/network/if-up.d/ntpdate
      run-parts: executing /etc/network/if-up.d/openssh-server
      run-parts: executing /etc/network/if-up.d/wpasupplicant


      There is a long pause when the avahi-daemon runs for the eth0 interface. But other than that nothing remarkable.

      Comment


        #4
        Re: Puzzling problem with two network interfaces

        I've forgot to add the most infuriating thing, Windows does it correctly when booted, without needing to fiddle.

        Comment


          #5
          Re: Puzzling problem with two network interfaces

          I think the verbose output comes from restarting the network after boot and leads to a system that works. It would be interesting to see what is different at boot time. You can modify the /etc/init.d/networking script to use verbosity see what they do at boot time.

          Do you have any NFS mounts? In particular, is NFS involved in the TV watching?

          Comment


            #6
            Re: Puzzling problem with two network interfaces

            No, I neither I have any NFS mounts nor NFS is involved in TV watching. I'll hack the networking scripts and see what comes out from them at boot time.

            Comment


              #7
              Re: Puzzling problem with two network interfaces

              I've changed the /etc/init.d/networking script to invoke the ifup/down with the -v option, but I cannot see any messages in the logs. Perhaps I've not done it correctly, as I'm no expert in shell scripting.

              What I've noticed is that it's not necessary to restart the whole networking service. Just issuing a ifdown eth0:1 allows you to get any channel stream, not only the one that is being sent from the router to the TV decoder. Enabling eth0:1 again with ifup eth0:1 makes the second interface to appear and be usable without disturbing eth0

              I'm starting to suspect something related to vboxnetflt, if only because I don't remember this component installed in 8.10. However, I don't want to remove it and trying to uninstall the module with dkms has resulted on it being automatically installed at the next reboot. Is there a "safe" way of removing those modules?

              Comment


                #8
                [Almost - Solved] Puzzling problem with two network interfaces

                I don't understand much about network routing, but I've sort of fixed it in this way. This is my current /etc/network/interfaces

                auto lo

                iface lo inet loopback

                auto eth0

                iface eth0 inet static
                address 10.166.8.211
                netmask 255.255.255.0
                network 10.166.8.0
                broadcast 10.166.8.255
                gateway 10.166.8.209

                auto eth0:1

                iface eth0:1 inet static
                address 192.168.2.3
                netmask 255.255.255.0
                broadcast 192.168.2.255
                network 192.168.2.0


                I think that the problem is associated with the ability of the kernel to receive UDP broadcasts but I'm not sure if the problem is with my router as well. Anyway, with this configuration the eth0:1 interface is not up after booting, but simply including in /etc/rc.local the ifup eth0:1 makes it working.

                I still cannot find any error in the logs related to the eth0:1 interface not being able to be activated at boot time.

                Comment


                  #9
                  Re: Puzzling problem with two network interfaces

                  Interesting. It makes sense. There is a note about the virtual interface in
                  /usr/share/doc/ifupdown/examples/network-interfaces.gz
                  that you will find of interest.

                  Comment


                    #10
                    Re: Puzzling problem with two network interfaces

                    Do you refer to this part?
                    # A more complicated ethernet setup with a single ethernet card with
                    # two interfaces.
                    # Note: This happens to work since ifconfig handles it that way, not because
                    # ifup/down handles the ':' any differently.
                    # Warning: There is a known bug if you do this, since the state will not
                    # be properly defined if you try to 'ifdown eth0' when both interfaces
                    # are up. The ifconfig program will not remove eth0 but it will be
                    # removed from the interfaces state so you will see it up until you execute:
                    # 'ifdown eth0:1 ; ifup eth0; ifdown eth0'
                    # BTW, this is "bug" #193679 (it's not really a bug, it's more of a
                    # limitation)
                    I frankly don't understand what says there, much less how it relates to my problem. It happens when the ifup for both interfaces is executed at boot time, and the bug is about not being downed in the right order. Are you referring to other parts of the example perhaps?

                    Comment


                      #11
                      Re: Puzzling problem with two network interfaces

                      It does not apply to your boot problem , probably, but it does apply to your ability to reconfigure your networks with ifupdown.

                      Comment

                      Working...
                      X