Operating System - HP-UX
1753396 Members
7344 Online
108792 Solutions
New Discussion юеВ

Routing IP and Default GW are same

 
Dhananjaya Amarakoon
Regular Advisor

Routing IP and Default GW are same

Hi All,

I have a HP-UX server which have routing table as follows.
See attached file.

My Problem is earlier default gw was 192.168.10.100 but recently it changed to 192.168.10.2 which all other routing entries are routed.

So due to both are same, I removed all other network routing entries and kept only default gw.
then all the communications were lost to other network.

I am wondering how that was happen ? Server is using one lan card which is IP 192.168.10.7

Can some one has idea about this incident ?

Dhananjaya


13 REPLIES 13
johnsonpk
Honored Contributor

Re: Routing IP and Default GW are same

>>
So due to both are same,(what are they ??) I removed all other network routing entries and kept only default gw.
then all the communications were lost to other network. (which network/subnet ??)

do you have copy of your old routing table ??

regards!
Johnson
Dhananjaya Amarakoon
Regular Advisor

Re: Routing IP and Default GW are same

Hi Johnsan

Both mean default gateway ( 192.168.10.2 ) and Gateway (192.168.10.2) for other routing entries.
We experienced lost communication for 192.168.8.0 network due to it located inside head office. Others are branched networks.
I suddenly revert back entries without second thought.

The different between old routing table is default gw which was 192.168.10.100

Dhananjaya
johnsonpk
Honored Contributor

Re: Routing IP and Default GW are same

You mean to say that ..the network 192.168.8.0 is reachable through gateway 192.168.10.100 and not through 192.168.10.2 ?
V. Nyga
Honored Contributor

Re: Routing IP and Default GW are same

Hi,

all your destinations begin with 192.168.x.x
I would suggest that you change your subnet mask to 255.255.0.0
Check your /etc/rc.config.d/netconf I believe your is:
SUBNET_MASK[0]=255.255.255.0
Change it to:
SUBNET_MASK[0]=255.255.0.0

Then you don't need to add a route to every subnet.

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

Re: Routing IP and Default GW are same


What I mean 192.168.8.0 is reachable because of following entry
192.168.8.0 192.168.10.2 UG 0 lan0 1500

Wht I did remove above entry (including all other routing entries) and keep following entry which is default routing entry

default 192.168.10.2 UG 0 lan0 1500


that time 192.168.8.0 is unreachable. ( I did this because by thinking now all unknown (including 192.168.8.0) data packets should routed to 192.168.10.2 )
Earlier also above 1 st entry was there. what happened I changed default gateway to 192.168.10.2


Yes, subnet mask are as 255.255.255.0. But my problem is why that packets are not routing via default gateway?
V. Nyga
Honored Contributor

Re: Routing IP and Default GW are same

Hi again,

with your default
>default 192.168.10.2 UG 0 lan0 1500
and subnet mask
255.255.255.0

you can reach all ip-addresses with
192.168.10.x
Because of this now 192.168.8.0 is unreachable.
192.168.10.2 can only reach 192.168.10.x!

HTH
V.

*** Say 'Thanks' with Kudos ***
Dhananjaya Amarakoon
Regular Advisor

Re: Routing IP and Default GW are same

Hi
Ok, then what you think about following entry
192.168.8.0 192.168.10.2 UG 0 lan0 1500

If I remove above entry communication with 192.168.8.0 network will be lost.
but u can see above network gateway also 192.168.10.2 which is separate network id.

I hope 192.168.10.2 is a interface IP of firewall or router may internally route to other networks.

Dhananjaya
V. Nyga
Honored Contributor

Re: Routing IP and Default GW are same

Ok, sorry, your ip is 192.168.10.7, so you can reach 192.168.10.x

So you can reach your router: 192.168.10.2

You think, with:
default 192.168.10.2 UG 0 lan0 1500
you can reach any network?

It's logical, but it seems like it doesn't work:
>Ok, then what you think about following entry
>192.168.8.0 192.168.10.2 UG 0 lan0 1500
>If I remove above entry communication with
>192.168.8.0 network will be lost.

>I hope 192.168.10.2 is a interface IP of
>firewall or router may internally route to other networks.

Yes, it's a router, but you have to say your system which ip-addresses it can reach with this router - 'default' seems not to work.

Can you give us your:
/etc/rc.config.d/netconf ?

V.
*** Say 'Thanks' with Kudos ***
V. Nyga
Honored Contributor

Re: Routing IP and Default GW are same

>Yes, it's a router, but you have to say
>your system which ip-addresses it can reach
>with this router - 'default' seems not to work.

Or your ROUTE_MASK in /etc/rc.config.d/netconf is not set correct ...

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