# Duplex mismatch discovered



## okaenrique (Apr 10, 2016)

Hello!

I need change duplex on my FreeBSD to full-duplex.


```
FreeBSD 10.3-RELEASE (FreeNAS.amd64) #0 52dd777(freebsd10):
[root@freenas] ~# ifconfig ix0   
ix0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        description: connected to SW-OKA (Te1/0/1)
        options=e407bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,TSO4,TSO6,LRO,VLAN_HWTSO,RXCSUM_IPV6,TXCSUM_IPV6>
        ether a0:36:9f:94:af:68
        inet 192.168.0.240 netmask 0xffffff00 broadcast 192.168.0.255
        nd6 options=9<PERFORMNUD,IFDISABLED>
        media: Ethernet autoselect (Unknown <rxpause,txpause>)
        status: active

[root@freenas] ~# dmesg | grep ix0
ix0: link state changed to UP
ix0: link state changed to DOWN
ix0: link state changed to UP
ix0: link state changed to DOWN
ix0: link state changed to UP
ix0: link state changed to DOWN
ix0: link state changed to UP
ix0: link state changed to DOWN
ix0: link state changed to UP
ix0: link state changed to DOWN
ix0: link state changed to UP
ix0: link state changed to DOWN
ix0: link state changed to UP
ix0: link state changed to DOWN
ix0: link state changed to UP
ix0: link state changed to DOWN
ix0: link state changed to UP
ix0: link state changed to DOWN
ix0: link state changed to UP

[root@freenas] ~#
[root@freenas] ~# ifconfig ix0 media 10Gbase < full-duplex >
Missing name for redirect.
[root@freenas] ~#
[root@freenas] ~# ifconfig ix0 media 10Gbase-SR < full-duplex >
Missing name for redirect.
[root@freenas] ~# ifconfig ix0 192.168.0.240 netmask 255.255.255.0 media 10Gbase-SR < full-duplex >
Missing name for redirect.
[root@freenas] ~#
```
Any help please?


----------



## okaenrique (Apr 10, 2016)

```
[root@freenas] ~# ifconfig ix0 media 10Gbase-T mediaopt full-duplex
ifconfig: SIOCSIFMEDIA (media): Device not configured
```


----------



## okaenrique (Apr 10, 2016)

```
[root@freenas] ~#
[root@freenas] ~# dmesg | grep ix0
ix0: <Intel(R) PRO/10GbE PCI-Express Network Driver, Version - 3.1.13-k> port 0xd020-0xd03f mem 0xdf700000-0xdf7fffff,0xdf904000-0xdf907fff irq 16 at device 0.0 on pci1
ix0: Using MSIX interrupts with 5 vectors
ix0: Advertised speed can only be set on copper or multispeed fiber media types.
ix0: Ethernet address: a0:36:9f:94:af:68
ix0: PCI Express Bus: Speed 5.0GT/s Width x8
ix0: link state changed to UP
ix0: link state changed to DOWN
ix0: link state changed to UP
ix0: link state changed to DOWN
ix0: link state changed to UP
ix0: link state changed to DOWN
ix0: link state changed to UP
ix0: link state changed to DOWN
ix0: link state changed to UP
ix0: link state changed to DOWN
ix0: link state changed to UP
ix0: link state changed to DOWN
ix0: link state changed to UP
ix0: link state changed to DOWN
ix0: link state changed to UP
ix0: link state changed to DOWN
ix0: link state changed to UP
ix0: link state changed to DOWN
ix0: link state changed to UP
ix0: link state changed to DOWN
```


----------



## tbyte (Apr 11, 2016)

Looking at the manual I'm not sure that driver/card support manual override at all. Which means your cable/port/card is probably damaged.


----------



## wblock@ (Apr 11, 2016)

What is connected to the other end?  Is it connected with the right cable?


----------



## SirDice (Apr 11, 2016)

tbyte said:


> Looking at the manual I'm not sure that driver/card support manual override at all. Which means your cable/port/card is probably damaged.


As far as I know auto-negotiation is mandatory for 1Gbps and higher.


----------



## tbyte (Apr 11, 2016)

SirDice said:


> As far as I know auto-negotiation is mandatory for 1Gbps and higher.


Nope - for example from the igb(4) states:


 The igb driver supports
  the following media types:

  autoselect  Enables auto-negotiation for speed and duplex.

  10baseT/UTP  Sets 10Mbps operation.  Use the mediaopt option to select
  full-duplex mode.

  100baseTX  Sets 100Mbps operation.  Use the mediaopt option to select
  full-duplex mode.

  1000baseSX  Sets 1000Mbps operation.  Only full-duplex mode is supported
  at this speed.

  1000baseTX  Sets 1000Mbps operation.  Only full-duplex mode is supported
  at this speed.

  The igb driver supports the following media options:

  full-duplex  Forces full-duplex operation

  half-duplex  Forces half-duplex operation.



But the ix(4) has no such options. So I guess what your are saying may be right for 10GBit/s and above.


----------



## SirDice (Apr 11, 2016)

The driver may still have the options but:


> The debatable portions of the autonegotiation specifications were eliminated by the 1998 release of 802.3. This was later followed by the release of IEEE 802.3ab in 1999. *The new standard specified that gigabit Ethernet over copper wiring requires autonegotiation.* Currently, most network equipment manufacturers recommend using autonegotiation on all access ports and enable it as a factory default setting.


https://en.wikipedia.org/wiki/Autonegotiation


----------



## tbyte (Apr 11, 2016)

SirDice said:


> The driver may still have the options but:
> 
> https://en.wikipedia.org/wiki/Autonegotiation



What I meant is that the error he was receiving is because the ix driver does not have media/mediaopts options like the other drivers he is used to use. And when/if the card supports sub 1GBit/s it is bound to have media options because it can be connected to 10MBits/s switch from 1997 no mater what the 802.3ab states


----------



## wblock@ (Apr 11, 2016)

I have not used any of the 10G stuff, but some searching yesterday said that it required cat 6a or better cable.  Backwards compatibility was not really mentioned.  So my guess is that it is connected to old equipment and will not work that way.


----------



## Uniballer (Apr 11, 2016)

When 100-Base-Tx first came out many devices and switches autonegotiated incorrectly, so many people got in the habit of turning off autonegotiation.  In the gigabit era this is deprecated, but some people haven't gotten the news.

One failure scenario involves a switch that is configured not to autonegotiate.  This is almost guaranteed to cause problems for a device that insists on autonegotiation.  One common result is a duplex mismatch.  So make sure your switch will autonegotiate.


----------

