1

i am newbie in networking. While working on the network i have seen that switches and wifi access points do contain the ip addresses. One reason for them to have the ip address is that we can manage them from the network but my question is why do these devices have ip address while they do not need it for their working. Secondly let us suppose that there is no dhcp server configured on the network so we gave the access point an ip address that is not in the same network. Now we will not be able to connect to it on network but it will still perform its functioning that is, it will broadcast packets to the network. Isn't it logically incorrect. That a device being on the different network is routing or broadcasting data of other network.

This is edit 1:- as i myself answered the first question that they need ip address for management but point is, this is wastage of ip address. In a network when it is divided into several subnetworks sometime each network has 5-6 ip addresses then assigning one ip address to switch is wastage of one address.Should it be omitted

  • 1
    If you need to remotely manage the device, then it's not a waste. – Ron Trunk Nov 30 '15 at 13:56
3

Layer-2 devices like switches an WAPs get IP addresses for management. There are unmanaged switches which don't get, and don't have an option for, IP addresses because they don't need them since they are not managed. Some WAPs (LWAPs) don't get configured with IP address as you normally would, but they get an IP address from DHCP and a configuration from a WLC.

You could give these devices IP addresses not on the same network as the network which they serve. This could be a problem since you may not be able to get to the devices to manage them, or it may be that you have set up a management VLAN with which to get to them.

Edit:

The IP addresses assigned to these devices are not wasted addresses. The devices need to be managed. As I wrote above, you could have a separate management VLAN. If you have so few addresses per subnet, you are really doing it wrong. Each subnet will have a bunch of unused addresses. These addresses could be considered wasted, but it is how IP addresses get assigned. There has been a lot of research and math to demonstrate how you can't, and really shouldn't, have a very efficient IP address scheme. This is one of the reasons IPv6 was designed the way it is with over 18 quintillion addresses per subnet.

  • But switches also work on network layer – shiv garg Nov 30 '15 at 13:57
  • 1
    Only layer-3 switches, which have routers, operate in the network layer. Layer-2 switches operate in the data-link layer. – Ron Maupin Nov 30 '15 at 14:01
1

as i myself answered the first question that they need ip address for management but point is, this is wastage of ip address.

Using a public ipv4 address for management would be "wastage" since that is expending a scarce resource on a task that could be served by a less scarce resource.

So dont do that (see below)

In a network when it is divided into several subnetworks sometime each network has 5-6 ip addresses then assigning one ip address to switch is wastage of one address.Should it be omitted

In general it's best not to put management addresses on general vlans but instead to have a dedicated vlan (or in a really big network multiple vlans) for management. This helps to keep management traffic seperate from user traffic.

Normally you would use private IPv4 addresses on your management VLAN. For most organisations private IPv4 addreses are plentiful enough that using up a few of them for management networks is a non-issue.

If your network is really so big that private ipv4 is a scarce resource then you might want to consider IPv6 for management but be aware that not all hardware has good ipv6 support.

0

You are answering the first question yourself. IP addresses are there to be able to manage them. Some layer two devices need IP addresses in some networks or vlan to be able to use different services, such as DHCP-relay or mDNS gateways.

I don't understand your other question, but as said, if you're using a DHCP-server in another network, the DHCP request needs to be sent to another network. And since the DHCP-client doesn't have a valid IP-address yet, the switch needs an IP-address to use as source-address so it can route the DHCP-packets back and forth from server to client.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.