Bug 168268 - [re] if_re doesn't work if you set MAC address
Summary: [re] if_re doesn't work if you set MAC address
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: unspecified
Hardware: Any Any
: Normal Affects Only Me
Assignee: Pyun YongHyeon
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-23 19:20 UTC by Irakli M
Modified: 2018-11-14 14:00 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Irakli M 2012-05-23 19:20:01 UTC
if_re has a bug
If you set ether address in ifconfig, ping fails,
but after, if you change interface to promiscuous mode ping become work.



re0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=389b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_UCAST,WOL_MCAST,WOL_MAGIC>


re0@pci0:2:0:0: class=0x020000 card=0x816810ec chip=0x816810ec rev=0x06 hdr=0x00
    vendor     = 'Realtek Semiconductor Co., Ltd.'
    device     = 'RTL8111/8168B PCI Express Gigabit Ethernet controller'
    class      = network
    subclass   = ethernet

How-To-Repeat: /etc/rc.conf

ifconfig_re0="inet 192.168.0.2/24"	 	ping works

ifconfig_re0="inet 192.168.0.2/24"
ifconfig_re0_alias0="ether 00:02:1a:2b:3c:4d"	ping fails

tcpdump -i re0 				ping works until Ctrl+C :)
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2012-05-23 22:58:05 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-net

Over to maintainer(s).
Comment 2 Pyun YongHyeon freebsd_committer 2012-05-24 03:19:19 UTC
State Changed
From-To: open->feedback

I think the correct way to change station address is to use 
/etc/start_if.<interface>. For this case, the filename would be 
/etc/start_if.re0 and its contents could be like the following. 

#!/bin/sh 
/sbin/ifconfig $1 ether 00:02:1a:2b:3c:4d 

See rc.conf(5) for more details. 


Comment 3 Pyun YongHyeon freebsd_committer 2012-05-24 03:19:19 UTC
Responsible Changed
From-To: freebsd-net->yongari

Grab.
Comment 4 mvil 2014-12-18 12:06:38 UTC
I have the same network card and am also having trouble with this bug. I also tried disabling all offloads (ifconfig re1 -rxcsum -txcsum -vlanmtu -vlanhwtag -vlanhwcsum -wol) but that did not help.

Here is my card:

re1@pci0:3:0:0: class=0x020000 card=0xe0001458 chip=0x816810ec rev=0x06 hdr=0x00
    vendor     = 'Realtek Semiconductor Co., Ltd.'
    device     = 'RTL8111/8168B PCI Express Gigabit Ethernet controller'
    class      = network
    subclass   = ethernet


If I change MAC address, card only works in promiscuous mode. I have tested this on both 10.1 and 11.0-CURRENT.
Comment 5 Eitan Adler freebsd_committer freebsd_triage 2018-05-28 19:45:23 UTC
batch change:

For bugs that match the following
-  Status Is In progress 
AND
- Untouched since 2018-01-01.
AND
- Affects Base System OR Documentation

DO:

Reset to open status.


Note:
I did a quick pass but if you are getting this email it might be worthwhile to double check to see if this bug ought to be closed.
Comment 6 bobb 2018-11-14 14:00:29 UTC
If I change MAC address, card only works in promiscuous mode. I have tested this on 11.2

D-Link DGE-560T (re0) on FreeBSD 11.2-RELEASE-p4:
"ether" work only with "promisc"

rc.conf:
ifconfig_re0="DHCP ether 00:30:4f:xx:xx:xx promisc"

kernel:
re0: <RealTek 8168/8111 B/C/CP/D/DP/E/F/G PCIe Gigabit Ethernet> port 0xe000-0xe0ff mem 0xf0104000-0xf0104fff,0xf0100000-0xf0103fff irq 17 at device 0.0 on pci1

ifconfig:
re0: flags=28943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST,PPROMISC> metric 0 mtu 1500
options=8209b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_MAGIC,LINKSTATE>