Operating System - Linux
1829243 Members
2183 Online
109987 Solutions
New Discussion

Re: Attribute IP address based on HP switch number/port number ?

 
Lejeune Vianney
New Member

Attribute IP address based on HP switch number/port number ?

Hello,

I have several 2650 switches (in stack) on a LAN, the IP addresses are attributed by a DHCP server, I would like to know if it's possible to attribute the IP address based on the switch number of the stack and the port number ?

Regards,
Mr Lejeune
3 REPLIES 3
Emil Velez
Honored Contributor

Re: Attribute IP address based on HP switch number/port number ?

Interesting question. Not that I know of but maybe I can suggest some workarounds.

1. Assumptions your DHCP server can assign a IP address to a MAC address.

2. SNMP supported switch.

What you will need to do is run a program to get a snmp dump of the switch port table. The switch port table mib will give you a port number and mac address.

From that output you can create a DHCP config where the IP is based on the switch and port number and mapped to a mac address.

Does this help you figure out how you might do it. You can use the snmpget command to get the data from a mib via the command line.

Matti_Kurkela
Honored Contributor

Re: Attribute IP address based on HP switch number/port number ?

If you allocate IP addresses by switch ports, what happens when someone plugs a hub with two or more hosts into one port?

MK
MK
Lejeune Vianney
New Member

Re: Attribute IP address based on HP switch number/port number ?

It doesn't matter because I use a radius authentification system based on mac address, so one device is allowed per port.