Author Topic: DHCP server on both NICs  (Read 4557 times)

jimmejames

  • Guru
  • ****
  • Posts: 183
    • View Profile
DHCP server on both NICs
« on: August 11, 2008, 05:38:30 pm »
I just got an Asus M3A78-EM (will update wiki shortly), but am having problems with what seems to be the feeding of ip address on both NICs. 

The board has an integrated NIC and I added a second pci based NIC.  I wanted the onboard NIC to be on the internal network (it is gigabit to fit my gigabit switches) and the pci NIC to be on the external network.  BTW- I have a linksys router that I use to split the internet connection just after a cable modem- my core feeds directly off this router and my GF's computer as well so that she receives a .1.xx address and the other computer receive a .80.xx from the core.

The problem:  I ipconfig /renew her XP based machine and received a .80.xx address AND on the other internal network I was able to PXE boot a media director.  That is to say that LMCE was acting as a dhcp server and feeding my GF's computer through the linksys router and it was feeding ip addresses through the external network.

Now, what I really don't understand was that when the media direct was booting from the network I happened to mention that it was given the ip address .1.102 and the default gateway was .1.1.  It seems that the core was feeding .80.xx on the external network and was allowing the router to pass ip's through the core to feed the media director, but the media director was still receiving the PXE information.

With that all said and done, I figured I just had the wires on the core flipped- so I manually changed them (instead of using the admin configuration).  Now, the media director doesn't receive the PXE signal and the core can't get online.  I looked at the MAC addresses physically stamped on the cards, compared them with the network configuration in the admin pages, and found that I had the wiring correct the first time.

This is an AMD 64bit installation.  Has anyone else seen a similar scenario?

Thanks

jimmejames

  • Guru
  • ****
  • Posts: 183
    • View Profile
Re: DHCP server on both NICs
« Reply #1 on: August 12, 2008, 05:16:41 am »
OK-

So forget the previous and let's start slow.  How do I tell if my nic is supported by Linux/Kubuntu/LinuxMCE?  I am not able to receive ip addresses from a DHCP server and I am not able to act as a DHCP server on that nic.  LinuxMCE does, however, find the mac address of the NIC.

Does this mean it is supported?

BTW- this would be an excellent (fairly cheap) core.  It's an AM2+ motherboard that supports a lot.  It has a hdmi port and digital audio (will add to wiki, but want to get the nic card sorted).

Thanks

rodercot

  • Guest
Re: DHCP server on both NICs
« Reply #2 on: August 12, 2008, 02:32:41 pm »
So on the CORE. Forget the MD for now. Can you get to the webadmin page? advanced - newtork to see what your nics are set to currently.
 
 barring that on the core itself - ctl-alt-f2 and login then run

 ethtool eth0 and tell us what it says then you can also run ethtool -i eth0 and tell us what driver it is using. Your netwrok card is working somewhat or you would not have gotten this far. (but which one?)

 you should also check ethtool eth1 and see what is says and make sure the two are not reversed.

 but tell us what the network settings say first in the webadmin.

 regards,

 Dave

slapshot

  • Regular Poster
  • **
  • Posts: 18
    • View Profile
Re: DHCP server on both NICs
« Reply #3 on: August 12, 2008, 05:06:19 pm »
I don't mean to hijack this thread, but I am experiencing similar network problems as well. Basically, my network is like this:

Cable Modem --> Vonage VOiP router (DHCP enabled) ---> (eth1) Core/Hybrid (eth0) -->Linksys WPG54GS (w/ DHCP disabled) --> Wireless Laptops

I used the ethtool and I am only getting results for eth1. Eth1 appears to be working fine, and it is using the driver forcedeth ver 0.60. I am getting my pictures from Flick and I can surf the web on the core/hybrid.
For ethtool eth0, I am getting "no data available", for ethtool -i eth0, it is using the driver tulip ver 1.1.15. Also, I can connect to the wireless router, but I have no access to the internet.

Any help is appreciated,

John
Core/Hybrid:
Asus M2NPV-VM w/ AMD Athlon 64 x2 4600+
2 GB Ram, 40 GB Quantum Fireball HDD
WinTV PVR-150 Tuner
Philips 42" Plasma Television
Wiimote

rodercot

  • Guest
Re: DHCP server on both NICs
« Reply #4 on: August 12, 2008, 05:21:02 pm »
John,

 What is the ip address of the eth1 being given. I really think you have things in weird order.

 I think your VOIP should be on the internal LAN. I am not sure about this as I have not got that far on my setup yet.

 my flowchart is like so.

 ASDL - D-link DR-655 wired to core a 192.168.1.1 gateway and an ip address of 192.168.1.100 supplied by this router. (DHCP Enabled for feeding wireless to the laptop on the external lan @ 192.168.1.197) Then my eth0 sees 192.168.1.100 for external lan and 192.168.80.1 for eth1 or internal lan.

 rgds,

 Dave

slapshot

  • Regular Poster
  • **
  • Posts: 18
    • View Profile
Re: DHCP server on both NICs
« Reply #5 on: August 12, 2008, 05:51:38 pm »
Dave,
   The reason the Vonage VOiP router is outside the LMCE network is because I have been using Vonage since 2005 and have one of the first generation routers. Believe me, if it is not the first device attached to the cable modem, then I loose my phone service. I don't know why, I just accept it and move on as best I can.
My IP Addresses are as follows:
eth0: 192.168.1.99 (Set up in Pluto Admin)
eth1: 192.168.15.150 (Assigned by the Vonage VOiP router)
      Near as I can tell, nothing connected inside the Core/Hybrid can get out to the internet. Is there a setting that I am missing?

~John
Core/Hybrid:
Asus M2NPV-VM w/ AMD Athlon 64 x2 4600+
2 GB Ram, 40 GB Quantum Fireball HDD
WinTV PVR-150 Tuner
Philips 42" Plasma Television
Wiimote

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5499
  • DOES work for LinuxMCE.
    • View Profile
Re: DHCP server on both NICs
« Reply #6 on: August 12, 2008, 06:37:09 pm »
Ditch Vonage, get Broadvoice, and let LinuxMCE manage your phones. You'll be glad you did.

-Thom

jimmejames

  • Guru
  • ****
  • Posts: 183
    • View Profile
Re: DHCP server on both NICs
« Reply #7 on: August 12, 2008, 06:37:34 pm »
Dave-

When I get home, I will run those commands and post what I find.  ASUS ships this MB with linux drivers and a readme on how to install.  I installed the driver:

1) tar vjxf r81...
2) make clean modules
3) make
4) make install
5) depmod -a
6) insmod ./src/r8168.ko
7) lsmod | grep r8168  (at this point the driver showed up on the next line).
8) ifconfig -a (this showed, as before, the eth0 and eth1 with mac addresses and what not, but it's still not up).


John-

My setup is:
Cable Modem --> Linksys WRT54G (DHCP enabled) ---> (eth1) Core/Hybrid (eth0) --> Media Directors
                                       |_________________----> GF's computer

The eth1 and Candice's get .1.xx address and eth0 is supposed to deliver .80.xx.  What's odd is that in the above setup, Candice's computer was getting 192.168.80.253 and the media directors were not receiving a signal.  Plus, my GF's could hit the core (.80.1) but not the internet and the core could hit the internet.  Firewall disabled.

Are you running the AMD 64bit version? 

Thanks,
James

slapshot

  • Regular Poster
  • **
  • Posts: 18
    • View Profile
Re: DHCP server on both NICs
« Reply #8 on: August 12, 2008, 08:08:33 pm »
James,
     Yup, I am running the 64 bit version. It looks like maybe you have eth0 and eth1 mixed up if your GF's laptop is pulling that IP. Did you go into the WebAdmin and click on the "swap adapters" in the Network Settings window? I have been contemplating on just loading the i386 version, for some reason it seems more stable.

Thom,
     I am hesitant to ditch Vonage until I get my networking issues squared away. I have looked at Broadvoice and I looks comparable to what I have now with Vonage, but that will come down the road when I get just the basic set up done. What I would like to do is to blow out the OS on the WRT54GS and install DDWRT on it, I have heard it is a lot more stable and you can tweak the settings for it to work better. Unfortunately my router is a v. 5 and not capable of handling the install (it's too large).

~John
Core/Hybrid:
Asus M2NPV-VM w/ AMD Athlon 64 x2 4600+
2 GB Ram, 40 GB Quantum Fireball HDD
WinTV PVR-150 Tuner
Philips 42" Plasma Television
Wiimote

rodercot

  • Guest
Re: DHCP server on both NICs
« Reply #9 on: August 12, 2008, 09:09:27 pm »

 It looks like neither of your Ip's are in the right group. to be honest I get confused, but the easiest is eth0 should be external and the core should be receving a DHCP address from your exsting lan (192.168.0 or 1. 100-however many clients you have allowed) Then the Gateway and DNS address should propogate to the core on eth0 and eth1 should be the core's internal address of 192.168.80.1.

 You guys have etho and eth1 reversed in both instances. James - It looks like you installed the driver OK. What kernel is that driver for or did it rebuild yours on the system. I can tell that not all drivers work as they say they will, I have tried the marvell driver which replaces the sky.c driver with the sklin98 driver and it made my problems worse and that is supposed to be the driver for the chip I was using.

 John 192.168.15.??? I am not sure. Thom is right - that thing is causing you grief. I am not sure how that thing works, BUT are your phones on a subnet supplied by this router different from what your internet would be.

 I would not be trying to setup any MD until you get this all sorted out as you will likely just have to rebuild the images and make more work for yourselves in the long run.

 And between you and me I would be running the i386 32bit version of LMCE. I have had no luck with the 64 bit and I run ALL amd processors in my setup. 6000+ in the core - 4800+ in the bedroom md and a 4200+ in the test md which is currently in my room.

 How I did my setup is ONLY plug in the ext lan connected to what you figure is the eth0. You will know this as the install will run through and when it gets to the google resolve (if there is a problem with the network or the ISP it will not resolve or download the required files) BUT it will still reboot and continue the setup so you have to pay attention to where you are at in the setup progress. Once you have the system up and you can get your ifconfig eth0 response or see what address the system is using from the UI - advanced.

 Dave

slapshot

  • Regular Poster
  • **
  • Posts: 18
    • View Profile
Re: DHCP server on both NICs
« Reply #10 on: August 12, 2008, 11:12:45 pm »
Well,  since I am on vacation from work this week, I may just re-install the i386 version  As far as Vonage goes, the default IP address for the Vonage router is 192.168.15.1, since this is on the outside of the LMCE network, this should not matter as the only IP address this assigns is to eth1. I have LMCE running as DHCP and I changed the numbers that it assigns to match what the WPG54GS uses (default is 192.168.1.1).
Since I live in a condo and don't want to invest the time and money into wiring  cat5e throughout the whole place.

John
Core/Hybrid:
Asus M2NPV-VM w/ AMD Athlon 64 x2 4600+
2 GB Ram, 40 GB Quantum Fireball HDD
WinTV PVR-150 Tuner
Philips 42" Plasma Television
Wiimote

jimmejames

  • Guru
  • ****
  • Posts: 183
    • View Profile
Re: DHCP server on both NICs
« Reply #11 on: August 13, 2008, 02:35:54 pm »
OK- Update.

External_IFACE:  eth1
External_Mac:  **********39  (this is the onboard nic)
External_IP        (blank)
External_netmask (blank)
external_dhcp:  1
internal_iface: eth0
internal_mac:  **********16 (dlink pci nic)
internal_ip: 192.168.80.1
internal_netmask:  255.255.255.0
gateway: 0.0.0.0
DNS1: **.**.**.5
DNS2: **.**.**.67  (both of these are the same as what is provided from my cable modem to my WRT54g)

Internet is not accessable on the core.

I did the ctrl+alt+f2 and ran:

ethtool eth1
It says a bunch of stuff, but the:
Supported ports: [ FIBRE ]
Port: FIBRE
Transceiver: Internal
Current message level: 0x00000033 (51)
Link detected: no

ethtool -i eth1
driver: r8169
version: 2.2LK
firmware-version: (blank)
bus-info: 0000:03:00.0

It is plugged in directly to my WRT54G and the lights are blinking on both.  I've tried different cables that I know work.

TIA,
James

rodercot

  • Guest
Re: DHCP server on both NICs
« Reply #12 on: August 13, 2008, 02:54:24 pm »
OK well that does not look good at all. As I stated in the previous post, your nics are reversed. eth0 should be external and eth1 should be internal. You core is not getting an address from the router at all and you have no gateway. your problem is with your router. You need to look in the wiki under netwroking and read Alex9R's setup he is using the same router as you I think and he has some specs in there on setting it up. Ideally my advice is to switch your int ext cables do the setup on the router like Alex says and then reinstall the system with the cables in the right order and as I stated previously.

 but setup the router first.

 http://wiki.linuxmce.org/index.php/Alx9r%27s_Router_Setup

 rgds,

 Dave

Zaerc

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 2256
  • Department of Redundancy Department.
    • View Profile
Re: DHCP server on both NICs
« Reply #13 on: August 13, 2008, 05:47:40 pm »
...
I have LMCE running as DHCP and I changed the numbers that it assigns to match what the WPG54GS uses (default is 192.168.1.1).
...

That is very wrong for several reasons, do yourself a really big favor and leave it at 192.168.80.X as it was.
"Change is inevitable. Progress is optional."
-- Anonymous


jimmejames

  • Guru
  • ****
  • Posts: 183
    • View Profile
Re: DHCP server on both NICs
« Reply #14 on: August 13, 2008, 06:29:20 pm »
First of all- thanks for all of the help.  It would be much easier for people to read the posts and move on without giving it a second thought.  The fact that help is given without expectations is much appreciated.  I would like to think that I give back by updating the wiki and trying the hardware that I have, but there are certainly those that give a whole lot more.

/epilogue

I will certainly switch the cables and though the admin pages swap the interfaces to see if that changes things.  It seems odd to me that the core receives the DNS's from the WRT54G but does not get the gateway ip address.  Which leads to 3 questions:

1) I don't mean to argue, but wouldn't it be easier to diagnose the NIC problems when it is setup as it is?  In a 'passive mode' if you will where all it needs to do is receive an ip address from the network rather than having the core be the DHCP server on that nic?  My knowledge of these things is very limited. 

2) Is it necessary for eth0 to be the external and eth1 be the internal?  Does LMCE only act as a DHCP server on eth0?  If so, that would explain my initial findings where the DHCP server seemed to be passing ip address up the external network to my WRT54G and onto my GF's computer.

3) How do you know if your nic is supported?  I was reading this: http://wiki.linuxmce.org/index.php/Unrecognized_NIC but as that it is the core and not a MD, I don't know if it will PXE boot.  What makes me believe that it works is: it can read the MAC address, and receives the DNS information from the router.  What makes me believe it doesn't work is that it doesn't receive an ip address from the router.  I have mac address filtering on, but I think that only applies to the wireless network.  I will add this mac address to the allowed list just to be sure.

Thanks