Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] route del - active after reboot again
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
stegerpl
Apprentice
Apprentice


Joined: 25 Jun 2005
Posts: 185
Location: 48°19'30"N 14°20'18"E

PostPosted: Sat Feb 16, 2013 9:39 am    Post subject: [solved] route del - active after reboot again Reply with quote

I changed my network structure - in the past I had two subnets 192.168.1.x and 192.168.140.x and used my main computer as gateway by adding a route for the internal LAN 192.168.140.x via the eth1 while the default gateway was my internet connection I access via eth0. The setup was done in the /etc/conf.d/net

Now I deleted the routing for 192.168.140.x via eth1 from the /etc/conf.d/net but after a reboot it is stil active. When I delete it manually by
Code:
route del -net 192.168.140.0 netmask 255.255.255.0 dev eth1
it works. I can access all my hosts by netmask 255.255.0.0. But only until the next reboot and then the routing is again via eth1.

My /etc/conf.d/net looks now like:
Code:
config_eth0=( "dhcp" )
dhcpcd_eth0="-t 3"
dhcpcd_eth0="-h minbar"
mtu_eth0="1420"

config_eth1=( "192.168.140.8/24" )
# [routes_eth1=( "192.168.140.0 via 192.168.140.8" )
mtu_eth1="4096"

Can anybody tell me what's wrong?

Simple solution woul be to change all the subnet 192.168.140.x to 192.168.1.x but I want to avoid this for future extensions and logical reasons.

Thanks inadvance
Peter
_________________
[1]... AMD Phenon X4-9950 on asus M3N78-EM with 4 GB of RAM - gentoo 10.1 - kernel 2.6.32 - kde 4.3.4
[2]... AMD Athlon XP 2500+ mobile on ASUS A7N8X with 512 kB RAM and 2xTT S-2300 - vdr-1.6.0 based on gentoo-2008.0


Last edited by stegerpl on Tue Feb 19, 2013 11:00 am; edited 1 time in total
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54211
Location: 56N 3W

PostPosted: Sat Feb 16, 2013 12:46 pm    Post subject: Reply with quote

stegerpl,

You net file still uses the old baselayout1 syntax. That will break one day
You should remove all of the ( and ).

Code:
config_eth1="192.168.140.8/24"
provides a route to the 192.168.140.0/24 subnet too.

Try using config_eth1="192.168.140.8/16", now you will get a route to 192.168.0.0/16, which may well be what you want.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
stegerpl
Apprentice
Apprentice


Joined: 25 Jun 2005
Posts: 185
Location: 48°19'30"N 14°20'18"E

PostPosted: Tue Feb 19, 2013 11:01 am    Post subject: Reply with quote

Hi Neddy,

thanks again - now it's clear: /24 refers to the subnet only and /16 one level higher....

Peter
_________________
[1]... AMD Phenon X4-9950 on asus M3N78-EM with 4 GB of RAM - gentoo 10.1 - kernel 2.6.32 - kde 4.3.4
[2]... AMD Athlon XP 2500+ mobile on ASUS A7N8X with 512 kB RAM and 2xTT S-2300 - vdr-1.6.0 based on gentoo-2008.0
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54211
Location: 56N 3W

PostPosted: Tue Feb 19, 2013 6:06 pm    Post subject: Reply with quote

stegerpl,

Sort of. The /X divides the IP address into the network/host parts.
/16 is the same as 255.255.0.0
/24 is the same as 255.255.255.0

/17 is the same as 255.255.128.0

The rest are left as an exercise for the reader :)
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum