Kali ini kita akan belajar VPLS yang akan diterapkan di ONOS SDN Controller. pada dasarnya ini sama sepertinya vpls pada umumnya namun penerapanya di ONOS (Open Network Operating System)
VPLS (Virtual Private LAN Service) adalah aplikasi ONOS yang memungkinkan operator membuat jaringan overlay L2 sesuai permintaan, di atas infrastruktur dengan protokol OpenFlow. Aplikasi terhubung ke host jaringan dengan mengkoneksikan overlay network yang terhubung ke OpenFlow data plane.
Komponen VPLS
- VPLS (VPLS Manager)
- VPLS Store Delegate (in VPLS Manager)
- VPLS Operation Service(VPLS Operation Manager)
- VPLS Store (Distributed VPLS Store)
- VPLS Config Manager
- VPLS Neighbour Handler
- VPLS REST API
General Workflow
VPLS dapat dirubah berdasarkan dengan cara seperti berikut:
- Host event (menambah / mengurangi)
- modifikasi konfigurasi jaringan
- mengunakan perintah VPLS
- mengunakan Rest API VPLS
mungkin sudah cukup teorinya :D, kita langsung nge Lab aja :), untuk memulai lab maka kita harus install onos 1.11.1 di centos 7.
TOPOLOGI LAB
Install Java openjdk 1.8 (*sejak versi onos 1.9 harus mengunakan java 1.8)
1 |
[root@onos-sdn ~]# yum install java-1.8.0-openjdk.x86_64 |
Download onos 1.11.1
1 2 |
[root@onos-sdn ~]# cd /opt/ [root@onos-sdn opt]# wget https://downloads.onosproject.org/release/onos-1.11.1.tar.gz |
Install onos sdn controller
1 2 3 |
[root@onos-sdn opt]# tar -zxvf onos-1.11.1.tar.gz [root@onos-sdn opt]# cd onos-1.11.1 [root@onos-sdn onos-1.11.1]# ./bin/onos-service |
tampilan ketika menjalankan onos
kemudian akses onos sdn controller di web browser dengan mengakses http://ip-address:8181/onos/ui/login.html
tampilan dashboard onos sdn controller
jika dari web browser tidak bisa diakses, mungkin saja port 8181 diblok oleh firewall, maka masalah tersebut bisa diatasi dengan cara seperti ini
1 2 |
[root@onos-sdn ~]# systemctl stop firewalld [root@onos-sdn ~]# systemctl disable firewalld |
namun cara tersebut hanya berlaku pada saat testing saja, jika sudah masuk production jangan coba2 untuk mendisable firewallnya 😀
setelah itu aktifkan apps di onos controller seperti dibawah ini (drivers, openflow dan vpls)
1 2 3 4 5 6 |
onos> app activate org.onosproject.drivers Activated org.onosproject.drivers onos> app activate org.onosproject.openflow Activated org.onosproject.openflow onos> app activate org.onosproject.vpls Activated org.onosproject.vpls |
setelah itu bisa dilihat melalui dashboard apps onos
Tabel IP address management
No | Nama Host | IP Adress |
1. | SDN Controller (ONOS) (eth0) | 192.168.122.173 |
2. | Openvswitch1 (eth0) | 192.168.122.14 |
3. | Openvswitch 2 (eth0) | 192.168.122.158 |
4. | Openvswitch3 (eth0) | 192.168.122.137 |
setelah itu arahkan bridge br0 pada masing-masing openvswitch ke sdn controller, sebelumnya ini adalah gambaran real di lab gns3
OpenvSwitch1
1 2 |
# ovs-vsctl set-controller br0 tcp:192.168.122.173:6633 # ovs-vsctl show |
OpenvSwitch2
1 2 |
# ovs-vsctl set-controller br0 tcp:192.168.122.173:6633 # ovs-vsctl show |
OpenvSwitch3
1 2 |
# ovs-vsctl set-controller br0 tcp:192.168.122.173:6633 # ovs-vsctl show |
*Note : memisahhkan port management dengan port akses
untuk memisahkan management switch openflow dengan port akses antar host (rubah pada semua openvswitch)
1 2 |
# ovs-vsctl del-port br0 eth0 # ovs-vsctl add-port br1 eth0 |
Set IP Host (H1-H4)
No | Nama Host | IP Address |
1. | H1 | 10.212.113.10/24 |
2. | H2 | 10.212.113.11/24 |
3. | H3 | 10.212.113.12/24 |
4. | H4 | 10.212.113.14/24 |
Tampilan dashboard ONOS ketika semua openvswitch sudah terhubung
ketika dilihat dari overlay networknya
Testing koneksi antar host (h1-h4) => ping dari H1
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
root@H1:~# ping 10.212.113.11 PING 10.212.113.11 (10.212.113.11) 56(84) bytes of data. ^C --- 10.212.113.11 ping statistics --- 3 packets transmitted, 0 received, 100% packet loss, time 2028ms root@H1:~# ping 10.212.113.12 PING 10.212.113.12 (10.212.113.12) 56(84) bytes of data. ^C --- 10.212.113.12 ping statistics --- 3 packets transmitted, 0 received, 100% packet loss, time 2029ms root@H1:~# ping 10.212.113.14 PING 10.212.113.14 (10.212.113.14) 56(84) bytes of data. ^C --- 10.212.113.14 ping statistics --- 2 packets transmitted, 0 received, 100% packet loss, time 1029ms |
semua belum bisa terkoneksi karena belum ada flow yang membuat jalur koneksi supaya antar host bisa saling berkomunikasi. nah pada saat ini kita akan coba set vpls di onos sdn controller. Untuk setting vpls ada beberapa cara diataranya adalah bisa mengunakan REST API yang sudah di sediakan onos, namun bisa juga mengunakan CLI
Untuk mempermudah dalam mengkonfigurasi VPLS di onos kita perlu melihat semua host yang terdaftar pada Host
Tambahkan interface sesuai dengan location host yang akan di mapping
1 2 3 4 |
onos> interface-add of:0000265476fe1442/11 h1 onos> interface-add of:0000265476fe1442/12 h3 onos> interface-add of:00000e45569db64c/11 h2 onos> interface-add of:00000e45569db64c/12 h4 |
setelah itu buat vplsnya
1 2 |
onos> vpls create VPLS1 onos> vpls create VPLS2 |
kemudian daftarkan host pada masing2 vpls
1 2 3 4 |
onos> vpls add-if VPLS1 h1 onos> vpls add-if VPLS1 h2 onos> vpls add-if VPLS2 h3 onos> vpls add-if VPLS2 h4 |
cek konfigruasi, untuk memastikan konfigurasi yang kita set sudah susuai dengan harapan (*bukan harapan palsu #ehh :D)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
onos> interfaces h2: port=of:00000e45569db64c/11 h4: port=of:00000e45569db64c/12 h1: port=of:0000265476fe1442/11 h3: port=of:0000265476fe1442/12 onos> vpls list VPLS1 VPLS2 onos> vpls show ---------------- VPLS name: VPLS2 Associated interfaces: [h3, h4] Encapsulation: NONE State: ADDED ---------------- VPLS name: VPLS1 Associated interfaces: [h1, h2] Encapsulation: NONE State: ADDED ---------------- |
okee konfigurasi susah sesuai dengan harapan, sekarang tinggal waktunya testing
*goal : host yang bisa ping hanya pada satu vpls yang sama, selain itu tidak bisa
H1
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
root@H1:~# ping 10.212.113.10 PING 10.212.113.10 (10.212.113.10) 56(84) bytes of data. 64 bytes from 10.212.113.10: icmp_seq=1 ttl=64 time=0.064 ms ^C --- 10.212.113.10 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.064/0.064/0.064/0.000 ms root@H1:~# ping 10.212.113.11 PING 10.212.113.11 (10.212.113.11) 56(84) bytes of data. 64 bytes from 10.212.113.11: icmp_seq=1 ttl=64 time=1.67 ms 64 bytes from 10.212.113.11: icmp_seq=2 ttl=64 time=2.16 ms ^C --- 10.212.113.11 ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 1000ms rtt min/avg/max/mdev = 1.675/1.920/2.166/0.249 ms root@H1:~# ping 10.212.113.12 PING 10.212.113.12 (10.212.113.12) 56(84) bytes of data. ^C --- 10.212.113.12 ping statistics --- 2 packets transmitted, 0 received, 100% packet loss, time 1029ms root@H1:~# ping 10.212.113.13 PING 10.212.113.13 (10.212.113.13) 56(84) bytes of data. ^C --- 10.212.113.13 ping statistics --- 3 packets transmitted, 0 received, 100% packet loss, time 2051ms |
H3
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
root@H3:~# ping 10.212.113.12 PING 10.212.113.12 (10.212.113.12) 56(84) bytes of data. 64 bytes from 10.212.113.12: icmp_seq=1 ttl=64 time=0.064 ms ^C --- 10.212.113.12 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.064/0.064/0.064/0.000 ms root@H3:~# ping 10.212.113.14 PING 10.212.113.14 (10.212.113.14) 56(84) bytes of data. 64 bytes from 10.212.113.14: icmp_seq=1 ttl=64 time=2.86 ms 64 bytes from 10.212.113.14: icmp_seq=2 ttl=64 time=2.15 ms ^C --- 10.212.113.14 ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 1002ms rtt min/avg/max/mdev = 2.157/2.509/2.861/0.352 ms root@H3:~# ping 10.212.113.10 PING 10.212.113.10 (10.212.113.10) 56(84) bytes of data. ^C --- 10.212.113.10 ping statistics --- 3 packets transmitted, 0 received, 100% packet loss, time 2032ms root@H3:~# ping 10.212.113.11 PING 10.212.113.11 (10.212.113.11) 56(84) bytes of data. ^C --- 10.212.113.11 ping statistics --- 2 packets transmitted, 0 received, 100% packet loss, time 1022ms |
Woow konfigurasi vpls sudah sesuai dengan tujuan kita :), sebenernya antar host yang sama vplsnya bisa ping karena adanya intens yang membentuk jalur koneksi khusus ketika proses konfigurasi vpls.
selain itu sebenarnya pada vpls kita bisa set encapsulasi menjadi MPLS
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
onos> vpls set-encap VPLS1 MPLS onos> vpls set-encap VPLS2 MPLS onos> vpls show ---------------- VPLS name: VPLS2 Associated interfaces: [h3, h4] Encapsulation: MPLS State: ADDED ---------------- VPLS name: VPLS1 Associated interfaces: [h1, h2] Encapsulation: MPLS State: ADDED ---------------- |
ketika ping h1 ke h2, maka enkapsulasinya sudah mengunakan MPLS seperti pad capture di wireshark
Melihat isi flow pada masing2 openvswitch
OpenvSwitch1
1 2 3 4 5 6 7 8 9 10 11 12 13 |
/ # ovs-ofctl dump-flows br0 NXST_FLOW reply (xid=0x4): cookie=0x1000024c9562c, duration=3279.820s, table=0, n_packets=1058, n_bytes=85698, idle_age=2, priority=40000,dl_type=0x8942 actions=CONTROLLER:65535 cookie=0x100004e2e2dfa, duration=3279.795s, table=0, n_packets=1058, n_bytes=85698, idle_age=2, priority=40000,dl_type=0x88cc actions=CONTROLLER:65535 cookie=0x1000078fda48d, duration=592.518s, table=0, n_packets=55, n_bytes=3300, idle_age=326, priority=40000,arp actions=CONTROLLER:65535 cookie=0x4800009d7b8628, duration=596.383s, table=0, n_packets=0, n_bytes=0, idle_age=596, priority=1100,in_port=11,dl_dst=ff:ff:ff:ff:ff:ff actions=push_mpls:0x8847,load:0x8e->OXM_OF_MPLS_LABEL[],output:2 cookie=0x480000ea1888f7, duration=596.370s, table=0, n_packets=2, n_bytes=196, idle_age=330, priority=1200,in_port=11,dl_dst=56:5b:4e:9c:64:5b actions=push_mpls:0x8847,load:0x7d->OXM_OF_MPLS_LABEL[],output:2 cookie=0x4800006f3e348f, duration=592.536s, table=0, n_packets=0, n_bytes=0, idle_age=592, priority=1200,in_port=12,dl_dst=62:39:67:bc:4f:67 actions=push_mpls:0x8847,load:0x51->OXM_OF_MPLS_LABEL[],output:2 cookie=0x480000d7acbfbb, duration=592.531s, table=0, n_packets=0, n_bytes=0, idle_age=592, priority=1100,in_port=12,dl_dst=ff:ff:ff:ff:ff:ff actions=push_mpls:0x8847,load:0xdc->OXM_OF_MPLS_LABEL[],output:2 cookie=0x4800006ad45310, duration=596.397s, table=0, n_packets=0, n_bytes=0, idle_age=596, priority=1100,mpls,in_port=2,mpls_label=167 actions=pop_mpls:0x0800,output:11 cookie=0x480000343dcc90, duration=596.370s, table=0, n_packets=2, n_bytes=204, idle_age=330, priority=1200,mpls,in_port=2,mpls_label=111 actions=pop_mpls:0x0800,output:11 cookie=0x4800009d8cd9a2, duration=592.546s, table=0, n_packets=0, n_bytes=0, idle_age=592, priority=1100,mpls,in_port=2,mpls_label=74 actions=pop_mpls:0x0800,output:12 cookie=0x480000b77d6623, duration=592.536s, table=0, n_packets=0, n_bytes=0, idle_age=592, priority=1200,mpls,in_port=2,mpls_label=212 actions=pop_mpls:0x0800,output:12 |
OpenvSwitch2
1 2 3 4 5 6 7 8 9 10 11 12 13 |
/ # ovs-ofctl dump-flows br0 NXST_FLOW reply (xid=0x4): cookie=0x10000a28c1a1a, duration=3404.047s, table=0, n_packets=2177, n_bytes=176337, idle_age=1, priority=40000,dl_type=0x88cc actions=CONTROLLER:65535 cookie=0x10000dd7c73f9, duration=3404.045s, table=0, n_packets=2177, n_bytes=176337, idle_age=1, priority=40000,dl_type=0x8942 actions=CONTROLLER:65535 cookie=0x1000077ba65b5, duration=661.773s, table=0, n_packets=0, n_bytes=0, idle_age=3404, priority=40000,arp actions=CONTROLLER:65535 cookie=0x480000df47b80a, duration=665.650s, table=0, n_packets=0, n_bytes=0, idle_age=665, priority=1100,mpls,in_port=3,mpls_label=139 actions=load:0xa7->OXM_OF_MPLS_LABEL[],output:2 cookie=0x480000a58c0b50, duration=665.636s, table=0, n_packets=0, n_bytes=0, idle_age=665, priority=1100,mpls,in_port=2,mpls_label=142 actions=load:0x4a->OXM_OF_MPLS_LABEL[],output:3 cookie=0x480000ade105a1, duration=665.623s, table=0, n_packets=2, n_bytes=204, idle_age=399, priority=1200,mpls,in_port=3,mpls_label=144 actions=load:0x6f->OXM_OF_MPLS_LABEL[],output:2 cookie=0x4800009776e787, duration=665.623s, table=0, n_packets=2, n_bytes=204, idle_age=399, priority=1200,mpls,in_port=2,mpls_label=125 actions=load:0xbe->OXM_OF_MPLS_LABEL[],output:3 cookie=0x480000caeed21d, duration=661.798s, table=0, n_packets=0, n_bytes=0, idle_age=661, priority=1100,mpls,in_port=3,mpls_label=97 actions=load:0x4a->OXM_OF_MPLS_LABEL[],output:2 cookie=0x4800009068d813, duration=661.788s, table=0, n_packets=0, n_bytes=0, idle_age=661, priority=1200,mpls,in_port=3,mpls_label=46 actions=load:0xd4->OXM_OF_MPLS_LABEL[],output:2 cookie=0x480000a91dc9a0, duration=661.788s, table=0, n_packets=0, n_bytes=0, idle_age=661, priority=1200,mpls,in_port=2,mpls_label=81 actions=load:0x1c->OXM_OF_MPLS_LABEL[],output:3 cookie=0x480000aef1243a, duration=661.784s, table=0, n_packets=0, n_bytes=0, idle_age=661, priority=1100,mpls,in_port=2,mpls_label=220 actions=load:0x5f->OXM_OF_MPLS_LABEL[],output:3 |
OpenvSwitch3
1 2 3 4 5 6 7 8 9 10 11 12 13 |
/ # ovs-ofctl dump-flows br0 NXST_FLOW reply (xid=0x4): cookie=0x1000066561637, duration=3394.316s, table=0, n_packets=1094, n_bytes=88614, idle_age=3, priority=40000,dl_type=0x8942 actions=CONTROLLER:65535 cookie=0x100003b838f9f, duration=3394.257s, table=0, n_packets=1094, n_bytes=88614, idle_age=3, priority=40000,dl_type=0x88cc actions=CONTROLLER:65535 cookie=0x10000c46bfc88, duration=730.004s, table=0, n_packets=13, n_bytes=780, idle_age=464, priority=40000,arp actions=CONTROLLER:65535 cookie=0x4800004b8b4979, duration=733.881s, table=0, n_packets=0, n_bytes=0, idle_age=733, priority=1100,in_port=11,dl_dst=ff:ff:ff:ff:ff:ff actions=push_mpls:0x8847,load:0x8b->OXM_OF_MPLS_LABEL[],output:2 cookie=0x480000ff6b1f09, duration=733.854s, table=0, n_packets=2, n_bytes=196, idle_age=468, priority=1200,in_port=11,dl_dst=ce:4b:02:97:34:cc actions=push_mpls:0x8847,load:0x90->OXM_OF_MPLS_LABEL[],output:2 cookie=0x48000053c01eb4, duration=730.029s, table=0, n_packets=0, n_bytes=0, idle_age=730, priority=1100,in_port=12,dl_dst=ff:ff:ff:ff:ff:ff actions=push_mpls:0x8847,load:0x61->OXM_OF_MPLS_LABEL[],output:2 cookie=0x480000cf774cec, duration=730.020s, table=0, n_packets=0, n_bytes=0, idle_age=730, priority=1200,in_port=12,dl_dst=66:70:7e:d1:b1:d8 actions=push_mpls:0x8847,load:0x2e->OXM_OF_MPLS_LABEL[],output:2 cookie=0x4800008f608432, duration=733.866s, table=0, n_packets=0, n_bytes=0, idle_age=733, priority=1100,mpls,in_port=2,mpls_label=74 actions=pop_mpls:0x0800,output:11 cookie=0x4800005469030a, duration=733.853s, table=0, n_packets=2, n_bytes=204, idle_age=468, priority=1200,mpls,in_port=2,mpls_label=190 actions=pop_mpls:0x0800,output:11 cookie=0x4800000aeb0f20, duration=730.020s, table=0, n_packets=0, n_bytes=0, idle_age=730, priority=1200,mpls,in_port=2,mpls_label=28 actions=pop_mpls:0x0800,output:12 cookie=0x4800008f1317b2, duration=730.016s, table=0, n_packets=0, n_bytes=0, idle_age=730, priority=1100,mpls,in_port=2,mpls_label=95 actions=pop_mpls:0x0800,output:12 |
mungkin cukup sekian pembahsan vpls pada ONOS sdn controller, semoga bermanfaat 🙂
wassalamualaikum
Refrensi : https://wiki.onosproject.org/display/ONOS/VPLS+User+Guide
System Engineer
Komentar