The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Adding new Route jaygamini SUN Solaris 1 05-28-2008 01:14 PM
need help on route command (adding) ko9ko9ko9 IP Networking 2 12-04-2007 12:36 PM
Adding an extra route to the ip routing table Japie89 IP Networking 2 10-18-2007 04:16 PM
Do I need to add a route?? agoodrich IP Networking 6 07-05-2005 08:15 PM
Adding Route in AIX Docboyeee IP Networking 1 11-11-2002 12:07 PM

Closed Thread
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 10-31-2002
Registered User
 

Join Date: Jul 2002
Location: NYC
Posts: 6
Route Adding

I am trying to add a route for an interface on my unix server. The interface is qfe0. How do I type out the route add command.

The Normal way is

route add 1.1.1.0 1.1.1.1

When I want it to bind to a certain interface how to I enter the command.
Forum Sponsor
  #2  
Old 10-31-2002
RTM's Avatar
RTM RTM is offline
Hog Hunter
 
Join Date: Apr 2002
Location: On my motorcycle
Posts: 3,039
The man page has quite a few examples which should help you out.

example% route add default hostname -interface

hostname is the name or IP address associated with the net-
work interface all packets should be sent over. On a host
with a single network interface, hostname is normally the
same as the nodename returned by uname -n (see uname(1)).

Adding a net route:
/usr/sbin/route add -net 10.140 172.16.186.1 1

Adding a host route:

/usr/sbin/route add -host 152.148.50.34 172.16.1.9 0

For your situation, you want to bind to a certain interface.

route add xxx.xxx.xxx.xxx yourhostname -interface

You don't put -hme0 or -qfe0 on this - you tell it the hostname of the interface or the IP of the interface (in case you did not make a secondary hostname for the interface)

So if xxx.xxx.xxx.xxx is 10.140.0.0 and yourhostname is myhost-qfe0,

# route add 10.140.0.0 myhost-qfe0 -interface
Google The UNIX and Linux Forums
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 01:44 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0