Sponsored Content
Full Discussion: Route Adding
Top Forums UNIX for Dummies Questions & Answers Route Adding Post 31043 by RTM on Thursday 31st of October 2002 09:57:18 AM
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
 

10 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. 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

5. 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

6. 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

7. 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

8. 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

9. 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

10. 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
Route classifier in tc(8)					       Linux						 Route classifier in tc(8)

NAME
route - route traffic control filter SYNOPSIS
tc filter ... route [ from REALM | fromif TAG ] [ to REALM ] [ classid CLASSID ] [ action ACTION_SPEC ] DESCRIPTION
Match packets based on routing table entries. This filter centers around the possibility to assign a realm to routing table entries. For any packet to be classified by this filter, a routing table lookup is performed and the returned realm is used to decide on whether the packet is a match or not. OPTIONS
action ACTION_SPEC Apply an action from the generic actions framework on matching packets. classid CLASSID Push matching packets into the class identified by CLASSID. from REALM fromif TAG Perform source route lookups. TAG is the name of an interface which must be present on the system at the time of tc invocation. to REALM Match if normal (i.e., destination) routing returns the given REALM. EXAMPLES
Consider the subnet 192.168.2.0/24 being attached to eth0: ip route add 192.168.2.0/24 dev eth0 realm 2 The following route filter will then match packets from that subnet: tc filter add ... route from 2 classid 1:2 and pass packets on to class 1:2. NOTES
Due to implementation details, realm values must be in a range from 0 to 255, inclusive. Alternatively, a verbose name defined in /etc/iproute2/rt_realms may be given instead. SEE ALSO
tc(8), ip-route(8) iproute2 21 Oct 2015 Route classifier in tc(8)
All times are GMT -4. The time now is 02:52 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy