Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I use RedHat9.
I already set the network (ip: 212.200.122.123, mask: 255.255.255.248, Gateway: 10.5.5.1) but if I type the command netstat -nr (to see the routing table) I get the data:
Destination: 212.200.122.120
Gateway: 0.0.0.0
Genmask: 255.255.255.248
Flags: U
MSS Windows: 0 0
etc.
I see thet the the Gateway is 0.0.0.0 , but I set it to 10.5.5.1 .
What is the problem? How can I set the gateway?
"gw GW
route packets via a gateway. NOTE: The specified gateway must
be reachable first. This usually means that you have to set up a
static route to the gateway beforehand. If you specify the
address of one of your local interfaces, it will be used to
decide about the interface to which the packets should be routed
to. This is a BSDism compatibility hack. "
It says that I first have to make a static route. How can I do this?
I can't ping that gateway.
If I type the command "route add -net default gateway 10.5.5.1 dev eth0" the answer is the same : SIOCADDRT: Network is unreachable
But I can't because I bought the public address 212.200.122.123 and I must to use it, but I'm connected to the internet through this gateway (10.5.5.1).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.