The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

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 04:14 PM
need help on route command (adding) ko9ko9ko9 IP Networking 2 12-04-2007 03:36 PM
Adding an extra route to the ip routing table Japie89 IP Networking 2 10-18-2007 07:16 PM
Do I need to add a route?? agoodrich IP Networking 6 07-05-2005 11:15 PM
Adding Route in AIX Docboyeee IP Networking 1 11-11-2002 03:07 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 10-31-2002
Hordak Hordak is offline
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.
  #2 (permalink)  
Old 10-31-2002
RTM's Avatar
RTM RTM is offline Forum Advisor  
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
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 08:33 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0