如何在实际交换机上启用SDN

时间:2016-12-14 12:39:42

标签: sdn

如何在实际交换机上启用SDN?我已经使用迷你网成功模拟了SDN,但是当我使用实际的交换机时,我无法控制流入交换机的流量而无法ping主机。 我正在使用ODL控制器和Cisco 3650交换机。有没有人成功做到了?

-Ajay

1 个答案:

答案 0 :(得分:0)

验证OpenFlow的Cisco插件

摘要步骤

  1. show openflow copyright

  2. show openflow switch switch-id

  3. show openflow switch switch-id controllers [ stats ]

  4. show openflow switch switch ports

  5. show openflow switch-id flows [ configured | controller | default | fixed | pending | pending-del ] [ brief | summary]

  6. show openflow switch switch-id stats

  7. show interfaces type number counter

  8. show running-config | section openflow

  9. show openflow hardware capabilities

  10. 示例:使用物理接口指定到控制器的路由

    Switch> enable
    Switch# configure terminal
    Switch(config)# interface GigabitEthernet1/0/1
    Switch(config-if)# no switchport
    Switch(config-if)# ip address 10.0.1.4 255.255.255.0
    Switch(config-if)# exit
    Switch(config)# ip route 0.0.0.0 0.0.0.0 10.0.1.6
    Switch# copy running-config startup-config
    Switch(config)# exit
    

    示例:使用管理界面指定到控制器的路由

    Device> enable
    Switch# configure terminal
    Switch(config)# interface GigabitEthernet0/0
    Switch(config-if)# no switchport
    Switch(config-if)# ip address 10.0.1.4 255.255.255.0
    Switch(config-if)# exit
    Switch(config)# ip route vrf mgmtVrf 0.0.0.0 0.0.0.0 10.0.1.6
    Switch# copy running-config startup-config
    Switch(config)# exit
    

    示例:用于OpenFlow逻辑交换机配置的Cisco插件(默认VRF)

    Switch> enable
    Switch# configure terminal
    Switch(config)# onep
    Switch(config-onep)# exit
    
    Switch(config)# openflow
    Switch(config-ofa)# switch 1
    
    ! Specifies the pipeline that enables the IP Forwarding Table.
    Switch(config-ofa-switch)# pipeline 1
    Switch(config-ofa-switch)# tls trust-point local local-trustpoint-name remote remote-trustpoint-name
    Switch(config-ofa-switch)# max-backoff 5
    Switch(config-ofa-switch)# probe-interval 5
    Switch(config-ofa-switch)# rate-limit packet-in 300 burst 50
    Switch(config-ofa-switch)# controller ipv4 10.0.1.6 port 6323 security none
    Switch(config-ofa-switch)# datapath-id 0x222
    
    ! Adding an interface to the Cisco Plug-In for OpenFlow logical switch.
    Switch(config-ofa-switch)# of-port interface GigabitEthernet1/0/23
    Switch(config-ofa-switch)#end
    Switch# copy running-config startup-config
    

    示例:为OpenFlow逻辑交换机(管理VRF)配置Cisco插件

    Switch> enable
    Switch# configure terminal
    Switch(config)# onep
    Switch(config-onep)# exit
    
    Switch(config)# openflow
    Switch(config-ofa)# switch 1
    Switch(config-ofa-switch)# pipeline 1
    
    ! Specifying a controller that is part of a VRF.
    Switch(config-ofa-switch)# controller ipv4 10.0.1.6 port 6323 vrf mgmtVrf security none
    
    ! Adding an interface to the Cisco Plug-In for OpenFlow logical switch.
    Switch(config-ofa-switch)# of-port interface GigabitEthernet1/0/23
    Switch(config-ofa-switch)# end
    Switch# copy running-config startup-config
    

    更多细节here: Cisco Plug-in for OpenFlow Configuration Guide for Catalyst 3850 and 3650 Series Switches