Operating System - HP-UX
1751860 Members
5716 Online
108782 Solutions
New Discussion юеВ

Re: netconf route_destination

 
SOLVED
Go to solution
Patrick Farho
Occasional Advisor

netconf route_destination

I was wondering how you determine what the route_destination will be if you have multiple IP addresses with different route_gateway addresses.

I understand the [n] information, but I just do not know what to put in the route_destination. Any insight would be helpful.

Thank you,
10 REPLIES 10
RAC_1
Honored Contributor

Re: netconf route_destination

Route destination is what use when you do route command. Like route add host/network.

Also /etc/rc.config.d/netconf gives explaination about it. so if you are going to define a route to a host it will look like follows.

ROUTE_DESTINATION[x]="host_ip_address"
ROUTE_MASK[x]=""
ROUTE_GATEWAY[x]="aa.bb.dd.ffy"
ROUTE_COUNT[x]="1" -- > one if remote, else 0
ROUTE_ARGS[x]=""

If it is going to be network, then put network address in route_destination.
There is no substitute to HARDWORK
John Dvorchak
Honored Contributor

Re: netconf route_destination

Here is part of my /etc/rc.config.d/netconf file on a system that has 3 NICs installed:

ROUTE_DESTINATION[0]="default"
ROUTE_MASK[0]=""
ROUTE_GATEWAY[0]="123.123.123.3"
ROUTE_COUNT[0]="1"
ROUTE_ARGS[0]=""

ROUTE_DESTINATION[1]="net 172.123.123.0"
ROUTE_MASK[1]=""
ROUTE_GATEWAY[1]="172.123.123.4"
ROUTE_COUNT[1]="0"
ROUTE_ARGS[1]=""

ROUTE_DESTINATION[2]="net 172.223.223.0"
ROUTE_MASK[2]=""
ROUTE_GATEWAY[2]="172.223.223.4"
ROUTE_COUNT[2]="0"
ROUTE_ARGS[2]=""

Of course these addresses are bogus but I think you will see that for every NIC [0] there is a ROUTE_DESTINATION[0] (network address) and a ROUTE_GATEWAY[0] (default router) associated with each instance of the NIC [0] or [1] etc.
If it has wheels or a skirt, you can't afford it.
Patrick Farho
Occasional Advisor

Re: netconf route_destination

So if my router address is a 151.123.12.123 I should be entering something like "net 151.123.12.0"?
John Dvorchak
Honored Contributor

Re: netconf route_destination

correct if your netmask is a class C network like 255.255.255.0 then the network would be the octet 123.123.123.0 because the network is always the first number of the address, in this case a 0 is used. Then the first host on that network would be 1 then 2 etc. like 123.123.123.1 and 123.123.123.2 etc.



If it has wheels or a skirt, you can't afford it.
Patrick Farho
Occasional Advisor

Re: netconf route_destination

What if the netmask is a 255.255.255.192 that has an ip of 151.123.12.123 or 255.255.254.0 that has an ip of 10.1.12.1?

Would the .192 still be 151.123.12.0 and the .254 be 10.1.0.0?

Thank you,

Patrick
John Dvorchak
Honored Contributor

Re: netconf route_destination

If you have a bunch of these NOT Class A B or C netmasks and you want to be sure, try using a "netmask calculator" like the one I found here:

http://jodies.de/ipcalc


Address: 151.123.12.123 10010111.01111011.00001100.01 111011Netmask: 255.255.255.192 = 26 11111111.11111111.11111111.11 000000Wildcard: 0.0.0.63 00000000.00000000.00000000.00 111111=>
Network: 151.123.12.64/26 10010111.01111011.00001100.01 000000 (Class B)Broadcast: 151.123.12.127 10010111.01111011.00001100.01 111111HostMin: 151.123.12.65 10010111.01111011.00001100.01 000001HostMax: 151.123.12.126 10010111.01111011.00001100.01 111110Hosts/Net: 62
If it has wheels or a skirt, you can't afford it.
John Dvorchak
Honored Contributor
Solution

Re: netconf route_destination

That was pretty ugly looking so here it is a little more readable with your example:

http://jodies.de/ipcalc

Network: 151.123.12.64
Broadcast: 151.123.12.127
HostMin: 151.123.12.65
HostMax: 151.123.12.126
If it has wheels or a skirt, you can't afford it.
John Dvorchak
Honored Contributor

Re: netconf route_destination

I have never seen a 255.255.254.0 netmask but I guess some network guy could think of a reason to use it.

But it does look like this:
Network: 10.1.12.0
Broadcast: 10.1.13.255
HostMin: 10.1.12.1
HostMax: 10.1.13.254
If it has wheels or a skirt, you can't afford it.
Patrick Farho
Occasional Advisor

Re: netconf route_destination

So, I should not have to make the 10.1.12.12 10.1.0.0 for the ROUTE_DESTINATION.

This sounds like fun, but I think my daughter would have more fun at an amusement park!