HP Switch
HP Switch
Basic config
Hostname [word]
- Assigned ip Configure -
- Vlan -
Vlan 1
Ip address a.b.c.d a.b.c.d # if you add ip it is equal to (int vlan 1)
Ip default-gateway a.b.c.d
Write memory # equal to copy run start
- For SVI -
Vlan 20
Ip address a.b.c.d a.b.c.d # equal int vlan 200
Write
- Enable routing -
Show ip
#Ip routing should : IP Routing : Disabled
- Vlan -
Show vlan # check the number of vlans
- History -
Show history
Repeat [no]
- Menu -
#Menu #manager mode
Press the numbers or use arrow keys
1. Go to status and counters> 5. port counters
- Upgrade image -
Show flash # it will show primary and secondary flash
Boot system flash [primary or secondary ] # the system will reboot after
Sh version
- Configuration files -
-
Show config config1 [filename] config [testconfig] # will add another config
Startup-default primary config testconfig # will use “testconfig” as primary if primary flash image is
used
- Logs -
- Vlan -
Vlan 2 # create a vlan
Untagged 24 #equal to switchport mode access & switchport access vlan 5 on port 24
Tagged 1 # trunk interface on port 1
- Svi -
Vlan 2
Ip address a.b.c.d a.b.c.d # equal int vlan 2
Tagged 1 #trunk interface
Vlan 10
Ip address a.b.c.d a.b.c.d # should be configured on L3 switch
Tagged port 24 # trunk
Untagged 5,8-10
Show vlan 10
------
-------
- Spanning tree -
To enable spanning tree
Config: spanning-tree
Show spanning-tree
Dynamic lacp #dynamic joining of links when one of the physical int is down #cons you cannot
control vlans that can traverse
Static lacp
!
Sw2: trunk 1,3 trk1 lacp #dynamic negotiation
!
Sw3: trunk a2,a4 trk1 trunk
Sw3: trunk a3,a6 trk2 lacp
!
Show trunks
Show interface brief a2
- security -
- Creating username -
Conf t
Password operator user-name operator #can still be able to config
Type the password:
Note: To secure device add a manager account to be able to config global config
Conf t
Config: crypto key generate cert rsa bits 1024
- Enable ssh -
Config: Crypto key generate ssh rsa bits 1024
Config: ip ssh
- Static routing -
Sh ip route
Setup dns ip dns server-address priority 1 208.67.222.222
SD1(config)#: Vlan 1
SD1(config)#:ip address 192.168.1.20 255.255.255.0
SD2(config)#: Vlan 1
SD2(config)#:ip address 192.168.1.21 255.255.255.0
Do this for all switch!!!
Create a Vlan:
SD1(config)#: Vlan 10
SD1(config)#: Vlan 20
SD1(config)#: Vlan 30
SD1(config)#: Vlan 40
SD2(config)#: Vlan 10
SD2(config)#: Vlan 20
SD2(config)#: Vlan 30
SD2(config)#: Vlan 40
- SVI -
SD1(config)#:Vlan 10
SD1(config)#:ip address 192.168.10.1 255.255.255.0
SD1(config)#:Vlan 20
SD1(config)#:ip address 192.168.20.1 255.255.255.0
When you do show run, it should look like this. Same goes for the other switch
Please note if you want to balance it on the other switch, Do not assign an ip. Assign if you only
have one L3 switch.
SD2(config)#:Vlan 30
SD2(config)#:ip address 192.168.30.1 255.255.255.0
SD2(config)#:Vlan 40
SD2(config)#:ip address 192.168.40.1 255.255.255.0
Creating trunks
SD1(config)#:Vlan 10
SD1(config)#:Tagged e 20-24
SD1(config)#:Vlan 20
SD1(config)#:Tagged e 20-24
SD1(config)#:Vlan 30
SD1(config)#:Tagged e 20-24
SD1(config)#:Vlan 40
SD1(config)#:Tagged e 20-24
This means it will vlans 10, 20, 30, 40 will traverse on ports 20-24
SD1(config)# Vlan 10
SD1(config)# Untagged 10
This will change the port to an access port
Dynamic lacp #dynamic joining of links when one of the physical int is down #cons you cannot
control vlans that can traverse