Making my Znyx ZX346Q nic to work



  • I know there are a few threads that have to do with this NIC.  It seems that none answer my question, so here it goes.

    I am trying to make my old computer in to a router for my house, but it seems that the card is not activating (I have no idea what is going on)

    Here is a simple break down of what I am doing.

    I have an old HP comp (7 years ish?) it's a Intel Core 2 Duo chip, on an Asus mobo. 2 gig of ddr2 ram. I also installed a wireless card on it and a quad port nic the Znyx ZX346Q.  When I run the pfSense software (installed it on my HD) I configure my interfaces as Lan - fxp0 (I am assuming this is the on-board Ethernet adapter) and Wan - dc0 (there are total of 4 dc0-3 so I am pretty sure its the NIC) and I skip the VLAN all together, when all is done pfSense seems to recognize my config and assigns IPs from my modem to the Lan port and a normal 192.168.1.1 address for my Wan port, but when I plug my computer in to the NIC port the computer does not react it shows no connection of any sort not even the 192.168.1.1 to access the router. (as if its not plugged in to anything at all) Is there something I need to do to activate the NIC? as for the chain of equipment, all I have (to set this up) is my Cable internet modem which is hooked to my newly converted/made router which is then connected to my computer through one of the ports on the NIC



  • Just an update…

    I ran pciconf -v in the shell to see what i have... it shows all 5 ethernet ports 1 mobo 4 nic, i am using a cross over patch cord to my workstation from the other pc with no results, what i want in the end out of the system is to be able to connect at least 3 comps and some wireless devices.  What I have now for connection is Modem ---> pfSense (comp/router), what I want is Modem ---> pfSense (comp/router) ---> Workstation/multiple workstations.

    I did verify that fxp0 is mobo ethernet port and dc0-3 are the Nic ports.


  • Netgate Administrator

    @vishibalo:

    pfSense seems to recognize my config and assigns IPs from my modem to the Lan port and a normal 192.168.1.1 address for my Wan port

    It that a typo or is that really how you have it connected? You would normally exepect the pfSense WAN port to be connected to your cable modem while the LAN port(s) connect to your local client machines.

    Since you are seeing nothing happening at all you need to check you have basic connectivity. Are you cables good? At the very least you should see a link LED turn on when you plug in the cable.
    Does that NIC have LAN-bypass?

    Steve



  • Yes, it is a typo.

    They wiring is good, I am also using a crossover cable to go from pfsense machine to my workstation.  No, the LED's do no light up, except for the WAN port on my machines mobo. Which lights up and seems to be working pretty fine, pings out and all that pretty stuff.

    I am honestly not sure about LAN-bypass I have no idea what it is.  Think "new guy", I have a very limited knowledge but trying to grasp the concepts.

    The only thing I can assume is that either my mobo does not want to work with the NIC or pfsense does not.  Either seem to recognize it just fine.  I honestly don't want to get a new NIC just yet, untill I am positive that it's not just my mobo.

    Also, I am doing this as a fun project, nothing overly complicated in mind. So I want to see if I can make this NIC work, in the worst case I will look in to buying from what was recommended an intel card, which will take a while since im not looking to build a beast, and not too fond of spending too much.


  • Netgate Administrator

    @vishibalo:

    I am doing this as a fun project, nothing overly complicated in mind.

    Those are the best type of projects.  ;)

    LAN-bypass is feature that disconnects the actual sockets on card from the NIC chips in order to by-pass a failed piece of hardware. It usually (always?) does this using a series of small relays so it's normally easy to spot on the card. You would see a number of small rectangular objects, the white components in this example:

    Looking at the specs of your card it doesn't look like it has by-pass but it would explain you symptoms perfectly which was why I asked.
    It doesn't look like a problem with the mobo or with pfSense since the 4 interfaces dc0-3 are showing up no problem. It looks like a more fundamental issue such as broken cables, bad switch etc. Until you see link lights you aren't going to get any connection.

    Have a look through the boot logs to see if the driver is spitting any errors when it attaches to the card. Specifically if the driver attaches but the cable is not detected the PHY part of the NIC may not be configures correctly.

    This document makes interesting reading: http://docs.znyx.com/support/drivers/driverdocs/dc013602.pdf
    It appears the card has additional functionality beyond the four interfaces but requires the custom driver to use it. That driver is not part of FreeBSD and therefore pfSense. Perhaps the card has been configured in it's firmware to use port trunking or similar? Pure speculation. Do you know the history of the card?

    Steve


  • Netgate Administrator

    Here's something:
    @http://osdir.com/ml/freebsd-questions/2009-01/msg01836.html:

    I got a ZNYX ZX346Q
    and tested it. It seems to work (I did not yet stress
    testing). The only problem with the card is, that it doesn't
    support media autoselect.

    That was some time ago but it's an old card so the situation may not have improved. You might have to select a link speed and duplex manually to acheive a link. You can do this in Interfaces: LAN: speed and duplex (advanced button). Or whatever interface(s) you have dc0-3 assigned to.

    Steve



  • i do not know the history of the card, i got it of ebay, but i currently have 2 of the same cards and i'm having the same issue with both of them, i do not think i have bad cables, since i made them and tested them (i am a sound n com tech/low volt electrician, so at the very least i know how to make a patch cord or a crossover cable) also i did try different ports on the card.
    as for the error messages, the only thing i can see that happens is this:

    acd0: FAILURE - READ_BIG ILLEGAL REQUEST ASC=0X64 ASCQ = 0X00

    that error shows up multiple times in a row

    there is also a ZFS WARNING about a recommended minimum kmem size.

    as for doing anything manually, i do not even know where to begin.  I only know how to set the interfaces manually but not how to set them up.

    I appreciate the help.


  • Netgate Administrator

    Neither of those warnings are a problem. acd0 is the cd-rom drive which I presume is empty and you are booting from hard disk? ZFS is not used unless you have specially chosen to use it in a custom install (you haven't!).

    Ok. So first off you need to prove the hardware. Start by proving your cables especially if you've just made them up for this. If you don't have a cable tester I usually use two devices such as a switch and an access point or two switches.
    You should probably also prove the network card operates OK under a different OS. Stick it in a Windows box or boot the pfSense box from a live Linux CD.

    Once both of those are proved try setting both ends of the connection to 100Mbps full duplex. Importantly you MUST set BOTH ends. If you leave one end set to auto-negotiation it will fail (because the other end is set to manual) and then fall back to default setting, usually 10Mbps half duplex.

    Steve



  • i can go ahead n prove that both the cables and the card works in a few min, my concern will be is how do i set both ends to 100mbps full duplex.  I would not know how to do so manually

    also would this affect my other machine (mac pro) and another thing, at this point im at a loss, do i have to use a crossover cable, or straight through would work? pfsense nic is a 10/100 base and my workstation is 1gbit port.

    ill get back in a bit after i see if i can get the 4 port nic to work on my workstation.

    EDIT: additional information.

    I threw the network card in to my widows machine, as I suspected, it recognizes that it is there but can not find drivers for it, i looked around on the webs, i seem to can not find anything suitable.


  • Netgate Administrator

    Maybe try a live Linux CD then to prove the card.

    The gigabit NIC in your workstation should take care of the cross-over/straight through selection for you, all gigabit NICs are auto-MDX.

    Assume you have dc0 assigned as the LAN interface in pfSense. Go to Interfaces: LAN: in the webgui and next to 'speed and duplex' hit the advanced button. Now from the drop down select '100baseTX full duplex'. Save and apply.

    In the Windows workstation the setting is in the network card properties.

    Steve



  • Live Linux CD? never done that before, will have to look it up, never used linux before either.  as for web gui, well i cant access that, unless i can do so through pfsense box… will have to look at that as well.

    This is turning out pretty interesting though, a crush course on different OS'

    Also... any particular linux build i should look for? or would any work? and then, if i do use live linux cd, what am i looking for? how do i check the NIC basically.

    its seems at this point that it might be easier for me to shell out $100 and get an inter card instead, i might as well do so, i kinda want to see if i can make it work, if only to replace is as soon as i get a new card. or that way ill be able to have 8 ports (not that i would ever need that many).


  • Netgate Administrator

    Hmm, that card is older than I thought, Windows drivers are only available for Windows 2000 or NT4. However there is this patch tool which might be a clue:
    http://docs.znyx.com/support/drivers/driverdocs/dc012501.pdf
    The Win 2K driver might run in WinXP if you still have that.

    For a live Linux CD just download the latest Ubuntu iso and write it. Boot it and choose 'try Ubuntu' and it will boot to a complete desktop. From there you can test the card and view the logs etc.

    Steve



  • Assuming that the card and the cables are fine, how would i make a manual selection on pfsense box to choose 100base full duplex speed?  its easy on the windows machine but i have no idea how to do so on pfsense machine.


  • Netgate Administrator

    It's possible to do it from the command line:

    ifconfig dc0 media 100baseTX mediaopt full-duplex
    

    That setting will be overwritten whenever the box renews it's interfaces for whatever reason though so I suggest you set it via the webgui as I outlined above. If your LAN interface is assigned to fxp0 you should have no problems accessing the webgui.

    Steve



  • Ok, I followed the directions on making my fxp0 a LAN connection and was able to acces web gui.  There I was able to assign interfaces and was able to change the speed to 100base Base TX full duplex, which seemed to "work", at least now when i plug in to the nic it shows a sign of life, link light turns on and activity light blinks for few seconds.  But I can not pass traffic through it and i can not access web gui (invalid IP address, i dont know what i am doing i assigned a 192.168.1.2 for dc0 interface and tried using that), im not sure how to assign my interfaces back or how to configure the rest of the ports to act as LAN interface. I kind of tried to copy the info from the interface that was automatically set, but I am facing an issue where my 192.168.1.1 address is taken and i can not assign it to other interfaces (im not sure what i am supposed to do though)

    Basically i have a jumbled mess of interfaces my fxp0 is now LAN1 (mobo nic) and my dc3 is WAN, and I want WAN to be fxp0 and LAN1-4 to be dc0-3 (for simplicity sake) i'm just not sure how to work around the problem and configure interfaces properly.  I am not even sure how to explain this. I am sorry if this sounds like nonsense, hopefully I can clear it up.



  • Netgate Administrator

    Aha!  ;D
    Ok well that's a huge step forward, everything else is standard configuration.
    When you add a new interface in pfSense, like LAN2, it must be in a different subnet to any existing interfaces. So you could use 192.168.2.1/24. You can't use 192.168.1.2 because it's in the subnet used by LAN.
    Secondly when you add new interfaces all traffic to it will be blocked by the firewall by default. The LAN interface comes with a default rule to allow traffic to make things easier but that is an exception.
    Go to Firewall: Rules: LAN: in the webgui and look at the default LAN rule. Now go to Firewall: Rules: LAN2: and add similar rule there. If you want to allow all traffic it would be something like:
    Protocol: IPv4 any
    Source: LAN2 NET
    Source port: any
    Destination: any
    Destination port: any

    Once you are familiar with setting the rules on the interfaces you can reassign the NICs in the order you wish either from the webgui or at the console.

    Steve



  • hrmm… i was able to set up and copy the rules and assign the interfaces as i wanted, i do not get the connection or i cant get traffic to pass through the the lan ports, im not sure if im missing something in the rules, or somewhere else.  frustrating.  I been trying to see if anyone has any instructions on youtube, but all i get are advance settings for the stuff that already works and they are just showing how to finetune or implement other stufff...

    i configured it as follows,

    fxp - wan - it gets its own IPs from the modem.
    dc0 - Lan1 - 192.168.1.1 its automatically set up (rulles and everything) - unable to connect to either internets or the webgui
    dc1 - Lan2 - 192.168.2.20 tried to copy rules from Lan1 - no connection (it does have IPV6 assigned to it and so are others)
    dc2 - etc.
    dc3 - etc.

    so im not sure, and again i do get a link up lights on all 4 ports on the card...


  • Netgate Administrator

    Hmm. OK. So possibly the card is now talking correctly at the hardware level but the driver is not indicating a connection in some way. Can you get back to the webgui via the WAN? You can disable the firewall entirely to allow that using 'pfctl -d' at the console. Check the Status: Interfaces: page. Does it show a load of errors? Does it show a conection?

    Are you using DHCP for the client machine on LAN1? Is it working?

    Steve



  • i am able to access webgui if i assign fxp0 to lan.
    Checking Status:Interfaces window shows 0/0 errors on all ports, all show 0/0 in out packets except dc0 (lan4) it shows in/out packets 112/133 (pass) no errors nothing. all show status 'no carrier', im not sure how to see if it show a connection.

    as for the DHCP, in the Interfaces:DHCP Leases it shows the IP 192.168.1.130 as online and active and it shows my workstations name.  Keep in mind Lan1 is fxp0 port which is my mobo port that was originally known to work (machine was in working order when i started messing with pfsense)

    I did run pfctl -d it shows pf disabled, ill try seeing if that changed anything.

    I hope this gives you any ideas.


  • Netgate Administrator

    @vishibalo:

    all show status 'no carrier', im not sure how to see if it show a connection.

    Hmm, well that's not good. Did they have a physical connection when you were looking a this?
    If you ssh in and run ifconfig at a the command line you can copy and paste that output here.

    What did you have connected to dc0 (lan4) that manged to send/receive some traffic?

    I forgot earlier that none of the additional interfaces will have DHCP enabled unless you manually set it in Services: DHCP Server: so you would have to use static IP addresses.

    Steve



  • well, ya, they had nothing pluged in, and dc0 (lan4) i have no idea i honestly dont think anything was. i believe i use statick IPs on all but Wan.  If I remember right if i assign wan to any dc interfaces it wont work either, basically the only interface that does everything it should is fxp0 the one that is currently on a mobo. and would i run ssh from webgui?  ill look at it in a bit and see if i can figure it out on my own.

    and again i greatly appreciate all the help.

    i am kind-off glad that i am running in to so many problems with it, i  at least will know what to do in a future if it ever starts working.


  • Netgate Administrator

    @vishibalo:

    well, ya, they had nothing pluged in

    Ok, well connect a client and make sure they're both configured manually at 10/100. Check the output of ifconfig at the console for a change in the status. We already talked about cross-over cables.

    To connect via SSH you have to enable it first in the webgui in System: Advanced: Admin access: then connect to it using an SSH client like putty.

    Steve



  • ok so i realized that i never configured WAN port for a manual speed, i did change that. Sadly nothing changed, also i did run ifconfig and have an image of it maybe it can tell you anything.

    another thing i do notice is that if i configure wan port to any of the dc0-3 interfaces the interface does not get an IP assigned to it (tried resetting the pfsense box and the modem, no result, or same result to be exact) and again, the physical RJ45 ports show link lights and activity lights when i plug in to them.

    Would be nice if everything just worked.



  • Netgate Administrator

    O.k. so two things:
    1. You have set the fxp port to 100MbpsFD manually and tht should really be left as autoselect unless you have a good reason not to.
    2. The dc3 interface shows that the connection is 'active', it can see that a cable is attached. Since it doesn't have an IP assigned to it I assume you had that assigned as WAN when the screenshot was taken? Have you been able to set the modem interface to 100Mb-FD? If you check the Status: Interfaces: page does it show and packets or errors on dc3?

    If you plug other clients in the dc0-2 NICs do they receive IP addresses from pfSense?

    Ultimately if you can't set the modem interface you will have to use the fxp NIC as WAN but obviously you can only do that once you can talk to one of the dc NICs.

    Steve



  • the first part was done just to see if that would change anything, I will change the
    fxp0 port to auto, since it works fine

    the second part, yes dc3 was set up as WAN I just picked the last port on the card, I did set all the interfaces for manual 100baseTX fd.  In the status, interface window, there are some packets shown 221/33 (23kb/3kb)  so minimal and no errors 0/0, that's after about 30 min of looking around.

    as for plugin in to other interfaces, the webgui shows status as "up" but again, no real traffic through, minimal packets in and out…
    (i plugged in my laptop to check that out)
    as to weather or not they receive IPs, im not sure how to even check, i know that if i assign dc0 to 192.168.1.1 i cant get on to webgui through it, and in the end i do want fxp0 to be my WAN port, that is as soon as i can get the other 4 running


  • Netgate Administrator

    If the NIC were in fact still completely inactive I would expect to see some packets going out but not any received.
    If you have setup a dhcp server on dc0 at 192.168.4.20 and when you connect a client to it it receives an address then the NIC is working and the problem lies elsewhere.

    You definitely proved your cross-over cables with some thing else?

    Steve



  • im not sure how to set up a dhcp server on dc0, do you mean make it in to a WAN port or activate dhcp in the interface menue in gui.  Not sure what im reading here
    @stephenw10:

    If you have setup a dhcp server on dc0 at 192.168.4.20

    i basically dont understand the question or what i would do to answer that, troubleshoot that.

    as for the crossover cable i am at a bit of a loss, do i need to use a crossover cable? my workstation has 2 gigabit ports, on the other hand the znyx card has 4 10/100baseTX ports, would my gigabit port take care of the crossover problem or do i still need to use a crossover cable for the card, to access my webgui via fxp0 im using a straight through cable, if i do have to have a crossover cable, i will have one made and tested.


  • Netgate Administrator

    Ok so you have dc0 assigned as LAN4 (?) with an IP address of 192.168.4.20/24.
    The pfSense box will not act as a DHCP server on that interface unless to configure it to do so.
    Go to Services: DHCP Server: and click on the LAN4 tab. Now check the 'enable DHCP server' box and enter a valid range. For example: 192.168.4.50-192.168.4.100. Click save and apply.

    You wouldn't normally need a cross over cable since your Gigabit interface are almost certainly auto-MDX. However if you have manually specified 100MbpsFD (disabling auto-negotiation) are they still auto-MDX? I don't know. If you had two 100Mbps NICs you would need to use a cross-over cable. It's not certain whether or not you might need one so try both if you have them. Normally you would not see any link lights if the cable is wrong though.

    Steve



  • Ok, I did as instructed, I set up dc0 as per example, i pluged my laptop to pfsense box, and checked the network, it did get an IP (although it is completely different from the pfsense IP 169.254.xx.xx) also mentions that it is a self assigned IP amd will not be able to connect to internet. as for packages, it did show minimal transfer in and out.

    also I have a question, what is the point of setting up a LAN port as a DHCP server?


  • Netgate Administrator

    Like you found 169.254.X.X are self assigned IPs. That is done when the dhcp client, in a Windows box, can't find a DHCP server. So it was not able to talk to the pfSense box at all.  :(

    @vishibalo:

    what is the point of setting up a LAN port as a DHCP server?

    If you have a DHCP server running on your LAN interface then you can connect almost any client machine and it will just work. That includes all types of computer but also printers, set-top boxes etc.

    We may be getting close to the end of the road here. It seems odd that you are seeing link lights but no data is flowing. Do the lights you're seeing make sense? Are they showing 100MbpsFD? One thing you could try is to run a packet capture on, say, dc0 and the connect the client. Then we could see what packets are being sent/received.

    Steve



  • Ok so something I was looking at, I don't know if it means anything or matters, but my machine recognizes the NIC interfaces as dc(4), while I was looking at HCL, it lists that card under de(4) driver support. ZNYX ZX3xx.  Does that change anything? Is there something wrong with my machine? or my install?


  • Netgate Administrator

    Hmm, well it's at least unexpected. Reading through the complete thread on the freebsd mailing list I linked to earlier they exepcted it to be the de(4) driver too.
    Please give the output of:

    pciconf -lv | grep 20000
    

    Another suggestion in the FreeBSD thread was that the PHY is in fact unsupported so it remains in whatever it's default mode is. You might try setting your client machine to whatever modes it can and see it that connects (10Mbps FD, 100Mbps HD etc).

    @http://www.freebsd.org/cgi/man.cgi?query=de&apropos=0&sektion=0&manpath=FreeBSD+10.0-RELEASE&arch=default&format=html:

    Some cards are explicitly programmed to a particular media type by a set-up utility and are not changeable.

    Steve



  • @stephenw10:

    Hmm, well it's at least unexpected. Reading through the complete thread on the freebsd mailing list I linked to earlier they exepcted it to be the de(4) driver too.
    Please give the output of:

    pciconf -lv | grep 20000
    

    Another suggestion in the FreeBSD thread was that the PHY is in fact unsupported so it remains in whatever it's default mode is. You might try setting your client machine to whatever modes it can and see it that connects (10Mbps FD, 100Mbps HD etc).

    @http://www.freebsd.org/cgi/man.cgi?query=de&apropos=0&sektion=0&manpath=FreeBSD+10.0-RELEASE&arch=default&format=html:

    Some cards are explicitly programmed to a particular media type by a set-up utility and are not changeable.

    I was looking at that thread a while back and when i looked up ZNYX website for product description, they mention.

    Channel Speeds Ethernet/Fast Ethernet: 10/100 or 20/200 per channel in full-duplex
    mode (IEEE Auto Negotiation)

    this is what it mentions under the channel speeds, im not sure if that means because its under auto negotiation that I have to set it to 10/100 because I'm setting both sides on manual or if there is anything else.
    I will play around with it trying to set it to other speeds to see if that yields any results, as for now I still don't understand why it pulls the card under a different driver.

    Attached is a image of pciconf -lv hopefully that will give you some ideas.

    ![pciconf -lv.png](/public/imported_attachments/1/pciconf -lv.png)
    ![pciconf -lv.png_thumb](/public/imported_attachments/1/pciconf -lv.png_thumb)


  • Netgate Administrator

    Ok, so the chips used in the card are given as 0x00191011. 1011 is the PCI vendoir ID for DEC and 0019 is the 21143 NIC. That is listed as a supported model in the dc(4) driver:

    @http://svnweb.freebsd.org/base/release/8.3.0/sys/dev/dc/if_dcreg.h?revision=234063&view=markup:

    /*

    • DEC PCI vendor ID
      */
      #define DC_VENDORID_DEC 0x1011

    /*

    • DEC/Intel 21143 PCI device ID
      #define DC_DEVICEID_21143 0x0019

    That same chip is also listed by the de(4) driver though here it's listed as a 21142:
    @http://svnweb.freebsd.org/base/release/8.3.0/sys/dev/de/dc21040reg.h?revision=234063&view=markup:

    #define DEC_VENDORID 0x1011
    #define CHIPID_21040 0x0002
    #define CHIPID_21140 0x0009
    #define CHIPID_21041 0x0014
    #define CHIPID_21142 0x0019

    Can you see what chip it's actually using?

    Interestingly looking at the build instructions for the Znyx FreeBSD driver, now very out of date, it says you must remove the dc and de drivers from the kernel. Presumably this is because all three would otherwise try to claim the device.
    Perhaps there's a way of disabling the dc driver to allow the de driver to have a go? Hmm, I've not needed to try before. It might be possible to override the in kernel dc driver with one compiled specially to not recognise the chip. Hmm.

    Steve



  • I would say its using 21143-PD, but I am not sure if I am looking at the right thing.  I have the picture provided, it should tell you what it has.

    How complicated is it to remove drivers from a kernel? and would it be necessary?

    Also, somewhat off topic, how do you get out of Shell? Every time I use Shell option I can not get out of it.



  • Netgate Administrator

    Nice photo.  :) Yep definitely 21143-PD.

    Type 'exit' to get back to the menu from the CLI shell.

    Recompiling the kernel to remove drivers is not hard if you've already got a build environment setup. I don't.

    It would be better to try to prevent the dc drive attaching somehow. If you rebuild the kernel you're likely to have to repeat the process at each pfSense update which could become tiresome pretty quickly!

    One thing you haven't tried yet is running a 2.2 snapshot. They are built on FreeBSD 10 and having many, many driver changes. They are still in alpha it the moment so there might be some other nasty surprises but if the interfaces behave differently then at least you might be able to use them under 2.2 when it's released.

    Steve



  • i would give it a try, anything at this point. how would i get a 2.2 snapshot?


  • Netgate Administrator

    http://snapshots.pfsense.org/

    Check the 2.2 subforum to make sure there aren't report of some new catastrophic bug in the latest snapshot and give it a try.

    Steve



  • I tried giving 2.2 a shot… no luck, my comp will not recognize live CD install, just gives me "Disk boot failure" message on screen.  I tried different versions of it and using iso.gz files with no luck either.  Ran out of CD's to burn (only had a few left), and my comp will not do flashdrive.

    I figure that I will get a 5 port Asus server board and a Xeon cpu, probably will solve all the problems I am having now.  But that is way in the future.