1754018 Members
7812 Online
108811 Solutions
New Discussion юеВ

default gateway

 
SOLVED
Go to solution
kunjuttan
Super Advisor

default gateway

what is the command to see the default gateway?
6 REPLIES 6
SoorajCleris
Honored Contributor
Solution

Re: default gateway

Hi,

Check nestat -rn

# netstat -rn
Routing tables
Destination Gateway Flags Refs Interface Pmtu
127.0.0.1 127.0.0.1 UH 0 lo0 4136
192.168.112.143 192.168.112.143 UH 0 lan1 4136
16.118.112.143 16.118.112.143 UH 0 lan0 4136
16.118.112.0 16.118.112.143 U 2 lan0 1500
192.168.0.0 192.168.112.143 U 2 lan1 1500
127.0.0.0 127.0.0.1 U 0 lo0 0
default 16.118.112.1 UG 0 lan0 0
[rx260-17]/


Regards,
Sooraj
"UNIX is basically a simple operating system, but you have to be a genius to understand the simplicity" - Dennis Ritchie
Sunny123_1
Esteemed Contributor

Re: default gateway

Hi

Check netstat -rn

It will show you all the routes and default gateway.


Regards
Sunny
rariasn
Honored Contributor

Re: default gateway

Hi,

Also, verify "netconf" file (netconf: configuration values for core networking subsystems)

File --> /etc/rc.config.d/netconf

some entrys:

INTERFACE_NAME[0]=lan1
IP_ADDRESS[0]=172.X.X.X
SUBNET_MASK[0]=255.255.0.0
BROADCAST_ADDRESS[0]=""
INTERFACE_STATE[0]="up"
DHCP_ENABLE[0]=0

ROUTE_DESTINATION[0]=default
ROUTE_MASK[0]=""
ROUTE_GATEWAY[0]=172.X.0.200
ROUTE_COUNT[0]=1
ROUTE_ARGS[0]=""


Rgs,





Steven E. Protter
Exalted Contributor

Re: default gateway

Shalom,

As noted netstat -rn will show the default gateway which is permanently stored in /etc/rc.config.d/netconf

Gotha's

1) Do not change netconf and back up the file in /etc/rc.config.d/ both will be read and neither will work.

2) There can be but one default gateway. Other NIC card's can however have gateways in the configuration file or added with the route command.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Suraj K Sankari
Honored Contributor

Re: default gateway

Hi,
Do not edit anything on this "/etc/rc.config.d/netconf" file if you dont have confidence what you are going to do


you can cat this file to see the informaion of your nic cards.

netstat -r or netstart -rn
is the command to see the default gateway.

Suraj
kunjuttan
Super Advisor

Re: default gateway

thanks gurus..I got it..