General support questions
Post Reply
Posts: 48
Joined: 2019/10/15 13:29:09


Post by good_face » 2020/11/11 15:18:52

i added route on server . Why can't I see the ip address under gatewey

route add -net netmask gw

[root@test1~]# route
Destination Gateway Genmask Flags Metric Ref Use Iface
default gateway UG 0 0 0 bond1 gateway UG 0 0 0 bond1 gateway UGH 0 0 0 bond1 U 0 0 0 bond1

User avatar
Posts: 3180
Joined: 2007/12/11 08:17:33
Location: Finland

Re: route

Post by jlehtone » 2020/11/11 16:45:28

route is an old tool. A more advanced alternative, the iproute2 package was introduced two decades ago.
(I never bothered to learn to read the output of 'route'.)

The iproute2 shows routes with:

Code: Select all

ip ro
(which is actually a shorthand for ip route show)
One would add a route with:

Code: Select all

ip ro add via
However, if you do have NetworkManager.service in use (which is the default), the you would not set route with 'ip' (or 'route'), except temporarily. You would would configure your connections with NM.
For example (assuming the name of connection is 'bond1'):

Code: Select all

nmcli connection modify bond1 +ipv4.routes ""

Posts: 31
Joined: 2020/10/20 07:19:31

Re: route

Post by kdpatil » 2020/11/18 06:32:58

whats does netstat -nr shows ?

Posts: 370
Joined: 2019/10/09 12:31:40

Re: route

Post by BShT » 2020/11/18 18:37:17

traceroute or mtr

Post Reply

Return to “CentOS 7 - General Support”