-
Notifications
You must be signed in to change notification settings - Fork 32
Cisco 9300
In this tutorial we will be using a network switch from the Cisco Catalyst 9300 Series.
These are 24 or 48 10/100/1000T UPoE+ ports network switches that supports OpenFlow.
These instruction should work on any Cisco Catalyst 9300 Series network switch.
In order to program the x230 switch, connect the USB mini or serial to RJ45 cable to the switch and to your computer. A USB to serial converter is needed if you have a serial cable and no serial port on your computer.
The USB mini cable can be connected to the USB console port located in the front of the switch, indicated with the number (2) in the image below.
The serial to RJ45 cable can be connected to the console RJ45 port at the back of the switch, indicated with the blue colour in the area indicated with the number (1) in the image below.
For reference, the installation and configuration guides for the Cisco Catalyst 9300 series switches are linked here.
The serial connection settings for the communication to the switch are these:
- Baud rate: 9600 bps (The baud rate of the Console Port is adjustable from 1200 to 115200 bps. The default is 9600 bps.)
- Data bits: 8
- Parity: None
- Stop bits: 1
- Flow control: None
First, let's find the name of the USB interface:
ls /dev/tty*
Open a serial console. On Linux or MacOS you can use this command (if the serial interface is /dev/ttyACM0
):
screen /dev/ttyACM0 9600
The previous command opens a console terminal. Hit the Enter key a couple of times and you'll see the x230 login prompt. Enter username and password. The default username is manager
and the default password is friend
.
If this is the first time you are configuring the switch, a few things will be asked:
Would you like to enter the initial configuration dialog? [yes/no]: yes
At any point you may enter a question mark '?' for help.
Use ctrl-c to abort configuration dialog at any prompt.
Default settings are in square brackets '[]'.
Basic management setup configures only enough connectivity
for management of the system, extended setup will ask you
to configure each interface on the system.
Would you like to enter basic management setup? [yes/no]: yes
Enter host name [Switch]: daq-switch
Enter enable secret: cisco
Enter enable password: password
Enter virtual terminal password:
Configure SNMP Network Management? [no]: no
In the example above the name of the switch has been set as daq-switch and all the passwords have been set as cisco.
The next step is to reboot the switch and enable the OpenFlow features on the switch.
From the console
daq-switch>
enter the command enable
to turn on privileged mode, so that the privileged mode prompt below appears. Note the #
character at the end and that you will have to enter the enable password that you have set earlier.
daq-switch#
Now reboot the switch with the reload
command.
daq-switch#reload
Wait until the switch has rebooted and type the following commands to assign an IP address to the management port and to enable the OpenFlow features:
daq-switch> enable
Password:
daq-switch#
daq-switch#configure terminal
daq-switch(config)#interface GigabitEthernet0/0
daq-switch(config-if)#vrf forwarding Mgmt-vrf
daq-switch(config-if)#ip address 192.168.10.10 255.255.255.0
daq-switch(config-if)#negotiation auto
daq-switch(config-if)#exit
daq-switch(config)#boot mode ?
openflow openflow forwarding mode
daq-switch(config)#boot mode openflow
Changes to the boot mode preferences have been stored,
but it cannot take effect until the next reload.
Use "show boot mode" to check the boot mode currently
active.
daq-switch(config)#end
daq-switch#show boot mode
System initialized in normal switching mode
System configured to boot in openflow forwarding mode
Reload required to boot switch in configured boot mode.
The switch is now configured to boot in OpenFlow forwarding mode, but it needs to be rebooted to enable this feature:
daq-switch#reload
Wait for the reboot process to complete and the enter the following commands to configure the management interface communicate with controller. The management interface is the one marked in yellow colour behind the switch.
daq-switch>enable
Password:
daq-switch#
daq-switch#configure terminal
daq-switch(config)#interface GigabitEthernet0/0
daq-switch(config-if)#vrf forwarding Mgmt-vrf
daq-switch(config-if)#ip address 192.168.10.10 255.255.255.0
daq-switch(config-if)#negotiation auto
daq-switch(config-if)#end
daq-switch#
The next step is to configure the OpenFlow feature and controller connectivity, setting up the port numbers for faucet and gauge and the datapath-id:
daq-switch#
daq-switch#configure terminal
daq-switch(config)#feature openflow
daq-switch(config)#openflow
daq-switch(config-openflow)#switch 1 pipeline 1
daq-switch(config-openflow-switch)#controller ipv4 192.168.10.11 port 6653 vrf Mgmt-vrf security none
daq-switch(config-openflow-switch)#controller ipv4 192.168.10.11 port 6654 vrf Mgmt-vrf security none
daq-switch(config-openflow-switch)#datapath-id 0xABCDEF1234
daq-switch(config-openflow-switch)#end
daq-switch#
The final configuration steps for the switch are the following. This disables DTP and keepalives for GigabitEthernet1/0/1-24. This is for a 24 ports network switch, so adjust the range to 1-48 if your switch has 48 ports.
daq-switch(config)#interface range GigabitEthernet1/0/1-24
daq-switch(config-if-range)#switchport mode trunk
daq-switch(config-if-range)#switchport nonegotiate
daq-switch(config-if-range)#spanning-tree bpdufilter enable
daq-switch(config-if-range)#no keepalive
daq-switch(config-if-range)#exit
Enable telnet
access:
daq-switch(config)#line vty 0 15
arup-daq-lab(config-line)#transport input telnet
daq-switch(config-line)#password password
daq-switch(config-line)#login authentication admin
It is now a good time to save the configuration:
daq-switch#copy running-config startup-config
Use the following command to check the OpenFlow configuration:
daq-switch#show openflow switch 1
Logical Switch Context
Id: 1
Switch type: Forwarding
Pipeline id: 1
Data plane: secure
Table-Miss default: drop
Configured protocol version: Negotiate
Config state: no-shutdown
Working state: enabled
Rate limit (packet per second): 0
Burst limit: 0
Max backoff (sec): 8
Probe interval (sec): 5
TLS local trustpoint name: not configured
TLS remote trustpoint name: not configured
Logging flow changes: Disabled
Stats collect interval (sec): 5
Stats collect Max flows: 9216
Stats collect period (sec): 1
Minimum flow idle timeout (sec): 10
OFA Description:
Manufacturer: Cisco Systems, Inc.
Hardware: C9300-24P
Software: Cisco IOS Software [Gibraltar], Catalyst L3 Switch Software (CAT9K_IOSXE), Version 16.12.02, RELEASE SOFTWARE (fc1)| openvswitch 2.1
Serial Num: FCW2401C0ST
DP Description: arup-daq-lab:sw1
OF Features:
DPID: 0x000000ABCDEF1234
Number of tables: 9
Number of buffers: 256
Capabilities: FLOW_STATS TABLE_STATS PORT_STATS
Controllers:
192.168.10.11:6653, Protocol: TCP, VRF: Mgmt-vrf
192.168.10.11:6654, Protocol: TCP, VRF: Mgmt-vrf
Interfaces:
GigabitEthernet1/0/2
GigabitEthernet1/0/4
GigabitEthernet1/0/5
GigabitEthernet1/0/6
GigabitEthernet1/0/7
GigabitEthernet1/0/8
GigabitEthernet1/0/9
GigabitEthernet1/0/10
GigabitEthernet1/0/11
GigabitEthernet1/0/12
GigabitEthernet1/0/13
GigabitEthernet1/0/14
GigabitEthernet1/0/15
GigabitEthernet1/0/16
GigabitEthernet1/0/17
GigabitEthernet1/0/18
GigabitEthernet1/0/19
GigabitEthernet1/0/20
GigabitEthernet1/0/21
GigabitEthernet1/0/22
GigabitEthernet1/0/23
GigabitEthernet1/0/24
GigabitEthernet1/1/1
GigabitEthernet1/1/2
GigabitEthernet1/1/3
GigabitEthernet1/1/4
TenGigabitEthernet1/1/1
TenGigabitEthernet1/1/2
TenGigabitEthernet1/1/3
TenGigabitEthernet1/1/4
TenGigabitEthernet1/1/5
TenGigabitEthernet1/1/6
TenGigabitEthernet1/1/7
TenGigabitEthernet1/1/8
FortyGigabitEthernet1/1/1
FortyGigabitEthernet1/1/2
TwentyFiveGigE1/1/1
TwentyFiveGigE1/1/2
AppGigabitEthernet1/0/1
GigabitEthernet1/0/1
GigabitEthernet1/0/3
Now is the time to configure DAQ to use the networks switch.
Connect two USB ethernet adapters to your computer and ensure that the ethernet cables connected to the USB ethernet adapters are attached to the management port at the back of the switch for the control plane connection and to port 24 of the network switch for the data plane connection.
Edit local/system.yaml
, for instance using nano
:
nano local/system.yaml
and input the following configuration:
---
# Arup DAQ lab - Cisco 9300 configuration file for DAQ.
# Load defaults.
include: config/system/default.yaml
# Description for dashboard.
site_description: "Arup DAQ lab - Cisco 9300"
# Physical switch setup
switch_setup:
of_dpid: 0xABCDEF1234
data_intf: enxb49cdff3015b
ctrl_intf: enxb49cdff33826
lo_port: 6653
uplink_port: 24
lo_addr: 192.168.10.11/24
mods_addr: 192.168.10.1%d/24
ip_addr: 192.168.10.10
model: CISCO_9300
username: admin
password: password
host_tests: config/modules/all.conf
Make sure that the network interfaces indicated in the ctrl_intf
and data_intf
fields are the appropriate network interfaces of the USB ethernet adapters. If in doubt use the ifconfig
command to figure out the correct port.
Test that the configuration works by executing the following command:
bin/physical_sec
If all goes well you should see something looking like the text below:
Activating venv
Flattening config from local/system.yaml into inst/config/system.conf
Running switch setup...
Pulled cplane_mac b4:9c:df:f3:38:26 from enxb49cdff33826
Cleaning old setup...
Creating ovs-link interfaces...
Creating local-link interfaces...
Creating local bridge ctrl-br...
Configuring ctrl-swy with 192.168.10.11/24
Bridging enxb49cdff33826 to ctrl-br
Checking external connection to 192.168.10.10
PING 192.168.10.10 (192.168.10.10) 56(84) bytes of data.
64 bytes from 192.168.10.10: icmp_seq=1 ttl=255 time=0.927 ms
64 bytes from 192.168.10.10: icmp_seq=2 ttl=255 time=0.458 ms
--- 192.168.10.10 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 999ms
rtt min/avg/max/mdev = 0.458/0.692/0.927/0.235 ms
DAQ autoclean ip link del ctrl-pri
DAQ autoclean ip link del ctrl-swx
DAQ autoclean ovs-vsctl --if-exists del-br ctrl-br
Done with switch setup.
Congratulations, you have configured successfully your Cisco Catalyst 9300 switch for DAQ!
Go to the next tutorial > Device testing workflow