Document information
- University
- Politecnico di Milano
- Degree programme
- Computer Engineering
- Subject
- Software Defined Networking
- Material language
- Italian
- Classification
- Exam · Full exam
- Content
- Exam paper only
- Original format
- Text
- Searchable text
Study material for Software Defined Networking, shared by the Studwiz community and reviewed by moderators.
Study material for Software Defined Networking, shared by the Studwiz community and reviewed by moderators.
Import quality: text was extracted directly from the original document.
Representative passages recognised in different parts of the material. The full extracted text remains available to search, while this compact preview makes the page easier to read.
Software Defined Networking (simulazione del 03/06/2020 ) Esercizio 1 Si consideri la rete in figura. I nodi h1,. . . , hn contengono tabelle ARP prepopolate per tutta la rete. Gli indirizzi MAC e IP dei nodi h1,. . . , hn sono MAC1,. . . , MACn e IP1,. . . , IPn. Sui nodi h1,. . . , hn sono in esecuzione processi in ascolto su tutte le porte TCP e UDP di interesse. Se non altrimenti specificato, il TTL iniziale è 200. Negli switch sono preinstallate le seguenti regole. Switch 1 Priority Match Action 5 * Output(FLOOD) 10 eth_dst = MAC2 Output(2) 10 eth_dst = MAC3 Output(CONTROLLER,128) Switch 2 Priority Match Action 0 * Output(CONTROLLER,128) 10 eth_type = IPv4 ip_proto = TCP DecTTL Output(FLOOD) Switch 3 Priority Match Action 5 * Output(FLOOD) 10 eth_dst = MAC5 Output(2) 10 eth_dst = MAC3 Output(CONTROLLER,128) Switch 4 Priority Match Action 0 * Output(CONTROLLER,128) 10 eth_type = IPv4 ip_proto = UDP Output(FLOOD) Il controllore Ryu è collegato ai nodi s1,. . . , sm ed è configurato come indicato nel seguente programma. Le interfacce tra gli switch e il controllore non sono indicate in figura. @set_ev_cls(ofp_event.EventOFPPacketIn, MAIN_DISPATCHER) def packet_in_handler(self, ev): msg = ev.msg; datapath = msg.datapath; ofproto = datapath.ofproto; parser = datapath.ofproto_parser; in_port = msg.match['in_port'] pkt = packet.Packet(msg.data); pkt_eth = pkt.get_protocol(eth.eth) pkt_ipv4 = pkt.get_protocol(ipv4.ipv4) pkt_udp = pkt.get_protocol(udp.udp); pkt_tcp = pkt.get_protocol(tcp.tcp) buffer_id = msg.buffer_id; data = msg.data if (datapath.id == 1 and pkt_tcp is not None): match = parser.OFPMatch(eth_dst=pkt_eth.dst, eth_type=ETH_TYPE_IP, ipv4_dst = pkt_ipv4.dst, ip_proto=IPPROTO_TCP, tcp_dst=pkt_tcp.dst_port) actions = [] if(pkt_tcp.dst_port<1024): actions.append(…
First page of the document.