Score:0

How to add new multiple ip addresses with different default gateway ip to same interface on ubuntu server 20.04

sl flag

and thanks in advance for any help. I got /29 ip address range, and this was after I had set up my server with a different ip and default ip. So, I was assigned a new range of ip's which have a different default gateway, then my current gateway. So now I need to add the new ip's and the new default gateway to my ubuntu server. The ip's where come from the same Host provider, and it is on a dedicate server. I needed the extra ip's for DNS, and to set seperate website up on their own up's. My other dedicated server has 6 ip's, but they all came in the same block, and are on the same gateway. So they were easy to add. How do I add the new ip's and the new default gateway to my ubuntu server. I have added the the new ip addresses to my server, and they are reachable via a browser, or if I ping them. But, I never added the new gateway. I'm sure this will cause issues sometime, and I want to make sure everything is running correctly. Again, thank you for your time and help.

And Yes I know that in an idea world, I would only have 1 gateway ip. But, I have 2. I realize that only 1 of them can be the default. So, I will work this out. I think I have it under control.

vidarlo avatar
ar flag
You can't have multiple default gateways. You obviously need some kind of policy based routing, and should talk with your supplier on how to configure it - as it depends on exactly what they provide.
Peter Zhabin avatar
cn flag
Hosting providers that are properly set up do not generally require you to create a separate gateway for additional networks they supply. That is you can route your traffic from these additional networks to your primary default and it should just work. Have you tried that?
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.