How To Set Full Duplex



  • Hey Guys

    Could you please confirm that this is the correct procedure and config.xml setting to set my WAN interface to 100baseTX full-duplex

    ATTENTION!! DO NOT USE THIS GUIDE YOU WILL BREAK YOUR PFSENSE FIREWALL (See dotdash's advice below)

    1. Go to Diagnostics > Edit File
    2. Load the /cf/conf/config.xml
    3. Change the WAN section of the config to look like this (Sanitized)

    <wan><if>em3</if>
    <mtu><blockpriv><media>100baseTX</media>  <==== MODIFIED THIS LINE
    <mediaopt>full-duplex</mediaopt>  <======MODIFIED THIS LINE

    <bandwidth>100</bandwidth>
    <bandwidthtype>Mb</bandwidthtype>
    <spoofmac><ipaddr>203.82.xxx.xxx</ipaddr>
    <subnet>29</subnet>
    <gateway>203.82.xxx.xxx</gateway></spoofmac></blockpriv></mtu></wan>

    4. Click the Save button
    5. Reboot PfSense.

    Have I got the correct entries in the config.xml file and is my procedure correct?

    Do I have to reboot PfSense or can I some how manually reload the config?

    Thanks



  • That should be:
    <media>100baseTX</media>
    <mediaopt>full-duplex</mediaopt>

    The easiest way is to re-upload the config. But, you could go into a shell, delete the config.cache, manually add the entries to config.xml,(so it sets it on reboot) and use ifconfig em3 media 100baseTX mediaopt full-duplex (to change it on the running system). Oh, and test this before you do it on a production (especially remote) system. I may have screwed up somewhere, your switch may lose connectivity if the settings are not correct, etc. If you blow up a production box and people throw rocks and garbage at you, don't blame me.



  • ATTENTION!!

    DO NOT USE THE GUIDE IN POST #1 ABOVE.

    I needed to reinstall my firewall using the steps I put in my first post.

    Follow dotdash's advice (above) if you need to do this.



  • I was able to correct mine by editing the /cf/conf/config.xml manually but for some reason even dotdash's config is not working for me. I can change it through the shell but if I hard code it in the config.xml I get a fatal error at these lines from the config file on boot.

    I am trying to set mine to 10baseT with Full duplex. I have tried this in a shell 'ifconfig xl0 media 10baseT mediaopt full-duplex' but I always get an 'ifconfig: unknown media subtype: 10baseT'. Everything that I have googled shows that should be correct.

    Anybody know what I am missing?



  • I think somewhere on the forum someone posted the command that will display all the possible modes a card supports.
    You have to put the exact term the command returned into the config.xml



  • ifconfig -m em3



  • You can also check the man page:
    http://www.freebsd.org/cgi/man.cgi?query=em&apropos=0&sektion=0&manpath=FreeBSD+6.2-RELEASE&format=html
    10baseT/UTP  Sets 10Mbps operation.



  • Thanks for all the help!

    I was able to set the card manually but I still have to more issues. Even through I set it manually and ifconfig shows that it is set to full-duplex the switch shows it at half-duplex. Think that this is just a card issue?

    The other one is if I change the config and save it I get this error after I try to access the webgui "Fatal error: Cannot create references to/from string offsets nor overloaded objects in /etc/inc/xmlparse.inc on line 57" Any thoughts would be appreciated

    <wan><if>xl0</if>
    <mtu><media>10baseT/UTP <media><mediaopt>full-duplex <mediaopt><bandwidth>10</bandwidth>
    <bandwidthtype>Mb</bandwidthtype>
    <spoofmac><use_rrd_gateway><disableftpproxy><ipaddr>69.XXX.XXX.XXX</ipaddr>
    <subnet>29</subnet>
    <gateway>69.XXX.XXX.XXX</gateway></disableftpproxy></use_rrd_gateway></spoofmac></mediaopt></mediaopt></media></media></mtu></wan>

    Thanks

    Rick



  • If you have a configurable switch, what happens if you set the port to full duplex at the switch? Sometimes auto-negotiation goes awry, leaving you at a lower speed than is possible, or, more commonly, half duplex instead of full duplex.

    If you can set the port to full duplex at the switch, and pfSense responds correctly, I'd regard that as a cleaner and more workable solution.



  • I remember thinking when I first read Rick's post that perhaps there was an issue with the / in '10baseT/UTP' that was causing his error. I finally had reason to hard set an interface to 10/full, so I tested my config on a spare unit before dropping it on the live (and remote) box. Everything worked perfectly. When I actually looked at his config, I noticed his syntax was wrong. Perhaps this may help someone looking at this thread in the future.

    @rickbaran:

    The other one is if I change the config and save it I get this error after I try to access the webgui "Fatal error: Cannot create references to/from string offsets nor overloaded objects in /etc/inc/xmlparse.inc on line 57" Any thoughts would be appreciated

    <wan><if>xl0</if>
    <mtu><media>10baseT/UTP <media><mediaopt>full-duplex <mediaopt><bandwidth>10</bandwidth>
    <bandwidthtype>Mb</bandwidthtype>
    <spoofmac><use_rrd_gateway><disableftpproxy><ipaddr>69.XXX.XXX.XXX</ipaddr>
    <subnet>29</subnet>
    <gateway>69.XXX.XXX.XXX</gateway></disableftpproxy></use_rrd_gateway></spoofmac></mediaopt></mediaopt></media></media></mtu></wan>

    Thanks

    Rick

    The lines in red should be:
    <media>10baseT/UTP</media>
    <mediaopt>full-duplex</mediaopt>



  • Thanks for the correction. Can't believe I missed that. I will try it this weekend when i can reboot the box.

    Rick


Log in to reply