View previous topic :: View next topic |
Author |
Message |
stegerpl Apprentice
Joined: 25 Jun 2005 Posts: 185 Location: 48°19'30"N 14°20'18"E
|
Posted: Sat Feb 16, 2013 9:39 am Post subject: [solved] route del - active after reboot again |
|
|
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 |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54808 Location: 56N 3W
|
Posted: Sat Feb 16, 2013 12:46 pm Post subject: |
|
|
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 |
|
|
stegerpl Apprentice
Joined: 25 Jun 2005 Posts: 185 Location: 48°19'30"N 14°20'18"E
|
Posted: Tue Feb 19, 2013 11:01 am Post subject: |
|
|
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 |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54808 Location: 56N 3W
|
Posted: Tue Feb 19, 2013 6:06 pm Post subject: |
|
|
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 |
|
|
|