Re: Default route not correctly added
Hi, On Thu, May 16, 2019 at 8:43 PM Alex wrote: > > Hi, > > > >> Typically NAME and DEVICE are the name of the device, like enp4s6, > > >> but they don't exist in this config. Is that what is missing? > > > > > > Doubtful. > > > > > > I have a system with a ifcfg-enp0s3 file and NAME=LAN-1 and > > > everthing works just fine. > > > > But "DEVICE=..." would have to be ""DEVICE=enp4s6" if the NIC is > > "enp4s6", especially if there's no "HWADDR=...". > > I've added DEVICE=enp4s6 > > > If you set "DEVICE=enp4s6" in "ifcfg-foo", "enp4s6" will be configured > > and brought up. The ifcfg file name isn't used. > > > > If you set "NAME=bar", you can run "if{up,down} bar" and "nmcli > > ... bar", but "ip {l,a,r}" will display "enp4s6". > > > > If I have "enp4s6", I set "DEVICE=enp4s6" and "NAME=enp4s6" in > > "ifcfg-enp4s6", so that everything corresponds and "ip a sh enp4s6" > > and "nmcli c sh enp4s6" are possible and correspond to the same NIC. > > I've also now added NAME=enp4s6, although I realize none of these > changes are likely to be effective here. > > > Going back to OP's original query, do you have more than one NIC? Do > > their ifcfg files both have "DEFROUTE=yes"? What's the output of "ip > > r" (or "route") before you run "route add default gw 192.168.9.1 dev > > enp4s6". > > No, prior to running the network config, the > /etc/sysconfig/network-scripts directory was empty. After running it, > only that one file with interface info was created. There is another > interface on the system, but it is not configured. > > I wish this was better documented, but it seems to change with every > release, even slightly. For those following this thread, I rebooted the desktop remotely and it came back successfully. For those not following, for some reason after a fedora30 upgrade from fedora29, it did not properly add the default route, making it impossible to connect to the system remotely using ssh. Here's the working config: $ cat /etc/sysconfig/network-scripts/ifcfg-Wired_connection_2 HWADDR=00:0E:0C:3B:35:68 DEVICE=enp4s6 NAME=enp4s6 TYPE=Ethernet PROXY_METHOD=none BROWSER_ONLY=no BOOTPROTO=none IPADDR=192.168.9.110 PREFIX=24 GATEWAY=192.168.9.1 DEFROUTE=yes IPV4_FAILURE_FATAL=no IPV6INIT=yes IPV6_AUTOCONF=yes IPV6_DEFROUTE=yes IPV6_FAILURE_FATAL=no IPV6_ADDR_GEN_MODE=stable-privacy NAME="Wired connection 2" UUID=850cde8f-7dc2-364a-8911-e511cdbea2e4 ONBOOT=yes AUTOCONNECT_PRIORITY=-999 DNS1=167.206.112.138 DNS2=8.8.4.4 $ route Kernel IP routing table Destination Gateway Genmask Flags Metric RefUse Iface default _gateway0.0.0.0 UG10000 enp4s6 192.168.9.0 0.0.0.0 255.255.255.0 U 10000 enp4s6 192.168.122.0 0.0.0.0 255.255.255.0 U 0 00 virbr0 ___ users mailing list -- users@lists.fedoraproject.org To unsubscribe send an email to users-le...@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
Re: Default route not correctly added
Tim: >> Was his gateway up and running before the computer booted up? (I'm >> unsure if an unavailable gateway would have been removed from pre- >> configured settings, though.) Alex: > Before it booted up? I'm not sure I understand. I couldn't reach his > computer prior to him typing the route command I've shown above. > After having added it, I could successfully connect to it remotely. I was thinking along the lines of him switching on his router and computer together, and the computer booting up faster than his router. ___ users mailing list -- users@lists.fedoraproject.org To unsubscribe send an email to users-le...@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
Re: Default route not correctly added
Hi, > >> Typically NAME and DEVICE are the name of the device, like enp4s6, > >> but they don't exist in this config. Is that what is missing? > > > > Doubtful. > > > > I have a system with a ifcfg-enp0s3 file and NAME=LAN-1 and > > everthing works just fine. > > But "DEVICE=..." would have to be ""DEVICE=enp4s6" if the NIC is > "enp4s6", especially if there's no "HWADDR=...". I've added DEVICE=enp4s6 > If you set "DEVICE=enp4s6" in "ifcfg-foo", "enp4s6" will be configured > and brought up. The ifcfg file name isn't used. > > If you set "NAME=bar", you can run "if{up,down} bar" and "nmcli > ... bar", but "ip {l,a,r}" will display "enp4s6". > > If I have "enp4s6", I set "DEVICE=enp4s6" and "NAME=enp4s6" in > "ifcfg-enp4s6", so that everything corresponds and "ip a sh enp4s6" > and "nmcli c sh enp4s6" are possible and correspond to the same NIC. I've also now added NAME=enp4s6, although I realize none of these changes are likely to be effective here. > Going back to OP's original query, do you have more than one NIC? Do > their ifcfg files both have "DEFROUTE=yes"? What's the output of "ip > r" (or "route") before you run "route add default gw 192.168.9.1 dev > enp4s6". No, prior to running the network config, the /etc/sysconfig/network-scripts directory was empty. After running it, only that one file with interface info was created. There is another interface on the system, but it is not configured. I wish this was better documented, but it seems to change with every release, even slightly. ___ users mailing list -- users@lists.fedoraproject.org To unsubscribe send an email to users-le...@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
Re: Default route not correctly added
On 5/16/19 10:34 PM, Tom H wrote: > On Thu, May 16, 2019 at 4:21 PM Ed Greshko wrote: >> On 5/16/19 9:54 PM, Tom H wrote: >>> On Thu, May 16, 2019 at 12:44 PM Ed Greshko wrote: On 5/16/19 4:40 AM, Alex wrote: > > Typically NAME and DEVICE are the name of the device, like enp4s6, > but they don't exist in this config. Is that what is missing? Doubtful. I have a system with a ifcfg-enp0s3 file and NAME=LAN-1 and everthing works just fine. >>> But "DEVICE=..." would have to be ""DEVICE=enp4s6" if the NIC is >>> "enp4s6", especially if there's no "HWADDR=...". >> None of my files have DEVICE= as a parameter, only HWADDR= > You need "DEVICE=..." or "HWADDR=..." for a NIC to be identified. As I said, I have only HWADDR= (as well as a convenient NAME=). >> Oh, and file the OP showed had no DEVICE=. So, I've no idea why it >> would be brought up. > The OP has "HWADDR=...". Yes, he has "HWADDR=" and "NAME=Something not related". Which is what I have and isn't causing any issues. Thus, my conclusion that a missing "DEVICE=" is unlikely to be important. If it is, then all of my systems would have been in trouble a while back. -- Right: I dislike the default color scheme Wrong: What idiot picked the default color scheme ___ users mailing list -- users@lists.fedoraproject.org To unsubscribe send an email to users-le...@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
Re: Default route not correctly added
On Thu, May 16, 2019 at 4:21 PM Ed Greshko wrote: > On 5/16/19 9:54 PM, Tom H wrote: >> On Thu, May 16, 2019 at 12:44 PM Ed Greshko wrote: >>> On 5/16/19 4:40 AM, Alex wrote: Typically NAME and DEVICE are the name of the device, like enp4s6, but they don't exist in this config. Is that what is missing? >>> Doubtful. >>> >>> I have a system with a ifcfg-enp0s3 file and NAME=LAN-1 and >>> everthing works just fine. >> But "DEVICE=..." would have to be ""DEVICE=enp4s6" if the NIC is >> "enp4s6", especially if there's no "HWADDR=...". > > None of my files have DEVICE= as a parameter, only HWADDR= You need "DEVICE=..." or "HWADDR=..." for a NIC to be identified. > Oh, and file the OP showed had no DEVICE=. So, I've no idea why it > would be brought up. The OP has "HWADDR=...". ___ users mailing list -- users@lists.fedoraproject.org To unsubscribe send an email to users-le...@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
Re: Default route not correctly added
On 5/16/19 9:54 PM, Tom H wrote: > On Thu, May 16, 2019 at 12:44 PM Ed Greshko wrote: >> On 5/16/19 4:40 AM, Alex wrote: >>> Typically NAME and DEVICE are the name of the device, like enp4s6, >>> but they don't exist in this config. Is that what is missing? >> Doubtful. >> >> I have a system with a ifcfg-enp0s3 file and NAME=LAN-1 and >> everthing works just fine. > But "DEVICE=..." would have to be ""DEVICE=enp4s6" if the NIC is > "enp4s6", especially if there's no "HWADDR=...". None of my files have DEVICE= as a parameter, only HWADDR= Oh, and file the OP showed had no DEVICE=. So, I've no idea why it would be brought up. -- Right: I dislike the default color scheme Wrong: What idiot picked the default color scheme ___ users mailing list -- users@lists.fedoraproject.org To unsubscribe send an email to users-le...@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
Re: Default route not correctly added
On Thu, May 16, 2019 at 12:44 PM Ed Greshko wrote: > On 5/16/19 4:40 AM, Alex wrote: >> >> Typically NAME and DEVICE are the name of the device, like enp4s6, >> but they don't exist in this config. Is that what is missing? > > Doubtful. > > I have a system with a ifcfg-enp0s3 file and NAME=LAN-1 and > everthing works just fine. But "DEVICE=..." would have to be ""DEVICE=enp4s6" if the NIC is "enp4s6", especially if there's no "HWADDR=...". If you set "DEVICE=enp4s6" in "ifcfg-foo", "enp4s6" will be configured and brought up. The ifcfg file name isn't used. If you set "NAME=bar", you can run "if{up,down} bar" and "nmcli ... bar", but "ip {l,a,r}" will display "enp4s6". If I have "enp4s6", I set "DEVICE=enp4s6" and "NAME=enp4s6" in "ifcfg-enp4s6", so that everything corresponds and "ip a sh enp4s6" and "nmcli c sh enp4s6" are possible and correspond to the same NIC. Going back to OP's original query, do you have more than one NIC? Do their ifcfg files both have "DEFROUTE=yes"? What's the output of "ip r" (or "route") before you run "route add default gw 192.168.9.1 dev enp4s6". ___ users mailing list -- users@lists.fedoraproject.org To unsubscribe send an email to users-le...@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
Re: Default route not correctly added
On 5/16/19 4:40 AM, Alex wrote: > Typically NAME and DEVICE are the name of the device, like enp4s6, but > they don't exist in this config. Is that what is missing? Doubtful. I have a system with a ifcfg-enp0s3 file and NAME=LAN-1 and everthing works just fine. -- Right: I dislike the default color scheme Wrong: What idiot picked the default color scheme ___ users mailing list -- users@lists.fedoraproject.org To unsubscribe send an email to users-le...@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
Re: Default route not correctly added
Hi, On Wed, May 15, 2019 at 9:34 PM Tim via users wrote: > > On Wed, 2019-05-15 at 16:40 -0400, Alex wrote: > > The problem is that, after bringing it back to his house and putting > > it online, the default route was not added properly and the system > > was unreachable until I stepped him through the process of adding it > > manually. > > > > This is the command I had him run as root to configure the default > > route: > > > > # route add default gw 192.168.9.1 dev enp4s6 > > > > Here is that /etc/sysconfig/network-scripts/ifcfg-Wired_connection_2 > > config: > > > > HWADDR=00:0E:0C:3B:35:68 > > TYPE=Ethernet > > PROXY_METHOD=none > > BROWSER_ONLY=no > > BOOTPROTO=none > > IPADDR=192.168.9.110 > > PREFIX=24 > > GATEWAY=192.168.9.1 > > DEFROUTE=yes > > IPV4_FAILURE_FATAL=no > > IPV6INIT=yes > > IPV6_AUTOCONF=yes > > IPV6_DEFROUTE=yes > > IPV6_FAILURE_FATAL=no > > IPV6_ADDR_GEN_MODE=stable-privacy > > NAME="Wired connection 2" > > UUID=850cde8f-7dc2-364a-8911-e511cdbea2e4 > > ONBOOT=yes > > DNS1=8.8.4.4 > > AUTOCONNECT_PRIORITY=-999 > > > > Is there something immediately identifiable that would prevent the > > default route from working? > > > > Typically NAME and DEVICE are the name of the device, like enp4s6, > > but they don't exist in this config. Is that what is missing? I can't > > easily reboot this machine, so want to be sure before I do it. > > Things that spring to mind are: > > Is his gateway using the same numerical IP as when you got it working > on your network? Yes. > You're using manual configuration, instead of DHCP. Does his LAN have > a DHCP server that would have automatically managed this all for him? I'm doing port forwarding from the cable modem to his IP, so while most of the network uses DHCP, I've set his computer to use a static address to be able to forward http and ssh to his machine. > Was his gateway up and running before the computer booted up? (I'm > unsure if an unavailable gateway would have been removed from pre- > configured settings, though.) Before it booted up? I'm not sure I understand. I couldn't reach his computer prior to him typing the route command I've shown above. After having added it, I could successfully connect to it remotely. There are a few NetworkManager messages printed during boot, but not sure they indicate any problems: May 15 08:39:50 localhost NetworkManager[796]: [1557923990.7338] acd[0x56313c844a30,3]: couldn't init ACD for announcing addresses on interface 'enp4s6': Operation not permitted May 15 08:39:50 localhost NetworkManager[796]: [1557923990.7341] device (enp4s6): state change: ip-config -> ip-check (reason 'none', sys-iface-state: 'managed') May 15 08:39:50 localhost NetworkManager[796]: [1557923990.7377] device (enp4s6): state change: ip-check -> secondaries (reason 'none', sys-iface-state: 'managed') May 15 08:39:50 localhost NetworkManager[796]: [1557923990.7385] device (enp4s6): state change: secondaries -> activated (reason 'none', sys-iface-state: 'managed') May 15 08:39:50 localhost NetworkManager[796]: [1557923990.9552] policy: set 'Wired connection 2' (enp4s6) as default for IPv4 routing and DNS May 15 08:39:50 localhost NetworkManager[796]: [1557923990.9561] device (enp4s6): Activation: successful, device activated. May 15 08:39:50 localhost nm-dispatcher[876]: req:2 'up' [enp4s6]: new request (3 scripts) May 15 08:39:50 localhost nm-dispatcher[876]: req:2 'up' [enp4s6]: start running ordered scripts... I think worse case I'll set NAME= and DEVICE= in the config, and also set some type of cron job or shell script that manually adds the route as root after some period of time, to give me some time to access the machine in case modifying the config doesn't work. Thanks, Alex ___ users mailing list -- users@lists.fedoraproject.org To unsubscribe send an email to users-le...@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
Re: Default route not correctly added
On Wed, 2019-05-15 at 16:40 -0400, Alex wrote: > The problem is that, after bringing it back to his house and putting > it online, the default route was not added properly and the system > was unreachable until I stepped him through the process of adding it > manually. > > This is the command I had him run as root to configure the default > route: > > # route add default gw 192.168.9.1 dev enp4s6 > > Here is that /etc/sysconfig/network-scripts/ifcfg-Wired_connection_2 > config: > > HWADDR=00:0E:0C:3B:35:68 > TYPE=Ethernet > PROXY_METHOD=none > BROWSER_ONLY=no > BOOTPROTO=none > IPADDR=192.168.9.110 > PREFIX=24 > GATEWAY=192.168.9.1 > DEFROUTE=yes > IPV4_FAILURE_FATAL=no > IPV6INIT=yes > IPV6_AUTOCONF=yes > IPV6_DEFROUTE=yes > IPV6_FAILURE_FATAL=no > IPV6_ADDR_GEN_MODE=stable-privacy > NAME="Wired connection 2" > UUID=850cde8f-7dc2-364a-8911-e511cdbea2e4 > ONBOOT=yes > DNS1=8.8.4.4 > AUTOCONNECT_PRIORITY=-999 > > Is there something immediately identifiable that would prevent the > default route from working? > > Typically NAME and DEVICE are the name of the device, like enp4s6, > but they don't exist in this config. Is that what is missing? I can't > easily reboot this machine, so want to be sure before I do it. Things that spring to mind are: Is his gateway using the same numerical IP as when you got it working on your network? You're using manual configuration, instead of DHCP. Does his LAN have a DHCP server that would have automatically managed this all for him? Was his gateway up and running before the computer booted up? (I'm unsure if an unavailable gateway would have been removed from pre- configured settings, though.) ___ users mailing list -- users@lists.fedoraproject.org To unsubscribe send an email to users-le...@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
Re: Default route not correctly added
On 5/16/19 4:40 AM, Alex wrote: > Hi, > > I've just installed fedora30 desktop on a friend's computer for him. > It was installed and configured here before he brought it to his house > and connected it to his cable modem. Previously I had set up port > forwarding on his modem from port 8027 to port 8027 on his system for > web access and port 8022 to port 8022 on his system for remote ssh > access. > > I used the gnome network manager to configure networking and just > manually configured ssh to listen on port 8022 instead of the default. > > The problem is that, after bringing it back to his house and putting > it online, the default route was not added properly and the system was > unreachable until I stepped him through the process of adding it > manually. > > This is the command I had him run as root to configure the default route: > > # route add default gw 192.168.9.1 dev enp4s6 > > Here is that /etc/sysconfig/network-scripts/ifcfg-Wired_connection_2 config: > > HWADDR=00:0E:0C:3B:35:68 > TYPE=Ethernet > PROXY_METHOD=none > BROWSER_ONLY=no > BOOTPROTO=none > IPADDR=192.168.9.110 > PREFIX=24 > GATEWAY=192.168.9.1 > DEFROUTE=yes > IPV4_FAILURE_FATAL=no > IPV6INIT=yes > IPV6_AUTOCONF=yes > IPV6_DEFROUTE=yes > IPV6_FAILURE_FATAL=no > IPV6_ADDR_GEN_MODE=stable-privacy > NAME="Wired connection 2" > UUID=850cde8f-7dc2-364a-8911-e511cdbea2e4 > ONBOOT=yes > DNS1=8.8.4.4 > AUTOCONNECT_PRIORITY=-999 > > Is there something immediately identifiable that would prevent the > default route from working? > > Typically NAME and DEVICE are the name of the device, like enp4s6, but > they don't exist in this config. Is that what is missing? I can't > easily reboot this machine, so want to be sure before I do it. It would be best too know the conditions "before" and "after" the manual addition of the route. If it is working with the above it is hard to determine why it didn't work prior. -- Right: I dislike the default color scheme Wrong: What idiot picked the default color scheme ___ users mailing list -- users@lists.fedoraproject.org To unsubscribe send an email to users-le...@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