1. Trang chủ
  2. » Giáo Dục - Đào Tạo

Mạng MPLS và ứng dụng trong ngành thuế

80 9 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Nội dung

ĐẠI HỌC QUỐC GIA HÀ NỘI TRƯỜNG ĐẠI HỌC CÔNG NGHỆ ĐINH CÔNG HIẾU MẠNG MPLS VÀ ỨNG DỤNG TRONG NGÀNH THUẾ LUẬN VĂN THẠC SỸ Người hướng dẫn: PGS.TS Nguyễn Văn Tam Hà nội - 2011 MỤC LỤC Trang phụ bìa Lời cam đoan Mục lục Danh mục thuật ngữ từ viết tắt Danh mục hình vẽ LỜI MỞ ĐẦU CHƢƠNG CÔNG NGHỆ CHUYỂN MẠCH MPLS CHƢƠNG CHẤT LƢỢNG DỊCH VỤ CHƢƠNG ỨNG DỤNG MƠ HÌNH DIFFSERV TRONG VIỆC ĐẢM CHẤT LƢỢNG DỊCH VỤ MẠNG MPLS 3.2 Đề suất cải tiến chất lƣợng dịch vụ đƣờng truyền ngành Tài 3.3 Kết đo đạc thông lƣợng đƣờng truyền MPLS ngành Thuế 3.4 Thực nghiệm kiểm chứng hiệu việc áp dụng mơ hình DiffServ công cụ mô NS2 KẾT LUẬN TÀI LIỆU THAM KHẢO PHỤ LỤC LỜI CAM ĐOAN Kính gửi: Ban giám hiệu - Trƣờng Đại học Công nghệ - Phịng Đào tạo - Ban Chủ nhiệm Khoa Cơng nghệ thông tin Tên là: Đinh Công Hiếu Sinh ngày: 21-11-1978 Học viên cao học lớp K15-T2 Tôi xin cam đam toàn kiến thức nội dung luận văn kiến thức tự nghiên cứu từ tài liệu tham khảo nƣớc nhƣ nêu phần “Tài liệu tham khảo” Tồn luận văn thân tơi nghiên cứu xây dựng nên khơng có chép hay vay mƣợn dƣới hình thức để hồn thành luận văn Tơi xin cam đoan lời khai chịu hoàn toàn trách nhiệm nội dung luận văn trƣớc Hội đồng chấm luận văn thạc sĩ DANH MỤC CÁC THUẬT NGỮ VÀ CÁC TỪ VIẾT TẮT ATM Asynchnorous Tran AToM Any Transport ove BGP Border Gateway P BTC CAR Committed Access CBWFQ Class-Base Weight CE Custome Edge CEF Cisco Express Forw CoS Class of Service CQ Custom Queue CR Constraint-based ro CCT CT DiffServ Differentiated Serv DSCP DiffServ Code Poi E-LSR Egress LSR FEC Forwarding Equiva FTP File Tranfer Protoc FRTS Frame Relay Traffi GRE Generic Routing E GTS Generic Traffic Sh HDLC HTTT High-Level Data L IETF Internet Engineerin IGP Interior Gateway P I-LSR Ingress LSR IntServ Intergrated Service IP Internet Protocol IS-IS Intermediate Syste System LAN Local Area Networ LDP Label Distribution LER Label Edge Router LFIB Label Forwarding LIB Label Information LSP Label Switch Path LSR Label Switch Rout MPLS Multiprotocol Labe BGP Border Gateway P OSPF Open Shortest Path OUI Organizationally U PE Provider Edge PHB Per-Hop Behavior PPP Point-to-Point Prot PQ Priority Queue PVC Permanent Virtual QoS Quanlity of Service RFC Request for comm RSpec Request Specificat RSVP Resource Reservat SLA Service Level Agre SP Service Provider TCP Tranmission Contr TCT TDP Tag Distribution Pr TE Traffic Engineering TSpec Traffic Specificatio TTDL TTH TTM TTL Time To Live TTT UDP User Datagram Pro UNI User-to-Network I VC Virtual Channel VoATM Voice over ATM VoIP Voice over IP VP Virtual Path VPN Virtual Pravite Net WRED Weighted Random DANH MỤC HÌNH VẼ Hình 1- Kiến trúc hệ thống mạng MPLS Hình 1- Kiến trúc nút mạng MPLS Hình 1- Định dạng nhãn MPLS Hình 1- Cấu trúc sở thông tin chuyển tiếp nhãn (LFIB) Hình 1- Hoạt động LSR gói tin với mức ngăn xếp Hình 1- Hoạt động LSR gói tin với nhiều mức ngăn sếp Hình 1- Các mức chuyển tiếp LSP Hình 1- Thiết lập LSP điều khiển độc lập Hình 1- Thiết lập LSP điều khiển thứ tự Hình 2-1 Luồng thông điệp PATH RESV Hình 2-2 Luồng thơng điệp PATH RESV theo hai chiều Hình 2-3 Giá trị trƣờng DSCP PHB Hình 2-4 Kiến trúc dịch vụ DiffServ Hình 2-5 Cơ chế thành phần QoS CLI Hình 2-6 MPLS E-LSP Hình 2-7 MPLS L-LSP Hình 2-8 Mơ hình đƣờng ống Hình 2-9 Mơ hình đƣờng ống ngắn với PHP Hình 2-10 Mơ hình đƣờng ống ngắn khơng có PHP Hình 2-11 Mơ hình đƣờng hầm thống với PHP Hình 2-12 Mơ hình đƣờng hầm thống khơng có PHP Hình 3-1 Mơ hình hạ tầng truyền thơng ngành Tài Hình 3-2 Mơ hình kết nối cho Cục thuế tỉnh Hình 3-3 Mơ hình kết nối tổng qt GRE Tunnel Hình 3-4 Mơ hình kết hợp DiffServ vào mạng MPLS Hình 3-5 Các lớp dịch vụ khác chia sẻ băng thơng Hình 3-6 Vị trí lắp đặt Packetshaper Data Center Hình 3-7 Vị trí lắp đặt Packetshaper Cục thuế Phú Thọ Hình 3-8 Vị trí lắp đặt Packetshaper Chi cục Thuế Việt Trì Hình 3-9 Thơng lƣợng truy cập vào TTDL Hình 3-10 Mƣời ứng dụng đứng đầu truy cập vào TTDL Hình 3-11 Thơng lƣợng vào Cục thuế Phú Thọ Hình 3-12 Mƣời ứng dụng đứng đầu truy cập CT Phú Thọ Hình 3-13 Thơng lƣợng vào Chi cục Thuế Việt Trì Hình 3-14 Mƣời ứng dụng truy cập CCT Việt Trì Hình 3-15 Cấu trúc thƣ mục NS-allinone 62 Hình 3-23 Mạng MPLS có DiffServ với luồng UDP có lưu lượng cao Nhƣ Hình 3-22 Hình 3-23 có khác biệt thông lƣợng luồng TCP việc sử dụng luồng UDP có lƣu lƣợng thấp cao luồng TCP0 TCP1 áp dụng sách khác hàng đợi, thơng lƣợng, mức độ ƣu tiên gửi gói tin đƣờng truyền Bảng 3.2 tóm tắt kết mơ mạng MPLS có sử dụng DiffServ MPLS có DiffServ Luồng UDP lƣu lƣợng thấp Luồng UDP lƣu lƣợng cao Bảng 3.2 Thống kê thơng lượng mạng MPLS (có DiffServ) 63 KẾT LUẬN Trong nội dung luận văn trình bày khái niệm công nghệ chuyển mạch nhãn MPLS, khái niệm chất lƣợng đƣờng truyền (QoS) đề suất việc áp dụng mơ hình DiffServ hệ thống mạng MPLS ngành Tài Thơng qua kết đo đạc thông lƣợng đƣờng truyền MPLS ngành Thuế kết thực nghiệm chạy NS2 chứng minh đƣợc việc sử dụng mơ hình DiffServ hệ thống mạng MPLS tăng đƣợc chất lƣợng dịch vụ cho ứng dụng địi hỏi có độ ƣu tiên cao Với việc áp dụng mơ hình DiffServ hạ tầng truyền thơng ngành Tài chính, Bộ tài có khả phân luồng lƣu lƣợng hệ thống mạng trục ngành cho ứng dụng quan trọng ngành tài nhƣ ứng dụng TABMIS, ITAIS,… hoạt động thơng suốt hiệu từ cấp Trung ƣơng xuống tới địa phƣơng Hƣớng phát triển đề tài: Luận văn có số hƣớng phát triển thời gian tới nhƣ:  Thực thi sách QoS mơ hình DiffServ mạng MPLS ngành Tài thiết bị mạng sử dụng ngành Tài TTT TTM  Nghiên cứu xem xét việc xây dựng giao thức để đƣa giải pháp cung cấp QoS cho lớp mạng lõi mạng MPLS ngành Tài 64 TÀI LIỆU THAM KHẢO Tiếng Việt Juniper Networks (Jun, 2007), "Thiết kế mạng MPLS cho Bộ tài chính", Bộ tài chính, tr 30 Juniper Networks (Jun, 2007), "Thiết kế mạng MPLS cho Bộ tài chính", Bộ tài chính, tr 31 Trần Công Hùng (2009), Chuyển mạch nhãn đa giao thức, Nhà xuất Thông tin Truyền thông, tr 222-223 Trần Công Hùng (2009), Chuyển mạch nhãn đa giao thức, Nhà xuất Thông tin Truyền thông, tr 230-232 Tiếng Anh Cisco Systems (Aug, 2005), "DiffServ-The scalable end-to-end quality of service model”, White Paper, pp 7-10 Eric Horlait and Nicolas Rouhana (2000), “Differentiated Services and Intergrated Services Use of MPLS”, University Pierre et Marie Curie – France, University Saint Joseph – Lebanon Gaei Ahn and Woojik Chum (2001), “Overview of MPLS Network Simulator: Design and Implementation”, Chungnam National University Korea Raymond Law and Srihari Raghavan (2001), “DiffServ and MPLS – Concepts and Simulation”, Virginia Polytechnic Institude and State University Santiago Alvarez (June, 02, 2006), QoS for IP/MPLS Networks, Cisco Press, USA, pp 15-19 10 Santiago Alvarez (June, 02, 2006), QoS for IP/MPLS Networks, Cisco Press, USA, pp 18 11 Vivek Alwayn (2002), Advanced MPLS Design and Implementation, Cisco Press, USA, pp 14 12 Vivek Alwayn (2002), Advanced MPLS Design and Implementation, Cisco Press, USA, pp 48-50 13 Vivek Alwayn (2002), Advanced MPLS Design and Implementation, Cisco Press, USA, pp 59-62 65 14 Vivek Alwayn (2002), Advanced MPLS Design and Implementation, Cisco Press, USA, pp 63 15 Vivek Alwayn (2002), Advanced MPLS Design and Implementation, Cisco Press, USA, pp 277-279 66 PHỤ LỤC  # -# mpls.tcl # -# Network simulation topology: # # Node0 #\ # \1Mb # \ # # # / | # / |1Mb # 1Mb/ | # / | # # Node1 # # # # - set ns [new Simulator] #Open the NAM trace file -set nf [open mpls.nam w] set tf [open mpls.tr w] $ns namtrace-all $nf $ns trace-all $tf #Define a 'finish' procedure -proc finish {} { global ns nf tf $ns flush-trace #Close the NAM trace file close $nf #Close the Trace file close $tf #Execute NAM on the trace file exec nam mpls.nam & exit } # Define a procedure attach traffic node with sink proc attach-expoo-traffic { node sink size burst idle rate } { global ns set source [new Agent/CBR/UDP] $ns attach-agent $node $source set traffic [new Traffic/Expoo] $traffic set packet-size $size $traffic set burst-time $burst 67 $traffic set idle-time $idle $traffic set rate $rate $source attach-traffic $traffic $ns connect $source $sink return $source } # make nodes & MPLSnodes set Node0 [$ns node] set Node1 [$ns node] set LSR2 [$ns mpls-node] set LSR3 [$ns mpls-node] set LSR4 [$ns mpls-node] set LSR5 [$ns mpls-node] set LSR6 [$ns mpls-node] set LSR7 [$ns mpls-node] set LSR8 [$ns mpls-node] set Node9 [$ns node] set Node10 [$ns node] # make links $ns duplex-link $Node0 $LSR2 1Mb 10ms DropTail $ns duplex-link $Node1 $LSR2 1Mb 10ms DropTail $ns duplex-link $LSR2 $LSR3 1Mb 10ms DropTail $ns duplex-link $LSR3 $LSR4 1Mb 10ms DropTail $ns duplex-link $LSR4 $LSR8 1Mb 10ms DropTail $ns duplex-link $LSR2 $LSR5 1Mb 10ms DropTail $ns duplex-link $LSR5 $LSR6 1Mb 10ms DropTail $ns duplex-link $LSR5 $LSR4 1Mb 10ms DropTail $ns duplex-link $LSR6 $LSR7 1Mb 10ms DropTail $ns duplex-link $LSR6 $LSR8 1Mb 10ms DropTail $ns duplex-link $LSR7 $LSR8 1Mb 10ms DropTail $ns duplex-link $LSR7 $Node9 1Mb 10ms DropTail $ns duplex-link $LSR8 $Node10 1Mb 10ms DropTail # Orient links to make topology clear $ns duplex-link-op $Node0 $LSR2 orient 1.667 $ns duplex-link-op $Node1 $LSR2 orient 0.333 $ns duplex-link-op $LSR2 $LSR3 orient down $ns duplex-link-op $LSR3 $LSR4 orient right $ns duplex-link-op $LSR4 $LSR8 orient right $ns duplex-link-op $LSR2 $LSR5 orient right $ns duplex-link-op $LSR5 $LSR6 orient right $ns duplex-link-op $LSR5 $LSR4 orient down $ns duplex-link-op $LSR6 $LSR7 orient 1.667 $ns duplex-link-op $LSR6 $LSR8 orient down $ns duplex-link-op $LSR8 $LSR7 orient 0.333 $ns duplex-link-op $LSR7 $Node9 orient 0.333 68 $ns duplex-link-op $LSR8 $Node10 orient 1.667 # configure ldp agents on all mpls nodes $ns configure-ldp-on-all-mpls-nodes # set ldp-message colors $ns ldp-request-color blue $ns ldp-mapping-color red $ns ldp-withdraw-color magenta $ns ldp-release-color orange $ns ldp-notification-color yellow # set ldp events $ns enable-control-driven #Create a traffic sink0 and attach it to the node node9 set sink0 [new Agent/LossMonitor] $ns attach-agent $Node9 $sink0 $sink0 clear #Create a traffic source set src0 [attach-expoo-traffic $Node0 $sink0 100 0 50k] $src0 set fid_ $ns color orange # create TCP agents set tcp0 [new Agent/TCP] $ns attach-agent $Node0 $tcp0 set ftp0 [new Application/FTP] $tcp0 set packetSize_ 1024 $ftp0 attach-agent $tcp0 set sink1 [new Agent/TCPSink] $ns attach-agent $Node9 $sink1 $ns connect $tcp0 $sink1 $tcp0 set fid_ $ns color blue set tcp1 [new Agent/TCP] $ns attach-agent $Node1 $tcp1 set ftp1 [new Application/FTP] $tcp1 set packetSize_ 1024 $ftp1 attach-agent $tcp1 set sink2 [new Agent/TCPSink] $ns attach-agent $Node9 $sink2 69 $ns connect $tcp1 $sink2 $tcp1 set fid_ $ns color magenta # set MPLS modules # for {set i 2} {$i < 9} {incr i} { set a LSR$i set m [eval $$a get-module "MPLS"] eval set LSRmpls$i $m } # Schedule starting & stoping of traffic resources $ns at 1.1 "$ftp0 start" $ns at 1.5 "$ftp1 start" $ns at 1.9 "$src0 start" $ns at 25.9 "$src0 stop" $ns at 25.1 "$ftp0 stop" $ns at 25.5 "$ftp1 stop" $ns at 26.0 "finish" $ns run ### End: # # mplsdiff.tcl # # Network simulation topology: # # Node0 #\ # \1Mb # \ # # # / | # / |1Mb # 1Mb/ | # / | # # Node1 # # # # - set ns [new Simulator] #Open the NAM trace file -set nf [open mplsdiff.nam w] set tf [open mplsdiff.tr w] 70 $ns namtrace-all $nf $ns trace-all $tf #Set variable: cir traffic rate, pir max traffic rate set cir0 100000 set pir0 500000 set rate0 4000000 set cir1 400000 set pir1 1000000 set rate1 2000000 set packetSize 1000 #Define a 'finish' procedure -proc finish {} { global ns nf tf $ns flush-trace #Close the NAM trace file close $nf #Close the Trace file close $tf #Execute NAM on the trace file exec nam mplsdiff.nam & exit } # Define a procedure attach traffic node with sink proc attach-expoo-traffic { node sink size burst idle rate } { global ns set source [new Agent/CBR/UDP] $ns attach-agent $node $source set traffic [new Traffic/Expoo] $traffic set packet-size $size $traffic set burst-time $burst $traffic set idle-time $idle $traffic set rate $rate $source attach-traffic $traffic $ns connect $source $sink return $source } # make nodes & MPLSnodes set Node0 [$ns node] set Node1 [$ns node] set LSR2 [$ns mpls-node] set LSR3 [$ns mpls-node] set LSR4 [$ns mpls-node] set LSR5 [$ns mpls-node] set LSR6 [$ns mpls-node] set LSR7 [$ns mpls-node] set LSR8 [$ns mpls-node] 71 set Node9 [$ns node] set Node10 [$ns node] # make links $ns duplex-link $Node0 $LSR2 1Mb 10ms DropTail $ns duplex-link $Node1 $LSR2 1Mb 10ms DropTail $ns duplex-link $LSR2 $LSR3 1Mb 10ms DropTail $ns duplex-link $LSR3 $LSR4 1Mb 10ms DropTail $ns duplex-link $LSR4 $LSR8 1Mb 10ms DropTail $ns simplex-link $LSR2 $LSR5 1Mb 10ms dsRED/edge $ns simplex-link $LSR5 $LSR2 1Mb 10ms dsRED/core $ns duplex-link $LSR5 $LSR6 1Mb 10ms DropTail $ns duplex-link $LSR5 $LSR4 1Mb 10ms DropTail $ns duplex-link $LSR7 $LSR6 1Mb 10ms dsRED/edge $ns simplex-link $LSR6 $LSR7 1Mb 10ms dsRED/core $ns duplex-link $LSR6 $LSR8 1Mb 10ms DropTail $ns duplex-link $LSR7 $LSR8 1Mb 10ms DropTail $ns duplex-link $LSR7 $Node9 1Mb 10ms DropTail $ns duplex-link $LSR8 $Node10 1Mb 10ms DropTail set qE1C [[$ns link $LSR2 $LSR5] queue] set qE2C [[$ns link $LSR7 $LSR6] queue] set qCE1 [[$ns link $LSR5 $LSR2] queue] set qCE2 [[$ns link $LSR6 $LSR7] queue] # Orient links to make topology clear $ns duplex-link-op $Node0 $LSR2 orient 1.667 $ns duplex-link-op $Node1 $LSR2 orient 0.333 $ns duplex-link-op $LSR2 $LSR3 orient down $ns duplex-link-op $LSR3 $LSR4 orient right $ns duplex-link-op $LSR4 $LSR8 orient right $ns duplex-link-op $LSR2 $LSR5 orient right $ns duplex-link-op $LSR5 $LSR6 orient right $ns duplex-link-op $LSR5 $LSR4 orient down $ns duplex-link-op $LSR6 $LSR7 orient 1.667 $ns duplex-link-op $LSR6 $LSR8 orient down $ns duplex-link-op $LSR8 $LSR7 orient 0.333 $ns duplex-link-op $LSR7 $Node9 orient 0.333 $ns duplex-link-op $LSR8 $Node10 orient 1.667 # configure ldp agents on all mpls nodes $ns configure-ldp-on-all-mpls-nodes # set ldp-message colors $ns ldp-request-color $ns ldp-mapping-color blue red 72 $ns ldp-withdraw-color magenta $ns ldp-release-color orange $ns ldp-notification-color yellow # set ldp events $ns enable-control-driven # Set DS RED parameters from LSR2 to LSR5: $qE1C meanPktSize $packetSize $qE1C set numQueues_ $qE1C setNumPrec $qE1C addPolicyEntry [$Node0 id] [$Node9 id] TSW3CM 10 $cir0 $pir0 $qE1C addPolicyEntry [$Node1 id] [$Node9 id] TSW3CM 20 $cir1 $pir1 $qE1C addPolicyEntry -1 -1 TSW3CM 10 $cir1 $pir1 $qE1C addPolicerEntry TSW3CM 10 11 12 $qE1C addPolicerEntry TSW3CM 20 21 22 $qE1C addPHBEntry 10 0 $qE1C addPHBEntry 11 $qE1C addPHBEntry 12 $qE1C addPHBEntry 20 0^M $qE1C addPHBEntry 21 1^M $qE1C addPHBEntry 22 2^M $qE1C addPHBEntry 0 $qE1C configQ 0 20 40 0.02 $qE1C configQ 10 20 0.10 $qE1C configQ 10 0.20 $qE1C configQ 20 40 0.02^M $qE1C configQ 1 10 20 0.10^M $qE1C configQ 10 0.20^M # Set DS RED parameters from LSR7 to LSR6: $qE2C meanPktSize $packetSize $qE2C set numQueues_ $qE2C setNumPrec $qE2C addPolicyEntry [$Node9 id] [$Node0 id] TSW3CM 10 $cir0 $pir0 $qE2C addPolicyEntry [$Node9 id] [$Node1 id] TSW3CM 20 $cir1 $pir1 $qE2C addPolicyEntry -1 -1 TSW3CM 10 $cir1 $pir1 $qE2C addPolicerEntry TSW3CM 10 11 12 $qE2C addPolicerEntry TSW3CM 20 21 22 $qE2C addPHBEntry 10 0 $qE2C addPHBEntry 11 $qE2C addPHBEntry 12 $qE2C addPHBEntry 20 0^M $qE2C addPHBEntry 21 1^M $qE2C addPHBEntry 22 2^M 73 $qE2C addPHBEntry 0 $qE2C configQ 0 20 40 0.02 $qE2C configQ 20 20 0.10 $qE2C configQ 10 0.20 $qE2C configQ 20 40 0.02^M $qE2C configQ 1 20 20 0.10^M $qE2C configQ 10 0.20^M # Set DS RED parameters from LSR5 to LSR2: $qCE1 meanPktSize $packetSize $qCE1 set numQueues_ $qCE1 setNumPrec $qCE1 addPHBEntry 10 0 $qCE1 addPHBEntry 11 $qCE1 addPHBEntry 12 $qCE1 addPHBEntry 20 0^M $qCE1 addPHBEntry 21 1^M $qCE1 addPHBEntry 22 2^M $qCE1 addPHBEntry 0 2^M $qCE1 configQ 0 20 40 0.02 $qCE1 configQ 10 20 0.10 $qCE1 configQ 10 0.20 $qCE1 configQ 20 40 0.02^M $qCE1 configQ 1 10 20 0.10^M $qCE1 configQ 10 0.20^M # Set DS RED parameters from LSR6 to LSR7: $qCE2 meanPktSize $packetSize $qCE2 set numQueues_ $qCE2 setNumPrec $qCE2 addPHBEntry 10 0 $qCE2 addPHBEntry 11 $qCE2 addPHBEntry 12 $qCE2 addPHBEntry 20 0^M $qCE2 addPHBEntry 21 1^M $qCE2 addPHBEntry 22 2^M $qCE2 addPHBEntry 0 2^M $qCE2 configQ 0 20 40 0.02 $qCE2 configQ 10 20 0.10 $qCE2 configQ 10 0.20 $qCE2 configQ 20 40 0.02^M $qCE2 configQ 1 10 20 0.10^M $qCE2 configQ 10 0.20^M #Create a traffic sink0 and attach it to the node node9 set sink0 [new Agent/LossMonitor] 74 $ns attach-agent $Node9 $sink0 $sink0 clear #Create a traffic source set src0 [attach-expoo-traffic $Node0 $sink0 100 0 90k] $src0 set fid_ $ns color orange # create TCP agents set tcp0 [new Agent/TCP] $ns attach-agent $Node0 $tcp0 set ftp0 [new Application/FTP] $tcp0 set packetSize_ 1024 $ftp0 attach-agent $tcp0 set sink1 [new Agent/TCPSink] $ns attach-agent $Node9 $sink1 $ns connect $tcp0 $sink1 $tcp0 set fid_ $ns color blue set tcp1 [new Agent/TCP] $ns attach-agent $Node1 $tcp1 set ftp1 [new Application/FTP] $tcp1 set packetSize_ 1024 $ftp1 attach-agent $tcp1 set sink2 [new Agent/TCPSink] $ns attach-agent $Node9 $sink2 $ns connect $tcp1 $sink2 $tcp1 set fid_ $ns color magenta # set MPLS modules # for {set i 2} {$i < 9} {incr i} { set a LSR$i set m [eval $$a get-module "MPLS"] eval set LSRmpls$i $m } $qE1C printPolicyTable $qE1C printPolicerTable # Schedule starting & stoping of traffic resources $ns at 1.1 "$ftp0 start" $ns at 1.5 "$ftp1 start" $ns at 1.9 "$src0 start" 75 $ns at 25.9 "$src0 stop" $ns at 25.1 "$ftp0 stop" $ns at 25.5 "$ftp1 stop" $ns at 26.0 "finish" $ns run ### End: # Type: perl Scripts_1.pl # To compute average throughput during simulation time # of the flow "flow id" at the node "required node" # -$infile=$ARGV[0]; $flow_id=$ARGV[1]; $tonode=$ARGV[2]; $start_time=0; $end_time=0; # To compute how many bytes of "flow id" were received at the "required node" # during simulation time # $sum=0; open (DATA,"

Ngày đăng: 11/11/2020, 21:42

w