Route Adding


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Route Adding
# 1  
Old 10-31-2002
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  
Old 10-31-2002
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
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Adding to an array in an external file, and adding elements to it.

I have an array in an external file, "array.txt", which contains: char *testarray={"Zero", "One", "Two", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine"};I want to be able to add an element to this array, and have that element display, whenever I call it, without having to recompile... (29 Replies)
Discussion started by: ignatius
29 Replies

2. Solaris

Error adding static route

Hi all i have a simple question here I'm kind of newbie on solaris development currently i'm trying to add static route to solaris environment and i got error, each time i add this static route to it btw this is my command : root@xxxxxx # ping 1.2.3.1 1.2.3.1 is alive echo ... (15 Replies)
Discussion started by: l33tbot_if
15 Replies

3. Solaris

Network interface down after adding static route

Please , I have a problem I have add a statis route on Solaris 10, but after this, the network interface of Server was Offline. The system is in cluster mode (3.2) route add -net 10.10.1.128 -netmask 255.255.255.128 10.10.1.51 ------------------- lo0:... (1 Reply)
Discussion started by: Ruggero
1 Replies

4. IP Networking

route add

I have built a new linux server, via a iLo connection. and I am trying to connect via my desktop to the server I have just built to the management port eth0 via putty. Please could some one advise how to connect to this server from my desktop. Do i need to create add a route access on the... (0 Replies)
Discussion started by: venhart
0 Replies

5. Shell Programming and Scripting

Adding new lines to a file + adding suffix to a pattern

I need some help with adding lines to file and substitute a pattern. Ok I have a file: #cat names.txt name: John Doe stationed: 1 name: Michael Sweets stationed: 41 . . . And would like to change it to: name: John Doe employed permanently stationed: 1-office (7 Replies)
Discussion started by: hemo21
7 Replies

6. IP Networking

Route to nowhere?

Hi, HP-UX 11iV2, but it's probably universal (tcp/ip) I have a production and a test server. The test server gets the application updated nightly from the production server software. The application accesses a set of process servers on a separate subnet (192.163.22.30,31,32), but reachable... (1 Reply)
Discussion started by: monroedoug
1 Replies

7. Solaris

Adding new Route

Hi, I am trying to add route command in SunOS machine but it is not successful : route add -host 10.31.251.47 -gateway 10.31.251.0 -interface ce0 this command fails with an error "lo0:1: bad value" I want to add a route to 10.31.251.47 that picks 10.31.251.0 as the gateway via the... (1 Reply)
Discussion started by: jaygamini
1 Replies

8. IP Networking

need help on route command (adding)

Hi, I was window OS user and kinda switched to darwin-bash/Mac OS recently, just asking for some help for setting up routes. When i was using in window XP i can do "route print" and "route add 64.25.55.200 mask 255.255.255.255 188.17.145.178" ,and then when i access 64.25.55.200, it will... (2 Replies)
Discussion started by: ko9ko9ko9
2 Replies

9. IP Networking

Adding an extra route to the ip routing table

In my college dorm, there is a file sharing network in the entire building. Problem is, there is only a manual for windows with the settings on how to connect... :mad: They say that you have to give the following command in cmd in windows: route add 172.16.71.0 mask 255.255.255.0... (2 Replies)
Discussion started by: Japie89
2 Replies

10. IP Networking

Adding Route in AIX

I need some help in adding a route for a new AIX RS6000 server. I have copied and pasted the route information from an existing server. The IP address of the server listed below is 192.168.100.1 The IP address of the server being added is 192.168.100.88 Routing tables ... (1 Reply)
Discussion started by: Docboyeee
1 Replies
Login or Register to Ask a Question