+ + +
+
+

Switches and ports

+
+
From COWiki
+
+
+ Jump to: navigation, search +
+
+ +

Switches and Ports[edit]

+

A quick guide to things you might want to do with an HP switch. +

+

Connect the switch to a serial line[edit]

+

Use a serial cable, and use 38400bps for HP switches. (Faster is +possible but 38400 seems to be reliable.) Press Enter twice to get a +login prompt. Username is manager, the password is the switch admin password. +

You can use PuTTY (on Unix or Windows) to log in over a serial +cable. If you attach a USB to serial adapter it will probably appear as /dev/ttyUSB0 but ls -l /dev/ttyUSB* to check. By default Ubuntu restricts serial ports to group dialout so you may need to add yourself to that group. +

puttyserial.png +

+

+ +

What is connected where?[edit]

+

Switches keep track of what MAC address is seen on which port, so you can ask the switch. +

+
show mac-address
+# but there'll be a lot of them on our switches
+show mac-address aa:bb:cc:dd:ee:ff
+# to show where that particular MAC address was seen or
+show mac-address B1
+# to show which MAC addresses were seen on port B1.
+show mac-address vlan 97
+# show only MAC addresses seen on VLAN 97.
+

Some things, mostly switches, advertise to the network what they are +by a protocol called LLDP. You can ask questions about this to find out +more about things that might be attached to your switch: +

+
bl08-d1# show lldp info remote-device B24
+ LLDP Remote Device Information Detail
+  Local Port   : B24
+  ChassisType  : mac-address
+  ChassisId    : aa bb cc dd ee ff
+  PortType     : local
+  PortId       : 50
+  SysName      : blah-l2
+  System Descr : ProCurve J9088A Switch 2610-48, revision R.11.63, ROM R.1...
+  PortDescr    : 50
+  Pvid         :
+  System Capabilities Supported  : bridge, router
+  System Capabilities Enabled    : bridge
+  Remote Management Address
+     Type    : ipv4
+     Address : 10.1.0.1
+blah-d1#
+

The switches' logs and other debugging[edit]

+

show log -r to read the switch's log in reverse order with the most recent entries first. +

/local/rancid on monitor keeps copies of the +configuration of our switches and notes on when they changed, so you may + be able to use this to discover when something changed. +

+

Adding a port to a VLAN[edit]

+

Most VLANs we need to configure are untagged +

+
config
+vlan 421 untagged B3
+exit
+wr mem
+

The final wr mem copies the running configuration to the switch's memory so it will startup with it. +

To ask which ports are in a vlan or which vlans are on a port: +

+
show vlans port A1
+show vlan 102
+

Spanning tree[edit]

+

Hard to summarise just here, but: +

+
# to find out who is the root and see the state of all ports
+show spanning-tree
+# to find out which ports are receiving topology changes etc
+show spanning-tree debug-counters instance 0 ports all
+# (or ports A1, 1-4, etc.)
+# and look for topology changes Rx.  If you're not expecting topology
+# changes from a switch you can then log on to that switch and repeat
+# the process
+# maybe you need to clear the counters so you can see changes more
+# clearly
+config
+spanning-tree clear-debug-counters
+

Transceivers, modules, links[edit]

+

Our chassis switches are modular, so you can ask which modules are in which slots and what their types and serial numbers are: +

+
bl08-d1(config)# show modules
+ Status and Counters - Module Information
+  Chassis: 5412zl J8698A!        Serial Number:   XXXXXXXXXX
+                              Allow V1 Modules:   Yes
+  Management Module: J8726A      Serial Number:  XXXXXXXXXX   Core Dump: YES
+                                                                      Core  Mod
+  Slot Module Description                     Serial Number  Status   Dump  Ver
+  ---- -------------------------------------- -------------- -------- ----- ---
+  A    HP J9309A 4p 10-GbE SFP+ zl Module     XXXXXXXXXX     Up       NO    1
+  B    HP J8702A 24p Gig-T zl Module          XXXXXXXXXX     Up       NO    1
+  C    HP J8702A 24p Gig-T zl Module          XXXXXXXXXX     Up       NO    1
+  D    HP J8702A 24p Gig-T zl Module          XXXXXXXXXX     Up       NO    1
+  E    HP J8702A 24p Gig-T zl Module          XXXXXXXXXX     Up       NO    1
+  F    HP J8702A 24p Gig-T zl Module          XXXXXXXXXX     Up       NO    1
+  G    HP J8702A 24p Gig-T zl Module          XXXXXXXXXX     Up       NO    1
+  I    HP J9534A 24p Gig-T PoE+ v2 zl Module  XXXXXXXXXX     Up       YES   2
+

You can hot-swap a module in slots A-L with another of the same type +without rebooting the switch. If you insert a module of a different type + you will need to reboot the switch (reload) for it to work. +

Fibre modules take little widgets called transceivers, SFP/SFP+ modules, or GBICs. To see which ones you have installed: +

+
bl08-d1# show tech transceivers
+transceivers
+Transceiver Technical Information:
+ Port # | Type      | Prod #     | Serial #         | Part #
+ -------+-----------+------------+------------------+----------
+ A1     | SFP+DA7   |     J9285B | XXXXXXXXXX       | 8121-1155
+ A2     | SFP+DA7   |     J9285B | XXXXXXXXXX       | 8121-1154
+ A3     | SFP+DA3   |     J9283B | XXXXXXXXXX       | 8121-1298
+