Memanage Openvswitch mengunakan ONOS

Onos merupakan controller SDN sama seperti ODL namun mempunyai fitur tambahan yaitu SDN IP yang berfungsi sebagai aplikasi onos yang memungkinkan SDN dapat terhubung dengan jaringan publik (internet) dengan protokol BGP (Border Gateway Protocol)

sebelumnya anda harus menginstall onos terlebih dahulu di sini

untuk simulasi ini saya megunakan mininet dan openvswitch jadi install mininetnya dulu di vm onos

root@aio:~# apt udpate && apt install mininet -y

kemudian kita bisa membuat topologi dan menghubungkan dengan controller onos

aio@aio:~$ sudo mn --topo tree,2,3 --controller=remote,ip=127.0.0.1,port=6633
*** Creating network
*** Adding controller
*** Adding hosts:
h1 h2 h3 h4 h5 h6 h7 h8 h9 
*** Adding switches:
s1 s2 s3 s4 
*** Adding links:
(s1, s2) (s1, s3) (s1, s4) (s2, h1) (s2, h2) (s2, h3) (s3, h4) (s3, h5) (s3, h6) (s4, h7) (s4, h8) (s4, h9) 
*** Configuring hosts
h1 h2 h3 h4 h5 h6 h7 h8 h9 
*** Starting controller
c0 
*** Starting 4 switches
s1 s2 s3 s4 ...
*** Starting CLI:
mininet> 

kita bisa cek di ONOS Gui untuk melihat lebih kerennya 😀

kita coba pingall di mininet

mininet> pingall
*** Ping: testing ping reachability
h1 -> h2 h3 h4 h5 h6 h7 h8 h9 
h2 -> h1 h3 h4 h5 h6 h7 h8 h9 
h3 -> h1 h2 h4 h5 h6 h7 h8 h9 
h4 -> h1 h2 h3 h5 h6 h7 h8 h9 
h5 -> h1 h2 h3 h4 h6 h7 h8 h9 
h6 -> h1 h2 h3 h4 h5 h7 h8 h9 
h7 -> h1 h2 h3 h4 h5 h6 h8 h9 
h8 -> h1 h2 h3 h4 h5 h6 h7 h9 
h9 -> h1 h2 h3 h4 h5 h6 h7 h8 
*** Results: 0% dropped (72/72 received)

hasilnya success full dan liat kerenya diiashboard onos

supaya host bisa terlihat maka aktifkan dulu host visiblenya di bagiian merah itu.

kemudian kita bisa cek node,link dan devices melalui controller onos

onos> nodes
id=127.0.0.1, address=127.0.0.1:9876, state=ACTIVE, updated=38m ago *
onos> devices
id=of:0000000000000001, available=true, role=MASTER, type=SWITCH, mfr=Nicira, Inc., hw=Open vSwitch, sw=2.5.0, serial=None, managementAddress=127.0.0.1, protocol=OF_13, channelId=127.0.0.1:40510
id=of:0000000000000002, available=true, role=MASTER, type=SWITCH, mfr=Nicira, Inc., hw=Open vSwitch, sw=2.5.0, serial=None, managementAddress=127.0.0.1, protocol=OF_13, channelId=127.0.0.1:40514
id=of:0000000000000003, available=true, role=MASTER, type=SWITCH, mfr=Nicira, Inc., hw=Open vSwitch, sw=2.5.0, serial=None, managementAddress=127.0.0.1, protocol=OF_13, channelId=127.0.0.1:40512
id=of:0000000000000004, available=true, role=MASTER, type=SWITCH, mfr=Nicira, Inc., hw=Open vSwitch, sw=2.5.0, serial=None, managementAddress=127.0.0.1, protocol=OF_13, channelId=127.0.0.1:40508
onos> links
src=of:0000000000000002/4, dst=of:0000000000000001/1, type=DIRECT, state=ACTIVE, expected=false
src=of:0000000000000001/3, dst=of:0000000000000004/4, type=DIRECT, state=ACTIVE, expected=false
src=of:0000000000000004/4, dst=of:0000000000000001/3, type=DIRECT, state=ACTIVE, expected=false
src=of:0000000000000001/1, dst=of:0000000000000002/4, type=DIRECT, state=ACTIVE, expected=false
src=of:0000000000000003/4, dst=of:0000000000000001/2, type=DIRECT, state=ACTIVE, expected=false
src=of:0000000000000001/2, dst=of:0000000000000003/4, type=DIRECT, state=ACTIVE, expected=false
onos> hosts
id=12:04:AB:F3:89:87/-1, mac=12:04:AB:F3:89:87, location=of:0000000000000003/3, vlan=-1, ip(s)=[10.0.0.6]
id=22:F1:7C:AE:36:53/-1, mac=22:F1:7C:AE:36:53, location=of:0000000000000002/3, vlan=-1, ip(s)=[10.0.0.3]
id=2E:A6:40:41:3C:D5/-1, mac=2E:A6:40:41:3C:D5, location=of:0000000000000004/3, vlan=-1, ip(s)=[10.0.0.9]
id=3E:27:28:6A:85:6C/-1, mac=3E:27:28:6A:85:6C, location=of:0000000000000004/2, vlan=-1, ip(s)=[10.0.0.8]
id=7E:6E:10:BF:A7:97/-1, mac=7E:6E:10:BF:A7:97, location=of:0000000000000002/2, vlan=-1, ip(s)=[10.0.0.2]
id=92:B4:31:30:41:D4/-1, mac=92:B4:31:30:41:D4, location=of:0000000000000003/2, vlan=-1, ip(s)=[10.0.0.5]
id=96:15:54:C2:79:60/-1, mac=96:15:54:C2:79:60, location=of:0000000000000003/1, vlan=-1, ip(s)=[10.0.0.4]
id=96:ED:FB:0A:3A:AF/-1, mac=96:ED:FB:0A:3A:AF, location=of:0000000000000002/1, vlan=-1, ip(s)=[10.0.0.1]
id=FE:7F:2F:20:F1:2E/-1, mac=FE:7F:2F:20:F1:2E, location=of:0000000000000004/1, vlan=-1, ip(s)=[10.0.0.7]

informasi sangat lengkap kita bisa dapat kan di onos controller, dari node sampe host

kita juga bisa memverifikasi openflow pada ovs, dari switch1 sampai 4, melihat flow yanng sudah di push oleh controller onos

root@aio:~# ovs-ofctl dump-flows s1 --protocols OpenFlow13
OFPST_FLOW reply (OF1.3) (xid=0x2):
 cookie=0x6000046444328, duration=771.141s, table=0, n_packets=54, n_bytes=5292, send_flow_rem priority=5,ip actions=CONTROLLER:65535
 cookie=0x60000464443e2, duration=771.141s, table=0, n_packets=0, n_bytes=0, send_flow_rem priority=5,arp actions=CONTROLLER:65535
 cookie=0x60000488ebd5d, duration=771.141s, table=0, n_packets=0, n_bytes=0, send_flow_rem priority=40000,arp actions=CONTROLLER:65535
 cookie=0x60000487f63a1, duration=771.141s, table=0, n_packets=746, n_bytes=60426, send_flow_rem priority=40000,dl_type=0x8942 actions=CONTROLLER:65535
 cookie=0x60000487f5557, duration=771.141s, table=0, n_packets=746, n_bytes=60426, send_flow_rem priority=40000,dl_type=0x88cc actions=CONTROLLER:65535
root@aio:~# ovs-ofctl dump-flows s2 --protocols OpenFlow13
OFPST_FLOW reply (OF1.3) (xid=0x2):
 cookie=0x600004644b787, duration=778.176s, table=0, n_packets=42, n_bytes=4116, send_flow_rem priority=5,ip actions=CONTROLLER:65535
 cookie=0x600004644b841, duration=778.176s, table=0, n_packets=0, n_bytes=0, send_flow_rem priority=5,arp actions=CONTROLLER:65535
 cookie=0x60000488f31bc, duration=778.176s, table=0, n_packets=26, n_bytes=1092, send_flow_rem priority=40000,arp actions=CONTROLLER:65535
 cookie=0x60000487fd800, duration=778.176s, table=0, n_packets=250, n_bytes=20250, send_flow_rem priority=40000,dl_type=0x8942 actions=CONTROLLER:65535
 cookie=0x60000487fc9b6, duration=778.176s, table=0, n_packets=250, n_bytes=20250, send_flow_rem priority=40000,dl_type=0x88cc actions=CONTROLLER:65535
root@aio:~# ovs-ofctl dump-flows s3 --protocols OpenFlow13
OFPST_FLOW reply (OF1.3) (xid=0x2):
 cookie=0x6000046452be6, duration=782.857s, table=0, n_packets=42, n_bytes=4116, send_flow_rem priority=5,ip actions=CONTROLLER:65535
 cookie=0x6000046452ca0, duration=782.857s, table=0, n_packets=0, n_bytes=0, send_flow_rem priority=5,arp actions=CONTROLLER:65535
 cookie=0x60000488fa61b, duration=782.857s, table=0, n_packets=27, n_bytes=1134, send_flow_rem priority=40000,arp actions=CONTROLLER:65535
 cookie=0x6000048804c5f, duration=782.857s, table=0, n_packets=252, n_bytes=20412, send_flow_rem priority=40000,dl_type=0x8942 actions=CONTROLLER:65535
 cookie=0x6000048803e15, duration=782.857s, table=0, n_packets=252, n_bytes=20412, send_flow_rem priority=40000,dl_type=0x88cc actions=CONTROLLER:65535
root@aio:~# ovs-ofctl dump-flows s4 --protocols OpenFlow13
OFPST_FLOW reply (OF1.3) (xid=0x2):
 cookie=0x600004645a045, duration=787.126s, table=0, n_packets=42, n_bytes=4116, send_flow_rem priority=5,ip actions=CONTROLLER:65535
 cookie=0x600004645a0ff, duration=787.126s, table=0, n_packets=0, n_bytes=0, send_flow_rem priority=5,arp actions=CONTROLLER:65535
 cookie=0x6000048901a7a, duration=787.126s, table=0, n_packets=27, n_bytes=1134, send_flow_rem priority=40000,arp actions=CONTROLLER:65535
 cookie=0x600004880c0be, duration=787.126s, table=0, n_packets=254, n_bytes=20574, send_flow_rem priority=40000,dl_type=0x8942 actions=CONTROLLER:65535
 cookie=0x600004880b274, duration=787.126s, table=0, n_packets=254, n_bytes=20574, send_flow_rem priority=40000,dl_type=0x88cc actions=CONTROLLER:65535

 

About the author
Alan Adi Prastyo

Routecloud Networks

Information about Server, Linux and Computer Network.

Great! You’ve successfully signed up.

Welcome back! You've successfully signed in.

You've successfully subscribed to Routecloud Networks.

Success! Check your email for magic link to sign-in.

Success! Your billing info has been updated.

Your billing was not updated.