vityabond2015-03-16 00:22:23
vityabond, 2015-03-16 00:22:23

2 IPs from the same subnet to one server?

There is a server with two network cards, two cords with white IPs enter it from a managed switch:
IP1 gateway

gateway so that the server, for example, pinged both one by one and the other ... how can it be registered through routes or registered one as an alias, or somehow differently?

Thank you!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
Igor, 2015-03-16

Attach an address to the second interface:
Raise the interface:
Add a rule so that everything from this address is routed to a separate table:
Well, in fact, add a default route to this table:

ip ro add default via ${ip_gw} dev ${interface} table ${table}

vityabond, 2015-03-16

Yeah, I picked up both the first and second interface according to this instruction and it all worked, I just prescribed a rhinestone for only one, thank you very much! But don’t tell me about the second question:
if you let two of these IPs from the switch be launched one by one, so that you can then add one as an alias to the other, how to properly configure the switch, send tagging and one and the other IP, and then untag on the server, or is there better option??

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question