Nusrat Nuriyev
asked on
Failing to add default gateway
route add default gw 192.168.0.254
The output is SIOCADDRT: Network is unreachable.
Network is ok, because it works when I reload it to fedora live.
It does not work only on installed fedora
Using the route add command will not survive a reboot. You have to put the default route into a configuration file for it to survive a reboot.
Typically you put the default gateway into your interface configuration file (example; /etc/sysconfig/network-scr ipts/ifcfg -eth0".
Like so:
GATEWAY=10.0.0.1
Typically you put the default gateway into your interface configuration file (example; /etc/sysconfig/network-scr
Like so:
GATEWAY=10.0.0.1
ASKER
savone, adding GATEWAY=192.168.0.254
does not work.
spravtek,
Basically open this file and check if settings seem ok...
I don't know what does mean all those settings, but still thank you.
does not work.
spravtek,
Basically open this file and check if settings seem ok...
I don't know what does mean all those settings, but still thank you.
Can you take a screenshot or copy what is in this file?
Did you try doing: default via 192.168.0.254 dev eh 0
Did you try doing: default via 192.168.0.254 dev eh 0
ASKER
do not understand, is default an executable name in this command?
Sure, here is a screenshot of the file of em1 inteface
snapshot-network.png
default via 192.168.0.254 dev eh 0
maybe something like this?route default via 192.168.0.254 dev eh 0
Please, be more specific.Sure, here is a screenshot of the file of em1 inteface
snapshot-network.png
Forget about the command, you tried that already anyway ...
The screenshot seems to not be showing something?
The screenshot seems to not be showing something?
ASKER
)))) wait, it's another issue, which interferred with this issue.
Fedora is so fedora.
Let's me send you text file
Fedora is so fedora.
Let's me send you text file
ASKER
I hope this file is not empty))))
ifcfg-em1
ifcfg-em1
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
works, thanks)
No prob ... Thanks for sticking with it :)
Is there a global gateway set in /etc/sysconfig/network?
Did you check the network-scripts for the interface, for example " /etc/sysconfig/network-scr
Basically open this file and check if settings seem ok...
If I remember correctly you can set a default gateway per interface like this: " default via X.X.X.X dev int " where int is your interface like eth0 for example...
" default via 192.168.0.254 dev eth0 "