Current configuration with HP Procurve 2848 switch at a colocation facility consists of using the ISP switchport as the default gateway. The current configuration is very basic with only 1 vlan assign to all switch ports. Routing is not currently enabled and the switch only functions at layer2 at the moment. There are 2 HP procurve switches connected together.

However I now need to configure HP switch to do the routing instead of using the ISP switchport as the default gateway.

The commands are similar to cisco commands but I can find the HP commands which relate. However, I just want to confirm I am thinking of this the best way.

I was going to configure a new vlan on an unsued access port and assign that Vlan with the IP of the /30 that is being configured to connect to the ISP switchport.

Then I was going to enable IP routing on the HP switch and assign our current IP subnet as well as new subnets to the current vlan, and statically route it to the new vlan that was configured with the /30 to connect to the ISP.

Which HP or Cisco commands might help achieve the above?

Also just to note, we statically assign private IP addresses to some devices connected to the HP switches. There is no actual gateway or route configured for this /24.


  1. Servers are located in a colocation facility.
  2. Right now HP switch functions only as a switch and utilizes the uplink port from the ISP(colocation facility) as the default gateway. So the ISP does the routing to my network.

  3. In order to obtain new IP's, we need to configure our switch to begin routing. The ISP will assign us public IPs and put it to our HP switch via the /30 IP.

  4. I need to be able to move a cable from any switch port to another switchport and still allow it to communicate on the network. (Meaning the default way a switch works where any network can communicate from any port)

The end result should resemble something similar to this image:

enter image description here

UPDATE: Working Example Below - Note: Due to time constraints I performed the IP configurations on Vlan 1 since that is the default vlan that exists in both switches. The ISP went into Port 2 of the switch. HP Switch B connected to Port 1 of Switch A.

HP Switch A

ip routing
ip route

vlan 1
ip address
ip address
ip address

vlan 30 name ISP
vlan 30
ip address
untagged 2

HP Switch B

ip default-gateway
vlan 1
ip address
  • 4
    Could you please add a diagram with your current topology and the new topology you want to go to? Your description is a bit confusing. – Daniel Yuste Aroca Aug 17 '13 at 11:59
  • I am not sure if this is a bug or not. Enable ip routing on some ProCurve switches requires a reset (erase all existing configurations). Simply use the command to enable IP routing does not do anything. – sdaffa23fdsf Aug 17 '13 at 13:53
  • DanielYusteAroca, I added a diagram. Sorry for the confusion. @realdreams, can you reference where you found that information? – Damainman Aug 18 '13 at 2:56

I tried to upload a visio picture that shows what I think you are trying to accomplish, but I guess I need more reputation! You basically need to enable IP routing on the HP switch that will be the gateway, and add a default route. I definitely recommend using separate VLANs for your different networks. You will also need to make sure that your ISP router has a route back to your HP switch for your network:

ISP Router

Int fa0/0    
Ip address X.X.X.1    
Ip route X.X.X.2  

HP Switch 1

Ip routing  
Vlan 10 name ISP  
Ip address X.X.X.2  
Untagged 1  
Vlan 20 name LAN  
Ip address  
Untagged 2-48  
Ip route X.X.X.1  

HP Switch 2

Ip default-gateway  
Vlan 20 name LAN  
Ip address  
Untagged 1-48  
  • Thank you for the response and commands. Since my network will only be isolated to my network via my HP switch, is it still necessary for the ISP to put a route for it in their router? I only need my devices which are connected to my HP switch to communicate via that network. In the mean time, I am going to try to figure out the purpose of the "untagged" commands in your example. – Damainman Aug 18 '13 at 2:14
  • You are correct, if the network does not communicate with the outside world then the ISP does not need to put a route in their router. The "untagged" commands have to do with setting the native VLAN for the port. In my example, you would plug the ISP router into port 1 on the HP switch. It's hard to give you actual configurations without all the details, but when I am using XenServer/ESXi, I prefer to setup each network on its own VLAN, and then setup VLAN tagging to my host. This allows you to assign virtual NICs to individual networks. – DanielK Aug 18 '13 at 3:47
  • Thank you for the response again. At the moment, because of time limitations we are attempting to just use two vlans. 1 Vlan assigned to the port which connects to the ISP. The 2nd vlan which we are planning to just keep as the default vlan to be used for all devices connecting to the switch. Is it possible in HP to assign multiple subnets to one vlan? In cisco it is done via ip address x.x.x.x secondary . So for example, in your answer... instead of vlan20 we should just use the default factory vlan and apply all the subnets to that. – Damainman Aug 18 '13 at 4:19
  • Yes, you can assign multiple IP addresses to one VLAN. With HP, you do not need the "secondary" commmand, just add the second IP address with "ip address X.X.X.X", it will not override the first IP address configured. If you need to remove an IP address from the vlan, just use the "no" command. – DanielK Aug 18 '13 at 7:25
  • This isn't completely on topic, but I would also setup redundant connections between your switches with LACP. Its really easy to do with with HP. For example, if you want to connect interfaces 47 & 48 on HP1 to 47 & 48 on HP2, do the following on both switches: "trunk 47-48 trk1 lacp" and then verify the trunk is in the correct vlan. Example: "vlan 20 untagged trk 1" – DanielK Aug 18 '13 at 7:29

Then I was going to enable IP routing on the HP switch and assign our current IP subnet as well as new subnets to the current vlan

Despite this is possible, I would recommend you to use a different VLAN for each subnet. This is considered a best practice as it provides several advantages. For instance: it reduces the amount of broadcast traffic that every network client has to process.

  • I agree. Although the network is currently not properly organized cable wise and not sure which devices on which subnets are plugged into which ports. Also because of virtualization, one device NIC might send/receive traffic from multiple subnets. I only have a day to do this before flying out of state, so trying to at least accomplish the above and slowly move from forward from there. – Damainman Aug 18 '13 at 2:17

I am guessing you have a /24 given to you by your ISP, you can divide that address space up into several Vlans with no problem, but if you create extra /24 Vlans you either have to get the address space from the provider or if it is your address space ensure that the provider side has static routes configured and redistributed in order to reach you.

As was said above almost on one uses multiple addresses spaces on the same VLAN unless you are doing something like a DHCP scope migration. You might be thinking of publically routeable vs private addresses spaces but your question did not detail that.

In addition you would need static routes on your WAN device pointing to your switch, you only need the default route on your HP switch.

  • Thank you for the response. The equipment is located in a co-location facility. My ISP which is the colocation facility is assigning me several different subnets, but my switch needs to act as the gateway and do the routing for those subnets. All addresses in my network are statically assigned and the internal network is only used for devices which need to communicate internally so no NAT is implemented. – Damainman Aug 18 '13 at 2:21

Ok then just put both subnet gateways under the same interface vlan 20 name lans ip address ip address you can communicate between the two subnets but do not need to set up trunking to servers or divide ports between vlans

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.