LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 05-21-2022, 11:38 PM   #1
mfoley
Senior Member
 
Registered: Oct 2008
Location: Columbus, Ohio USA
Distribution: Slackware
Posts: 2,593

Rep: Reputation: 179Reputation: 179
Upgrading 14.2 to 15.0, no internet connection


I've already installed a couple of 15.0 system from scratch w/o problem. Now, I'm trying to upgrade from 14.2 (up-to-date) to 15.0. I believe I've followed the procedures in UPGRADE.TXT. The system boots OK, and I appear to have eth0:
Code:
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 23.244.81.7  netmask 255.255.255.0  broadcast 23.244.81.255
        inet6 fe80::468a:5bff:fe89:1d7f  prefixlen 64  scopeid 0x20<link>
        ether 44:8a:5b:89:1d:7f  txqueuelen 1000  (Ethernet)
        RX packets 4574  bytes 274440 (268.0 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 5  bytes 446 (446.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
But I get "temporary resolution failure, no route to host".

I've been doing quite a lot with network interfacing over the past decade or so, especially with Slackware, but I'll have to say I'm stumped. My rc.inet1.conf has:
Code:
# IPv4 config options for eth0:
IPADDRS[0]="23.244.81.7"
# NETMASK[0]="255.255.254.0"
USE_DHCP[0]="no"
# IPv6 config options for eth0:
IP6ADDRS[0]=""
USE_SLAAC[0]=""
USE_DHCP6[0]=""
# Generic options for eth0:
DHCP_HOSTNAME[0]=""
/etc/resolv.conf has the same name servers.

Maybe I'll call myself an idiot later, but I know not where to look. This normally "just works".
 
Old 05-22-2022, 12:31 AM   #2
tadgy
Member
 
Registered: May 2018
Location: UK
Distribution: Slackware (servers), Void (desktop/laptop)
Posts: 299

Rep: Reputation: 401Reputation: 401Reputation: 401Reputation: 401Reputation: 401
You forgot the netmask component of the IPADDRS[0] parameter for your interface.

Since you didn't specify the netmask, it's assumed to be /24 - which differs from the NETMASK[0] parameter you have commented, indicating you need a /23.

Set:
Code:
IPADDRS[0]="23.244.81.7/23"
and that should fix your problems.
 
2 members found this post helpful.
Old 05-22-2022, 09:48 AM   #3
baumei
Member
 
Registered: Feb 2019
Location: USA; North Carolina
Distribution: Slackware 15.0 (replacing 14.2)
Posts: 365

Rep: Reputation: 124Reputation: 124
Why is your netmask line commented out?
Code:
# NETMASK[0]="255.255.254.0"
If this is the proper netmask for your network, then I expect uncommenting this line would also fix the problem.

Also, the IP address of your network's gateway/router should be given by the first line of this command, where I have put "<IP addr here>":
Code:
user1@darkstar:~$ /sbin/route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         <IP addr here>  0.0.0.0         UG    1002   0        0 eth0
If the proper address is not listed, then there is possibly a second problem.

Last edited by baumei; 05-22-2022 at 10:05 AM.
 
Old 05-22-2022, 02:39 PM   #4
tadgy
Member
 
Registered: May 2018
Location: UK
Distribution: Slackware (servers), Void (desktop/laptop)
Posts: 299

Rep: Reputation: 401Reputation: 401Reputation: 401Reputation: 401Reputation: 401
Quote:
Originally Posted by baumei View Post
Why is your netmask line commented out?
Code:
# NETMASK[0]="255.255.254.0"
If this is the proper netmask for your network, then I expect uncommenting this line would also fix the problem.
Note that the use of the NETMASK parameter is ignored when IPADDRS is set (as opposed to the old IPADDR). IPADDRS takes a list of IP/CIDR mask combinations, and assumes /24 as the mask when none is provided.

Obviously GATEWAY should still be set correctly for the network for things to work correctly.
 
Old 05-22-2022, 03:17 PM   #5
mfoley
Senior Member
 
Registered: Oct 2008
Location: Columbus, Ohio USA
Distribution: Slackware
Posts: 2,593

Original Poster
Rep: Reputation: 179Reputation: 179
Yes, that worked. Tell me, how did you know this? I find nothing on this in UPGRADE.TXT or CHANGES_AND_HINTS.TXT. Nor is it mentioned in /etc/rc.d/rc.inet1.conf, which would seem the logical place to put this critical change.
 
Old 05-22-2022, 03:34 PM   #6
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 3,345

Rep: Reputation: Disabled
Quote:
Originally Posted by mfoley View Post
Nor is it mentioned in /etc/rc.d/rc.inet1.conf, which would seem the logical place to put this critical change.
Take a look at /etc/rc.d/rc.inet1.conf.new. Granted, it's not stellar documentation, but it does include relevant examples of how to configure IP addresses.

The upgrade procedure (sensibly) leaves /etc/rc.d/rc.inet.conf well alone, as messing with that would surely cause a loss of connectivity. That's why the new file has a .new extension.

Slackware 15.0 is supposedly 100% compatible with old-style config files, so it's strange that you should run into problems. For instance, the GATEWAY parameter has not changed since forever, so I have no idea how that went missing.
 
Old 05-22-2022, 04:15 PM   #7
tadgy
Member
 
Registered: May 2018
Location: UK
Distribution: Slackware (servers), Void (desktop/laptop)
Posts: 299

Rep: Reputation: 401Reputation: 401Reputation: 401Reputation: 401Reputation: 401
Quote:
Originally Posted by Ser Olmy View Post
Slackware 15.0 is supposedly 100% compatible with old-style config files, so it's strange that you should run into problems. For instance, the GATEWAY parameter has not changed since forever, so I have no idea how that went missing.
The 15.0 rc.inet1 is 100% backwards compatible with 14.2 rc.inet1.conf files - however, the OP was using the new IPADDRS parameter with the 14.2 IPADDR syntax. Not supplying the CIDR netmask means that a /24 is assumed, which was not what the OP needed.

The GATEWAY parameter is completely unchanged from 14.2.
 
Old 05-22-2022, 04:16 PM   #8
tadgy
Member
 
Registered: May 2018
Location: UK
Distribution: Slackware (servers), Void (desktop/laptop)
Posts: 299

Rep: Reputation: 401Reputation: 401Reputation: 401Reputation: 401Reputation: 401
I should also say, the best way to generate a 100% 15.0 syntax rc.inet1.conf is to re-run 'netconfig', which will guide you through setting up IP addresses.
 
1 members found this post helpful.
Old 05-22-2022, 04:43 PM   #9
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 3,345

Rep: Reputation: Disabled
Quote:
Originally Posted by tadgy View Post
Not supplying the CIDR netmask means that a /24 is assumed, which was not what the OP needed.
That must be it.

He specified an IP address in the upper half of a /23 network, but as you say, without the requisite /23 netmask.

I'm guessing that the gateway has the address 23.244.80.1, and as that's outside the (incorrectly) assumed /24 network, the ip command would rightfully reject it ("Nexthop has invalid gateway").
 
Old 05-22-2022, 07:13 PM   #10
mfoley
Senior Member
 
Registered: Oct 2008
Location: Columbus, Ohio USA
Distribution: Slackware
Posts: 2,593

Original Poster
Rep: Reputation: 179Reputation: 179
Thanks for all the feedback. The only "examples" I see with the IP/x syntax in the rc.inet1.conf.new are for "Example of how to configure a bond" and "Example of how to configure a VLAN interface". Since I'm not doing those, I didn't pay attention to those examples, and had I, I probably would have assumed this was some specific syntax for those types of connections.

I didn't have this problem on my from-scratch installations because they both used DHCP, so I didn't even look at the .new configs. In this case, doing an upgrade, I ran through all the .new configs and did update rc.inet1.conf from .new. I then carefully compared .orig and .new, adding in my IP and gateway. I wondered why IPADDR was changed to IPADDRS and I also wondered at the lack of a NETMASK directive. It didn't occur for me to run netconfig.

I'll have to say, I don't see the point in changing the syntax of rc.inet1.conf. I don't think any other distros use this, and many Slackware users use networkmanager instead. This change does not add functionality that I can discern and I have to believe that I'm not the only one who's stumbled over this.

Thanks all!

Last edited by mfoley; 05-22-2022 at 07:15 PM.
 
Old 05-23-2022, 12:26 AM   #11
Petri Kaukasoina
Senior Member
 
Registered: Mar 2007
Posts: 1,865

Rep: Reputation: 1528Reputation: 1528Reputation: 1528Reputation: 1528Reputation: 1528Reputation: 1528Reputation: 1528Reputation: 1528Reputation: 1528Reputation: 1528Reputation: 1528
There's a man page:
Code:
man rc.inet1.conf
 
Old 05-23-2022, 01:01 AM   #12
tadgy
Member
 
Registered: May 2018
Location: UK
Distribution: Slackware (servers), Void (desktop/laptop)
Posts: 299

Rep: Reputation: 401Reputation: 401Reputation: 401Reputation: 401Reputation: 401
Quote:
Originally Posted by mfoley View Post
I'll have to say, I don't see the point in changing the syntax of rc.inet1.conf. I don't think any other distros use this, and many Slackware users use networkmanager instead. This change does not add functionality that I can discern and I have to believe that I'm not the only one who's stumbled over this.
If you had run netconfig or read the man page you'll have noticed that IPADDRS (being plural) takes a list of IP addresses and CIDR netmasks, rather than the original IPADDR (singular) and NETMASK syntax that only allows you to configure a single IP address per interface. IPADDR syntax was kept to allow older rc.inet1.conf files to be used when upgrading, but netconfig was altered to output the new syntax.

The ability to configure multiple IP addresses per interface (with the addition of IPv6 addresses if you need/want them too) is often a requirement for servers.

It wasn't just a change for change's sake
 
2 members found this post helpful.
  


Reply

Tags
network connectivity, slackware 15.0



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Connection to WiFi Extender has no Internet access since upgrading to Mint 19 Georgepie Linux - Wireless Networking 21 09-09-2018 08:47 PM
[SOLVED] Upgrading from Alternate Source (No Internet Connection) vtel57 Slackware 6 05-02-2011 02:07 PM
No internet connection after upgrading to kernel 2.6.18 CrownAmbassador Linux - Kernel 5 01-18-2007 06:04 PM
Upgrading Redhat with no internet connection avikosan Linux - Software 2 11-27-2006 09:11 PM
upgrading (or not upgrading) glibc richarde Slackware 9 09-12-2005 12:56 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 10:38 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration