那个创建的网络拓扑在opendaylight可视化界面显示不出来
feature:list | grep openflowplugin里面没有odl-openflowplugin-flow-services-ui对opendaylight可视化界面有影响吗?
sdn环境搭建opendaylight 安装问题
- 写回答
- 好问题 0 提建议
- 关注问题
- 邀请回答
-
2条回答 默认 最新
专家-皆知 2024-03-28 16:26关注引自免费微信小程序:皆我百晓生
创建SDN环境并安装OpenDaylight (ODL) OpenFlow plugin flow-services-ui:
-
准备硬件设备: 基于Linux系统,您可能需要以下设备连接到虚拟机或服务器以支持OpenDaylight:
- SDN Controller: Host machine or Virtual Machine with the necessary network interface card (NIC)
- Switches: Host machine or Virtual Machine with a network switch or router capable of running ODL and flow services.
-
下载OpenDaylight and install the OpenFlow plugin: Follow the instructions for installing OpenDaylight on your Linux host, either from the official documentation (https://docs.opendaylight.org/en/latest/) or the ODLSite (https://www.opendaylight.org/en/download/).
-
Configure your SDN controller: To connect the controller to the network, follow these steps:
- Configuring the controller's IP address and subnet: Open
/etc/network/interfacesin your Linux terminal. - Add the following lines to configure the controller's network interface(s):
Replaceauto eth0 iface eth0 inet static address 192.168.1.10 netmask 255.255.255.0 gateway 192.168.1.1eth0with the name of your network interface(s) (e.g.,eth0for Ethernet) and192.168.1.10and192.168.1.1with your respective network addresses and gateways.
- Configuring the controller's IP address and subnet: Open
-
Configuring the ODL plugin: Edit
/etc/OpenDayLight/dhcp.conf(if it exists), and add the following configuration block:server { mode = client-server max_rate = 100M limit_rate = 1G log_file /var/log/dhcp-dns-server.log broadcast_address = 192.168.1.255 advertising_ip = 192.168.1.10 database_files = /var/lib/openflow/plugins/opendaylight-odl-flow-plugin/ dns_database = /etc/mysql/conf.d/myodl-network-resolver.d/named.conf }Replace
/var/lib/openflow/plugins/opendaylight-odl-flow-plugin/with the path to the OpenDayLight flow service installation directory. -
Enable the OpenFlow plugin on all switches: Restart the involved switches by running the following command on each switch:
sudo systemctl restart switch-{name} -
Configure flow services for the controller: Navigate to
/etc/openflow/plugin.xml(if it exists) and update theflow-servicessection with the following configuration content:<flowServices> <!-- Add OpenFlow flows here --> </flowServices> -
Configure visualizing interface (VIFs): If you want to visualize the network topology using the OpenDayLight visualization interface (ODLV) in your Linux system, ensure that the ODL flow plugin is enabled on both the controller and switches, as described in step 5.
-
Install the Flow Services UI package: Install the OpenDayLight flow services UI using the following command on your Linux host:
sudo apt-get install flow-services-ui -
Connect the VIFs to the OpenDayLight Controller: Make sure the OpenDayLight control plane can access the VIFs on the switches connected to the controller:
- Configure an appropriate interface on each switch, such as
enp0s1,enp0s2, etc., usingifconfigorip addr show. - On the controller, create a VIF (
ovf) file containing the associated OpenFlow protocol configuration (e.g., OFPT instance ID, port mappings, and VLAN tags). For example,odl-flow-service.vif.yaml:version: '1' description: OpenDayLight OpenFlow flow services GUI vendor: 'openflow-client' # Example vendor for OpenFlow plugin type: graphical tags: - 'flow-ui' description_long: - This VIF provides a graphical user interface for configuring and monitoring OpenFlow flows between switches. engine: protocol: otg plug_name: odl-flow-service ports: - port_id: '1' port_type: input direction: out name: Inbound Interface value_template: {'local': {'port_name': 'in'} context: local_port: 'in' remote_port: 'out' floating_ips: - ip_address: '192.168.1.10' - ip_address: '192.168.1.11' - port_id: '2' port_type: output direction: in name: Outbound Interface value_template: {'local': {'port_name': 'out'} context: local_port: 'out' remote_port: 'in' floating_ips: - ip_address: '192.168.1.12' - port_id: '3' port_type: flow_table direction: in name: Ingress Table value_template: {'table_name': 'default-table', 'flows': []} global_flow_engine_config: binding_key: 'flows' flow_engine: protocols: - type: forwarding type_flows: - id: default-flow description: A default flow template for the controller's IN-bound tables. flow_table_id: 'default-table' table_path: '/vswitches/{switch_id}/tables/default-table.yaml' policy_matchers: - match_table: 'ingress' rules: - name: Edge Router source_port_range: start: 1024 end: 4096 actions: - action: appserver_flow controller_instance: name: default-router public_port: 5000 - name: Bridge (Ingress Only) source_port_range: start: 1024 end: 4096 actions: - action: appserver_flow controller_instance: name: bridge public_port: 5000
After creating the VIF files, edit `/etc/openflow/cli-config` (if it exists) and add the following configuration snippet to configure the corresponding OpenFlow clients: ```yaml ovftool binary: 'ovftool' ovftool conf_dir: '/opt/openflow/plugins' ovftool server_conf: '/etc/openflow/plugins/opendaylight-odl-flow-plugin/flowservices.yaml' ovftool flow_service_conf: '/etc/openflow/plugins/opendaylight-odl-flow-plugin/flowservices-vif.yaml' ovftool user: 'controller' ovftool password: 'your_password' - Configure an appropriate interface on each switch, such as
-
Test the VIF integration: Start the OpenDayLight controller and switches using the
ovftoolcommand. Verify if the OpenFlow flows are visible in the ODL visualization interface:
- Check the OpenFlow controller's logging output, which should include information about incoming/outgoing flows, such as their state, destinations, and source ports.
- Access the OpenDayLight controller's HTTP API or CLI to verify the OpenFlow tables that were created during the process (e.g., ingress, edge router, and bridge).
- Test the OpenFlow tables by querying the specified flows and checking their status (e.g., active/inactive, flowing, etc.).
If the OpenFlow diagram is not displayed correctly after installation, there might be issues with the OpenDayLight configuration, such as incorrect packet mapping in the OpenFlow tables, lack of link types in the flow services, or misconfigured policies.
Here's a summary of the potential solutions:
-
Check the OpenFlow controller's network configuration: Ensure that the OpenDayLight controller has connectivity to its assigned interfaces (eth0) and correct the network mask and gateway settings in
/etc/network/interfaces. -
Validate the OpenFlow plugin configuration: Confirm that the ODL flow plugin is installed and configured properly on the OpenDayLight controller, switches, and VIFs. Ensure that the control plane (controller and switches) have proper traffic routing configured to send OpenFlow packets through the ODL vSwitch and on the VIFs.
-
Check and adjust OpenFlow table bindings: Verify that the OpenFlow tables being used in the OpenFlow tables definition (flow-services.yaml) are bound correctly to the correct OVS switch(es) and ports. Make sure the flow tables use the correct context fields for handling local and remote port names.
-
Update or modify OpenFlow policy configurations: If the OpenFlow plugins don't work as expected due to misconfigured policies, review the generated OpenFlow policy configuration files (flowservices.yaml, flowservices-vif.yaml) and verify the policy matchers and flow templates provided in the OpenFlow CLI or ovftool commands.
-
Fix missing/virgin/missing-link-type configurations: If the OpenFlow tables are missing certain link types or use the wrong link types, ensure that they are defined in the flow services.yaml file with the correct values
解决 无用评论 打赏 举报 编辑记录-