Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Networking & Security
  • Search

[Solved] How to set /etc/init.d/net with /24

Having problems getting connected to the internet or running a server? Wondering about securing your box? Ask here.
Post Reply
Advanced search
3 posts • Page 1 of 1
Author
Message
holm74
n00b
n00b
Posts: 25
Joined: Wed Nov 21, 2007 9:03 am

[Solved] How to set /etc/init.d/net with /24

  • Quote

Post by holm74 » Sun Oct 31, 2010 2:21 pm

Hi there,

I have a problem with setting my fixed IP in /etc/init.d/net

Example:

What I need in /etc/init.d/net is

config_eth0=( "123.456.789.000/24 netmask 255.255.255.255 brd 123.456.789.000" )
routes_eth0=( "default via 123.456.789.1" )

But while booting the server can not handle the ->/24<- in 123.456.789.000/24

So - at the moment - I have do boot the server with

config_eth0=( "123.456.789.000 netmask 255.255.255.255 brd 123.456.789.000" )
routes_eth0=( "default via 123.456.789.1" )

and log onto the server via a cosole and set the ip by hand:

ifconfig eth0 123.456.789.000/24
route add default gw 123.456.789.1

After that I can ping the server.

Without the /24 in the IP I can not set the default route.

Is there a way to post set the /24 in /etc/init.d/net. Just like to boot everything without re-login onto my system.

BTW: is there a special name for the information /24: just want to inform myself for what it is good for.

Thanks for every advice.

Talk soon

Holm
Last edited by holm74 on Mon Nov 01, 2010 9:05 am, edited 1 time in total.
Top
Beju
Apprentice
Apprentice
Posts: 171
Joined: Thu Mar 30, 2006 8:15 pm

  • Quote

Post by Beju » Sun Oct 31, 2010 3:19 pm

Well, that's because the '/24' is actually the netmask of the address. It seems that you are trying to set 24 and 32 bit mask at the same time. Try to put the 255.255.255.0 in the netmask parameter, instead of 255.255.255.255 and remove the '/24' from the address, then see if it works.

If I remember correctly, in the recent versions of gentoo, if you supply ip address and broadcast or netmask only, then the third missing parameter (netmask or broadcast respectively) will be calculated and set automatically. So you might try to remove the netmask :)
Top
holm74
n00b
n00b
Posts: 25
Joined: Wed Nov 21, 2007 9:03 am

  • Quote

Post by holm74 » Mon Nov 01, 2010 9:05 am

Hi Beju,

thank you: that did the trick.

Will try to change this message to solved.

Talk soon

Holm
Top
Post Reply

3 posts • Page 1 of 1

Return to “Networking & Security”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic