Author Topic: Switching from 1 network card to 2  (Read 8034 times)

cckrobinson

  • Veteran
  • ***
  • Posts: 124
    • View Profile
Switching from 1 network card to 2
« on: July 04, 2007, 04:13:38 am »
I'm currently using an onboard network adapter, but I'd like to add an additional gigabit NIC.  I want to have the onboard card configured for the external network (192.168.2.xx).  It will connect directly to my cable modem and optain an IP from my ISP.  The gigabit card will connect to a gigabit switch on the internal network and will have an IP of 192.168.80.xx.

I've installed the gigabit NIC and Linux detects it as eth1.  My question is, how do I get LinuxMCE to detect the new card?  Is there a network setup wizard or something that I can run?  Or do I need to manually configure /etc/network/interfaces?


pixelator

  • Veteran
  • ***
  • Posts: 70
    • View Profile
Re: Switching from 1 network card to 2
« Reply #1 on: July 04, 2007, 06:03:20 am »
If you log into the Pluto-admin pages, you should be able to configure the IPs for the nics on the network pages.

Advanced > network > network settings

cckrobinson

  • Veteran
  • ***
  • Posts: 124
    • View Profile
Re: Switching from 1 network card to 2
« Reply #2 on: July 04, 2007, 06:18:34 am »
The problem is that eth1 isn't listed under Advanced->Network->Network settings.  It says:

Number of network adapters: 2

But it only allows me to configure eth0 and eth0:0.

sharlee_angelo

  • Guru
  • ****
  • Posts: 316
    • View Profile
Re: Switching from 1 network card to 2
« Reply #3 on: July 04, 2007, 09:39:09 am »
a possible solution can be deleting eth0:0 and configuring eth1 with the desired ip.
Read the F****** Logs!!!

cckrobinson

  • Veteran
  • ***
  • Posts: 124
    • View Profile
Re: Switching from 1 network card to 2
« Reply #4 on: July 05, 2007, 02:53:52 am »
Can someone with a working 2 network card configuration post the contents of their /etc/network/interfaces file?  I can't get this to work for the life of me.  Here's what I've tried.

I currently have working eth0, eth0:0 devices.  eth0 is assigned 192.168.2.137 and the alias eth0:0 is assigned 192.168.80.1.  The other PC's on my networks get dynamic IP from the router in the 192.168.80.130-255 range.  That works fine.

I added a 2nd network card that comes up as eth1 in Kubuntu.  I tried replacing each instance of eth0:0 with eth1 in the /etc/network/interfaces file but that doesn't seem to work.

#ifdown eth0
#vi /etc/network/interfaces ->replace eth0:0 with eth1
#ifup eth0
#ifup eth1

On the surface this seems liked it worked.  If I do an ifconfig I see eth0 with IP address 192.168.2.137 and eth1 with 192.168.80.1. The problem is that I can't access the internet from the router box and the other PC's on the network don't get dynamic IPs.  Here what my network topography looks like:

Cable Modem -> Router's onboard NIC#1 (eth0)
Gigabit Switch -> Router's Gigabit NIC#2 (eth1)
                    -> Laptop (wired connection)
                    -> VOIP modem (wired connection)
                    -> Wireless Access Point (connected to switch via the internet port on the WAP. I have DHCP disabled and assigned the WAP a static IP of 192.168.80.129)

I'm not using any ethernet crossover cables.  Any help would be greatly appreciated.



Zaerc

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 2256
  • Department of Redundancy Department.
    • View Profile
Re: Switching from 1 network card to 2
« Reply #5 on: July 05, 2007, 04:22:47 am »
Here's my /etc/network/interfaces, I hope it helps.

Code: [Select]
auto lo
        iface lo inet loopback

auto eth0
iface eth0 inet static
        address 192.168.0.104
        netmask 255.255.255.0
        gateway 192.168.0.1
auto eth1
iface eth1 inet static
        address 192.168.80.1
        netmask 255.255.255.0 eth0

"Change is inevitable. Progress is optional."
-- Anonymous


cckrobinson

  • Veteran
  • ***
  • Posts: 124
    • View Profile
Re: Switching from 1 network card to 2
« Reply #6 on: July 05, 2007, 06:03:38 am »
Thanks for posting that.  It got me a little bit closer, but I'm still not there.  Using your settings, the PCs on the internal network can now obtain an IP address, but they still can't access the internet.  The main DCERouter PC can't access the internet either.

Can you also post the output of the following command:
#route -n

I'm not sure if I need to modify my routing table as well, or if modifying /etc/network/interfaces should be enough.
Thanks again. 
« Last Edit: July 05, 2007, 07:31:59 am by cckrobinson »

Zaerc

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 2256
  • Department of Redundancy Department.
    • View Profile
Re: Switching from 1 network card to 2
« Reply #7 on: July 05, 2007, 08:46:59 pm »
Sure, hardly any trouble at all with LMCE.  No idea where this '169.254.0.0' network came from tho, I doubt it's really needed.

Code: [Select]
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.80.0    0.0.0.0         255.255.255.0   U     0      0        0 eth1
192.168.0.0   0.0.0.0         255.255.255.0   U     0      0        0 eth0
169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0        0 eth0
0.0.0.0         192.168.255.1   0.0.0.0         UG    0      0        0 eth0
"Change is inevitable. Progress is optional."
-- Anonymous


1audio

  • Addicted
  • *
  • Posts: 552
    • View Profile
Re: Switching from 1 network card to 2
« Reply #8 on: July 06, 2007, 05:57:49 pm »
LMCE seems to have three places to edit the network info (Kubuntu - settings, LMCE start panel config files editor and in the admin panel under advanced- network). I have had the most success changing the settings from the admin panel, it seems to do the network restart better for some reason. However rebooting may be necessary for a change like yours. I spent a couple of hours figuring how which port was which on a new install and DHCP  only took effect after I rebooted. I did try from the admin panel but discovered that the commands aren't all loaded by default. And with no internet connectivity until the problem was sorted out I had to use the internal tools.

cckrobinson

  • Veteran
  • ***
  • Posts: 124
    • View Profile
Re: Switching from 1 network card to 2
« Reply #9 on: July 08, 2007, 12:41:47 am »
I can't get on the internet when I connect the cable modem to eth0 directly.  It only works if I connect the cable modem to the routers WAN port and then connect eth0 to the router.  I shouldn't need the router in the loop but I do.  For now I've reverted back to a single card configuration.  I don't think I can tolerate spending another minute debugging this.  The netx time I get brave I'll try making changes through the admin panel.  I've been manually modifying the \network\interfaces file and bringing down networking manually.


1audio

  • Addicted
  • *
  • Posts: 552
    • View Profile
Re: Switching from 1 network card to 2
« Reply #10 on: July 08, 2007, 06:51:57 am »
I find using the external router for a firewall is easier for me (and works in my installation better than trying to move the cable modem next to the core). Also there is a lot of talk about keeping the firewall away from everything else, its considered a security risk by the paranoid. The only challenge is managing the ports for VOIP. However thats manageable. Adding a Gig card makes sense for throughput and you could just disable the onboard NIC in the bios.

cckrobinson

  • Veteran
  • ***
  • Posts: 124
    • View Profile
Re: Switching from 1 network card to 2
« Reply #11 on: July 29, 2007, 05:54:14 am »
I was able to get the dual network card configuration working with RC1.  During the installation, both cards were detected.  It configured one for an external connection and the gigabit card for the internal network.  I ended up needed to use DHCP on external NIC or I couldn't get on the internet.  I would prefer to have a static IP, but I can live with it.

Here's what my final setup looks like:

Cable Modem->Eth0 (192.168.2.xxx)

Eth1 (192.168.80.xxx) ->Gigabit switch ->Wireless Access Point->Laptop
                              ->Laptop
                              ->VOIP modem
                              ->HDHomeRun

With this setup I was able to eliminate my router completely since LMCE is acting as the firewall.