host_tracker模块无法正常工作

时间:2016-04-07 13:11:40

标签: python openflow sdn pox

我想在POX中使用host_tracker模块。 我有一个运行mininet的树形拓扑。 在pox控制台中,我运行此命令$./pox.py host_tracker openflow.discovery 当检测到链接时,我尝试从我的mininet控制台$h1 ping h2执行ping操作,但它表示目标主机无法访问。 这是示例输出。 POX:

anusha@anusha-Lenovo-IdeaPad-Z500:~/pox$ ./pox.py host_tracker openflow.discovery
POX 0.2.0 (carp) / Copyright 2011-2013 James McCauley, et al.
INFO:host_tracker:host_tracker ready
INFO:core:POX 0.2.0 (carp) is up.
INFO:openflow.of_01:[00-00-00-00-00-0b 1] connected
INFO:openflow.of_01:[00-00-00-00-00-0a 2] connected
INFO:openflow.of_01:[00-00-00-00-00-08 3] connected
INFO:openflow.of_01:[00-00-00-00-00-04 4] connected
INFO:openflow.of_01:[00-00-00-00-00-0c 5] connected
INFO:openflow.of_01:[00-00-00-00-00-05 6] connected
INFO:openflow.of_01:[00-00-00-00-00-06 8] connected
INFO:openflow.of_01:[00-00-00-00-00-07 7] connected
INFO:openflow.of_01:[00-00-00-00-00-0e 11] connected
INFO:openflow.of_01:[00-00-00-00-00-09 9] connected
INFO:openflow.of_01:[00-00-00-00-00-03 10] connected
INFO:openflow.of_01:[00-00-00-00-00-0d 12] connected
INFO:openflow.of_01:[00-00-00-00-00-01 14] connected
INFO:openflow.of_01:[00-00-00-00-00-02 13] connected
INFO:openflow.discovery:link detected: 00-00-00-00-00-0b.1 -> 00-00-00-00-00-08.4
INFO:openflow.discovery:link detected: 00-00-00-00-00-0b.2 -> 00-00-00-00-00-07.1
INFO:openflow.discovery:link detected: 00-00-00-00-00-0a.4 -> 00-00-00-00-00-07.3
INFO:openflow.discovery:link detected: 00-00-00-00-00-0a.2 -> 00-00-00-00-00-08.1
INFO:openflow.discovery:link detected: 00-00-00-00-00-08.3 -> 00-00-00-00-00-0d.3
INFO:host_tracker:Learned 1 5 9e:b2:40:66:d3:32
INFO:openflow.discovery:link detected: 00-00-00-00-00-08.6 -> 00-00-00-00-00-09.1
INFO:host_tracker:Learned 14 2 82:78:86:86:ad:3a
INFO:host_tracker:Learned 13 4 ee:5b:06:e7:48:b9
INFO:openflow.discovery:link detected: 00-00-00-00-00-08.5 -> 00-00-00-00-00-0e.4
INFO:host_tracker:Learned 1 3 46:e8:77:ac:78:19
INFO:host_tracker:Learned 4 1 3e:f1:35:11:9a:f3
INFO:host_tracker:Learned 14 3 12:80:3e:1a:ec:33
INFO:openflow.discovery:link detected: 00-00-00-00-00-08.1 -> 00-00-00-00-00-0a.2
INFO:host_tracker:Learned 3 4 4e:cd:16:8b:b7:f1
INFO:host_tracker:Learned 12 3 46:4c:24:94:fd:15
INFO:host_tracker:Learned 14 1 7a:78:3b:2d:97:e2
INFO:openflow.discovery:link detected: 00-00-00-00-00-08.4 -> 00-00-00-00-00-0b.1
INFO:host_tracker:Learned 9 2 ca:f7:9e:00:fc:0b
INFO:host_tracker:Learned 3 3 52:97:b6:bc:31:ea
INFO:host_tracker:Learned 4 3 76:f0:75:c7:66:f8
INFO:openflow.discovery:link detected: 00-00-00-00-00-08.2 -> 00-00-00-00-00-0c.1
INFO:host_tracker:Learned 7 6 ee:16:95:32:2a:6a
INFO:host_tracker:Learned 1 2 a2:58:e8:02:70:8f
INFO:host_tracker:Learned 7 4 52:67:ec:5b:b7:c8
INFO:openflow.discovery:link detected: 00-00-00-00-00-04.3 -> 00-00-00-00-00-01.3
INFO:host_tracker:Learned 2 6 f6:f4:c4:be:b1:7a

并在mininet中:

mininet> h1_1_1 ping h1_1_2
PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
From 10.0.0.1 icmp_seq=1 Destination Host Unreachable
From 10.0.0.1 icmp_seq=2 Destination Host Unreachable
From 10.0.0.1 icmp_seq=3 Destination Host Unreachable
From 10.0.0.1 icmp_seq=4 Destination Host Unreachable
From 10.0.0.1 icmp_seq=5 Destination Host Unreachable
From 10.0.0.1 icmp_seq=6 Destination Host Unreachable
^C
--- 10.0.0.2 ping statistics ---
8 packets transmitted, 0 received, +6 errors, 100% packet loss, time 7038ms

有人可以告诉为什么目标主机无法访问?谢谢!

1 个答案:

答案 0 :(得分:1)

您必须使用pox加载库存组件

python pox.py forwarding.l2_pairs host_tracker openflow.discovery

使用遥控器运行mininet

sudo mn --controller remote

然后在mininet中发出pingall并监视pox终端中的结果