Operating System - HP-UX
1752596 Members
5525 Online
108788 Solutions
New Discussion юеВ

Re: Routing IP and Default GW are same

 
Dhananjaya Amarakoon
Regular Advisor

Re: Routing IP and Default GW are same

Hi
This is one of customer place, I have some limitation to do testing.

Yes, I agree with u, logically It should work.
If default gateway IP is not working ( 192.168.10.2) which is same to gateway for other network how communication will lost if I remove other routing entries.

I will put some entries of netconf file ( because of this open forum I have some limits )



HOSTNAME="XXXX"
OPERATING_SYSTEM=HP-UX
LOOPBACK_ADDRESS=127.0.0.1

INTERFACE_NAME[0]=lan0
IP_ADDRESS[0]="192.168.10.7"
SUBNET_MASK[0]="255.255.255.0"
BROADCAST_ADDRESS[0]="192.168.10.255"
INTERFACE_STATE[0]=""
DHCP_ENABLE[0]=0
INTERFACE_MODULES[0]=""


ROUTE_DESTINATION[0]=default
#ROUTE_DESTINATION[0]=192.168.10.0
ROUTE_MASK[0]="255.255.255.0"
ROUTE_GATEWAY[0]="192.168.10.2"
ROUTE_COUNT[0]="1"
ROUTE_ARGS[0]=""

ROUTE_DESTINATION[1]=192.168.11.0
ROUTE_MASK[1]="255.255.255.0"
ROUTE_GATEWAY[1]="192.168.10.2"
ROUTE_COUNT[0]="1"
ROUTE_ARGS[0]=""


ROUTE_DESTINATION[35]=192.168.8.0
ROUTE_MASK[35]="255.255.255.0"
ROUTE_GATEWAY[35]="192.168.10.2"
ROUTE_COUNT[0]="1"
ROUTE_ARGS[0]=""

ROUTE_DESTINATION[2]=192.168.12.0
ROUTE_MASK[2]="255.255.255.0"
ROUTE_GATEWAY[2]="192.168.10.2"
ROUTE_COUNT[0]="1"
ROUTE_ARGS[0]=""

-------

ROUTE_DESTINATION[22]=192.168.30.0
ROUTE_MASK[22]="255.255.255.0"
ROUTE_GATEWAY[22]="192.168.10.2"
ROUTE_COUNT[0]="1"
ROUTE_ARGS[0]=""

# Dynamic routing daemon configuration. See gated(1m)
#
# GATED: Set to 1 to start gated daemon.
# GATED_ARGS: Arguments to the gated daemon.

GATED=0
GATED_ARGS=""

#
# Router Discover Protocol daemon configuration. See rdpd(1m)
#
# RDPD: Set to 1 to start rdpd daemon
#

RDPD=0

#
# Reverse ARP daemon configuration. See rarpd(1m)
#
# RARPD: Set to 1 to start rarpd daemon
#

RARPD=0


DEFAULT_INTERFACE_MODULES=""





V. Nyga
Honored Contributor

Re: Routing IP and Default GW are same

Hi again,

so this is your actual configuration?

ROUTE_DESTINATION[0]=default
#ROUTE_DESTINATION[0]=192.168.10.0
ROUTE_MASK[0]="255.255.255.0"
ROUTE_GATEWAY[0]="192.168.10.2"
ROUTE_COUNT[0]="1"
ROUTE_ARGS[0]=""

ROUTE_DESTINATION[35]=192.168.8.0
ROUTE_MASK[35]="255.255.255.0"
ROUTE_GATEWAY[35]="192.168.10.2"
ROUTE_COUNT[0]="1"
ROUTE_ARGS[0]=""

and you don't get a connection to 192.168.8.0?
Have you done it yourself or was it already there?

Please test either:
ROUTE_DESTINATION[0]=default
ROUTE_MASK[0]="255.255.0.0" <- as I mentioned above

or:
ROUTE_DESTINATION[35]="net 192.168.8.0"
ROUTE_MASK[35]="255.255.255.0"

HTH
V.
*** Say 'Thanks' with Kudos ***
Dhananjaya Amarakoon
Regular Advisor

Re: Routing IP and Default GW are same

Hi

Yes, this is actual configuration.
Yes I get connection to the 192.168.8.0 network due to following block.
>
ROUTE_DESTINATION[35]=192.168.8.0
ROUTE_MASK[35]="255.255.255.0"
ROUTE_GATEWAY[35]="192.168.10.2"
ROUTE_COUNT[0]="1"
ROUTE_ARGS[0]=""
>

If I removed above block communication will lost.
But Why I am confuse even above block is removed , 192.168.8.0 network should access via default gateway ( According to my knowledge )
Yes. I will try but it take times due it production

Dhananjaya
V. Nyga
Honored Contributor

Re: Routing IP and Default GW are same

Hi again,

>If I removed above block communication will lost.
>But Why I am confuse even above block is removed,
>192.168.8.0 network should access via default gateway
>( According to my knowledge )

ROUTE_MASK[0]="255.255.255.0" is the limitation, as long as you don't change it you'll still limitated to
ROUTE_DESTINATION[0]=192.168.10.0

Also this makes no sense:
You can see it in your current Routing tables:
Destination Gateway 192.168.10.7 192.168.10.7 192.168.10.0 192.168.10.7

You can reach any 192.168.10.x with your server. That's because:
INTERFACE_NAME[0]=lan0
IP_ADDRESS[0]="192.168.10.7"
SUBNET_MASK[0]="255.255.255.0"
BROADCAST_ADDRESS[0]="192.168.10.255"

It's a part of security to limit this!
An admin before you had made this, and he opened only those destinations he wanted.
Because of this you have so many entires in netconf.

If you don't want this limitation you can also do:
INTERFACE_NAME[0]=lan0
IP_ADDRESS[0]="192.168.10.7"
SUBNET_MASK[0]="255.255.0.0" <- change
BROADCAST_ADDRESS[0]="192.168.255.255" <- change
INTERFACE_STATE[0]=""
DHCP_ENABLE[0]=0
INTERFACE_MODULES[0]=""

Then you don't need any route to 192.168.x.x

>Yes. I will try but it take times due it production

Haven't you tested already some things at your production server?

V.
*** Say 'Thanks' with Kudos ***