Forums

Skip to content

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

error adding routes to /etc/conf.d/net

Problems with emerge or ebuilds? Have a basic programming question about C, PHP, Perl, BASH or something else?
Post Reply
Advanced search
6 posts • Page 1 of 1
Author
Message
Vieri
l33t
l33t
Posts: 935
Joined: Sun Dec 18, 2005 12:26 pm

error adding routes to /etc/conf.d/net

  • Quote

Post by Vieri » Mon May 09, 2011 6:40 am

Hi,

My /etc/conf.d/net file contains something like this:

Code: Select all

config_eth0=(
"10.215.144.91 netmask 255.255.0.0"
"10.215.144.6 netmask 255.255.0.0"
"192.168.144.91 netmask 255.255.255.0"
)

config_eth1=( "172.16.0.1 netmask 255.255.255.240" )

config_eth2=( "172.20.11.62 netmask 255.255.255.240" )

config_eth3=(
"192.168.210.1 netmask 255.255.255.0"
"192.168.211.1 netmask 255.255.255.0"
"192.168.212.1 netmask 255.255.255.0"
)

routes_eth0=(
 "-net 192.168.250.0 netmask 255.255.255.0 gw 10.215.147.115"
 "-net 192.168.251.0 netmask 255.255.255.0 gw 10.215.147.115"
)

routes_eth1=(
 "-host 10.215.147.61 gw 172.16.0.1"
 "-host 10.215.144.90 gw 172.16.0.2"
 "-host 10.215.144.92 gw 172.16.0.2"
 "default via 172.16.0.2"
)

routes_eth2=(
 "-net 10.215.0.0 netmask 255.255.128.0 gw 172.20.11.49"
 "-net 10.215.128.0 netmask 255.255.240.0 gw 172.20.11.49"
 "-net 10.215.148.0 netmask 255.255.252.0 gw 172.20.11.49"
 "-net 10.215.152.0 netmask 255.255.248.0 gw 172.20.11.49"
 "-net 10.215.160.0 netmask 255.255.224.0 gw 172.20.11.49"
 "-net 10.215.192.0 netmask 255.255.224.0 gw 172.20.11.49"
 "-net 10.215.224.0 netmask 255.255.240.0 gw 172.20.11.49"
 "-net 10.215.240.0 netmask 255.255.248.0 gw 172.20.11.49"
 "-net 10.215.249.0 netmask 255.255.255.0 gw 172.20.11.49"
 "-net 10.215.250.0 netmask 255.255.254.0 gw 172.20.11.49"
 "-net 10.215.252.0 netmask 255.255.252.0 gw 172.20.11.49"
 "-host 85.119.193.16 gw 172.20.11.49"
)

routes_eth3=(
 "-host 10.215.147.62 gw 192.168.210.1"
)
When I boot the system I get several errors and some routes are not added.

The failing entries are:

Code: Select all

routes_eth1=(
 "-host 10.215.147.61 gw 172.16.0.1"
 "-host 10.215.144.90 gw 172.16.0.2"
 "-host 10.215.144.92 gw 172.16.0.2"
 "default via 172.16.0.2"
)

routes_eth2=(
 "-host 85.119.193.16 gw 172.20.11.49"
)

routes_eth3=(
 "-host 10.215.147.62 gw 192.168.210.1"
)
Why are they failing? Is there a syntax error on my behalf?

Note that once the system is up, I can manually run these commands successfully at the console prompt:

Code: Select all

# route add -host 85.119.193.16 gw 172.20.11.49
# route add -host 10.215.147.62 gw 192.168.210.1
# route add -host 10.215.147.61 gw 172.16.0.1
# route add -host 10.215.144.92 gw 172.16.0.2
Thanks,

Vieri
Top
Sysa
Apprentice
Apprentice
User avatar
Posts: 161
Joined: Wed Mar 16, 2005 8:52 am
Location: Europe

  • Quote

Post by Sysa » Mon May 09, 2011 11:58 am

What is your "baselayout"?
RedHat -> SuSE -> Debian -> Gentoo
Top
v_andal
Guru
Guru
Posts: 549
Joined: Tue Aug 26, 2008 4:25 pm
Location: Germany

  • Quote

Post by v_andal » Mon May 09, 2011 2:40 pm

Most likely, you've updated to baselayout2 (openrc) and there the format of net file is slightly different. There was a news about it in portage and
reference to the document that describes what needs to be done for smooth change.
Top
Vieri
l33t
l33t
Posts: 935
Joined: Sun Dec 18, 2005 12:26 pm

  • Quote

Post by Vieri » Tue May 10, 2011 2:01 pm

No, I have baselayout 1:

Code: Select all

*  sys-apps/baselayout
      Latest version installed: 1.12.14-r1
I'm not using openrc.
Top
Sysa
Apprentice
Apprentice
User avatar
Posts: 161
Joined: Wed Mar 16, 2005 8:52 am
Location: Europe

Re: error adding routes to /etc/conf.d/net

  • Quote

Post by Sysa » Wed May 11, 2011 5:33 am

Vieri wrote:My /etc/conf.d/net file contains something like this:

Code: Select all

...
routes_eth3=(
 "-host 10.215.147.62 gw 192.168.210.1"
)
When I boot the system I get several errors and some routes are not added.

The failing entries are:

Code: Select all

...
routes_eth3=(
 "-host 10.215.147.62 gw 192.168.210.1"
)
...
I think you should not use -net/-host in configuration. The system use /32 netmask by default, so if you do not set a netmask it is a correct definition for hosts.
Also be sure that your relevant interface is up during the route initialization.
RedHat -> SuSE -> Debian -> Gentoo
Top
Vieri
l33t
l33t
Posts: 935
Joined: Sun Dec 18, 2005 12:26 pm

  • Quote

Post by Vieri » Wed May 11, 2011 6:08 am

Thanks for pointing that out!
As soon as I can, I'll change my /etc/conf.d/net and remove "-net/-host".
Funny thing that some "-net" declarations in the net file don't give errors and are correctly executed.
I don't know what the underlying system call is but it "works".
For the errors I mentioned above, the only message I get on screen is "RTNETLINK answers= invalid arguments".
So it's probably a syntax error.

Thanks again.
Top
Post Reply

6 posts • Page 1 of 1

Return to “Portage & Programming”

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