1819871 Members
2522 Online
109607 Solutions
New Discussion юеВ

Route add ??

 
Kevin_107
Regular Advisor

Route add ??

I have two network cards in a K580 running V11. Lan0 card's IP address is 192.168.3.22 netmask 255.255.255.0 and Lan1 is on 135.196.66.22 netmask 255.255.255.192 I cant see any devices via the Lan1 card. My default gateway is 192.168.3.62 Do I need to add a route for the second card to see the 135 network ???
He who laughs last.....doesnt get the joke !!
12 REPLIES 12
Chuck J
Valued Contributor

Re: Route add ??

If you default gateway 192.168.3.62 does not have a route to your 135 network then you will not be able to see it. You'll have to either configure the router to see the 135 or add a route on your HP box so the two can see eachother.

Chuck J
Chuck J
Valued Contributor

Re: Route add ??

Kevin

A few ways to add a route:

(A)
# route add net 135.196.66.22 netmask 135.196.66.22

(B)
Add the network 135.196.66.22 to /etc/networks :
lan1net 135.196.66.22
then
# route add lan1net mask 255.255.255.192

ALso, i don't think this will stay after a reboot so you'd have to modify /etc/rc.config.d/netconf i think.

I guess the would be the address of your lan0 card, try it.

Chuck J
Chuck J
Valued Contributor

Re: Route add ??

Sorry, then you could check your routing table:

# netstat ???r
T G Manikandan
Honored Contributor

Re: Route add ??

#route add 135.196.66.0 135.196.66.22 0

Make entries in your /etc/rc.config.d/netconf to make it permanent.


ROUTE_DESTINATION[1]=135.196.66.0
ROUTE_MASK[1]=255.255.255.0
ROUTE_GATEWAY[1]=135.196.66.22
ROUTE_COUNT[1]=0
ROUTE_ARGS[1]=""



Thanks
Kevin_107
Regular Advisor

Re: Route add ??

I am getting a bad value returning from the route add lan1....

Also the other route add command didnt seem to work
He who laughs last.....doesnt get the joke !!
Chuck J
Valued Contributor

Re: Route add ??

Try:

# route add net 135.196.66.22 192.168.3.22 1

or maybe a 0 at the end instead of the 1.

Tell us what you have done so far.

See this document:

http://www4.itrc.hp.com/service/cki/docDisplay.do?docId=200000049791567&admit=-938907319+1038399331292+28353475

Chuck J
Adam J Markiewicz
Trusted Contributor

Re: Route add ??

Don't play with route yet.

First, send us what netstat -nrv says.

Second what address are you trying to reach? Note you have very strict netmask on this network (the last netmask byte is not zero).

Third - yep, config in /etc/rc.config.d/netconf are restored at every boottime.

Good luck

Adam
I do everything perfectly, except from my mistakes
Kevin_107
Regular Advisor

Re: Route add ??

Adam, I have attached a copy of netstat -nrv.

I ma trying to get to 135. addresses.
He who laughs last.....doesnt get the joke !!
Ron Kinner
Honored Contributor

Re: Route add ??

On an 11.0 machine you can not use 135.196.66.22 with a mask of 255.255.255.192 without turning off subnet checking with ndd. That violates the old RFC's zero subnet rule. The rule is obsolete but 11.0 still enforces it.

ndd -set /dev/ip ip_check_subnet_addr 0

will do it for now but you need to put it in nddconf in order for it to be remembered at boot.

edit /etc/rc.config.d/nddconf to add:

TRANSPORT_NAME[0]=ip
NDD_NAME[0]=ip_check_subnet_addr
NDD_VALUE[0]=0

If there is already an entry then you have to change the numbers in brackets to the next higher number.

Your netstat -rvn output looks very strange. Perhaps because you have tried to add routes and gotten them wrong. You have two routes to the 135.196.64.0 but both of them are wrong since the mask is for a host and not for a network:

135.196.64.0/255.255.255.255 135.196.66.22

135.196.64.0/255.255.255.255 135.196.66.1


Then you have
135.196.66.0/255.255.255.192 135.196.66.1
which is a duplicate path to the 135.196.66.0/255.255.255.192 network so it looks like your box might even think it has two addresses (the .22 and the .1). Isn't the .1 your local router?

Please post your /etc/rc.config.d/netconf


Ron





Adam J Markiewicz
Trusted Contributor

Re: Route add ??

Ron gave you a nice halp. I see.

I'm not fammiliar with this 'ip_check_subnet_addr', but this sounds like could cause the troubles, so check it.

I'll explain your routing for you:
127.xxx -obvious, skip it

135.196.66.22/255.255.255.255 the address of lan1 - OK

192.168.3.22/255.255.255.255 the address of lan0 - OK

135.196.64.0/255.255.255.255 135.196.66.22 UH:
'I have 135.196.64.0 machine that is connected directly to 135.196.66.22' -is that what you want? I doubt.
I guess you wanted:
route add net 135.196.64 netmask 255.255.255.0 135.196.66.22
but you did:
route add host 135.196.64.0135.196.66.22 (hosts always have netmask 255.255.255.255)

135.196.66.0/255.255.255.192 local network for lan1 - OK (if it's OK with that stuff Ron mentioned)

192.168.3.0/255.255.255.0 local network for lan0 - OK

135.196.64.0/255.255.255.255 135.196.66.1
'I have machine 135.196.64.0 that I want to contact with via gateway of address 135.196.66.1 (and that goes through lan1)
like above. You did:
route add host 135.196.64.0 135.196.66.1 1
but you wanted
route add net 135.196.64 netmask 255.255.255.0 135.196.66.1 1
(the netmask is my guess in this case)

Check your subnets and their netmasks more carefully.


Good luck

Adam
I do everything perfectly, except from my mistakes
rick jones
Honored Contributor

Re: Route add ??

Folks will be pleased to know that the default for ip_check_subnet_addr changes to "0" in 11i.
there is no rest for the wicked yet the virtuous have no pillows
harry d brown jr
Honored Contributor

Re: Route add ??

Kevin,

You should really try harder to assign points. There's a feature in your profile to view your previous posts, here is the link:
http://forums.itrc.hp.com/cm/TopSolutions/1,,BR710490!1!questions,00.html

live free or die
harry
Live Free or Die