I'm trying to get the interface on a multi-homed machine named "internal"
I have ifcfg-internal:
cat ifcfg-internal # Please read /usr/share/doc/initscripts-*/sysconfig.txt # for the documentation of these parameters. TYPE=Ethernet BOOTPROTO=none DEVICE=internal ONBOOT=yes IPADDR=10.10.11.253 PREFIX=24 DEFROUTE=no IPV4_FAILURE_FATAL=no IPV6INIT=no USERCTL=no HWADDR=50:7b:9d:0b:8a:ab
rebboted, but:
ifconfig enp1s0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500 ether 50:7b:9d:0b:8a:ab txqueuelen 1000 (Ethernet)
As I understand, NM scans the ifcfg files for HWADDR's. If there's a match, it names the interface the DEVICE name.
Why not here? sean
On 12/10/18 4:22 PM, sean darcy wrote:
I'm trying to get the interface on a multi-homed machine named "internal"
ifconfig enp1s0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500 ether 50:7b:9d:0b:8a:ab txqueuelen 1000 (Ethernet)
Is that the full ifconfig output for that interface or does it have the right IP address as well?
As I understand, NM scans the ifcfg files for HWADDR's. If there's a match, it names the interface the DEVICE name.
What does "nmcli d" give you?
On 12/11/18 12:54 AM, Samuel Sieb wrote:
On 12/10/18 4:22 PM, sean darcy wrote:
I'm trying to get the interface on a multi-homed machine named "internal"
ifconfig enp1s0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500 ether 50:7b:9d:0b:8a:ab txqueuelen 1000 (Ethernet)
Is that the full ifconfig output for that interface or does it have the right IP address as well?
I haven't connected the port yet. Before I do I need to make sure I've got the correct internet name.
As I understand, NM scans the ifcfg files for HWADDR's. If there's a match, it names the interface the DEVICE name.
What does "nmcli d" give you? _______________________________________________
nmcli d DEVICE TYPE STATE CONNECTION wlp2s0 wifi connected 1stFloor_5GHz 2 enp1s0 ethernet unavailable -- lo loopback unmanaged --
sean
On 12/11/18 11:52 AM, sean darcy wrote:
On 12/11/18 12:54 AM, Samuel Sieb wrote:
On 12/10/18 4:22 PM, sean darcy wrote:
I'm trying to get the interface on a multi-homed machine named "internal"
ifconfig enp1s0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500 ether 50:7b:9d:0b:8a:ab txqueuelen 1000 (Ethernet)
Is that the full ifconfig output for that interface or does it have the right IP address as well?
I haven't connected the port yet. Before I do I need to make sure I've got the correct internet name.
As I understand, NM scans the ifcfg files for HWADDR's. If there's a match, it names the interface the DEVICE name.
What does "nmcli d" give you? _______________________________________________
nmcli d DEVICE TYPE STATE CONNECTION wlp2s0 wifi connected 1stFloor_5GHz 2 enp1s0 ethernet unavailable -- lo loopback unmanaged --
sean _______________________________________________
And, FWIW:
cat /etc/udev/rules.d/40-persistent-net.rules # this is the pci ethernet port # udevadm info -a -p /sys/class/net/enp1s0/ # r8169 0000:01:00.0 eth0: RTL8168g/8111g, 50:7b:9d:0b:8a:ab, XID 50900880, IRQ 44 SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="50:7b:9d:0b:8a:ab", ATTR{dev_id}=="0x0", ATTR{type}=="1", NAME="internal"
But now nm handles naming , not udev, correct ?
sean
On 12/11/18 9:22 AM, sean darcy wrote:
cat /etc/udev/rules.d/40-persistent-net.rules # this is the pci ethernet port # udevadm info -a -p /sys/class/net/enp1s0/ # r8169 0000:01:00.0 eth0: RTL8168g/8111g, 50:7b:9d:0b:8a:ab, XID 50900880, IRQ 44 SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="50:7b:9d:0b:8a:ab", ATTR{dev_id}=="0x0", ATTR{type}=="1", NAME="internal"
But now nm handles naming , not udev, correct ?
Try deleting that file and see what happens.
On 12/11/18 8:52 AM, sean darcy wrote:
On 12/11/18 12:54 AM, Samuel Sieb wrote:
On 12/10/18 4:22 PM, sean darcy wrote:
I'm trying to get the interface on a multi-homed machine named "internal"
ifconfig enp1s0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500 ether 50:7b:9d:0b:8a:ab txqueuelen 1000 (Ethernet)
Is that the full ifconfig output for that interface or does it have the right IP address as well?
I haven't connected the port yet. Before I do I need to make sure I've got the correct internet name.
That's the device (ethernet port) name, NOT the host name. The host name is controlled by the contents of the /etc/hostname file, which is read at boot time and sets the FQDN (fully qualified domain name) of the machine.
The stuff in the /etc/sysconfig/network-scripts/ifcfg-* files (and NM's configurations) control how the interfaces themselves are configured and do not affect the hostname of the machine.
As I understand, NM scans the ifcfg files for HWADDR's. If there's a match, it names the interface the DEVICE name.
I believe NM uses the DEVICE _or_ the HWADDR to set up the interface. Whichever one matches the hardware config first is what gets used (I'm not sure which has precedence). And don't be confused...the values in the NM config are only used to match the hardware.
And in answer to your second message, NM doesn't do any renaming of devices. That's still done by the udev rules. ---------------------------------------------------------------------- - Rick Stevens, Systems Engineer, AllDigital ricks@alldigital.com - - AIM/Skype: therps2 ICQ: 226437340 Yahoo: origrps2 - - - - "Microsoft is a cross between The Borg and the Ferengi. - - Unfortunately they use Borg to do their marketing and Ferengi to - - do their programming." -- Simon Slavin - ----------------------------------------------------------------------
On 12/11/18 12:54 PM, Rick Stevens wrote:
On 12/11/18 8:52 AM, sean darcy wrote:
On 12/11/18 12:54 AM, Samuel Sieb wrote:
On 12/10/18 4:22 PM, sean darcy wrote:
I'm trying to get the interface on a multi-homed machine named "internal"
ifconfig enp1s0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500 ether 50:7b:9d:0b:8a:ab txqueuelen 1000 (Ethernet)
Is that the full ifconfig output for that interface or does it have the right IP address as well?
I haven't connected the port yet. Before I do I need to make sure I've got the correct internet name.
That's the device (ethernet port) name, NOT the host name. The host name is controlled by the contents of the /etc/hostname file, which is read at boot time and sets the FQDN (fully qualified domain name) of the machine.
That was fat finger syndrome. I meant interface name !
The stuff in the /etc/sysconfig/network-scripts/ifcfg-* files (and NM's configurations) control how the interfaces themselves are configured and do not affect the hostname of the machine.
As I understand, NM scans the ifcfg files for HWADDR's. If there's a match, it names the interface the DEVICE name.
I believe NM uses the DEVICE _or_ the HWADDR to set up the interface. Whichever one matches the hardware config first is what gets used (I'm not sure which has precedence). And don't be confused...the values in the NM config are only used to match the hardware.
And in answer to your second message, NM doesn't do any renaming of devices. That's still done by the udev rules.
If so, why doesn't the udev rule work ? But I think nm now does device renaming: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/htm...
sean
It's been my experience that if you want udev to rename interfaces you have to include in /etc/default/grub: net.ifnames=0 on the kernel command line to prevent the auto rename that the kernel does: GRUB_CMDLINE_LINUX="rd.md.uuid=bf821173:4de945af:1f58df6d:74e2fc11 net.ifnames=0 rd.shell rd.timeout=65" Don't forget to re-create your grub config and then reboot: grub2-mkconfig -o /boot/grub2/grub.cfg
My /etc/udev/rules.d/70-persistent-net.rules line looks like this: SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="6c:f0:49:0a:1e:54", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="lan4"
Bill
On 12/11/2018 9:10 PM, sean darcy wrote:
On 12/11/18 12:54 PM, Rick Stevens wrote:
On 12/11/18 8:52 AM, sean darcy wrote:
On 12/11/18 12:54 AM, Samuel Sieb wrote:
On 12/10/18 4:22 PM, sean darcy wrote:
I'm trying to get the interface on a multi-homed machine named "internal"
ifconfig enp1s0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500 ether 50:7b:9d:0b:8a:ab txqueuelen 1000 (Ethernet)
Is that the full ifconfig output for that interface or does it have the right IP address as well?
I haven't connected the port yet. Before I do I need to make sure I've got the correct internet name.
That's the device (ethernet port) name, NOT the host name. The host name is controlled by the contents of the /etc/hostname file, which is read at boot time and sets the FQDN (fully qualified domain name) of the machine.
That was fat finger syndrome. I meant interface name !
The stuff in the /etc/sysconfig/network-scripts/ifcfg-* files (and NM's configurations) control how the interfaces themselves are configured and do not affect the hostname of the machine.
As I understand, NM scans the ifcfg files for HWADDR's. If there's a match, it names the interface the DEVICE name.
I believe NM uses the DEVICE _or_ the HWADDR to set up the interface. Whichever one matches the hardware config first is what gets used (I'm not sure which has precedence). And don't be confused...the values in the NM config are only used to match the hardware.
And in answer to your second message, NM doesn't do any renaming of devices. That's still done by the udev rules.
If so, why doesn't the udev rule work ? But I think nm now does device renaming: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/htm...
sean
users mailing list -- users@lists.fedoraproject.org To unsubscribe send an email to users-leave@lists.fedoraproject.org Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org
On 12/12/18 5:59 AM, Bill Shirley wrote:
It's been my experience that if you want udev to rename interfaces you have to include in /etc/default/grub: net.ifnames=0 on the kernel command line to prevent the auto rename that the kernel does: GRUB_CMDLINE_LINUX="rd.md.uuid=bf821173:4de945af:1f58df6d:74e2fc11 net.ifnames=0 rd.shell rd.timeout=65" Don't forget to re-create your grub config and then reboot: grub2-mkconfig -o /boot/grub2/grub.cfg
My /etc/udev/rules.d/70-persistent-net.rules line looks like this: SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="6c:f0:49:0a:1e:54", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="lan4"
Bill
On 12/11/2018 9:10 PM, sean darcy wrote:
On 12/11/18 12:54 PM, Rick Stevens wrote:
On 12/11/18 8:52 AM, sean darcy wrote:
On 12/11/18 12:54 AM, Samuel Sieb wrote:
On 12/10/18 4:22 PM, sean darcy wrote:
I'm trying to get the interface on a multi-homed machine named "internal"
ifconfig enp1s0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500 ether 50:7b:9d:0b:8a:ab txqueuelen 1000 (Ethernet)
Is that the full ifconfig output for that interface or does it have the right IP address as well?
I haven't connected the port yet. Before I do I need to make sure I've got the correct internet name.
That's the device (ethernet port) name, NOT the host name. The host name is controlled by the contents of the /etc/hostname file, which is read at boot time and sets the FQDN (fully qualified domain name) of the machine.
That was fat finger syndrome. I meant interface name !
The stuff in the /etc/sysconfig/network-scripts/ifcfg-* files (and NM's configurations) control how the interfaces themselves are configured and do not affect the hostname of the machine.
As I understand, NM scans the ifcfg files for HWADDR's. If there's a match, it names the interface the DEVICE name.
I believe NM uses the DEVICE _or_ the HWADDR to set up the interface. Whichever one matches the hardware config first is what gets used (I'm not sure which has precedence). And don't be confused...the values in the NM config are only used to match the hardware.
And in answer to your second message, NM doesn't do any renaming of devices. That's still done by the udev rules.
If so, why doesn't the udev rule work ? But I think nm now does device renaming: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/htm...
sean
Very helpful. I'll try that.
I'd like to get the nm renaming working if I could. We prefer to follow fedora "best" practice (or at least current practice) if we can, so we don't have to hack each machine we set up.
But maybe nm renaming just doesn't work......
Thanks,
sean
On 12/12/18 2:59 AM, Bill Shirley wrote:
It's been my experience that if you want udev to rename interfaces you have to include in /etc/default/grub: net.ifnames=0 on the kernel command line to prevent the auto rename that the kernel does: GRUB_CMDLINE_LINUX="rd.md.uuid=bf821173:4de945af:1f58df6d:74e2fc11 net.ifnames=0 rd.shell rd.timeout=65" Don't forget to re-create your grub config and then reboot: grub2-mkconfig -o /boot/grub2/grub.cfg
My /etc/udev/rules.d/70-persistent-net.rules line looks like this: SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="6c:f0:49:0a:1e:54", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="lan4"
I haven't modified my kernel command line and I don't have 70-persistent-net.rules on any of my computers. Just try removing that file and see if that fixes it.
On 12/12/18 2:40 PM, Samuel Sieb wrote:
On 12/12/18 2:59 AM, Bill Shirley wrote:
It's been my experience that if you want udev to rename interfaces you have to include in /etc/default/grub: net.ifnames=0 on the kernel command line to prevent the auto rename that the kernel does: GRUB_CMDLINE_LINUX="rd.md.uuid=bf821173:4de945af:1f58df6d:74e2fc11 net.ifnames=0 rd.shell rd.timeout=65" Don't forget to re-create your grub config and then reboot: grub2-mkconfig -o /boot/grub2/grub.cfg
My /etc/udev/rules.d/70-persistent-net.rules line looks like this: SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="6c:f0:49:0a:1e:54", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="lan4"
I haven't modified my kernel command line and I don't have 70-persistent-net.rules on any of my computers. Just try removing that file and see if that fixes it. _______________________________________________
Removed 70-persistent-net.rules. Rebooted. It worked.
Thanks, sean