You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

无法连接127.0.0.1:6633远程控制器,Mininet新手求助

Troubleshooting "Unable to contact the remote controller" in Mininet

Hey there! Let's break down why you're getting that error message when running your Mininet script. Here are the most common issues and how to fix them:

1. Your Remote Controller Isn't Running Locally

The biggest culprit here is that the controller you're trying to connect to (like POX, OpenDaylight, or ONOS) isn't actually running on your local machine (127.0.0.1) on port 6633.

  • First, start your controller:
    • For POX: Run ./pox.py forwarding.l2_learning from the POX directory.
    • For OpenDaylight: Follow its official startup instructions to launch the controller service.
  • Verify the controller is listening on port 6633 with this command:
    sudo netstat -tulpn | grep 6633
    
    You should see an entry showing the controller process actively using that port.

2. The Controller Uses a Different Default Port

Some controllers don't use 6633 by default. For example:

  • ONOS defaults to port 6653
  • Older OpenDaylight versions might use 6640

Check your controller's documentation for its default OpenFlow port, then update your script's port parameter in the addController line:

net.addController( 'c0', controller=RemoteController, ip='127.0.0.1', port=YOUR_CONTROLLER_PORT )

3. Firewall is Blocking the Connection

Your local firewall might be preventing Mininet from reaching the controller on port 6633.

  • Temporarily disable the firewall to test:
    sudo ufw disable
    
  • If that fixes it, add a permanent rule to allow traffic on port 6633:
    sudo ufw allow 6633/tcp
    

4. Switch Controller Configuration

Sometimes Mininet doesn't properly attach switches to the remote controller. After starting the Mininet CLI, check each switch's controller status:

mininet> sh ovs-vsctl show

Look for entries like Controller "tcp:127.0.0.1:6633" under each switch. If missing, manually attach the controller to each switch:

mininet> sh ovs-vsctl set-controller s1 tcp:127.0.0.1:6633
mininet> sh ovs-vsctl set-controller s2 tcp:127.0.0.1:6633
mininet> sh ovs-vsctl set-controller s3 tcp:127.0.0.1:6633

Once you've addressed the issue, restart your Mininet script and the error should disappear.

内容的提问来源于stack exchange,提问作者Mohammed

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.11 07:44:14