How many gateways need to be configured for a 2 IP on 1 NIC setup?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
1
down vote

favorite












Is this better? (currently used and working good)



[ipv4]
address1=10.0.0.13/32
address2=10.0.0.42/32
gateway1=10.0.0.1
gateway2=10.0.0.1
dns=10.0.0.1;
dns-search=
method=manual


or should I only define one gateway? (nmtui suggests this way)



[ipv4]
address1=10.0.0.13/32,10.0.0.1
address2=10.0.0.42/32
dns=10.0.0.1;
dns-search=
method=manual


  • gateway after the client IP?

  • gateway as separate lines?

  • is defining multiple gateways harmful when the same?

  • how do I know which connection will be preferred?

You can see, I have put some thought into this. What I have is working fine, but is it the correct way to do it? The "manpages" were absolutely NOT satisfying. The complete networking model before systemd.networking had way better documentation.



I would like your opinion if you are knowledgable on this subject, thanks!










share|improve this question























  • You only need one gateway
    – Panther
    22 mins ago










  • Any input on if I should put it after the client address or below? If you post this as solution I gladly accept it.
    – gavery
    19 mins ago










  • I do not think the order matters
    – Panther
    13 mins ago














up vote
1
down vote

favorite












Is this better? (currently used and working good)



[ipv4]
address1=10.0.0.13/32
address2=10.0.0.42/32
gateway1=10.0.0.1
gateway2=10.0.0.1
dns=10.0.0.1;
dns-search=
method=manual


or should I only define one gateway? (nmtui suggests this way)



[ipv4]
address1=10.0.0.13/32,10.0.0.1
address2=10.0.0.42/32
dns=10.0.0.1;
dns-search=
method=manual


  • gateway after the client IP?

  • gateway as separate lines?

  • is defining multiple gateways harmful when the same?

  • how do I know which connection will be preferred?

You can see, I have put some thought into this. What I have is working fine, but is it the correct way to do it? The "manpages" were absolutely NOT satisfying. The complete networking model before systemd.networking had way better documentation.



I would like your opinion if you are knowledgable on this subject, thanks!










share|improve this question























  • You only need one gateway
    – Panther
    22 mins ago










  • Any input on if I should put it after the client address or below? If you post this as solution I gladly accept it.
    – gavery
    19 mins ago










  • I do not think the order matters
    – Panther
    13 mins ago












up vote
1
down vote

favorite









up vote
1
down vote

favorite











Is this better? (currently used and working good)



[ipv4]
address1=10.0.0.13/32
address2=10.0.0.42/32
gateway1=10.0.0.1
gateway2=10.0.0.1
dns=10.0.0.1;
dns-search=
method=manual


or should I only define one gateway? (nmtui suggests this way)



[ipv4]
address1=10.0.0.13/32,10.0.0.1
address2=10.0.0.42/32
dns=10.0.0.1;
dns-search=
method=manual


  • gateway after the client IP?

  • gateway as separate lines?

  • is defining multiple gateways harmful when the same?

  • how do I know which connection will be preferred?

You can see, I have put some thought into this. What I have is working fine, but is it the correct way to do it? The "manpages" were absolutely NOT satisfying. The complete networking model before systemd.networking had way better documentation.



I would like your opinion if you are knowledgable on this subject, thanks!










share|improve this question















Is this better? (currently used and working good)



[ipv4]
address1=10.0.0.13/32
address2=10.0.0.42/32
gateway1=10.0.0.1
gateway2=10.0.0.1
dns=10.0.0.1;
dns-search=
method=manual


or should I only define one gateway? (nmtui suggests this way)



[ipv4]
address1=10.0.0.13/32,10.0.0.1
address2=10.0.0.42/32
dns=10.0.0.1;
dns-search=
method=manual


  • gateway after the client IP?

  • gateway as separate lines?

  • is defining multiple gateways harmful when the same?

  • how do I know which connection will be preferred?

You can see, I have put some thought into this. What I have is working fine, but is it the correct way to do it? The "manpages" were absolutely NOT satisfying. The complete networking model before systemd.networking had way better documentation.



I would like your opinion if you are knowledgable on this subject, thanks!







networking systemd






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 20 mins ago

























asked 23 mins ago









gavery

114




114











  • You only need one gateway
    – Panther
    22 mins ago










  • Any input on if I should put it after the client address or below? If you post this as solution I gladly accept it.
    – gavery
    19 mins ago










  • I do not think the order matters
    – Panther
    13 mins ago
















  • You only need one gateway
    – Panther
    22 mins ago










  • Any input on if I should put it after the client address or below? If you post this as solution I gladly accept it.
    – gavery
    19 mins ago










  • I do not think the order matters
    – Panther
    13 mins ago















You only need one gateway
– Panther
22 mins ago




You only need one gateway
– Panther
22 mins ago












Any input on if I should put it after the client address or below? If you post this as solution I gladly accept it.
– gavery
19 mins ago




Any input on if I should put it after the client address or below? If you post this as solution I gladly accept it.
– gavery
19 mins ago












I do not think the order matters
– Panther
13 mins ago




I do not think the order matters
– Panther
13 mins ago















active

oldest

votes











Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f478124%2fhow-many-gateways-need-to-be-configured-for-a-2-ip-on-1-nic-setup%23new-answer', 'question_page');

);

Post as a guest



































active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes















 

draft saved


draft discarded















































 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f478124%2fhow-many-gateways-need-to-be-configured-for-a-2-ip-on-1-nic-setup%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

Peggy Mitchell

Palaiologos

The Forum (Inglewood, California)