1819880 Members
2528 Online
109607 Solutions
New Discussion юеВ

netmask ?

 
Lee Huei
Regular Advisor

netmask ?

hi,

I'm getting this error in rc.log
Configure LAN interfaces
Output from "/sbin/rc2.d/S340net start":
----------------------------
ERROR: Failed to add route entry because its interface is not
yet initialized. May need to add this route entry with
a route commad after the interface is up :
netmask: bad value
"/sbin/rc2.d/S340net start" FAILED <<--

there are 2 lan card
lan 1 entry:
P_ADDRESS[1]=10.100.109.250
SUBNET_MASK[1]=255.255.255.0
INTERFACE_NAME[1]=lan1
BROADCAST_ADDRESS[1]=""
INTERFACE_STATE[1]=up
:
:
ROUTE_DESTINATION[1]=10.100.108.11
ROUTE_MASK[1]=255.255.255.0

ROUTE_GATEWAY[1]=10.100.109.1
ROUTE_COUNT[1]=1
ROUTE_ARGS[1]=""

But whwnever i have the route_mask uncomment, i cant read the netconf file (/sbin/init.d/net) it complaint abt the route mask, i have to comment it out .

so each time system reboot, i need to manually add in the route "10.100.108.11"

anyone can help ?
9 REPLIES 9
Ermin Borovac
Honored Contributor

Re: netmask ?

The following line is giving you the clue

netmask: bad value

I suggest you replace

ROUTE_MASK[1]=255.255.255.0

with

ROUTE_MASK[1]=""
Lee Huei
Regular Advisor

Re: netmask ?

Thanks for replying.

You mean it is ok with not putting anything on the route_mask ??

Will this start up automatically upon system reboot?

currently, i've commented it out. system reboot does not start up thsi route? any advice?

Thanks in advance.
Ermin Borovac
Honored Contributor

Re: netmask ?

It looks like that you are trying to add host route in which case you shouldn't specify route network mask.

Route network mask would only make sense if you were adding network route (see below).

ROUTE_DESTINATION[1]="net 10.100.108.0"
ROUTE_MASK[1]="255.255.255.0"

ROUTE_GATEWAY[1]=10.100.109.1
ROUTE_COUNT[1]=1
ROUTE_ARGS[1]=""
Lee Huei
Regular Advisor

Re: netmask ?

Hi,

Forgot to tell you that i've changed to this:
ROUTE_DESTINATION[1]="net 10.100.108.11"
ROUTE_MASK[1]=255.255.255.0
ROUTE_GATEWAY[1]=10.100.109.1
ROUTE_COUNT[1]=1
ROUTE_ARGS[1]=""

Still, /sbin/init.d/net start <== fail with bad mask

Peter Leddy_1
Esteemed Contributor

Re: netmask ?

Hi,

The ip addresses you are using are Class A networks so shouldn't the SUBNET_MASK & the ROUTE_MASK be 255.0.0.0

HTH,

Peter
Muthukumar_5
Honored Contributor

Re: netmask ?

Put network configuration informations within quote's as,

ROUTE_DESTINATION[1]="net 10.100.108.11"
ROUTE_MASK[1]="255.255.255.0"
ROUTE_GATEWAY[1]="10.100.109.1"
ROUTE_COUNT[1]="1"
ROUTE_ARGS[1]=""

And more, ROUTE_MASK is a optional field. You can put or make "" there. If you did not put then system will take default route mask there.

# ROUTE_MASK: Subnetwork mask in decimal-dot notation, or C language
# hexadecimal notation. This is an optional field.
# A IP address, subnet mask pair uniquely identifies
# a subnet to be reached. If a subnet mask is not given,
# then the system will assign the longest subnet mask
# of the configured network interfaces to this route.
# If there is no matching subnet mask, then the system
# will assign the default network mask as the route's
# subnet mask.

Start net again.


HTH.
Easy to suggest when don't know about the problem!
Laurie Gellatly
Honored Contributor

Re: netmask ?

Your gateway (10.100.109.1) on that interface is NOT
on the same network as 10.100.108.11 with a netmask of
255.255.255.0
Either the netmask or the gateway needs fixing.

HTH and thanks for any points. ...Laurie :{)
If you're not using OverTime, you're doing overtime!
Mike Botha
Occasional Contributor

Re: netmask ?

ROUTE_DESTINATION must specify a valid network subnet.
With a subnet mask of 255.255.255.0 a valid ROUTE_DESTINATION would be "net 10.100.108.0"
Lee Huei
Regular Advisor

Re: netmask ?

hi all,

even when i use:
ROUTE_DESTINATION[1]="net 10.100.108.0"
ROUTE_MASK[1]="255.255.255.0"
ROUTE_GATEWAY[1]="10.100.109.1"
ROUTE_COUNT[1]="1"
ROUTE_ARGS[1]=""

i'm getting error rereading netconf.. why ?

but when i do this :
ROUTE_DESTINATION[1]="net 10.100.108.11"
ROUTE_MASK[1]=""
ROUTE_GATEWAY[1]="10.100.109.1"
ROUTE_COUNT[1]="1"
ROUTE_ARGS[1]=""

it went through. The route mask is confirmed correct. why it cant be used here ?