Announcement

Collapse
No announcement yet.

Getting two network cards to work

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

    Getting two network cards to work

    I have two nics on my motherboard. One is connected to the home network, the other is for Internet. So far, I have to disable one when I want to connect to the other. Is there a way of getting the two to work together rather than manually disabling each other? I know under windows I can just remove the DNS server and the conventional way before Lucid doesn't seem to work. Network manager doesn't even allow you to set one as default for internet connection. Any ideas?
    Challenges are what that keeps us from the borderline of boredom in life's journey. Linux user no. 419401 currently running Kubuntu 24.04
    _______________________________________________
    Current System: Beelink Mini PC, AMD Ryzen 7 5800H 8 Core(Up to 4.4GHz), 32GB DDR4 RAM 1TB NVME M.2 SSD, SER5 MAX Mini Desktop Computer with TCL BeyondTV5 serving as my monitor. ​

    #2
    Re: Getting two network cards to work

    First, install wicd and remove knm:

    sudo apt-get install wicd (which gets wicd BEFORE you tear down you wireless connection)
    sudo apt-get remove network-manager-kde
    configure wicd (but don't try to connect, it won't until the autoremove step below)
    reboot
    sudo apt-get autoremove

    Then, use wicd to setup your Internet connection, and use the information found in chapter 25.7 and 28 of rute.pdf to configure your LAN. Google for rute.pdf and you'll find dozens of locations from which you can freely download it (or the html version).
    "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
    – John F. Kennedy, February 26, 1962.

    Comment


      #3
      Re: Getting two network cards to work

      I don't have a wireless card, it's 2 gigabyte WIRED nics on my gigabyte motherboard, would that same still apply?
      Challenges are what that keeps us from the borderline of boredom in life's journey. Linux user no. 419401 currently running Kubuntu 24.04
      _______________________________________________
      Current System: Beelink Mini PC, AMD Ryzen 7 5800H 8 Core(Up to 4.4GHz), 32GB DDR4 RAM 1TB NVME M.2 SSD, SER5 MAX Mini Desktop Computer with TCL BeyondTV5 serving as my monitor. ​

      Comment


        #4
        Re: Getting two network cards to work

        What exactly are your connection needs and exact current setup? It appears you have 1 nic attached to a modem and 1 to a router? Give us some more detail.

        There are various ways to use dual NIC's - you can attach both to your network and "bond" them or use them in the way you are now. The advantage to your current setup is the other computers do not have internet access thus are more secure. The dis-advantage is if you're using your PC as the gateway then it must be up for the others to access the internet.

        IMO you're better off doing this manually without and network manager at all - knetworkmanager is useless enough to be alpha version (again - just my opinion). Remove all your knetworkmanager stuff as suggested and skip the wicd install.

        You'll need to connect to the internet manually so before you remove network manager - copy the contents of /etc/resolv.conf because the unfriendly knetworkmanager will delete it when it's un-installed. Keep your liveCD handy in case you can't get back on line and need an alternate way to do so.

        Your network cards are setup in /etc/network/interfaces which right now is likely rather sparse. It should look like:
        Code:
        # This file describes the network interfaces available on your system
        # and how to activate them. For more information, see interfaces(5).
        
        # The loopback network interface
        auto lo
        iface lo inet loopback
        
        # The primary network interface
        auto eth0
        iface eth0 inet dhcp
        
        # The secondary network interface
        auto eth1
        iface eth1 inet dhcp
        This should bring up both NIC's with unique IP's.

        /etc/resolv.conf contains DNS nameserver information.


        Once you've cleared knetworkmanager off - restart your network and look at your default settings.
        Here are some commands you'll need in a terminal (commands in bold. comments in ital):

        sudo service networking restart restarts network without a reboot, also stop and start can be used

        ifup eth0 brings eth0 up using the default setting from the interfaces file


        If you restart your network and are not on-line. Report the contents of /etc/resolv.conf and /etc/network/interfaces and the results of these terminal commands: ifconfig and route

        Please Read Me

        Comment


          #5
          Re: Getting two network cards to work

          Thanks for the information, let explain what my current setup is, and what is what I want.

          I have one nic, eth1 connected to my DSL modem which I access the internet with.

          Nic two, eth0 is connected to a modem which serves the rest of the pcs on the home network that I do not want connected to the internet, so, no, I'm not looking to setup ICS or a gateway.

          I want both cards to work at the same time as my home media center runs on that network. Right now, I can only access either the home network or the internet by bring up one and turn off the other via the command prompt. Hope I'm being clear here.

          I am used to just removing the DNS server under Windows for the router running the home network, but seeing I no longer run that OS, I want to find a flawless way to do it without manually bring up and turning off either of the cards to enjoy simultaneous use of the two nics and networks.
          Challenges are what that keeps us from the borderline of boredom in life's journey. Linux user no. 419401 currently running Kubuntu 24.04
          _______________________________________________
          Current System: Beelink Mini PC, AMD Ryzen 7 5800H 8 Core(Up to 4.4GHz), 32GB DDR4 RAM 1TB NVME M.2 SSD, SER5 MAX Mini Desktop Computer with TCL BeyondTV5 serving as my monitor. ​

          Comment


            #6
            Re: Getting two network cards to work

            Originally posted by Princey
            ....
            I have one nic, eth1 connected to my DSL modem which I access the internet with.

            Nic two, eth0 is connected to a modem which serves the rest of the pcs on the home network that I do not want connected to the internet, so, no, I'm not looking to setup ICS or a gateway.

            I want both cards to work at the same time as my home media center runs on that network.
            ....
            Is that really a modem that eth0 is connected to, or an router (active or passive)?

            If it is a modem then which ever nic card is activated last will determine what is in /etc/resolv.conf and the router table as well. I suspect you will have to configure your network manually. To that end here is some interesting information:
            http://www.aboutdebian.com/network.htm

            Here is another good site: http://www.linuxhomenetworking.com/w...he_DHCP_Server

            In fact, there are LOTS of howto's and resources for setting up Debian based networks:
            http://lmgtfy.com/?q=debian+home+network+howto
            "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
            – John F. Kennedy, February 26, 1962.

            Comment


              #7
              Re: Getting two network cards to work

              eth0 is connected to a linksys wired router, eth1 is connected to a DLINK wireless router that's in turn connected to my DSL router. I'll check that link out. Thanks.
              Challenges are what that keeps us from the borderline of boredom in life's journey. Linux user no. 419401 currently running Kubuntu 24.04
              _______________________________________________
              Current System: Beelink Mini PC, AMD Ryzen 7 5800H 8 Core(Up to 4.4GHz), 32GB DDR4 RAM 1TB NVME M.2 SSD, SER5 MAX Mini Desktop Computer with TCL BeyondTV5 serving as my monitor. ​

              Comment


                #8
                Re: Getting two network cards to work

                Originally posted by Princey
                eth0 is connected to a linksys wired router, eth1 is connected to a DLINK wireless router that's in turn connected to my DSL router. I'll check that link out. Thanks.
                Why not just plug them all into the same router and disable internet access on the router for the machines you don't want on teh intrawebz?
                we see things not as they are, but as we are.
                -- anais nin

                Comment


                  #9
                  Re: Getting two network cards to work

                  I can't. Both because of distance and other purposes which I rather not go in to here. Before I made the complete migration to Linux, I ran everything fine under Windows. When I transferred across, I was able to do just fine using Wireless. But since I purchased this new rig, I bought the mobo with 2 nics to make it simpler, I'd think as I don't want to use my laptop all the while.
                  Challenges are what that keeps us from the borderline of boredom in life's journey. Linux user no. 419401 currently running Kubuntu 24.04
                  _______________________________________________
                  Current System: Beelink Mini PC, AMD Ryzen 7 5800H 8 Core(Up to 4.4GHz), 32GB DDR4 RAM 1TB NVME M.2 SSD, SER5 MAX Mini Desktop Computer with TCL BeyondTV5 serving as my monitor. ​

                  Comment


                    #10
                    Re: Getting two network cards to work

                    Using your /etc/network/interfaces file:

                    # The primary network interface
                    auto eth0
                    iface eth0 inet dhcp
                    gateway 192.168.1.1
                    netmask 255.255.255.0

                    # The secondary network interface
                    auto eth1
                    iface eth1 inet dhcp
                    gateway 76.24.107.100
                    netmask 255.255.255.0


                    or something like that...

                    You can test this or try bring them both up at the command line. You might want to use static IP on your network.

                    You'll probably have to set routes for each interface too but that's not too hard either.

                    In your interfaces file:

                    up route add -net 192.168.2.0 netmask 255.255.255.0 gw 192.168.2.1
                    down route del -net 192.168.2.0 netmask 255.255.255.0 gw 192.168.2.1

                    just examples...

                    Please Read Me

                    Comment


                      #11
                      Re: Getting two network cards to work

                      Thanks guys, I think I got it to work. What I did was to set the one on the home network to static, remove the DNS and that solved the issues.
                      Challenges are what that keeps us from the borderline of boredom in life's journey. Linux user no. 419401 currently running Kubuntu 24.04
                      _______________________________________________
                      Current System: Beelink Mini PC, AMD Ryzen 7 5800H 8 Core(Up to 4.4GHz), 32GB DDR4 RAM 1TB NVME M.2 SSD, SER5 MAX Mini Desktop Computer with TCL BeyondTV5 serving as my monitor. ​

                      Comment

                      Working...
                      X