LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-15-2024, 09:20 AM   #1
tbarre
LQ Newbie
 
Registered: Apr 2008
Posts: 1

Rep: Reputation: 0
Unhappy Error: Invalid prefix for given prefix length


Using Ubuntu server, the following commands have been run:

sudo ip addr add 127.0.0.1/24 dev lo
sudo ip addr route 127.0.0.1/24 dev lo

The route command return the following error:

Error: Invalid prefix for given prefix length

I am not sure why.

Any thoughts?
 
Old 02-16-2024, 02:07 AM   #2
___
Member
 
Registered: Apr 2023
Posts: 141
Blog Entries: 1

Rep: Reputation: Disabled
sudo ip route add 127.0.0.0/24 dev lo

...1 would require /32
https://www.linuxquestions.org/quest...th-4175703568/
Try searching "<the err msg>" [site:linuxquestions.org]

P.S. 127 should be /8 And no route (to it) is needed.
ping 127.255.255.254 # should succeed!

FYI: your hand transcription of 2nd cmd is incorrect, because what you wrote would say:
Command "route" is unknown, try "ip address help".
https://www.cyberciti.biz/faq/linux-...-usage-syntax/

Last edited by ___; 02-16-2024 at 03:59 AM.
 
  


Reply



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
configure: error: expected an absolute directory name for --prefix: -prefix=/home/jeo Nownuri Linux - Newbie 2 03-28-2015 07:40 AM
wide-dhcpv6 - trying to obtain /60 prefix, "invalid prefix" psycroptic Linux - Server 3 05-26-2014 08:31 AM
How do I get the prefix length of an IPv6 address programatically in AIX? the_pilgrim AIX 1 09-30-2010 01:39 PM
Please help fix: sky2 error: rx length error: status 0x42c0500 length 600 trapix22 Linux - Wireless Networking 1 10-25-2008 07:50 AM
difference b/w AF_ prefix and PF_ prefix related to socket Ashok_mittal Linux - Newbie 1 03-20-2008 04:15 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:17 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