Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
The example configurations below provide IP routing between two HP ProCurve 5300XL Switches (Switch A
and Switch B) using OSPF as the routing protocol. The two switches are within a single area OSPF domain.
Switch A and B configured to provide IP routing between VLANs using only OSPF as the routing protocol. All
protocols are switched within each VLAN.
OPSPF Area
VLAN 20
20.20.20.0
Switch A
hp procurve
switch 5304XL
Use xl m od ul es only
J4850A
IP address
hp p ro c urve hp proc urve
10 / 1 00 -T x l
m o d ul e
M ini -GBI C
xl m o dule xl
J4 82 0A J4 87 8A m o dule
10.10.10.2
IP address
10.10.10.3 hp procurve
switch 5308XL
J4819A Use xl m od ul es only
hp p ro curve
10/ 100- Tx l hp p ro curve
xl
m o dule
M ini-GBIC
J4820A
xlm o d ule
J4 87 8A m o dule
VLAN 40
198.168.40.0
VLAN 30
Switch B 30.30.30.0
NOTES:
1. The interface port numbers (e.g. interface a1) and the IP address (e.g. 10.10.10.2) may differ in your
network, so adjust these values accordingly.
2. The HP ProCurve Switch 5300XL Series (e.g. HP 5304XL), type of module(s), and software version
number below may not accurately reflect the device(s) you are configuring.
3. The area 0.0.0.0 command is used to assign the 5300XLSwitches to the single backbone area.
4. The ip ospf area 0.0.0.0 command is used to assign the individual interfaces to the OSPF area.
5. In the example below for Switch B, as soon as the redistribute connected command is issued for a given
routing protocol, ALL connected routes are advertised within that routing protocol. The restrict
198.168.40.0/24 command is used in order to keep this directly connected network (e.g. VLAN 40) from
being advertised through OSPF to Switch A.
6. In the example below, the redistribute connected command is needed in order for Switch A to learn (via
OSPF) the directly connected network (e.g., the 30.30.30.0 network) on Switch B and vice versa. By
default the Switch 5300XL will not advertise directly connected OSPF networks. By default the Switch
5300XL will advertise directly connected RIP networks.
7. The configuration examples below were created on software version E.06.01.
Switch_A(config)# vlan 10
Switch_A(vlan-10)# untag a1
Switch_A(vlan-10)# exit
Switch_A(config)# ip routing
Switch_A(ospf)# vlan 10
Switch_A(vlan-10)# vlan 20
Switch_A(vlan-20)# untag b1
Switch B
HP ProCurve Switch 5308XL# con
Switch_B(config)# vlan 10
Switch_B(vlan-10)# untag a1
Switch_B(vlan-10)# exit
Switch_B(config)# ip routing
Switch_B(ospf)# vlan 10
Switch_B(vlan-10)# vlan 30
Switch_B(vlan-30)# untag b1
Switch_B(vlan-30)# vlan 40
Switch_B(vlan-40)# untag b4
hostname "Switch_A"
cdp run
ip routing
vlan 1
name "DEFAULT_VLAN"
untagged A2-A24,B2-B4
ip address dhcp-bootp
no untagged A1,B1
exit
vlan 10
name "VLAN10"
untagged A1
exit
vlan 20
name "VLAN20"
untagged B1
exit
ip router-id 10.10.10.2
router ospf
area backbone
redistribute connected
exit
vlan 10
exit
hostname "Switch_B"
cdp run
ip routing
vlan 1
name "DEFAULT_VLAN"
untagged A2-A24,B2-B3
ip address dhcp-bootp
no untagged A1,B1,B4
exit
vlan 10
name "VLAN10"
untagged A1
exit
vlan 30
name "VLAN30"
untagged B1
exit
vlan 40
name "VLAN40"
untagged B4
exit
ip router-id 10.10.10.3
router ospf
area backbone
redistribute connected
exit
vlan 10
exit
Outputs from these show commands for this example follow below. Refer to Chapter 16 of the HP
Procurve Series 5300XL Switches Management and Configuration Guide for detailed descriptions of each
command's output.
Router ID : 10.10.10.2
Area Border : no
AS Border : yes
Router ID : 10.10.10.3
Area Border : no
AS Border : yes
IP Route Entries
IP Route Entries
Switch_A# sh ip route
IP Route Entries
Switch_B# sh ip route
IP Route Entries
Advertising
Advertising
IP Address Mask
--------------- ---------------
IP Address Mask
--------------- ---------------
198.168.40.0 255.255.255.0