06-23-2008
# netstat -rn
Routing tables
Destination Gateway Flags Refs Use If PMTU Exp Groups
Route Tree for Protocol Family 2 (Internet):
default 172.29.2.127 UGcA 0 0 en1 - - - =>
default 172.29.2.126 UGcA 0 0 en1 - - -10.96.70.81/32 172.29.2.126 UGc 0 0 en1 - - -
10.96.70.222 172.29.2.126 UGHW 2 2318 en1 - - - =>
10.96.70.222/32 172.29.2.126 UGc 0 0 en1 - - -
127/8 127.0.0.1 U 10 8961 lo0 - - -
172.20.239.192/32 255.255.255.254 UGc 0 0 en1 - - -
172.29.2/25 172.29.2.1 U 4 84890 en1 - - -
172.29.2.1 127.0.0.1 UGHS 5 73 lo0 - - - =>
172.29.2.1/32 172.29.2.126 UGc 0 0 en1 - - - =>
172.29.2.1/32 127.0.0.1 UG 0 0 lo0 - - -
172.29.2.126 172.29.2.1 UHSb 5 85182 en1 - - -
172.29.7.192/27 172.29.2.100 UGc 0 0 en1 - - -
172.29.7.197 172.29.2.100 UGHW 0 6 en1 - - - =>
172.29.7.197/32 172.29.2.100 UGc 0 0 en1 - - -
192.168.1.0 192.168.1.2 UHSb 0 0 en0 - - - =>
192.168.1/24 192.168.1.2 U 0 1 en0 - - -
192.168.1.2 127.0.0.1 UGHS 0 1 lo0 - - - =>
192.168.1.2/32 127.0.0.1 UG 0 0 lo0 - - -
192.168.1.255 192.168.1.2 UHSb 0 4 en0 - - -
Route Tree for Protocol Family 24 (Internet v6):
::1 ::1 UH 0 0 lo0 16896 - -
My problem appeared in above specific lines.
I have 2 Def.Gw I tried to delete from smitty but I can't, also I tried to delete by command but I faced problem in destination address. By the result above I need to proper way to delete GW:172.29.2.127.
If possible pls.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
How can I change the gateway address on my sco Openserver 5.0.6. A cisco firewall is recently installed but the gateway on the system is still pointing at the old one.
I want it to use the gateway address of the router.
Please help. Thanks (2 Replies)
Discussion started by: sshokunbi
2 Replies
2. IP Networking
I used "route" to add the default gateway
I wrote this:
route add default 19x.x.x.x 0
but this is not permanent default gateway.
Do I need to use another command?
Thank a lot (2 Replies)
Discussion started by: lmena
2 Replies
3. Red Hat
Hi,
in which file and how shuold be decalred a gateway and its IP adresse ?
Where and how add a gateway ?
Many thanks before. (3 Replies)
Discussion started by: big123456
3 Replies
4. Programming
how we can get the gateway address.
i know gethostname used for ipaddress
how we can get the system gateway address.
thank u inadvance,
sree (2 Replies)
Discussion started by: phani_sree
2 Replies
5. SCO
Hy everybody !
I'm new on your forum, i'm french and don't speak a good english, so scuse me please for it !
I would to know how modify a gateway on a SCO 5.06
We have a problem, we have multi "beach" adress, one is 192.1.1.x, an other is 192.1.4.x
Actually, the computer on 192.1.4.x... (2 Replies)
Discussion started by: LB59
2 Replies
6. AIX
Hi,
I have two interfaces on m AIX 5.3 box. One going to 192.168.1.x and it has a gateway of 192.168.1.1.
I configured the other gateway with 192.168.2.x and the default gateway as 192.168.2.1. But I can't get connectivity to the 192.168.2.1 network. Can someone help me out and let me know... (7 Replies)
Discussion started by: bbbngowc
7 Replies
7. Solaris
Hi all,
Just now i had change the gateway for a server
Go to /etc/defaultrouter, change to 10.86.33.1
route delete default 10.86.39.222
route add default 10.86.33.1
now cannot telnet to the server already..
any idea? (5 Replies)
Discussion started by: SmartAntz
5 Replies
8. AIX
Hello,
I am new to Unix :D and have been trying to configure an AIX server running 5.3. I used smitty or smit to configure interface 0 on the server. I am able to ping the IP I set, however I am still unable to ping the gateway. I configured the IP by navigating to Communications Applications... (6 Replies)
Discussion started by: cdub50
6 Replies
9. Linux
Dear Sir
I am a newbie in the world of IP telephony. I have been working with Asterisk PBX (SIP) and Cisco Call Manager (MGCP) but now I am learning on how to work GNUGK for H.323 Gatekeeper.
I am having a problem, configuring static call routing on GNUGK
in the section
... (0 Replies)
Discussion started by: mfondoum
0 Replies
10. UNIX for Beginners Questions & Answers
Dear friends
I use RedHat 6.5, which sets the gateway in the configuration file / etc / sysconfig / network as GATEWAY = 192.168.1.26, and the gateway in the configuration file / etc / sysconfig / network-scripts / ifcfg-eth11 as GATEWAY = 192.168.1.256. The two gateways are different.... (6 Replies)
Discussion started by: tanpeng
6 Replies
route(8c) route(8c)
Name
route - manually manipulate the routing tables
Syntax
/etc/route [ -f ] [ -n ] command args ]
Description
The program is used to manipulate the network routing tables manually. However, normally it is not needed, as the system routing table
management daemon, should tend to this task.
The program accepts two commands: add, to add a route and delete, to delete a route.
All commands have the following syntax:
/etc/route command [ net | host ] destination gateway [ metric ]
In this syntax, destination is a host or network for which the route is to, gateway is the gateway to which packets should be addressed,
and metric is an optional count indicating the number of hops to the destination. The metric is required for add commands. It must be
zero if the destination is on a directly-attached network, and nonzero if the route utilizes one or more gateways.
When adding a route with metric 0, the gateway given is the address of this host on the common network, indicating the interface to be used
for transmission. Routes to a particular host are distinguished from routes to a network by interpreting the Internet address associated
with destination. The optional keywords net and host force the destination to be interpreted as a network or host, respectively. If the
destination has a local address part of INADDR_ANY, then the route is assumed to be to a network. Otherwise, it is presumed to be a route
to a host. If the route is to a destination connected via a gateway, the metric should be greater than 0. All symbolic names specified
for a destination or gateway are looked up first as a host name using If this lookup fails, is then used to interpret the name as that of a
network.
The command uses a raw socket and the SIOCADDRT and SIOCDELRT ioctls to do its work. As such, only the superuser can modify the routing
tables.
Options
-f Flushes the routing tables of all gateway entries. If is used with one of the commands described above, the tables are flushed prior
to the command's application.
-n Prevents attempts to print host and network names symbolically when reporting actions.
Restrictions
The change operation is not implemented. Therefore, you should first add the new route, and then delete the old one.
Diagnostics
add [host | network] %s: gateway %s flags %x"
The specified route is being added to the tables. The values printed are from the routing table entry supplied in the ioctl call. If the
gateway address used was not the primary address of the gateway (the first one returned by the gateway address is printed numerically as
well as symbolically.
delete [ host | network] %s: gateway %s flags %x
The specified route is being deleted from the tables. The values printed are from the routing table entry supplied in the ioctl call. If
the gateway address used was not the primary address of the gateway (the first one returned by the gateway address is printed numerically
as well as symbolically.
%s %s done
When the flag is specified, each routing table entry that is deleted is indicated with a message of this form.
Network is unreachable
An attempt to add a route failed because the gateway listed was not on a directly-connected network. The next-hop gateway must be given.
not in table
A delete operation was attempted for an entry which was not present in the tables.
routing table overflow
An add operation was attempted, but the system was low on resources and was unable to allocate memory to create the new entry.
See Also
intro(4n), routed(8c)
route(8c)