Why does an IP addreess need to be associated with an interface?

  • Thread starter Eus
  • Start date
  • Tags
    Interface
In summary, the reason why every host and router needs an IP address is because they can send and receive IP datagrams. This is done to reduce the role of the router to just a hub.
  • #1
Eus
94
0
Hi Ho!

On page 322 of Computer Network: A Top-Down Approach Featuring the Internet, 2nd Edition by Kurose and Ross, which is published by Addison-Wesley, it is stated that:

"Because every host and router is capable of sending and receiving IP datagrams, IP requires each host and router interface to have its own IP address. Thus, an IP address is technically associated with an interface, rather than with the host or router containing that interface."

Is it true that the reason why IP requires each host and router interface to have its own IP address is because every host and router is capable of sending and receiving IP datagrams?

If suppose an IP address is technically associated with the host or router containing that interface, will this eliminate the capability of sending and receiving IP datagrams of every host and router? Of course not, but this reduces the role of the router to just merely a hub. Suppose a router has more than one interface, all of which has the same IP address, which is the IP address of the router. Then, whenever the router wants to route a datagram, the routing table that the router consults will show the same IP address for each interface through which it should forward the datagram. Therefore, the router will simply forward the datagram to all of the interfaces; it acts just like a hub.

It can be argued that, since an IP address is not technically associated with an interface anymore, the routing table should store the code of each interface so that the router can forward the datagram through the right interface. This way the router can act as a router instead of a hub. However, the router will never be able to interconnect two or more different networks that have different netmasks. For example, one network has a network number 103.0.0.0 and a netmask 255.0.0.0. The other network has a network number 200.233.31.0 and a netmask 255.255.255.0. If the router has a network number of 103.0.0.0, datagrams from the second network will never reach the router, and vice versa.

Therefore, the main reason to associate an IP address with each interface is to permit a router to interconnect two or more different networks with different network numbers, not because every host and router is capable of sending and receiving IP datagrams.

What do you think?


Eus
 
Technology news on Phys.org
  • #2
Eus said:
Hi Ho!
<clip>
"Because every host and router is capable of sending and receiving IP datagrams, IP requires each host and router interface to have its own IP address. Thus, an IP address is technically associated with an interface, rather than with the host or router containing that interface."

Is it true that the reason why IP requires each host and router interface to have its own IP address is because every host and router is capable of sending and receiving IP datagrams?
<snip>
What do you think?


Eus
If you ever tried pinging a host, you would realize why they need an IP address. Hosts do provide services. The real reason is the originating IP of the packets. Interfaces can sit on the sub-net.
 
  • #3
I started to write a lengthy reply, but it boils down to this (you are essentially correct):

Code:
1.1 -- [a] R [b] -- 2.1
             [c]    
               |
             3.1

The interfaces [a], and [c] on R cannot share an IP-address simply because they all reside on different subnets. There is no address that is valid on all 3 networks.

Other than that I'm not sure exactly what you are saying. You cannot have routers that behave like hubs, they would generate an infinite amount of traffic (the internet is complex, there are many thousands of circular routes even at a core backbone level) as well as generate very serious security issues. Even small subnets don't use hubs for internal data anymore , they (the hubs) are too vulnerable to packet sniffing.

On a non-routing host it is very possible to have identical IP-adresses on different interfaces to achieve certain effects, or even different computers with the same IP. This is used in clustering, to name something off the top of my head.

k
 
Last edited:
  • #4
What kenewbie said, basically. A hub is basically just an electrical device; it's “dumb”, it doesn't know about what type of network it's on or anything about addresses, it simply repeats all of the transmissions it hears. Unlike a router a hub is not able to send and receive IP datagrams.

The whole point of having a group of computers separated into networks (small address ranges) with routers between them is so that a single packet / message doesn't have to be re-transmitted to be heard by every computer (because you don't know where the computer with a particular address is if every computer can be anywhere in one big address range.)

The router knows “The computers on network α have addresses that look like 172.126.xxx.xxx and the computers on network β have addresses that look like 192.168.115.xxx. So when I see a message on network α with a destination address beginning with 192.168.115… I know to transfer that message to network β. But I can leave all of the messages with ‘local’ addresses alone.”
 
Last edited:
  • #5
kenewbie said:
Other than that I'm not sure exactly what you are saying.

I just want to say that the reason why IP requires each host and router interface to have its own IP address is not because every host and router is capable of sending and receiving IP datagrams. But, the reason for that is to permit a router to interconnect two or more different networks with different network numbers. To back up this argument, I gave two examples in my first post.

basePARTICLE said:
The real reason is the originating IP of the packets. Interfaces can sit on the sub-net.

Yes, you are right! The fact that each interface can sit on different sub-nets is the reason why an IP address needs to be associated with each of the interface, not the host or the router having the interface.

kenewbie said:
I started to write a lengthy reply, but it boils down to this (you are essentially correct):

Thank you.

So, the authors of the book didn't give the right reason, did they?Eus
 
Last edited:
  • #6
They may or may not have given the correct answer, based on the context they said it in. The quote you posted, with no further context, is indeed incorrect.

k
 
  • #7
There would be complications on the link layer in shared mediums such as Ethernet. Which MAC address would an ARP query return?
 
  • #8
-Job- said:
There would be complications on the link layer in shared mediums such as Ethernet. Which MAC address would an ARP query return?

That should work just fine as far as I can tell. Router broadcasts who-has on all interfaces, and get a response on the appropriate one, containing the MAC. Then the router responds on that interface.

k
 
  • #9
kenewbie said:
They may or may not have given the correct answer, based on the context they said it in. The quote you posted, with no further context, is indeed incorrect.

Here is the complete paragraph in which the authors wrote the argument:

Before discussing IP addressing, however, we'll need to say a few words about how hosts and routers are connected into the network. A host typically has only a single link into the network. When IP in the host wants to send a datagram, it does so over this link. The boundary between the host and the physical link is called an interface. A router, on the other hand, is fundamentally different from a host. Because a router's job is to receive a datagram on an "incoming" link and forward the datagram on some "outgoing" link, a router necessarily has two or more links to which it is connected. The boundary between the router and anyone of its links is also called an interface. A router thus has multiple interfaces, one for each of its links. Because every host and router is capable of sending and receiving IP datagrams, IP requires each host and router interface to have its own IP address. Thus, an IP address is technically associated with an interface, rather than with the host or router containing that interface.

So, because the paragraph is about the connection of hosts and routers into the network, as what I have explained before, it is not apt to say the the reason that IP requires each host and router interface to have its own IP address is because every host and router is capable of sending and receiving IP datagrams.

What do you think?

kenewbie said:
That should work just fine as far as I can tell. Router broadcasts who-has on all interfaces, and get a response on the appropriate one, containing the MAC. Then the router responds on that interface.

Yup, you are totally right!Eus
 
Last edited:
  • #10
Eus: That paragraph didn't make any sense what so ever. You are correct; the book not only makes it point poorly, but said point is even wrong.

k
 
  • #11
kenewbie said:
That should work just fine as far as I can tell. Router broadcasts who-has on all interfaces, and get a response on the appropriate one, containing the MAC. Then the router responds on that interface.

k

Maybe I'm not understanding the topic correctly, i thought what was being argued here was the possibility of a single host with multiple interfaces to have the same IP on all interfaces.
 
  • #12
I think that a confusing distinction here is whether we're talking about each interface having the same IP address on a single network, or each interface having the same IP address on a separate network. The first case wouldn't work as Job rightly points out. I think the second case is what Eus was getting at with the OP.
 
  • #13
CaptainQuasar said:
I think that a confusing distinction here is whether we're talking about each interface having the same IP address on a single network, or each interface having the same IP address on a separate network. The first case wouldn't work as Job rightly points out. I think the second case is what Eus was getting at with the OP.

Yup, you are right that in the first case when an ARP request packet has been broadcasted, the sender will receive multiple replies because an IP address is associated with a host/router having multiple interfaces. Maybe this is the reason of the authors.

But, the ARP stuff is the concern of the data link layer and not the network layer. Since the network layer will not know anything about the data link layer, it should be okay to associate an IP address with the host/router having multiple interfaces instead of with each of the interface. Therefore, everything should work fine even in the first case because of the principle of network layer abstraction.

I have sent this matter to the authors but I haven't gotten any reply yet.


Eus
 
  • #14
Eus said:
But, the ARP stuff is the concern of the data link layer and not the network layer. Since the network layer will not know anything about the data link layer, it should be okay to associate an IP address with the host/router having multiple interfaces instead of with each of the interface. Therefore, everything should work fine even in the first case because of the principle of network layer abstraction.

Well, according to layer abstraction as well, the network layer doesn't see hosts, it sees interfaces. By design each interface in the network layer is addressable, and must have it's own IP for that purpose. I think you have somewhat of a circular argument going on.
 
Last edited:
  • #15
-Job- said:
Well, according to layer abstraction as well, the network layer doesn't see hosts, it sees interfaces.

Ah, you are right! Yes, thank you for reminding me about that important fact.

-Job- said:
By design each interface in the network layer is addressable, and must have it's own IP for that purpose.

Yes, that is the reason that the authors of the book should have written:
An IP address needs to be associated with each interface instead of with the host/router that has the interface because, according to the principle of the network layer abstraction, the network layer does not see the presence of host/router in the network; it sees the presence of the NIC.

-Job- said:
I think you have somewhat of a circular argument going on.

Nope! We are done.

The conclusion is that the authors of the book didn't write the right reason why an IP address needs to be associated with each interface instead of with the host/router that has the interface.


Eus
 

1. Why do we need IP addresses for communication?

An IP address is used for communication as it acts as a unique identifier for a device on a network. It allows devices to send and receive data to and from specific destinations, similar to how a mailing address is used for sending and receiving physical mail.

2. What is the purpose of associating an IP address with an interface?

Associating an IP address with an interface allows the device to know which network it belongs to and how to route data to and from that network. It also helps in avoiding conflicts with other devices on the same network that may have the same IP address.

3. Can a device have more than one IP address associated with its interface?

Yes, a device can have multiple IP addresses associated with its interface. This can be useful for devices that need to communicate with different networks simultaneously or for load balancing purposes.

4. How is an IP address associated with an interface?

An IP address is associated with an interface through the configuration of the device's network settings. This can be done manually by a network administrator or automatically through protocols such as DHCP (Dynamic Host Configuration Protocol).

5. Do all devices connected to a network need to have an IP address associated with their interface?

Yes, in order for devices to communicate with each other on a network, they all need to have a unique IP address associated with their interface. This includes computers, smartphones, printers, and any other device that needs to send or receive data on the network.

Similar threads

  • Programming and Computer Science
Replies
7
Views
412
  • Engineering and Comp Sci Homework Help
Replies
1
Views
610
  • Computing and Technology
Replies
4
Views
1K
  • Computing and Technology
Replies
27
Views
2K
  • Programming and Computer Science
Replies
4
Views
10K
  • Computing and Technology
Replies
14
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
18
Views
3K
  • Calculus and Beyond Homework Help
Replies
2
Views
2K
Replies
8
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
3K
Back
Top