Author Topic: single to doudle nic!!  (Read 2304 times)

dcubox1

  • Veteran
  • ***
  • Posts: 130
    • View Profile
single to doudle nic!!
« on: April 26, 2010, 08:17:31 pm »
OK so im going crazy trying to move from a single to double NIc on my hybrid.
I have read numerous posts and followed the "updated" wiki instructions.
However I have had no success so far and im getting tired of trying things!

Here is what my admin page says under Advanced>NEtwork Settings

Code: [Select]
EXTERNAL_IFACE  eth1
EXTERNAL_MAC 00:10:
EXTERNAL_IP
EXTERNAL_NETMASK
EXTERNAL_DHCP 1
INTERNAL_IFACE eth0
INTERNAL_MAC 00:24:21:04
INTERNAL_IP 192.168.80.1
INTERNAL_NETMASK 255.255.255.0
GATEWAY 0.0.0.0
DNS1 192.168.0.254
DNS2 192.168.0.254

From reading posts im guessing the nics are mixed up??
Also how do i set the second NIC to have a mac address as it looks wrong!!

Thanks all

pw44

  • Addicted
  • *
  • Posts: 653
    • View Profile
Re: single to doudle nic!!
« Reply #1 on: April 26, 2010, 08:33:15 pm »
Hi,
make /etc/network/interfaces read like:
Code: [Select]
auto lo
        iface lo inet loopback
auto eth0
iface eth0 inet dhcp
auto eth1
iface eth1 inet static
        address 192.168.80.1
        netmask 255.255.255.0
so eth0 will pick it's address from the outside dhcp server (dsl modem/router), cable provider, etc...

Code: [Select]
sudo /etc/init.d/networking restart
sudo /etc/init.d/dhcp3-server restart
if the nic are changed (i.e eth0 inside and eth1 outside), go to /etc/udev/rules.d/70-persistent-net.rules and change eth1 by eth0 and eth0 by eth1.
in case of doubt, after all, reboot the computer.
Give me a feedback if it worked or not and i will help you to get it working.
« Last Edit: April 28, 2010, 10:42:19 pm by pw44 »

dcubox1

  • Veteran
  • ***
  • Posts: 130
    • View Profile
Re: single to doudle nic!!
« Reply #2 on: April 26, 2010, 09:04:23 pm »
ok so i changed my /etc/network/interfaces file to read as you said......

from reading other posts should i have a /etc/iftab file where i can set the mac address of the NIC's??

Thanks for your great help pw44 hopefully once my hybrid restarts now I will have it sorted!!
I will keep you posted...

pw44

  • Addicted
  • *
  • Posts: 653
    • View Profile
Re: single to doudle nic!!
« Reply #3 on: April 26, 2010, 09:11:22 pm »
/etc/iftab? I don't have it on my system.... and never used it. I don't think you need it.
The best way to assign the MAC to the eth? is the udev persistent rules, and that's what i did here (because of the changing of nics - the internal was assigned to eth0 and extenal to eth1)
« Last Edit: April 26, 2010, 11:26:59 pm by pw44 »

dcubox1

  • Veteran
  • ***
  • Posts: 130
    • View Profile
Re: single to doudle nic!!
« Reply #4 on: April 26, 2010, 10:04:43 pm »
Ok thats good news cos I dont have that file either!!!

So im after utterly confusing myself!! how do I start from scratch and setup the NIC's and routers?

I have the external router setup to connect to the eth0 with DHCP turned off,
then I connect the internal router to eth1 and have wireless and DHCP turned on correct!!!

Am i best to setup LinuxMCE from scratch as I dont seem to be having any luck :(

thanks for the persistant help pw44

pw44

  • Addicted
  • *
  • Posts: 653
    • View Profile
Re: single to doudle nic!!
« Reply #5 on: April 26, 2010, 11:26:11 pm »
There are 2 dhcp servers:
1) one for your external network
2) one for your internal network
For the external network, it's up to you if you will have the dhcp server or not. If it's disabled, you can set a static address for you external nic.
For this, change the /etc/network/interfaces to read like:
Code: [Select]
auto lo
        iface lo inet loopback
auto eth0
iface eth0 inet static
        address 192.168.0.160  
        netmask 255.255.255.0
auto eth1
iface eth1 inet static
        address 192.168.80.1
        netmask 255.255.255.0
192.168.0.160 is an example only. use the one you like, but it must match your external subnet.
Or you can enable the external dhcp server and let the external nic get the address given by the dhcp server.
There is no conflict between the external and the internal dhcp servers.
On my setup i do have an external router with dhcp enabled (eth0 gets it's ip from it) and on the internal network i do have also a wireless access point, but for this, the dhcp is disabled, so any wireless device gets it's ip from the linuxmce dhcp server.
I think there is no need to setup from scratch. Just some adjusts on the network configuration (linux).
« Last Edit: April 27, 2010, 03:14:18 pm by pw44 »

dcubox1

  • Veteran
  • ***
  • Posts: 130
    • View Profile
Re: single to doudle nic!!
« Reply #6 on: April 27, 2010, 07:51:10 pm »
Ok so I am nearly there,
I now have internet on my core  ;) using eth0
and DCHP turned on.....

Im now having an issue with getting my internal network to have internet access!!!
I think this is a gateway issue possible...
Can anyone help me out, the family aint too happy with all my  "messin" about with the network!!
If you need any screenshots or logs just let me know...
Thanks again

P.S. Should I disable DCHP on the internal router???
« Last Edit: April 27, 2010, 07:54:07 pm by dcubox1 »

pw44

  • Addicted
  • *
  • Posts: 653
    • View Profile
Re: single to doudle nic!!
« Reply #7 on: April 27, 2010, 08:50:13 pm »
Well, so we got some progress.
Yes, you should disable the internal network router's dhcp and let lmce take care of it.
Try following:
If you have a hub, try plugging it to the internal network nic (eth1). Plug any device to it and see if you can accesse the internet from it.
If it does, then lmce is routing from the internal to the external network and your problem is the internal router configuration.
To verify if the routing capability is enabled, do:
Code: [Select]
sudo cat /proc/sys/net/ipv4/ip_forward
if the return is 1, the routing capability is enabled.
if the return is 0, than do:
Code: [Select]
sudo echo 1 > /proc/sys/net/ipv4/ip_forward
and test if you get access to the internet from the inside network.

BTW,  the ip forward is enabled in the /usr/pluto/bin/Network_Firewall.sh, by the command echo 1 >/proc/sys/net/ipv4/ip_forward
Check it.

Please report so i can keep helping you.
« Last Edit: April 27, 2010, 08:53:30 pm by pw44 »

dcubox1

  • Veteran
  • ***
  • Posts: 130
    • View Profile
Re: single to doudle nic!!
« Reply #8 on: April 27, 2010, 10:19:54 pm »
Ok so I ran the command and it was already set to 1...
I disabled DCHP on the internal router and rebooted the router...

Still no internal internet :(

I have attached a snapshot of my admin page, maybe this is the issue??

Thanks for the great assistance pw44 we are getting there......slowly

pw44

  • Addicted
  • *
  • Posts: 653
    • View Profile
Re: single to doudle nic!!
« Reply #9 on: April 27, 2010, 10:29:55 pm »
internal network: 192.168.80.0 - you have it set to 192.168.1.0, and it will not work.
Your eth1 shall have the address of 192.168.80.1, and your internal network must use the same range.
Change the eth1 address to 192.168.80.1 (i think you /etc/network/interfaces has it, if you followed the settings i posted previously).
Go to webadmin -> advanced -> network settings and change the 192.168.1 to 192.168.80.
So, make external network 192.168.0.0 or 192.168.1.0 or any other (defined by your external dhcp server), but define the internal as 192.168.80.0.
Internal and external networks are in different networks.
Reboot and see if it works.

« Last Edit: April 27, 2010, 10:43:04 pm by pw44 »

dcubox1

  • Veteran
  • ***
  • Posts: 130
    • View Profile
Re: single to doudle nic!!
« Reply #10 on: April 27, 2010, 11:05:28 pm »
Ok getting more results, windows 7 pc connected wirelessly to the internal network says i have internet access but i cant load a page!!

So close but still something small missing, here is my network settings as of now:
Thanks again for the excellent advice pw44

pw44

  • Addicted
  • *
  • Posts: 653
    • View Profile
Re: single to doudle nic!!
« Reply #11 on: April 27, 2010, 11:24:00 pm »
on one of the windows pcs, open terminal (command) and try tracert and ping to wiki.linuxmce.org.
Code: [Select]
tracert wiki.linuxmce.org
ping wiki.linuxmce.org
See if it works. If it works, that's a good signal.
Also do and terminal on windows (command)
Code: [Select]
ipconfig /all
Take note of ip address, netmask, dns, gateway...
Also
On your core, open a terminal and do:
Code: [Select]
sudo netstat -rn
Must produce something like:
Code: [Select]
sudo netstat -rn
Kernel IP routing table
Destination     Gateway          Genmask           Flags   MSS Window  irtt 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         0 0          0 eth0
239.0.0.0         0.0.0.0           255.0.0.0            U         0 0          0 eth1
0.0.0.0            192.168.0.1     0.0.0.0              UG        0 0          0 eth0
Do you have any proxy enabled on your windows pcs and ae they getting the ips from the lmce dhcp server (192.168.80.130, i.e)?





dcubox1

  • Veteran
  • ***
  • Posts: 130
    • View Profile
Re: single to doudle nic!!
« Reply #12 on: April 27, 2010, 11:41:00 pm »
tracert and ping both returned nothing :(

do not have any proxy setup on the windows pcs...
i have tried 3 diff windows netbooks and all show the same issues :(

Result for netstat:
Code: [Select]
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
192.168.80.0    0.0.0.0         255.255.255.0   U         0 0          0 eth1
192.168.1.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         0 0          0 eth0
239.0.0.0       0.0.0.0         255.0.0.0       U         0 0          0 eth1
0.0.0.0         192.168.1.254   0.0.0.0         UG        0 0          0 eth0

The one thing that is very strange is when I do ipconfig /all (on one of the windows netbooks)
the ip address is 169.254.9.59 and the default gateway is blank??????
this looks like the issue ya??


« Last Edit: April 28, 2010, 12:01:20 am by dcubox1 »

pw44

  • Addicted
  • *
  • Posts: 653
    • View Profile
Re: single to doudle nic!!
« Reply #13 on: April 28, 2010, 12:01:21 am »
Quote
the ip address is 169.254.9.59 and the default gateway is blank?Huh??
this looks like the issue ya??
Yeah.. it's an issue. Should be 192.168.80.something and with gateway 192.168.80.1.
So, please, get a hub, a switch (wired), and plug it on eth1 (internal network), plug one of the pcs on it and see if it works.
If it works, your problem is in your internal networks router (maybe you need to reconfigure it or reset to factory defaults). What is the internal router you are using (brand and model)? does it have a wan port?

We are almost there.

dcubox1

  • Veteran
  • ***
  • Posts: 130
    • View Profile
Re: single to doudle nic!!
« Reply #14 on: April 28, 2010, 12:21:55 am »
Ok ill have a look at the router...

it is a standard router supplied by Eircom(ISP) and the brand is Netopia I believe....

It has an option to enable one of the Ethernet Ports as the WAN which is what I have done and connected an ethernet cable from eth1 to the Wan port.

I will report my results once I can.

You have been a great help pw44, thanks so much