0

Suppose we have the following configuration :

BROADCAST=192.168.91.255
HWADDR=00:1D:09:FE:DA:04
IPADDR=192.168.91.250
NETMASK=255.255.255.0
NETWORK=192.168.91.0

BROADCAST=10.10.191.255
DNS1=10.10.15.161
DNS2=10.10.18.36
GATEWAY=10.10.191.254
HWADDR=00:1D:09:FE:DA:04
NETMASK=255.255.255.0
NETWORK=10.39.191.0

We have assigned two IP Addresses belonging to two different subnets to the same network interface. How does such a scenario work? How can a single computer be connected to two different network IDs?

And is it possible to assign different IP addresses with two different subnet masks to the same network interface? What are its implications?

3
  • This "just works". What do you think would go wrong? Imagine you have one Ethernet wire with a 192.168.91.0/24 network on it. And then you have another Ethernet wire with a 10.10.191.0/24 network on it. Now imagine you connect those two wires together. What do you think would break? And why can't a computer connected to that wire have an IP address in each network? What's the problem? Dec 29, 2016 at 11:55
  • My question is assigning such IP Address to one interface, I just have one Ethernet port on my PC, however the above configuration worked with Cent OS. So my question is how does one network interface work with more than one IP?
    – kauray
    Dec 29, 2016 at 16:11
  • It "just works". What do you think would go wrong? Dec 29, 2016 at 20:19

1 Answer 1

-1

Packets are processed correctly thanks to encapsulation and decapsulation, this is handled by the TCP/IP stack. What you usually can't do is assigning two different default gateways. If you do, the packets don't know "which way to go" when they are addressed to a network different than 192.168.91.0 and 10.39.191.0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .