05-28-2008
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 interface ce0. Could you help and guide me how this can be done?
Thanks
=================
-bash-3.00# cat /etc/defaultrouter
10.31.251.1
===================
-bash-3.00# netstat -rn
Routing Table: IPv4
Destination Gateway Flags Ref Use Interface
-------------------- -------------------- ----- ----- ------ ---------
10.30.159.208 10.30.136.1 UG 1 0
10.31.245.0 10.30.136.1 UG 1 0
10.31.244.0 10.30.136.1 UG 1 0
10.30.254.0 10.30.136.1 UG 1 0
10.77.74.0 10.30.136.1 UG 1 0
10.31.133.0 10.30.136.1 UG 1 0
10.31.132.0 10.30.136.1 UG 1 2
10.31.135.0 10.30.136.1 UG 1 0
10.31.128.0 10.30.136.1 UG 1 0
10.31.130.0 10.30.136.1 UG 1 0
10.22.133.0 10.30.136.1 UG 1 0
204.4.114.0 10.30.136.1 UG 1 0
10.30.136.0 10.30.136.42 U 1 20 ce1
10.22.129.0 10.30.136.1 UG 1 0
10.119.0.0 10.30.136.1 UG 1 40
10.31.136.0 10.30.136.1 UG 1 4
10.22.131.0 10.30.136.1 UG 1 0
10.119.2.0 10.30.136.1 UG 1 0
10.153.206.0 10.30.136.1 UG 1 0
172.31.0.0 172.31.194.125 U 1 0 ce2
224.0.0.0 10.31.251.47 U 1 0 ce0
default 10.31.251.1 UG 1 0
127.0.0.1 127.0.0.1 UH 4 108 lo0
==================
-bash-3.00# ifconfig -a
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
ce0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
inet 10.31.251.47 netmask ff000000 broadcast 10.255.255.255
ether 0:14:4f:69:40:b0
ce1: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 3
inet 10.30.136.42 netmask ffffff00 broadcast 10.30.136.255
ether 0:14:4f:69:40:b1
ce2: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 4
inet 172.31.194.125 netmask ffff0000 broadcast 172.31.255.255
ether 0:14:4f:69:40:b2
-bash-3.00#
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
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. (1 Reply)
Discussion started by: Hordak
1 Replies
2. IP Networking
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
3. IP Networking
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
4. IP Networking
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
5. IP Networking
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
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
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
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
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
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
LEARN ABOUT X11R4
tc-route
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)