While install, mac address duplicate on two NIC's

StreamThreader

New Member


Messages: 19

Hi folks!
I have trouble with FreeBSD 9.3 x86_64.
Motherboard Intel D410PL, one nic on board and second nic plugged to PCI (Realtek rtl8193D).
After fresh installation, i detect of two nic's have same MAC address.
System use one MAC chip for both PHY ?
How i can controll relations between PHY and MAC chips in system (this is possible)?
Please suggest way for resolve this interesting problem.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 13,132
Messages: 39,736

Please post the output of ifconfig.
 

Murph

Well-Known Member

Reaction score: 183
Messages: 297

StreamThreader, firstly, there might not actually be a problem to be solved here. It is only a problem if both NICs are to be used on the same Ethernet segment/subnet without something like LAGG, which would be a slightly odd architecture. If they are on separate subnets, there is no problem to solve, as MAC addresses only need to be unique within a single Ethernet broadcast domain (segment/subnet).

In the case of some vendors (e.g. Sun Microsystems), the default behaviour is to have all interfaces on a single system share a single MAC address which is derived from the system's host ID (all NICs/PHYs are ignored as far as choosing the address is concerned). Fundamentally, there is nothing wrong with a single MAC address being shared across the system like that, unless you are trying to do something unusual with multiple non-aggregated interfaces on a single segment.

So, the first thing is for you to tell us if this is actually a problem, and why it is a problem for your network architecture. By letting us know why it is a problem, we can possibly offer better suggestions on how to deal with it. You can normally change the MAC address of an interface using ifconfig(8), but should normally only do so to solve a specific problem.

You almost certainly do not have a single shared MAC chip when the second NIC is on a PCI card.
 
OP
StreamThreader

StreamThreader

New Member


Messages: 19

ifconfig output:
Code:
re0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=8209b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_MAGIC,LINKSTATE>
        ether 60:e3:27:00:79:f8
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
        media: Ethernet autoselect
        status: no carrier
rl0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=2008<VLAN_MTU,WOL_MAGIC>
        ether 60:e3:27:00:79:f8
        inet 192.168.50.141 netmask 0xffffff00 broadcast 192.168.50.255
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
        media: Ethernet autoselect (100baseTX <full-duplex>)
        status: active
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
        options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
        inet6 ::1 prefixlen 128
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x8
        inet 127.0.0.1 netmask 0xff000000
        nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>

In dmesg.boot file exist this lines:
Code:
miibus0: <MII bus> on re0
rlphy0: <RealTek internal media interface> PHY 0 on miibus0
rlphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto, auto-flow
re0: Ethernet address: 60:e3:27:00:79:f8

miibus1: <MII bus> on rl0
rlphy1: <RealTek internal media interface> PHY 0 on miibus1
rlphy1:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
rl0: Ethernet address: 60:e3:27:00:79:f8
dmesg.boot file attached to message.

One PHY use two MIIbus ?
Why I create this thread, because this problem exist not first time. For example in previous cases, I have nice trouble:
Both NICs have disconnected UTP cables from ports, next I connect one cable to first NIC and in carrier status nothing changed (no carrier), unplug cable (both NICs again without cable connection), plug cable in second NIC and both NICs got carrier status active, but cable plugged only to one NIC not to two (one phy use for two nic's?).

If need more additional information I can post it here, thanks for support.
 

Attachments

  • dmesg.boot.txt
    7.8 KB · Views: 199

Murph

Well-Known Member

Reaction score: 183
Messages: 297

StreamThreader, some questions for you:
  • You described this as a "fresh installation", yet are using an old version which will be end of life fairly soon (9.3). Why are you using 9.3? Have you tried 10.3? Do you have a reason for not using 10.3?
  • What is your network topology/design/architecture? I.e. why do you have two interfaces, and what is the intended usage/configuration? Are the interfaces connected to a hub, a switch, or something else?
  • You say you have had similar problems in the past. Was this on exactly the same hardware, or on a different hardware configuration? How did you solve those problems?
  • That MAC address (60:e3:27:00:79:f8) is assigned by TP-LINK TECHNOLOGIES CO.,LTD. Are they the vendor of your PCI card? If so, it might help to know the TP-LINK model number of the card. If not, it might help to know the brand and model of the card. RealTek chips are used by a variety of vendors, and there can be vendor differences in the hardware implementations of the RealTek chips. If the address was coming from the chip on the motherboard, I would expect it to probably have an Intel-assigned MAC address.
 
OP
StreamThreader

StreamThreader

New Member


Messages: 19

  • I install old FreeBSD because i have self-hosted repository for my tasks
  • I use FreeBSD as gateway, one nic connected to ISP, second nic connected to switch (without vlan and other features)
  • In past i have trouble on another hardware, i reinstall OS with just one NIC, after installation complited, plug second NIC, and it use separate MAC addresses
  • TP-LINK card plugged to PCI (and system clone it MAC address to internal NIC)
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 13,132
Messages: 39,736

  • I install old FreeBSD because i have self-hosted repository for my tasks
  • I use FreeBSD as gateway, one nic connected to ISP, second nic connected to switch (without vlan and other features)
All the more reason to use a version that's going to be supported for a while. Support for 9.3 will end this year. FreeBSD 10.3 will be supported until April 2018. By that time 10.4 will be available, upgrading minor versions is usually quite simple to do.

TP-LINK card plugged to PCI (and system clone it MAC address to internal NIC)
This I don't understand. Is this something the machine does by itself or is this something you do? If it's the machine that does it, can you switch this "feature" off?
 
OP
StreamThreader

StreamThreader

New Member


Messages: 19

I unplug external PCI NIC (tplink with mac 60:e3:27:00:79:f8), and internal nic then use self real mac, if i again plug external pci card, system clone it mac to internal nic.
 
OP
StreamThreader

StreamThreader

New Member


Messages: 19

I reinstall FreeBSD with just one NIC (internal), after installation complited, plug my PCI and problem with mac again.
Maybe this bug with driver for tp-link nic ?
 

Murph

Well-Known Member

Reaction score: 183
Messages: 297

No, this doesn't happen. At all.
Yeah, I'm equally confused by this. I'm very familiar with it happening on Sun systems, but I was not aware of it intentionally happening on FreeBSD. On the one hand, it probably shouldn't be a problem when the interfaces are on separate networks (unless it will confuse something in the kernel, or is a symptom of something), but on the other it probably shouldn't be happening.

StreamThreader, I think it could be useful to at least try 10.3 on the system, and see what is reported by dmesg(8) and ifconfig(8). Although 9.3 was released in July 2014, some parts of it will date back to when 9.0 was released in January 2012, as not all changes to CURRENT get merged into STABLE. Basically, either way there have been a lot of changes in the kernel since 9.3, and it would be helpful to know if the same behaviour is seen when running a default build/install of the latest FreeBSD versions.

I don't believe that the MAC addresses are actually a problem for your described network, but might be a symptom of something else not working correctly.
 
OP
StreamThreader

StreamThreader

New Member


Messages: 19

I installed 10.3, trouble not resolve, MAC duplicated.
I change motherboard (Gigabyte GA-E350N) and problem resolved.
I detect, this is bug produce only on Intel D410PT motherboard (i tested on several identical boards). Plugged to Intel D410PT other PCI external nic (d-link) and internal nic disappeared from ifconfig.
In these Intel motherboards MAC cloned to internal NIC, on other motherboards this bug not produced.
Plugged Intel PCI NIC, MAC not cloned, it work!
So, this motherboard has compatible problem with realtek external NIC's.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 13,132
Messages: 39,736

This must mean it's a "feature" of this Intel mainboard. Which probably also means there's a setting in the BIOS to turn it on/off.
 
OP
StreamThreader

StreamThreader

New Member


Messages: 19

This motherboard have very simple BIOS settigns, PCI, memory, IRQ mapping or other setting not configurable.
Update BIOS not resolve problem on Intel D410PT
 

Attachments

  • P60818-160756.jpg
    P60818-160756.jpg
    40.9 KB · Views: 263
OP
StreamThreader

StreamThreader

New Member


Messages: 19

Plug new NIC from TP-Link with chip RTL8169SC (gigabit ethernet), and system again copy MAC to both NICs.

Load from Linux Finnix 109 LiveCD, and both NICs have separate MAC (so, linux drivers work normaly).

And, if plug Ggabit Ethernet nic from realtek, manualy change it MAC then it work, but if plug realtek Fast Ethernet, manualy change MAC then it not work.
Eny way realtek chip cause MAC duplication, but gigabit ether chip work, fast ether not.

Yes, this bug with MAC cause problem with traffic.
 

Attachments

  • 20160819_173443-.jpg
    20160819_173443-.jpg
    63.9 KB · Views: 379
  • 20160819_173803-.jpg
    20160819_173803-.jpg
    70.4 KB · Views: 243
Top