1753347 Members
5155 Online
108792 Solutions
New Discussion юеВ

route

 
esha
Occasional Contributor

route

I need to enter default route command for a specific interface line lan0..pls help
8 REPLIES 8
Steven E. Protter
Exalted Contributor

Re: route

Shalom,

netstat -rn
# see your current routes.
You may need to delete your current default route:

route delete default

route add default

The man page for route is actually quite helpful.

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
esha
Occasional Contributor

Re: route

what does here ip address and destination talks about.

Like i want to enter default addr for 151.2.125.3 which is the ip addr of my lan1 card
Enrico P.
Honored Contributor

Re: route

Hi,
please give the output of the command:

netstat -in

netstat -rn

Enrico
esha
Occasional Contributor

Re: route

the output is as follow i will like to assign ip addr to lan1 here as 151.2.125.3 and wants default route to be set for that.


Enrico P.
Honored Contributor

Re: route

If you want to made the settings permanently you must modify/add the rows in /etc/rc.config.d/netconf file and then restart the network with:

/sbin/init.d/net stop
/sbin/init.d/net start

Enrico
esha
Occasional Contributor

Re: route

well thanks my prob is resolved. Just need to edit netconf and enter the values there.
esha
Occasional Contributor

Re: route

I have one more question if i need to delete all the arp entries than what i sthe command for that.
Josiah Henline
Valued Contributor

Re: route

arp entries can be deleted with the -d option. Perminate arp entries which can be manually deleted with the -D option.

Man arp:

-d If an ARP entry exists for the host called hostname, delete it. This option cannot be used to delete a permanent ARP entry whose IP address is an interface on the local system.

-D (Not recommended). Delete a permanent ARP entry whose IP address is an interface on the local system. The removal of such an ARP entry may result in loss or limitation of network connectivity with remote machines. The local system will no longer respond to ARP requests for this IP address. Consequently, communication with remote systems is possible only when that communication is initiated by the local system. This option should be used with extreme caution.
If at first you don't succeed, read the man page.