02-18-2019
According to your routing table the IP-Network for the gateway (10.132.81.161) is connected via NIC eno50. But the route-setup command points to NIC eno49.
Maybe you should just omit the dev eno50 in your route command or change your ip configuration so that 10.31.181... is configured to eno50 instead of eno49.
And yes /28 is smaller than expected. As RudiC said the gateway is outside your subnet anyway. The gateway must be located within one of the configured subnets of your server.
Last edited by stomp; 02-18-2019 at 07:36 AM..
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
:confused:
Hi:
I donīt know how to add route gateway and when restart the machine lose this route and put other.
In SCO ver 5.6 Enterprise write:
etc\route delete gateway
route add gateway 199.199.1.1.
so , netstat -rn to see if has change -> all ok
Restart -> !!!... (2 Replies)
Discussion started by: AlvaroD
2 Replies
2. AIX
Hello ,
We have 3 rs/6000 server's running aix on our local network, so each time I try to ping one of these servers we get a "network is down" error , I've been instructed to use to route add command which is ...
#route add server.ip router.ip
after this the ping command works fine ,... (6 Replies)
Discussion started by: cubicle^dweller
6 Replies
3. IP Networking
I have two networks connected by cisco routers. My first subnet is 192.168.0.0 and my second is 192.168.1.0.
My SCO unix machine is on the 192.168.1.0 subnet with an IP of 192.168.1.231. It can see the entire .1.0 subnet but nothing on the other network.
My cicso router(gateway) to the other... (6 Replies)
Discussion started by: agoodrich
6 Replies
4. Shell Programming and Scripting
Hello all!
We have two fedora routers one at each site. What we are trying to do worked using freesco but not on fedora, i'm not very good at scripting and need a little guidence. Basicly what we are trying to do is if the primary line dies, the router will change it's routes to go through our... (0 Replies)
Discussion started by: slacker
0 Replies
5. IP Networking
We are unable to bring one of our linux boxes into the network once it was restarted. But once we stop and start the network service. We are able to ping the gateway and get into network. After a minute or two we get the following reponse for the ping command
64 bytes from 124.168.215.40:... (6 Replies)
Discussion started by: chrisanto_2000
6 Replies
6. Solaris
Hi,
I am trying to add route command in Solaris 10 machine in the following fashion:
route add -host 10.8.112.10 180.144.1.250 -interface lo0:1
this command fails with an error "lo0:1: bad value"
I want to add a route to 10.8.112.10 that picks 180.144.1.250 as the gateway via the... (3 Replies)
Discussion started by: sudhir_shet
3 Replies
7. AIX
Just want to know if someone has a clue about what could be happening here:
I have an AIX box with four NICs in Ether channel connected to a Cisco Switch.
When I try to ping the default gateway, sometimes it works, but sometimes it doesn't work unless it has a defined static route.
Thanks... (1 Reply)
Discussion started by: witt
1 Replies
8. UNIX for Advanced & Expert Users
I have setup a Linux machine on my server but for some reason Im unable to reach my default gateway. This is causing me to not communicate with the outside world (unable to connect to CentOS repos)
# ifconfig
enp0s3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet... (3 Replies)
Discussion started by: Junaid Subhani
3 Replies
9. Red Hat
Hi all,
i have a rhel 6.2 with a default gateway.
This server is an Intranet office with no internet access.
DNS are already configured and it's possible to resolve my target.
My goal is to link my application (apache forward) only to http://mytarget.yyy through a new gateway (That does... (0 Replies)
Discussion started by: kamose
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)