├── .DS_Store ├── Lab1 ├── dns.pcap ├── http.pcap ├── ping.pcap ├── traceroute.pcap └── 实验1.doc ├── Lab2 ├── conf1.txt ├── conf2.txt └── 计网Lab2 刘思锐 3200102708.doc ├── Lab4 ├── 3200102708 Lab4 刘思锐.zip ├── R1.txt ├── R2.txt ├── R3.txt ├── R4.txt ├── R5.txt ├── Ref │ ├── R1.txt │ ├── R2.txt │ ├── R3.txt │ ├── R4.txt │ ├── R5.txt │ └── lab4.pdf ├── topo.png ├── 实验报告 3200102708 Lab4.pdf └── 实验报告模版_实验4.doc ├── Lab5 └── 实验报告模版_实验5.doc ├── Lab7 ├── .idea │ ├── .gitignore │ ├── Lab7.iml │ ├── misc.xml │ └── modules.xml └── 实验报告模版_实验7.doc ├── Lab8 ├── .DS_Store ├── Project │ ├── .DS_Store │ ├── code │ │ ├── head.h │ │ ├── server │ │ ├── server.cpp │ │ └── utils.cpp │ ├── files │ │ ├── html │ │ │ ├── noimg.html │ │ │ └── test.html │ │ ├── img │ │ │ └── logo.jpg │ │ └── txt │ │ │ └── test.txt │ └── readme.md ├── 实验报告 Lab8 刘思锐 3200102708.doc └── 实验报告 Lab8 刘思锐 3200102708.pdf ├── README.md ├── 参考资料 ├── CCNA2.0中文版教材 .zip ├── Routersim2.1(路由器模拟软件).zip ├── WinPcap_2_3.exe ├── ethereal-setup-0.9.10a.exe ├── 实验 DHCP-DNS-WWW 实验指导v1.zip ├── 实验 Ethereal使用方法.doc ├── 实验 TcpDump的表达式详解.htm ├── 实验 socket-MFC(陆魁军).zip ├── 实验 socket-Win32资料.zip ├── 实验 安装和配置FTP服务器和WEB服务器.zip ├── 实验 模拟软件RouterSim实验指导v3.rar ├── 实验 网络命令(陆魁军)v2.txt └── 实验 网络命令使用说明v3.doc ├── 第三方实验报告 ├── 1 │ ├── Lab1.doc │ ├── dns.pcap │ ├── http.pcap │ ├── ping.pcap │ └── tracert.pcap ├── 2 │ └── lab2.pdf ├── 3 │ ├── R1.txt │ ├── S2.txt │ └── lab3.pdf ├── 4 │ ├── R1.txt │ ├── R2.txt │ ├── R3.txt │ ├── R4.txt │ ├── R5.txt │ └── lab4.pdf ├── 5 │ ├── R1.txt │ ├── R10.txt │ ├── R2.txt │ ├── R3.txt │ ├── R4.txt │ ├── R5.txt │ ├── R6.txt │ ├── R7.txt │ ├── R8.txt │ ├── R9.txt │ └── lab5.pdf ├── 6 │ ├── R1.txt │ ├── R2.txt │ ├── R3.txt │ ├── R4.txt │ ├── R5.txt │ ├── R6.txt │ ├── R7.txt │ ├── R8.txt │ └── lab6.pdf ├── 7 │ ├── Lab7.pdf │ └── source │ │ ├── Global.h │ │ ├── client.cpp │ │ └── server.cpp ├── 8 │ ├── lab8.pdf │ └── src │ │ ├── NetworkManager.cpp │ │ ├── NetworkManager.hpp │ │ ├── NetworkManager.hpp.gch │ │ ├── RequestManager.cpp │ │ ├── RequestManager.hpp │ │ ├── csapp.c │ │ ├── csapp.h │ │ ├── html │ │ ├── noimg.html │ │ └── test.html │ │ ├── img │ │ └── logo.jpg │ │ ├── main.cpp │ │ ├── makefile │ │ ├── readme.md │ │ └── txt │ │ └── test.txt └── .DS_Store ├── 计网复习资料 ├── 2022lkj100.docx ├── 2022lkj100答案版.docx ├── 计算机网络 2018-2019 Fall&Winter Final.pdf ├── 计算机网络 2018-2019 我的答案.pdf ├── 试卷整理.pdf ├── 错题.assets │ └── 9321673094790_.pic.jpg └── 错题.md ├── 计网笔记.assets ├── Screenshot 2022-10-30 at 19.46.33.png ├── image-20220927101827694.png ├── image-20220927105825252.png ├── image-20220927113559664.png ├── image-20220927114319170.png ├── image-20220927114432504.png ├── image-20220927114619841.png ├── image-20220927115025141.png ├── image-20221012111133883.png ├── image-20221012112514968.png ├── image-20221012112856390.png ├── image-20221012113929618.png ├── image-20221012122552656.png ├── image-20221012122610551.png ├── image-20221012122937249.png ├── image-20221012123701717.png ├── image-20221012123739030.png ├── image-20221012125111535.png ├── image-20221012141438822.png ├── image-20221012145916567.png ├── image-20221012162105560.png ├── image-20221017102703084.png ├── image-20221017104047121.png ├── image-20221017111640583.png ├── image-20221030154057054.png ├── image-20221030193926262.png ├── image-20221030200325849.png ├── image-20221030201126230.png ├── image-20221031094628481.png ├── image-20221031100856744-7182138.png ├── image-20221031100856744.png ├── image-20221031101025919.png ├── image-20221031101515402.png ├── image-20221031102201202.png ├── image-20221031102851091.png ├── image-20221031103617293.png ├── image-20221031103738760.png ├── image-20221107100724584.png ├── image-20221107102201820.png ├── image-20221107103653569.png ├── image-20221107104841712.png ├── image-20221107105527285.png ├── image-20221107110449483.png ├── image-20221107112352387.png ├── image-20221107114858921.png ├── image-20221107115325467.png ├── image-20221114114340708.png ├── image-20221114115832580.png ├── image-20221114121814849.png ├── image-20221114121910741.png ├── image-20221114122429032.png ├── image-20221114122439926.png ├── image-20221114132438605.png ├── image-20221114134709648.png ├── image-20221114140316597.png ├── image-20221114145136100.png ├── image-20221114145712230.png ├── image-20221114192551060.png ├── image-20221115123753275.png ├── image-20221115125834763.png ├── image-20221117195500559.png ├── image-20221121144048915.png ├── image-20221121145450769.png ├── image-20221121145516907.png ├── image-20221121150849094.png ├── image-20221121151502598.png └── image-20221128103018999.png ├── 计网笔记.md └── 课程网站答案 ├── Ch.5 exercise1.png ├── Ch.5 exercise2.png ├── Ch.5 exercise3.png ├── Ch.5 exercise4.png ├── Ch.5 exercise5.png ├── Ch.5 exercise6.png ├── Ch.6 exercise1.png ├── Ch.6 exercise2.png ├── Ch.6 exercise3.png ├── Ch.6 exercise4.png ├── Ch.6 exercise5.png ├── Ch.7 exercise1.png ├── Ch.7 exercise2.png ├── Quiz5-1.png ├── Quiz5-2.png ├── Quiz6-1.png ├── Quiz6-2.png ├── Quiz6-3.png ├── Quiz6-4.png ├── Quiz6-5.png ├── Quiz7-1.png ├── Quiz7-2.png ├── Quiz7-3.png ├── Quiz7-4.png ├── Quiz7-5.png ├── Quiz8-1.png ├── Quiz8-2.png ├── Quiz8-3.png ├── Quiz8-4.png └── Quiz8-5.png /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/.DS_Store -------------------------------------------------------------------------------- /Lab1/dns.pcap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/Lab1/dns.pcap -------------------------------------------------------------------------------- /Lab1/http.pcap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/Lab1/http.pcap -------------------------------------------------------------------------------- /Lab1/ping.pcap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/Lab1/ping.pcap -------------------------------------------------------------------------------- /Lab1/traceroute.pcap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/Lab1/traceroute.pcap -------------------------------------------------------------------------------- /Lab1/实验1.doc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/Lab1/实验1.doc -------------------------------------------------------------------------------- /Lab2/conf1.txt: -------------------------------------------------------------------------------- 1 | Switch#show ru 2 | Switch#show running-config 3 | Building configuration... 4 | 5 | Current configuration 3223 bytes 6 | ! 7 | ! Last configuration change at 000529 UTC Sat Feb 4 2017 8 | ! 9 | version 15.2 10 | no service pad 11 | service timestamps debug datetime msec 12 | service timestamps log datetime msec 13 | no service password-encryption 14 | ! 15 | hostname Switch 16 | ! 17 | boot-start-marker 18 | boot-end-marker 19 | ! 20 | ! 21 | no aaa new-model 22 | system mtu routing 1500 23 | ! 24 | ! 25 | ! 26 | ! 27 | ! 28 | ! 29 | no ip domain-lookup 30 | ! 31 | ! 32 | ! 33 | ! 34 | ! 35 | ! 36 | ! 37 | crypto pki trustpoint TP-self-signed-3983218688 38 | enrollment selfsigned 39 | subject-name cn=IOS-Self-Signed-Certificate-3983218688 40 | revocation-check none 41 | rsakeypair TP-self-signed-3983218688 42 | ! 43 | ! 44 | crypto pki certificate chain TP-self-signed-3983218688 45 | certificate self-signed 01 46 | 3082022B 30820194 A0030201 02020101 300D0609 2A864886 F70D0101 05050030 47 | 31312F30 2D060355 04031326 494F532D 53656C66 2D536967 6E65642D 43657274 48 | 69666963 6174652D 33393833 32313836 3838301E 170D3030 30313034 30313236 49 | 34355A17 0D323030 31303130 30303030 305A3031 312F302D 06035504 03132649 50 | 4F532D53 656C662D 5369676E 65642D43 65727469 66696361 74652D33 39383332 51 | 31383638 3830819F 300D0609 2A864886 F70D0101 01050003 818D0030 81890281 52 | 810097DE FAE35ED7 BA3EB7E1 95DAE674 A05D391E A3FD3B09 1A17B418 ED44579F 53 | 9AB3A788 A06040A8 A3D8451E 0152BC72 21EC857D BE37524E D94FB076 E9D8BEB8 54 | 863A0A8A 6F1F301C 2E2396E1 F3E9BFF1 6F7CB957 DC82BA15 8761F411 718E9171 55 | 76037063 60FFE3AB A28DBF14 58D2053E 09664A02 0EF93C29 17AA215E 18FEBBEB 56 | 28E70203 010001A3 53305130 0F060355 1D130101 FF040530 030101FF 301F0603 57 | 551D2304 18301680 14AEF623 8598F33F E5655F26 BAE9C411 383DFA07 02301D06 58 | 03551D0E 04160414 AEF62385 98F33FE5 655F26BA E9C41138 3DFA0702 300D0609 59 | 2A864886 F70D0101 05050003 81810037 34F1808E 07222CAC 418B377A 8679B5AA 60 | CC094626 D1B5C92A 4DCD293C 91C8EA78 0190BA57 7CCF6619 FF0E662F 900DBEC7 61 | E51C18E3 1601B4A9 F4073C96 9A447780 092246FB 907740BA 5C909F9C 88A53119 62 | DF51E120 CDE0C77A 6D75D4EF 67DBB1E4 7039AEC4 FE2B3C3C 7B5A1CCB AC46067A 63 | CE249B0E BBE59C16 2AE0452A 2886D0 64 | quit 65 | ! 66 | spanning-tree mode rapid-pvst 67 | spanning-tree extend system-id 68 | ! 69 | ! 70 | ! 71 | ! 72 | vlan internal allocation policy ascending 73 | ! 74 | ! 75 | ! 76 | ! 77 | ! 78 | ! 79 | ! 80 | ! 81 | ! 82 | ! 83 | ! 84 | ! 85 | interface GigabitEthernet01 86 | switchport mode trunk 87 | ! 88 | interface GigabitEthernet02 89 | ! 90 | interface GigabitEthernet03 91 | switchport access vlan 2 92 | switchport mode access 93 | ! 94 | interface GigabitEthernet04 95 | ! 96 | interface GigabitEthernet05 97 | switchport access vlan 2 98 | switchport mode trunk 99 | spanning-tree vlan 1 port-priority 16 100 | ! 101 | interface GigabitEthernet06 102 | switchport access vlan 2 103 | switchport mode trunk 104 | spanning-tree vlan 1 port-priority 16 105 | ! 106 | interface GigabitEthernet07 107 | ! 108 | interface GigabitEthernet08 109 | switchport mode trunk 110 | spanning-tree vlan 2,16 port-priority 16 111 | ! 112 | interface GigabitEthernet09 113 | ! 114 | interface GigabitEthernet010 115 | switchport access vlan 2 116 | ! 117 | interface GigabitEthernet011 118 | ! 119 | interface GigabitEthernet012 120 | ! 121 | interface Vlan1 122 | ip address 192.168.0.10 255.255.255.0 123 | ! 124 | interface Vlan2 125 | ip address 192.168.1.1 255.255.255.0 126 | ! 127 | ip forward-protocol nd 128 | ip http server 129 | ip http secure-server 130 | ! 131 | ! 132 | ! 133 | ! 134 | no vstack 135 | ! 136 | line con 0 137 | exec-timeout 0 0 138 | logging synchronous 139 | line vty 0 4 140 | password 123456 141 | login 142 | line vty 5 15 143 | login 144 | ! 145 | ! 146 | monitor session 1 source interface Gi01 , Gi03 - 4 , Gi06 - 7 , Gi010 147 | monitor session 1 destination interface Gi011 148 | ! 149 | end 150 | 151 | Switch# 152 | -------------------------------------------------------------------------------- /Lab2/conf2.txt: -------------------------------------------------------------------------------- 1 | Switch#show running-config 2 | Building configuration... 3 | 4 | Current configuration : 1195 bytes 5 | ! 6 | ! Last configuration change at 03:02:02 UTC Fri Feb 22 2002 7 | ! 8 | version 15.2 9 | no service pad 10 | service timestamps debug datetime msec 11 | service timestamps log datetime msec 12 | no service password-encryption 13 | ! 14 | hostname Switch 15 | ! 16 | boot-start-marker 17 | boot-end-marker 18 | ! 19 | ! 20 | no aaa new-model 21 | system mtu routing 1500 22 | ! 23 | ! 24 | ! 25 | ! 26 | ! 27 | ! 28 | ! 29 | ! 30 | ! 31 | ! 32 | ! 33 | ! 34 | ! 35 | ! 36 | ! 37 | spanning-tree mode rapid-pvst 38 | spanning-tree extend system-id 39 | ! 40 | ! 41 | ! 42 | ! 43 | vlan internal allocation policy ascending 44 | ! 45 | ! 46 | ! 47 | ! 48 | ! 49 | ! 50 | ! 51 | ! 52 | ! 53 | ! 54 | ! 55 | ! 56 | interface GigabitEthernet0/1 57 | ! 58 | interface GigabitEthernet0/2 59 | ! 60 | interface GigabitEthernet0/3 61 | switchport mode trunk 62 | ! 63 | interface GigabitEthernet0/4 64 | ! 65 | interface GigabitEthernet0/5 66 | switchport mode trunk 67 | spanning-tree vlan 1 port-priority 16 68 | ! 69 | interface GigabitEthernet0/6 70 | switchport access vlan 2 71 | ! 72 | interface GigabitEthernet0/7 73 | ! 74 | interface GigabitEthernet0/8 75 | switchport access vlan 2 76 | switchport mode trunk 77 | spanning-tree vlan 2 port-priority 16 78 | ! 79 | interface GigabitEthernet0/9 80 | ! 81 | interface GigabitEthernet0/10 82 | ! 83 | interface GigabitEthernet0/11 84 | ! 85 | interface GigabitEthernet0/12 86 | ! 87 | interface Vlan1 88 | no ip address 89 | shutdown 90 | ! 91 | ip forward-protocol nd 92 | ip http server 93 | ip http secure-server 94 | ! 95 | ! 96 | ! 97 | ! 98 | no vstack 99 | ! 100 | line con 0 101 | line vty 5 15 102 | ! 103 | ! 104 | end 105 | 106 | Switch# 107 | -------------------------------------------------------------------------------- /Lab2/计网Lab2 刘思锐 3200102708.doc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/Lab2/计网Lab2 刘思锐 3200102708.doc -------------------------------------------------------------------------------- /Lab4/3200102708 Lab4 刘思锐.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/Lab4/3200102708 Lab4 刘思锐.zip -------------------------------------------------------------------------------- /Lab4/R1.txt: -------------------------------------------------------------------------------- 1 | 2 | ip tcp synwait-time 5 3 | ! 4 | ! 5 | ! 6 | ! 7 | ! 8 | interface FastEthernet0/0 9 | ip address 10.0.0.2 255.255.0.0 10 | duplex auto 11 | speed auto 12 | ! 13 | interface Serial0/0 14 | ip address 192.168.12.1 255.255.255.0 15 | clock rate 2000000 16 | ! 17 | interface FastEthernet0/1 18 | ip address 192.168.8.1 255.255.255.0 19 | duplex auto 20 | speed auto 21 | ! 22 | interface Serial0/1 23 | no ip address 24 | shutdown 25 | clock rate 2000000 26 | ! 27 | interface Serial0/2 28 | no ip address 29 | shutdown 30 | clock rate 2000000 31 | ! 32 | interface Serial0/3 33 | no ip address 34 | shutdown 35 | clock rate 2000000 36 | ! 37 | interface FastEthernet1/0 38 | ip address 10.1.0.2 255.255.0.0 39 | duplex auto 40 | speed auto 41 | ! 42 | interface FastEthernet2/0 43 | no ip address 44 | shutdown 45 | duplex auto 46 | speed auto 47 | ! 48 | interface FastEthernet3/0 49 | no ip address 50 | shutdown 51 | duplex auto 52 | speed auto 53 | ! 54 | interface FastEthernet4/0 55 | ! 56 | interface FastEthernet4/1 57 | ! 58 | interface FastEthernet4/2 59 | ! 60 | interface FastEthernet4/3 61 | ! 62 | interface FastEthernet4/4 63 | ! 64 | interface FastEthernet4/5 65 | ! 66 | interface FastEthernet4/6 67 | ! 68 | interface FastEthernet4/7 69 | ! 70 | interface FastEthernet4/8 71 | ! 72 | interface FastEthernet4/9 73 | ! 74 | interface FastEthernet4/10 75 | ! 76 | interface FastEthernet4/11 77 | ! 78 | interface FastEthernet4/12 79 | ! 80 | interface FastEthernet4/13 81 | ! 82 | interface FastEthernet4/14 83 | ! 84 | interface FastEthernet4/15 85 | ! 86 | interface Vlan1 87 | no ip address 88 | ! 89 | ! 90 | ip forward-protocol nd 91 | ip route 0.0.0.0 0.0.0.0 192.168.12.2 92 | ip route 10.162.0.0 255.255.0.0 192.168.12.2 93 | ip route 172.16.0.0 255.255.255.0 192.168.8.2 94 | ip route 172.16.0.0 255.255.255.0 192.168.12.2 30 95 | ip route 172.16.1.0 255.255.255.0 192.168.8.2 96 | ip route 172.16.1.0 255.255.255.0 192.168.12.2 30 97 | ip route 192.168.24.4 255.255.255.255 192.168.12.2 98 | ip route 192.168.30.0 255.255.255.0 192.168.12.2 99 | ip route 192.168.31.0 255.255.255.0 192.168.12.2 100 | ip route 192.168.35.1 255.255.255.255 192.168.8.2 101 | ! 102 | ! 103 | no ip http server 104 | no ip http secure-server 105 | ! 106 | no cdp log mismatch duplex 107 | ! 108 | ! 109 | ! 110 | -------------------------------------------------------------------------------- /Lab4/R2.txt: -------------------------------------------------------------------------------- 1 | 2 | username R4 password 0 3200102708 3 | ! 4 | ! 5 | ip tcp synwait-time 5 6 | ! 7 | ! 8 | ! 9 | ! 10 | ! 11 | interface FastEthernet0/0 12 | ip address dhcp 13 | ip nat outside 14 | ip virtual-reassembly 15 | duplex auto 16 | speed auto 17 | ! 18 | interface Serial0/0 19 | ip address 192.168.12.2 255.255.255.0 20 | ip nat inside 21 | ip virtual-reassembly 22 | clock rate 128000 23 | ! 24 | interface FastEthernet0/1 25 | no ip address 26 | shutdown 27 | duplex auto 28 | speed auto 29 | ! 30 | interface Serial0/1 31 | ip address 192.168.24.2 255.255.255.0 32 | encapsulation ppp 33 | clock rate 2000000 34 | ppp authentication chap 35 | ! 36 | interface Serial0/2 37 | no ip address 38 | shutdown 39 | clock rate 2000000 40 | ! 41 | interface Serial0/3 42 | no ip address 43 | shutdown 44 | clock rate 2000000 45 | ! 46 | interface FastEthernet1/0 47 | no ip address 48 | shutdown 49 | duplex auto 50 | speed auto 51 | ! 52 | interface FastEthernet2/0 53 | no ip address 54 | shutdown 55 | duplex auto 56 | speed auto 57 | ! 58 | interface FastEthernet3/0 59 | no ip address 60 | shutdown 61 | duplex auto 62 | speed auto 63 | ! 64 | interface FastEthernet4/0 65 | ! 66 | interface FastEthernet4/1 67 | ! 68 | interface FastEthernet4/2 69 | ! 70 | interface FastEthernet4/3 71 | ! 72 | interface FastEthernet4/4 73 | ! 74 | interface FastEthernet4/5 75 | ! 76 | interface FastEthernet4/6 77 | ! 78 | interface FastEthernet4/7 79 | ! 80 | interface FastEthernet4/8 81 | ! 82 | interface FastEthernet4/9 83 | ! 84 | interface FastEthernet4/10 85 | ! 86 | interface FastEthernet4/11 87 | ! 88 | interface FastEthernet4/12 89 | ! 90 | interface FastEthernet4/13 91 | ! 92 | interface FastEthernet4/14 93 | ! 94 | interface FastEthernet4/15 95 | ! 96 | interface Vlan1 97 | no ip address 98 | ! 99 | ! 100 | ip forward-protocol nd 101 | ip route 192.168.8.1 255.255.255.255 192.168.12.1 102 | ! 103 | ! 104 | no ip http server 105 | no ip http secure-server 106 | ip nat source list 2 interface FastEthernet0/0 overload 107 | ! 108 | access-list 2 permit 10.0.0.0 0.255.255.255 109 | no cdp log mismatch duplex 110 | ! 111 | ! 112 | ! 113 | -------------------------------------------------------------------------------- /Lab4/R3.txt: -------------------------------------------------------------------------------- 1 | 2 | ip tcp synwait-time 5 3 | ! 4 | ! 5 | ! 6 | ! 7 | ! 8 | interface FastEthernet0/0 9 | ip address 192.168.35.2 255.255.255.0 10 | duplex auto 11 | speed auto 12 | ! 13 | interface Serial0/0 14 | no ip address 15 | shutdown 16 | clock rate 2000000 17 | ! 18 | interface FastEthernet0/1 19 | ip address 192.168.8.2 255.255.255.0 20 | duplex auto 21 | speed auto 22 | ! 23 | interface Serial0/1 24 | no ip address 25 | shutdown 26 | clock rate 2000000 27 | ! 28 | interface Serial0/2 29 | no ip address 30 | shutdown 31 | clock rate 2000000 32 | ! 33 | interface Serial0/3 34 | no ip address 35 | shutdown 36 | clock rate 2000000 37 | ! 38 | interface FastEthernet1/0 39 | ip address 192.168.27.2 255.255.255.0 40 | duplex auto 41 | speed auto 42 | ! 43 | interface FastEthernet2/0 44 | no ip address 45 | shutdown 46 | duplex auto 47 | speed auto 48 | ! 49 | interface FastEthernet3/0 50 | no ip address 51 | shutdown 52 | duplex auto 53 | speed auto 54 | ! 55 | interface FastEthernet4/0 56 | ! 57 | interface FastEthernet4/1 58 | ! 59 | interface FastEthernet4/2 60 | ! 61 | interface FastEthernet4/3 62 | ! 63 | interface FastEthernet4/4 64 | ! 65 | interface FastEthernet4/5 66 | ! 67 | interface FastEthernet4/6 68 | ! 69 | interface FastEthernet4/7 70 | ! 71 | interface FastEthernet4/8 72 | ! 73 | interface FastEthernet4/9 74 | ! 75 | interface FastEthernet4/10 76 | ! 77 | interface FastEthernet4/11 78 | ! 79 | interface FastEthernet4/12 80 | ! 81 | interface FastEthernet4/13 82 | ! 83 | interface FastEthernet4/14 84 | ! 85 | interface FastEthernet4/15 86 | ! 87 | interface Vlan1 88 | no ip address 89 | ! 90 | ! 91 | ip forward-protocol nd 92 | ip route 10.0.0.0 255.255.0.0 192.168.8.1 93 | ip route 10.1.0.0 255.255.0.0 192.168.8.1 94 | ip route 172.16.0.0 255.255.255.0 192.168.27.1 95 | ip route 172.16.1.0 255.255.255.0 192.168.27.1 96 | ! 97 | ! 98 | no ip http server 99 | no ip http secure-server 100 | ! 101 | no cdp log mismatch duplex 102 | ! 103 | ! 104 | ! 105 | -------------------------------------------------------------------------------- /Lab4/R4.txt: -------------------------------------------------------------------------------- 1 | 2 | username R2 password 0 3200102708 3 | ! 4 | ! 5 | ip tcp synwait-time 5 6 | ! 7 | ! 8 | ! 9 | ! 10 | ! 11 | interface FastEthernet0/0 12 | ip address 172.16.0.1 255.255.255.0 13 | duplex auto 14 | speed auto 15 | ! 16 | interface Serial0/0 17 | no ip address 18 | shutdown 19 | clock rate 2000000 20 | ! 21 | interface FastEthernet0/1 22 | ip address 172.16.1.1 255.255.255.0 23 | duplex auto 24 | speed auto 25 | ! 26 | interface Serial0/1 27 | ip address 192.168.24.4 255.255.255.0 28 | encapsulation ppp 29 | clock rate 2000000 30 | ppp authentication chap 31 | ! 32 | interface Serial0/2 33 | no ip address 34 | shutdown 35 | clock rate 2000000 36 | ! 37 | interface Serial0/3 38 | no ip address 39 | shutdown 40 | clock rate 2000000 41 | ! 42 | interface FastEthernet1/0 43 | ip address 192.168.27.1 255.255.255.0 44 | duplex auto 45 | speed auto 46 | ! 47 | interface FastEthernet2/0 48 | no ip address 49 | shutdown 50 | duplex auto 51 | speed auto 52 | ! 53 | interface FastEthernet3/0 54 | no ip address 55 | shutdown 56 | duplex auto 57 | speed auto 58 | ! 59 | interface FastEthernet4/0 60 | ! 61 | interface FastEthernet4/1 62 | ! 63 | interface FastEthernet4/2 64 | ! 65 | interface FastEthernet4/3 66 | ! 67 | interface FastEthernet4/4 68 | ! 69 | interface FastEthernet4/5 70 | ! 71 | interface FastEthernet4/6 72 | ! 73 | interface FastEthernet4/7 74 | ! 75 | interface FastEthernet4/8 76 | ! 77 | interface FastEthernet4/9 78 | ! 79 | interface FastEthernet4/10 80 | ! 81 | interface FastEthernet4/11 82 | ! 83 | interface FastEthernet4/12 84 | ! 85 | interface FastEthernet4/13 86 | ! 87 | interface FastEthernet4/14 88 | ! 89 | interface FastEthernet4/15 90 | ! 91 | interface Vlan1 92 | no ip address 93 | ! 94 | ! 95 | ip forward-protocol nd 96 | ip route 10.0.0.0 255.255.0.0 192.168.27.2 97 | ip route 10.0.0.0 255.255.0.0 192.168.24.2 30 98 | ip route 10.1.0.0 255.255.0.0 192.168.27.2 99 | ip route 10.1.0.0 255.255.0.0 192.168.24.2 30 100 | ip route 192.168.8.1 255.255.255.255 192.168.24.2 101 | ip route 192.168.12.1 255.255.255.255 192.168.24.2 102 | ip route 192.168.35.1 255.255.255.255 192.168.27.2 103 | ! 104 | ! 105 | no ip http server 106 | no ip http secure-server 107 | ! 108 | no cdp log mismatch duplex 109 | ! 110 | ! 111 | ! 112 | -------------------------------------------------------------------------------- /Lab4/R5.txt: -------------------------------------------------------------------------------- 1 | 2 | ip tcp synwait-time 5 3 | ! 4 | ! 5 | ! 6 | ! 7 | ! 8 | interface FastEthernet0/0 9 | ip address 192.168.35.1 255.255.255.0 10 | ip nat outside 11 | ip virtual-reassembly 12 | duplex auto 13 | speed auto 14 | ! 15 | interface Serial0/0 16 | no ip address 17 | shutdown 18 | clock rate 2000000 19 | ! 20 | interface FastEthernet0/1 21 | ip address 192.168.50.1 255.255.255.0 22 | ip nat inside 23 | ip virtual-reassembly 24 | duplex auto 25 | speed auto 26 | ! 27 | interface Serial0/1 28 | no ip address 29 | shutdown 30 | clock rate 2000000 31 | ! 32 | interface Serial0/2 33 | no ip address 34 | shutdown 35 | clock rate 2000000 36 | ! 37 | interface Serial0/3 38 | no ip address 39 | shutdown 40 | clock rate 2000000 41 | ! 42 | interface FastEthernet1/0 43 | no ip address 44 | shutdown 45 | duplex auto 46 | speed auto 47 | ! 48 | interface FastEthernet2/0 49 | no ip address 50 | shutdown 51 | duplex auto 52 | speed auto 53 | ! 54 | interface FastEthernet3/0 55 | no ip address 56 | shutdown 57 | duplex auto 58 | speed auto 59 | ! 60 | interface FastEthernet4/0 61 | ! 62 | interface FastEthernet4/1 63 | ! 64 | interface FastEthernet4/2 65 | ! 66 | interface FastEthernet4/3 67 | ! 68 | interface FastEthernet4/4 69 | ! 70 | interface FastEthernet4/5 71 | ! 72 | interface FastEthernet4/6 73 | ! 74 | interface FastEthernet4/7 75 | ! 76 | interface FastEthernet4/8 77 | ! 78 | interface FastEthernet4/9 79 | ! 80 | interface FastEthernet4/10 81 | ! 82 | interface FastEthernet4/11 83 | ! 84 | interface FastEthernet4/12 85 | ! 86 | interface FastEthernet4/13 87 | ! 88 | interface FastEthernet4/14 89 | ! 90 | interface FastEthernet4/15 91 | ! 92 | interface Vlan1 93 | no ip address 94 | ! 95 | ! 96 | ip forward-protocol nd 97 | ip route 10.0.0.0 255.255.0.0 192.168.35.2 98 | ip route 10.1.0.0 255.255.0.0 192.168.35.2 99 | ip route 172.16.0.0 255.255.255.0 192.168.35.2 100 | ip route 172.16.1.0 255.255.255.0 192.168.35.2 101 | ! 102 | ! 103 | no ip http server 104 | no ip http secure-server 105 | ip nat inside source list 1 interface FastEthernet0/0 overload 106 | ! 107 | access-list 1 permit 192.168.0.0 0.0.0.255 108 | access-list 1 permit 192.168.50.0 0.0.0.255 109 | no cdp log mismatch duplex 110 | ! 111 | ! 112 | ! 113 | -------------------------------------------------------------------------------- /Lab4/Ref/R1.txt: -------------------------------------------------------------------------------- 1 | R1#show running-config 2 | Building configuration... 3 | 4 | Current configuration : 2299 bytes 5 | ! 6 | version 12.4 7 | service timestamps debug datetime msec 8 | service timestamps log datetime msec 9 | no service password-encryption 10 | ! 11 | hostname R1 12 | ! 13 | boot-start-marker 14 | boot-end-marker 15 | ! 16 | ! 17 | no aaa new-model 18 | memory-size iomem 5 19 | no ip icmp rate-limit unreachable 20 | ip cef 21 | ! 22 | ! 23 | ! 24 | ! 25 | no ip domain lookup 26 | ip auth-proxy max-nodata-conns 3 27 | ip admission max-nodata-conns 3 28 | ! 29 | ! 30 | ! 31 | ! 32 | ! 33 | ! 34 | ! 35 | ! 36 | ! 37 | ! 38 | ! 39 | ! 40 | ! 41 | ! 42 | ! 43 | ! 44 | ! 45 | ! 46 | ! 47 | ip tcp synwait-time 5 48 | ! 49 | ! 50 | ! 51 | ! 52 | ! 53 | interface FastEthernet0/0 54 | ip address 10.0.0.1 255.255.0.0 55 | duplex auto 56 | speed auto 57 | ! 58 | interface Serial0/0 59 | ip address 192.168.12.1 255.255.255.0 60 | clock rate 2000000 61 | ! 62 | interface FastEthernet0/1 63 | ip address 192.168.13.1 255.255.255.0 64 | duplex auto 65 | speed auto 66 | ! 67 | interface Serial0/1 68 | no ip address 69 | shutdown 70 | clock rate 2000000 71 | ! 72 | interface Serial0/2 73 | no ip address 74 | shutdown 75 | clock rate 2000000 76 | ! 77 | interface Serial0/3 78 | no ip address 79 | shutdown 80 | clock rate 2000000 81 | ! 82 | interface FastEthernet1/0 83 | ip address 10.1.0.1 255.255.0.0 84 | duplex auto 85 | speed auto 86 | ! 87 | interface FastEthernet2/0 88 | no ip address 89 | shutdown 90 | duplex auto 91 | speed auto 92 | ! 93 | interface FastEthernet3/0 94 | no ip address 95 | shutdown 96 | duplex auto 97 | speed auto 98 | ! 99 | interface FastEthernet4/0 100 | ! 101 | interface FastEthernet4/1 102 | ! 103 | interface FastEthernet4/2 104 | ! 105 | interface FastEthernet4/3 106 | ! 107 | interface FastEthernet4/4 108 | ! 109 | interface FastEthernet4/5 110 | ! 111 | interface FastEthernet4/6 112 | ! 113 | interface FastEthernet4/7 114 | ! 115 | interface FastEthernet4/8 116 | ! 117 | interface FastEthernet4/9 118 | ! 119 | interface FastEthernet4/10 120 | ! 121 | interface FastEthernet4/11 122 | ! 123 | interface FastEthernet4/12 124 | ! 125 | interface FastEthernet4/13 126 | ! 127 | interface FastEthernet4/14 128 | ! 129 | interface FastEthernet4/15 130 | ! 131 | interface Vlan1 132 | no ip address 133 | ! 134 | ! 135 | ip forward-protocol nd 136 | ip route 0.0.0.0 0.0.0.0 192.168.12.2 137 | ip route 172.16.0.0 255.255.255.0 192.168.13.3 138 | ip route 172.16.0.0 255.255.255.0 192.168.12.2 30 139 | ip route 172.16.1.0 255.255.255.0 192.168.13.3 140 | ip route 172.16.1.0 255.255.255.0 192.168.12.2 30 141 | ip route 172.16.41.0 255.255.255.0 192.168.12.2 142 | ip route 192.168.24.4 255.255.255.255 192.168.12.2 143 | ip route 192.168.35.5 255.255.255.255 192.168.13.3 144 | ! 145 | ! 146 | no ip http server 147 | no ip http secure-server 148 | ! 149 | no cdp log mismatch duplex 150 | ! 151 | ! 152 | ! 153 | control-plane 154 | ! 155 | ! 156 | ! 157 | ! 158 | ! 159 | ! 160 | ! 161 | ! 162 | ! 163 | ! 164 | line con 0 165 | exec-timeout 0 0 166 | privilege level 15 167 | logging synchronous 168 | line aux 0 169 | exec-timeout 0 0 170 | privilege level 15 171 | logging synchronous 172 | line vty 0 4 173 | login 174 | ! 175 | ! 176 | end -------------------------------------------------------------------------------- /Lab4/Ref/R2.txt: -------------------------------------------------------------------------------- 1 | R2#show running-config 2 | Building configuration... 3 | 4 | Current configuration : 2405 bytes 5 | ! 6 | version 12.4 7 | service timestamps debug datetime msec 8 | service timestamps log datetime msec 9 | no service password-encryption 10 | ! 11 | hostname R2 12 | ! 13 | boot-start-marker 14 | boot-end-marker 15 | ! 16 | ! 17 | no aaa new-model 18 | memory-size iomem 5 19 | no ip icmp rate-limit unreachable 20 | ip cef 21 | ! 22 | ! 23 | ! 24 | ! 25 | no ip domain lookup 26 | ip auth-proxy max-nodata-conns 3 27 | ip admission max-nodata-conns 3 28 | ! 29 | ! 30 | ! 31 | ! 32 | ! 33 | ! 34 | ! 35 | ! 36 | ! 37 | ! 38 | ! 39 | ! 40 | ! 41 | ! 42 | ! 43 | ! 44 | ! 45 | username R4 password 0 1234 46 | ! 47 | ! 48 | ip tcp synwait-time 5 49 | ! 50 | ! 51 | ! 52 | ! 53 | ! 54 | interface FastEthernet0/0 55 | ip address dhcp 56 | ip nat outside 57 | ip virtual-reassembly 58 | duplex auto 59 | speed auto 60 | ! 61 | interface Serial0/0 62 | ip address 192.168.12.2 255.255.255.0 63 | ip nat inside 64 | ip virtual-reassembly 65 | clock rate 128000 66 | ! 67 | interface FastEthernet0/1 68 | no ip address 69 | shutdown 70 | duplex auto 71 | speed auto 72 | ! 73 | interface Serial0/1 74 | ip address 192.168.24.2 255.255.255.0 75 | encapsulation ppp 76 | clock rate 2000000 77 | ! 78 | interface Serial0/2 79 | no ip address 80 | shutdown 81 | clock rate 2000000 82 | ! 83 | interface Serial0/3 84 | no ip address 85 | shutdown 86 | clock rate 2000000 87 | ! 88 | interface FastEthernet1/0 89 | no ip address 90 | shutdown 91 | duplex auto 92 | speed auto 93 | ! 94 | interface FastEthernet2/0 95 | no ip address 96 | shutdown 97 | duplex auto 98 | speed auto 99 | ! 100 | interface FastEthernet3/0 101 | no ip address 102 | shutdown 103 | duplex auto 104 | speed auto 105 | ! 106 | interface FastEthernet4/0 107 | ! 108 | interface FastEthernet4/1 109 | ! 110 | interface FastEthernet4/2 111 | ! 112 | interface FastEthernet4/3 113 | ! 114 | interface FastEthernet4/4 115 | ! 116 | interface FastEthernet4/5 117 | ! 118 | interface FastEthernet4/6 119 | ! 120 | interface FastEthernet4/7 121 | ! 122 | interface FastEthernet4/8 123 | ! 124 | interface FastEthernet4/9 125 | ! 126 | interface FastEthernet4/10 127 | ! 128 | interface FastEthernet4/11 129 | ! 130 | interface FastEthernet4/12 131 | ! 132 | interface FastEthernet4/13 133 | ! 134 | interface FastEthernet4/14 135 | ! 136 | interface FastEthernet4/15 137 | ! 138 | interface Vlan1 139 | no ip address 140 | ! 141 | ! 142 | ip forward-protocol nd 143 | ip route 0.0.0.0 0.0.0.0 172.16.41.255 144 | ip route 10.0.0.0 255.255.0.0 192.168.12.1 30 145 | ip route 10.1.0.0 255.255.0.0 192.168.12.1 30 146 | ip route 172.16.0.0 255.255.255.0 192.168.24.4 30 147 | ip route 172.16.1.0 255.255.255.0 192.168.24.4 30 148 | ip route 192.168.13.1 255.255.255.255 192.168.12.1 149 | ! 150 | ! 151 | no ip http server 152 | no ip http secure-server 153 | ip nat inside source list 2 interface FastEthernet0/0 overload 154 | ! 155 | access-list 2 permit 10.0.0.0 0.255.255.255 156 | no cdp log mismatch duplex 157 | ! 158 | ! 159 | ! 160 | control-plane 161 | ! 162 | ! 163 | ! 164 | ! 165 | ! 166 | ! 167 | ! 168 | ! 169 | ! 170 | ! 171 | line con 0 172 | exec-timeout 0 0 173 | privilege level 15 174 | logging synchronous 175 | line aux 0 176 | exec-timeout 0 0 177 | privilege level 15 178 | logging synchronous 179 | line vty 0 4 180 | login 181 | ! 182 | ! 183 | end -------------------------------------------------------------------------------- /Lab4/Ref/R3.txt: -------------------------------------------------------------------------------- 1 | R3#show running-config 2 | Building configuration... 3 | 4 | Current configuration : 2095 bytes 5 | ! 6 | version 12.4 7 | service timestamps debug datetime msec 8 | service timestamps log datetime msec 9 | no service password-encryption 10 | ! 11 | hostname R3 12 | ! 13 | boot-start-marker 14 | boot-end-marker 15 | ! 16 | ! 17 | no aaa new-model 18 | memory-size iomem 5 19 | no ip icmp rate-limit unreachable 20 | ip cef 21 | ! 22 | ! 23 | ! 24 | ! 25 | no ip domain lookup 26 | ip auth-proxy max-nodata-conns 3 27 | ip admission max-nodata-conns 3 28 | ! 29 | ! 30 | ! 31 | ! 32 | ! 33 | ! 34 | ! 35 | ! 36 | ! 37 | ! 38 | ! 39 | ! 40 | ! 41 | ! 42 | ! 43 | ! 44 | ! 45 | ! 46 | ! 47 | ip tcp synwait-time 5 48 | ! 49 | ! 50 | ! 51 | ! 52 | ! 53 | interface FastEthernet0/0 54 | ip address 192.168.35.3 255.255.255.0 55 | duplex auto 56 | speed auto 57 | ! 58 | interface Serial0/0 59 | no ip address 60 | shutdown 61 | clock rate 2000000 62 | ! 63 | interface FastEthernet0/1 64 | ip address 192.168.13.3 255.255.255.0 65 | duplex auto 66 | speed auto 67 | ! 68 | interface Serial0/1 69 | no ip address 70 | shutdown 71 | clock rate 2000000 72 | ! 73 | interface Serial0/2 74 | no ip address 75 | shutdown 76 | clock rate 2000000 77 | ! 78 | interface Serial0/3 79 | no ip address 80 | shutdown 81 | clock rate 2000000 82 | ! 83 | interface FastEthernet1/0 84 | ip address 192.168.34.3 255.255.255.0 85 | duplex auto 86 | speed auto 87 | ! 88 | interface FastEthernet2/0 89 | no ip address 90 | shutdown 91 | duplex auto 92 | speed auto 93 | ! 94 | interface FastEthernet3/0 95 | no ip address 96 | shutdown 97 | duplex auto 98 | speed auto 99 | ! 100 | interface FastEthernet4/0 101 | ! 102 | interface FastEthernet4/1 103 | ! 104 | interface FastEthernet4/2 105 | ! 106 | interface FastEthernet4/3 107 | ! 108 | interface FastEthernet4/4 109 | ! 110 | interface FastEthernet4/5 111 | ! 112 | interface FastEthernet4/6 113 | ! 114 | interface FastEthernet4/7 115 | ! 116 | interface FastEthernet4/8 117 | ! 118 | interface FastEthernet4/9 119 | ! 120 | interface FastEthernet4/10 121 | ! 122 | interface FastEthernet4/11 123 | ! 124 | interface FastEthernet4/12 125 | ! 126 | interface FastEthernet4/13 127 | ! 128 | interface FastEthernet4/14 129 | ! 130 | interface FastEthernet4/15 131 | ! 132 | interface Vlan1 133 | no ip address 134 | ! 135 | ! 136 | ip forward-protocol nd 137 | ip route 10.0.0.0 255.255.0.0 192.168.13.1 138 | ip route 10.1.0.0 255.255.0.0 192.168.13.1 139 | ip route 172.16.0.0 255.255.255.0 192.168.34.4 140 | ip route 172.16.1.0 255.255.255.0 192.168.34.4 141 | ! 142 | ! 143 | no ip http server 144 | no ip http secure-server 145 | ! 146 | no cdp log mismatch duplex 147 | ! 148 | ! 149 | ! 150 | control-plane 151 | ! 152 | ! 153 | ! 154 | ! 155 | ! 156 | ! 157 | ! 158 | ! 159 | ! 160 | ! 161 | line con 0 162 | exec-timeout 0 0 163 | privilege level 15 164 | logging synchronous 165 | line aux 0 166 | exec-timeout 0 0 167 | privilege level 15 168 | logging synchronous 169 | line vty 0 4 170 | login 171 | ! 172 | ! 173 | end -------------------------------------------------------------------------------- /Lab4/Ref/R4.txt: -------------------------------------------------------------------------------- 1 | R4#show running-config 2 | Building configuration... 3 | 4 | Current configuration : 2574 bytes 5 | ! 6 | version 12.4 7 | service timestamps debug datetime msec 8 | service timestamps log datetime msec 9 | no service password-encryption 10 | ! 11 | hostname R4 12 | ! 13 | boot-start-marker 14 | boot-end-marker 15 | ! 16 | ! 17 | no aaa new-model 18 | memory-size iomem 5 19 | no ip icmp rate-limit unreachable 20 | ip cef 21 | ! 22 | ! 23 | no ip dhcp use vrf connected 24 | ! 25 | ip dhcp pool 1 26 | network 172.16.0.0 255.255.255.0 27 | default-router 172.16.0.1 28 | ! 29 | ip dhcp pool 2 30 | network 172.16.1.0 255.255.255.0 31 | default-router 172.16.1.1 32 | ! 33 | ! 34 | no ip domain lookup 35 | ip auth-proxy max-nodata-conns 3 36 | ip admission max-nodata-conns 3 37 | ! 38 | ! 39 | ! 40 | ! 41 | ! 42 | ! 43 | ! 44 | ! 45 | ! 46 | ! 47 | ! 48 | ! 49 | ! 50 | ! 51 | ! 52 | ! 53 | ! 54 | username R2 password 0 1234 55 | ! 56 | ! 57 | ip tcp synwait-time 5 58 | ! 59 | ! 60 | ! 61 | ! 62 | ! 63 | interface FastEthernet0/0 64 | ip address 172.16.0.1 255.255.255.0 65 | duplex auto 66 | speed auto 67 | ! 68 | interface Serial0/0 69 | ip address 192.168.24.4 255.255.255.0 70 | encapsulation ppp 71 | clock rate 2000000 72 | ppp authentication chap 73 | ! 74 | interface FastEthernet0/1 75 | ip address 172.16.1.1 255.255.255.0 76 | duplex auto 77 | speed auto 78 | ! 79 | interface Serial0/1 80 | no ip address 81 | shutdown 82 | clock rate 2000000 83 | ! 84 | interface Serial0/2 85 | no ip address 86 | shutdown 87 | clock rate 2000000 88 | ! 89 | interface Serial0/3 90 | no ip address 91 | shutdown 92 | clock rate 2000000 93 | ! 94 | interface FastEthernet1/0 95 | ip address 192.168.34.4 255.255.255.0 96 | duplex auto 97 | speed auto 98 | ! 99 | interface FastEthernet2/0 100 | no ip address 101 | shutdown 102 | duplex auto 103 | speed auto 104 | ! 105 | interface FastEthernet3/0 106 | no ip address 107 | shutdown 108 | duplex auto 109 | speed auto 110 | ! 111 | interface FastEthernet4/0 112 | ! 113 | interface FastEthernet4/1 114 | ! 115 | interface FastEthernet4/2 116 | ! 117 | interface FastEthernet4/3 118 | ! 119 | interface FastEthernet4/4 120 | ! 121 | interface FastEthernet4/5 122 | ! 123 | interface FastEthernet4/6 124 | ! 125 | interface FastEthernet4/7 126 | ! 127 | interface FastEthernet4/8 128 | ! 129 | interface FastEthernet4/9 130 | ! 131 | interface FastEthernet4/10 132 | ! 133 | interface FastEthernet4/11 134 | ! 135 | interface FastEthernet4/12 136 | ! 137 | interface FastEthernet4/13 138 | ! 139 | interface FastEthernet4/14 140 | ! 141 | interface FastEthernet4/15 142 | ! 143 | interface Vlan1 144 | no ip address 145 | ! 146 | ! 147 | ip forward-protocol nd 148 | ip route 10.0.0.0 255.255.0.0 192.168.34.3 149 | ip route 10.0.0.0 255.255.0.0 192.168.24.2 30 150 | ip route 10.1.0.0 255.255.0.0 192.168.34.3 151 | ip route 10.1.0.0 255.255.0.0 192.168.24.2 30 152 | ip route 192.168.12.1 255.255.255.255 192.168.24.2 153 | ip route 192.168.13.1 255.255.255.255 192.168.24.2 154 | ip route 192.168.35.5 255.255.255.255 192.168.13.3 155 | ip route 192.168.35.5 255.255.255.255 192.168.34.3 156 | ! 157 | ! 158 | no ip http server 159 | no ip http secure-server 160 | ! 161 | no cdp log mismatch duplex 162 | ! 163 | ! 164 | ! 165 | control-plane 166 | ! 167 | ! 168 | ! 169 | ! 170 | ! 171 | ! 172 | ! 173 | ! 174 | ! 175 | ! 176 | line con 0 177 | exec-timeout 0 0 178 | privilege level 15 179 | logging synchronous 180 | line aux 0 181 | exec-timeout 0 0 182 | privilege level 15 183 | logging synchronous 184 | line vty 0 4 185 | login 186 | ! 187 | ! 188 | end -------------------------------------------------------------------------------- /Lab4/Ref/R5.txt: -------------------------------------------------------------------------------- 1 | R5#show running-config 2 | Building configuration... 3 | 4 | Current configuration : 2263 bytes 5 | ! 6 | version 12.4 7 | service timestamps debug datetime msec 8 | service timestamps log datetime msec 9 | no service password-encryption 10 | ! 11 | hostname R5 12 | ! 13 | boot-start-marker 14 | boot-end-marker 15 | ! 16 | ! 17 | no aaa new-model 18 | memory-size iomem 5 19 | no ip icmp rate-limit unreachable 20 | ip cef 21 | ! 22 | ! 23 | ! 24 | ! 25 | no ip domain lookup 26 | ip auth-proxy max-nodata-conns 3 27 | ip admission max-nodata-conns 3 28 | ! 29 | ! 30 | ! 31 | ! 32 | ! 33 | ! 34 | ! 35 | ! 36 | ! 37 | ! 38 | ! 39 | ! 40 | ! 41 | ! 42 | ! 43 | ! 44 | ! 45 | ! 46 | ! 47 | ip tcp synwait-time 5 48 | ! 49 | ! 50 | ! 51 | ! 52 | ! 53 | interface FastEthernet0/0 54 | ip address 192.168.35.5 255.255.255.0 55 | ip nat outside 56 | ip virtual-reassembly 57 | duplex auto 58 | speed auto 59 | ! 60 | interface Serial0/0 61 | no ip address 62 | shutdown 63 | clock rate 2000000 64 | ! 65 | interface FastEthernet0/1 66 | ip address 192.168.0.1 255.255.255.0 67 | ip nat inside 68 | ip virtual-reassembly 69 | duplex auto 70 | speed auto 71 | ! 72 | interface Serial0/1 73 | no ip address 74 | shutdown 75 | clock rate 2000000 76 | ! 77 | interface Serial0/2 78 | no ip address 79 | shutdown 80 | clock rate 2000000 81 | ! 82 | interface Serial0/3 83 | no ip address 84 | shutdown 85 | clock rate 2000000 86 | ! 87 | interface FastEthernet1/0 88 | no ip address 89 | shutdown 90 | duplex auto 91 | speed auto 92 | ! 93 | interface FastEthernet2/0 94 | no ip address 95 | shutdown 96 | duplex auto 97 | speed auto 98 | ! 99 | interface FastEthernet3/0 100 | no ip address 101 | shutdown 102 | duplex auto 103 | speed auto 104 | ! 105 | interface FastEthernet4/0 106 | ! 107 | interface FastEthernet4/1 108 | ! 109 | interface FastEthernet4/2 110 | ! 111 | interface FastEthernet4/3 112 | ! 113 | interface FastEthernet4/4 114 | ! 115 | interface FastEthernet4/5 116 | ! 117 | interface FastEthernet4/6 118 | ! 119 | interface FastEthernet4/7 120 | ! 121 | interface FastEthernet4/8 122 | ! 123 | interface FastEthernet4/9 124 | ! 125 | interface FastEthernet4/10 126 | ! 127 | interface FastEthernet4/11 128 | ! 129 | interface FastEthernet4/12 130 | ! 131 | interface FastEthernet4/13 132 | ! 133 | interface FastEthernet4/14 134 | ! 135 | interface FastEthernet4/15 136 | ! 137 | interface Vlan1 138 | no ip address 139 | ! 140 | ! 141 | ip forward-protocol nd 142 | ip route 10.0.0.0 255.255.0.0 192.168.35.3 143 | ip route 10.1.0.0 255.255.0.0 192.168.35.3 144 | ip route 172.16.0.0 255.255.255.0 192.168.35.3 145 | ip route 172.16.1.0 255.255.255.0 192.168.35.3 146 | ! 147 | ! 148 | no ip http server 149 | no ip http secure-server 150 | ip nat inside source list 1 interface FastEthernet0/0 overload 151 | ! 152 | access-list 1 permit 192.168.0.0 0.0.0.255 153 | no cdp log mismatch duplex 154 | ! 155 | ! 156 | ! 157 | control-plane 158 | ! 159 | ! 160 | ! 161 | ! 162 | ! 163 | ! 164 | ! 165 | ! 166 | ! 167 | ! 168 | line con 0 169 | exec-timeout 0 0 170 | privilege level 15 171 | logging synchronous 172 | line aux 0 173 | exec-timeout 0 0 174 | privilege level 15 175 | logging synchronous 176 | line vty 0 4 177 | login 178 | ! 179 | ! 180 | end -------------------------------------------------------------------------------- /Lab4/Ref/lab4.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/Lab4/Ref/lab4.pdf -------------------------------------------------------------------------------- /Lab4/topo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/Lab4/topo.png -------------------------------------------------------------------------------- /Lab4/实验报告 3200102708 Lab4.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/Lab4/实验报告 3200102708 Lab4.pdf -------------------------------------------------------------------------------- /Lab4/实验报告模版_实验4.doc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/Lab4/实验报告模版_实验4.doc -------------------------------------------------------------------------------- /Lab5/实验报告模版_实验5.doc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/Lab5/实验报告模版_实验5.doc -------------------------------------------------------------------------------- /Lab7/.idea/.gitignore: -------------------------------------------------------------------------------- 1 | # 默认忽略的文件 2 | /shelf/ 3 | /workspace.xml 4 | # 基于编辑器的 HTTP 客户端请求 5 | /httpRequests/ 6 | # Datasource local storage ignored files 7 | /dataSources/ 8 | /dataSources.local.xml 9 | -------------------------------------------------------------------------------- /Lab7/.idea/Lab7.iml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Lab7/.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Lab7/.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Lab7/实验报告模版_实验7.doc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/Lab7/实验报告模版_实验7.doc -------------------------------------------------------------------------------- /Lab8/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/Lab8/.DS_Store -------------------------------------------------------------------------------- /Lab8/Project/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/Lab8/Project/.DS_Store -------------------------------------------------------------------------------- /Lab8/Project/code/head.h: -------------------------------------------------------------------------------- 1 | #ifndef LAB8_HEAD 2 | 3 | #define LAB8_HEAD 4 | 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | 21 | const int BUFFER_SIZE = 2048; 22 | const int MAX_CONNECTION = 100; 23 | const int SOCK_PORT = 2708; 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /Lab8/Project/code/server: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/Lab8/Project/code/server -------------------------------------------------------------------------------- /Lab8/Project/code/server.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Created by Yile Liu on 2022/12/10. 3 | // 4 | 5 | #include "utils.cpp" 6 | 7 | using namespace std; 8 | 9 | class Server { 10 | public: 11 | Server(); 12 | 13 | ~Server(); 14 | 15 | int startAcceptClnt(); 16 | 17 | private: 18 | pthread_t tid; 19 | int serv_sock = -1; 20 | struct sockaddr_in serv_addr; 21 | }; 22 | 23 | Server::Server() { 24 | // socket() 25 | serv_sock = socket(AF_INET, SOCK_STREAM, 0); 26 | cout << "socket()完成 服务程序句柄: " << serv_sock << endl; 27 | 28 | // bind() 29 | memset(&serv_addr, 0, sizeof(serv_addr)); 30 | serv_addr.sin_family = AF_INET; 31 | serv_addr.sin_addr.s_addr = htonl(INADDR_ANY); // INADDR_ANY即本机IP 32 | serv_addr.sin_port = htons(SOCK_PORT); 33 | 34 | int res = ::bind(serv_sock, (struct sockaddr *) &serv_addr, sizeof(struct sockaddr)); 35 | if (res != -1) { 36 | cout << "bind()完成 绑定IP: " << htonl(INADDR_ANY) << endl; 37 | } else { 38 | cout << "bind()发生错误: " << errno << endl; 39 | exit(errno); 40 | } 41 | 42 | // listen() 43 | res = listen(serv_sock, MAX_CONNECTION); 44 | if (res != -1) { 45 | cout << "listen()就绪" << endl; 46 | } else { 47 | cout << "listen()发生错误: " << errno << endl; 48 | exit(errno); 49 | } 50 | printSplitLine(); 51 | } 52 | 53 | Server::~Server() { 54 | close(serv_sock); 55 | } 56 | 57 | void *handleRequest(void *arg) { 58 | int sock = *(int *) arg; 59 | 60 | char method[BUFFER_SIZE]; 61 | char uri[BUFFER_SIZE]; 62 | char ver[BUFFER_SIZE]; 63 | char header[BUFFER_SIZE]; 64 | char content[BUFFER_SIZE]; 65 | struct stat file_stat; 66 | 67 | parseHttpFromSock(method, uri, ver, header, content, sock); 68 | 69 | if (!::strcasecmp(method, "GET")) { 70 | translateFileName(uri); 71 | if (stat(uri, &file_stat) < 0) { 72 | // cannot find the file 73 | clientSendMsg(sock, "404", "Not found"); 74 | } else if ((S_IRUSR & file_stat.st_mode) == 0) { 75 | // have no auth. to open the file 76 | clientSendMsg(sock, "403", "Forbidden"); 77 | } else { 78 | //response 79 | clientSendFile(sock, uri, file_stat.st_size); 80 | } 81 | } 82 | else if (!::strcasecmp(method, "POST")) { 83 | if (strcmp(uri, "/html/dopost")) { 84 | // if the uri is not /dopost 85 | clientSendMsg(sock, "404", "Not found"); 86 | } else if (!strcmp(content, "login=3200102708&pass=2708")) { 87 | // content correct 88 | clientSendMsg(sock, "200", "登录成功"); 89 | } else { 90 | // content incorrect 91 | clientSendMsg(sock, "200", "登录失败"); 92 | } 93 | } 94 | pthread_exit(nullptr); 95 | } 96 | 97 | 98 | int Server::startAcceptClnt() { 99 | int clnt_sock = -1; 100 | struct sockaddr_in clnt_addr; 101 | socklen_t clnt_addr_size = sizeof(clnt_addr); 102 | while (true) { 103 | clnt_sock = accept(serv_sock, (struct sockaddr *) (&clnt_addr), &clnt_addr_size); 104 | if (clnt_sock == -1) { 105 | cout << "无法建立连接" << endl; 106 | } else { 107 | cout << "成功建立连接" << endl 108 | << "客户端IP: " << clnt_addr.sin_addr.s_addr << endl 109 | << "客户端端口号: " << ntohs(clnt_addr.sin_port) << endl; 110 | // 新建服务线程 111 | pthread_t tid; 112 | pthread_create(&tid, NULL, &handleRequest, (void *) (&clnt_sock)); 113 | } 114 | printSplitLine(); 115 | } 116 | 117 | return 0; 118 | } 119 | 120 | int main() { 121 | Server *myServer = new Server(); 122 | 123 | myServer->startAcceptClnt(); 124 | return 0; 125 | } 126 | -------------------------------------------------------------------------------- /Lab8/Project/code/utils.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Created by Yile Liu on 2022/12/10. 3 | // 4 | 5 | #include "head.h" 6 | 7 | using namespace std; 8 | 9 | void printSplitLine() { 10 | cout << "\n**********************\n"; 11 | } 12 | 13 | /** 14 | * 15 | * @param method 16 | * @param uri 17 | * @param version 18 | * @param header 19 | * @param fd 20 | * 21 | * @attention 22 | * Content will be read according to the Content-Length header. 23 | * Do not check the border of params. 24 | */ 25 | void parseHttpFromSock(char *method, char *uri, char *version, char *header, char *content, int fd) { 26 | char buffer[BUFFER_SIZE] = {}; 27 | char ch; 28 | int res = -1, state = 0, content_len = 0; 29 | char *content_len_ptr = nullptr; 30 | 31 | // 获取并解析header 32 | // state==0: first line includes method, request-uri, http-version 33 | // state==1: header 34 | // state==2: blank line after header 35 | for (int n = 0; n < BUFFER_SIZE; n++) { 36 | res = read(fd, &ch, 1); 37 | if (res > 0) { 38 | buffer[n] = ch; 39 | if (ch == '\n') { 40 | if (state == 0) { 41 | sscanf(buffer, "%s %s %s", method, uri, version); 42 | memset(buffer, 0, BUFFER_SIZE); 43 | n = -1; 44 | state++; 45 | } else if (state == 1) { 46 | // header一行结束,如果这一行是Content-Length则要把后面的数字留下 47 | if (strstr(buffer, "Content-Length") != nullptr) { 48 | sscanf(buffer, "Content-Length: %d", &content_len); 49 | } 50 | // 保存此行头部,清空buffer 51 | strcat(header, buffer); 52 | memset(buffer, 0, BUFFER_SIZE); 53 | n = -1; 54 | state++; 55 | } else if (state == 2) { 56 | break; 57 | } 58 | } else { 59 | if (state == 2 && ch != '\r') { 60 | // 不是连续的两个换行,说明还没到content 61 | state--; 62 | } 63 | } 64 | } 65 | } 66 | // 获取content 67 | for (int i = 0; i < content_len; i++) { 68 | read(fd, &ch, 1); 69 | content[i] = ch; 70 | } 71 | } 72 | 73 | /** 74 | * 75 | * @param uri: file path 76 | * 77 | * @description 78 | * Add prefix "../files" to uri to translate it from request uri to actual file path on server. 79 | * The result will be copied back to param uri without checking the border. 80 | */ 81 | void translateFileName(char *uri) { 82 | char buffer[BUFFER_SIZE] = {}; 83 | ::strcpy(buffer, "../files"); 84 | ::strcat(buffer, uri); 85 | ::strcpy(uri, buffer); 86 | } 87 | 88 | /** 89 | * 90 | * @param fd 91 | * @param state_num 92 | * @param msg: available iff state_num is 200 93 | * 94 | * @description 95 | * Send http response to a socket with a certain state number. 96 | */ 97 | void clientSendMsg(int fd, char *state_num, char *msg) { 98 | char content[BUFFER_SIZE] = {}; 99 | char buff[BUFFER_SIZE] = {}; 100 | 101 | if (!::strcmp(state_num, "200")) { 102 | sprintf(content, "%s", msg); 103 | } 104 | 105 | sprintf(buff + ::strlen(buff), "HTTP/1.0 %s %s\r\n", state_num, msg); 106 | sprintf(buff + ::strlen(buff), "Content-type: text/html\r\n"); 107 | sprintf(buff + ::strlen(buff), "Content-length: %d\r\n\r\n", (int) strlen(content)); 108 | ::strcat(buff, content); 109 | printf("clientSendMsg:\n"); 110 | printf("%s", buff); 111 | printSplitLine(); 112 | 113 | write(fd, buff, ::strlen(buff)); 114 | } 115 | 116 | void get_filetype(char *file_name, char *file_type) { 117 | if (strstr(file_name, ".html")) 118 | strcpy(file_type, "text/html"); 119 | else if (strstr(file_name, ".jpg")) 120 | strcpy(file_type, "image/jpeg"); 121 | else 122 | strcpy(file_type, "text/plain"); 123 | } 124 | 125 | /** 126 | * 127 | * @param fd 128 | * @param uri 129 | * @param size 130 | * 131 | * @description 132 | * send http response to a socket with state 200 and the content of file corresponding to param uri. 133 | */ 134 | void clientSendFile(int fd, char *uri, off_t size) { 135 | char *mapped_fp, filetype[BUFFER_SIZE] = {}, buff[BUFFER_SIZE] = {}; 136 | 137 | /* Send response headers to client */ 138 | get_filetype(uri, filetype); 139 | sprintf(buff, "HTTP/1.0 200 OK\r\n"); 140 | sprintf(buff, "%sServer: A Web Server\r\n", buff); 141 | sprintf(buff, "%sConnection: close\r\n", buff); 142 | sprintf(buff, "%sContent-length: %lld\r\n", buff, size); 143 | sprintf(buff, "%sContent-type: %s\r\n\r\n", buff, filetype); 144 | 145 | write(fd, buff, ::strlen(buff)); 146 | printf("clientSendFile.header: \n"); 147 | printf("%s", buff); 148 | printSplitLine(); 149 | 150 | /* Send response body to client */ 151 | int file_fd = open(uri, O_RDONLY, 0); 152 | mapped_fp = (char *) mmap(nullptr, size, PROT_READ, MAP_PRIVATE, file_fd, 0); 153 | 154 | write(fd, mapped_fp, size); 155 | printf("clientSendFile.content: \n"); 156 | printf("%s", mapped_fp); 157 | printSplitLine(); 158 | 159 | munmap(mapped_fp, size); 160 | close(fd); 161 | } -------------------------------------------------------------------------------- /Lab8/Project/files/html/noimg.html: -------------------------------------------------------------------------------- 1 | 2 | Test 3 | 4 |

This is a test

5 |
6 | Login: 7 | Pass: 8 | 9 |
10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /Lab8/Project/files/html/test.html: -------------------------------------------------------------------------------- 1 | 2 | Test 3 | 4 |

This is a test

5 | 6 |
7 | Login: 8 | Pass: 9 | 10 |
11 | 12 | 13 | -------------------------------------------------------------------------------- /Lab8/Project/files/img/logo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/Lab8/Project/files/img/logo.jpg -------------------------------------------------------------------------------- /Lab8/Project/files/txt/test.txt: -------------------------------------------------------------------------------- 1 | 计算机网络 2022-2023秋冬 2 | Lab8 3 | 刘思锐 3200102708 4 | -------------------------------------------------------------------------------- /Lab8/Project/readme.md: -------------------------------------------------------------------------------- 1 | ### 项目内容 2 | 计算机网络 2022-2023秋冬 3 | 刘思锐 3200102708 4 | 5 | ### 编译命令 6 | ```shell 7 | cd code 8 | g++ server.cpp -o server 9 | ``` 10 | 11 | ### 运行命令 12 | ``` 13 | ./code/server 14 | ``` 15 | -------------------------------------------------------------------------------- /Lab8/实验报告 Lab8 刘思锐 3200102708.doc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/Lab8/实验报告 Lab8 刘思锐 3200102708.doc -------------------------------------------------------------------------------- /Lab8/实验报告 Lab8 刘思锐 3200102708.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/Lab8/实验报告 Lab8 刘思锐 3200102708.pdf -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ZJU_computer_network 2 | ZJU_computer_network 计算机网络 3 | 4 | 5 | 6 | 上这门课的时候正值课改,我应该是老版本的最后一届学生了,这个仓库里除了笔记其他东西对学弟学妹们的参考意义或许不大。 7 | -------------------------------------------------------------------------------- /参考资料/CCNA2.0中文版教材 .zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/参考资料/CCNA2.0中文版教材 .zip -------------------------------------------------------------------------------- /参考资料/Routersim2.1(路由器模拟软件).zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/参考资料/Routersim2.1(路由器模拟软件).zip -------------------------------------------------------------------------------- /参考资料/WinPcap_2_3.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/参考资料/WinPcap_2_3.exe -------------------------------------------------------------------------------- /参考资料/ethereal-setup-0.9.10a.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/参考资料/ethereal-setup-0.9.10a.exe -------------------------------------------------------------------------------- /参考资料/实验 DHCP-DNS-WWW 实验指导v1.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/参考资料/实验 DHCP-DNS-WWW 实验指导v1.zip -------------------------------------------------------------------------------- /参考资料/实验 Ethereal使用方法.doc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/参考资料/实验 Ethereal使用方法.doc -------------------------------------------------------------------------------- /参考资料/实验 socket-MFC(陆魁军).zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/参考资料/实验 socket-MFC(陆魁军).zip -------------------------------------------------------------------------------- /参考资料/实验 socket-Win32资料.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/参考资料/实验 socket-Win32资料.zip -------------------------------------------------------------------------------- /参考资料/实验 安装和配置FTP服务器和WEB服务器.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/参考资料/实验 安装和配置FTP服务器和WEB服务器.zip -------------------------------------------------------------------------------- /参考资料/实验 模拟软件RouterSim实验指导v3.rar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/参考资料/实验 模拟软件RouterSim实验指导v3.rar -------------------------------------------------------------------------------- /参考资料/实验 网络命令(陆魁军)v2.txt: -------------------------------------------------------------------------------- 1 | Arp.exe 2 | Ftp.exe 3 | Ipconfig.exe 4 | Netstat.exe 5 | Net.exe 6 | Netstat.exe 7 | Ping.exe 8 | Route.exe 9 | Telnet.exe 10 | Tracert.exe 11 | Winipcfg.exe 12 | Winpopup.exe 13 | nslookup.exe 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /参考资料/实验 网络命令使用说明v3.doc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/参考资料/实验 网络命令使用说明v3.doc -------------------------------------------------------------------------------- /第三方实验报告/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/第三方实验报告/.DS_Store -------------------------------------------------------------------------------- /第三方实验报告/1/Lab1.doc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/第三方实验报告/1/Lab1.doc -------------------------------------------------------------------------------- /第三方实验报告/1/dns.pcap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/第三方实验报告/1/dns.pcap -------------------------------------------------------------------------------- /第三方实验报告/1/http.pcap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/第三方实验报告/1/http.pcap -------------------------------------------------------------------------------- /第三方实验报告/1/ping.pcap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/第三方实验报告/1/ping.pcap -------------------------------------------------------------------------------- /第三方实验报告/1/tracert.pcap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/第三方实验报告/1/tracert.pcap -------------------------------------------------------------------------------- /第三方实验报告/2/lab2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/第三方实验报告/2/lab2.pdf -------------------------------------------------------------------------------- /第三方实验报告/3/R1.txt: -------------------------------------------------------------------------------- 1 | R1#show running-config 2 | Building configuration... 3 | 4 | Current configuration : 1828 bytes 5 | ! 6 | version 12.4 7 | service timestamps debug datetime msec 8 | service timestamps log datetime msec 9 | no service password-encryption 10 | ! 11 | hostname R1 12 | ! 13 | boot-start-marker 14 | boot-end-marker 15 | ! 16 | ! 17 | no aaa new-model 18 | memory-size iomem 5 19 | no ip icmp rate-limit unreachable 20 | ip cef 21 | ! 22 | ! 23 | ! 24 | ! 25 | no ip domain lookup 26 | ip auth-proxy max-nodata-conns 3 27 | ip admission max-nodata-conns 3 28 | ! 29 | ! 30 | ! 31 | ! 32 | ! 33 | ! 34 | ! 35 | ! 36 | ! 37 | ! 38 | ! 39 | ! 40 | ! 41 | ! 42 | ! 43 | ! 44 | ! 45 | ! 46 | ! 47 | ip tcp synwait-time 5 48 | ! 49 | ! 50 | ! 51 | ! 52 | ! 53 | interface FastEthernet0/0 54 | no ip address 55 | duplex auto 56 | speed auto 57 | ! 58 | interface FastEthernet0/0.1 59 | encapsulation dot1Q 1 native 60 | ip address 192.168.1.2 255.255.255.0 61 | ! 62 | interface FastEthernet0/0.2 63 | encapsulation dot1Q 2 64 | ip address 192.168.2.2 255.255.255.0 65 | ! 66 | interface Serial0/0 67 | no ip address 68 | shutdown 69 | clock rate 2000000 70 | ! 71 | interface FastEthernet0/1 72 | no ip address 73 | shutdown 74 | duplex auto 75 | speed auto 76 | ! 77 | interface Serial0/1 78 | no ip address 79 | shutdown 80 | clock rate 2000000 81 | ! 82 | interface Serial0/2 83 | no ip address 84 | shutdown 85 | clock rate 2000000 86 | ! 87 | interface Serial0/3 88 | no ip address 89 | shutdown 90 | clock rate 2000000 91 | ! 92 | interface FastEthernet1/0 93 | shutdown 94 | ! 95 | interface FastEthernet1/1 96 | ! 97 | interface FastEthernet1/2 98 | ! 99 | interface FastEthernet1/3 100 | ! 101 | interface FastEthernet1/4 102 | ! 103 | interface FastEthernet1/5 104 | ! 105 | interface FastEthernet1/6 106 | ! 107 | interface FastEthernet1/7 108 | ! 109 | interface FastEthernet1/8 110 | ! 111 | interface FastEthernet1/9 112 | ! 113 | interface FastEthernet1/10 114 | ! 115 | interface FastEthernet1/11 116 | ! 117 | interface FastEthernet1/12 118 | ! 119 | interface FastEthernet1/13 120 | ! 121 | interface FastEthernet1/14 122 | ! 123 | interface FastEthernet1/15 124 | ! 125 | interface Vlan1 126 | no ip address 127 | ! 128 | ! 129 | ip forward-protocol nd 130 | ! 131 | ! 132 | no ip http server 133 | no ip http secure-server 134 | ! 135 | no cdp log mismatch duplex 136 | ! 137 | ! 138 | ! 139 | control-plane 140 | ! 141 | ! 142 | ! 143 | ! 144 | ! 145 | ! 146 | ! 147 | ! 148 | ! 149 | ! 150 | line con 0 151 | exec-timeout 0 0 152 | privilege level 15 153 | logging synchronous 154 | line aux 0 155 | exec-timeout 0 0 156 | privilege level 15 157 | logging synchronous 158 | line vty 0 4 159 | login 160 | ! 161 | ! 162 | end -------------------------------------------------------------------------------- /第三方实验报告/3/S2.txt: -------------------------------------------------------------------------------- 1 | SW1#show running-config 2 | Building configuration... 3 | 4 | Current configuration : 1768 bytes 5 | ! 6 | version 12.4 7 | service timestamps debug datetime msec 8 | service timestamps log datetime msec 9 | no service password-encryption 10 | ! 11 | hostname SW1 12 | ! 13 | boot-start-marker 14 | boot-end-marker 15 | ! 16 | ! 17 | no aaa new-model 18 | memory-size iomem 5 19 | no ip icmp rate-limit unreachable 20 | ip cef 21 | ! 22 | ! 23 | ! 24 | ! 25 | no ip domain lookup 26 | ip auth-proxy max-nodata-conns 3 27 | ip admission max-nodata-conns 3 28 | ! 29 | ! 30 | ! 31 | ! 32 | ! 33 | ! 34 | ! 35 | ! 36 | ! 37 | ! 38 | ! 39 | ! 40 | ! 41 | ! 42 | ! 43 | ! 44 | ! 45 | ! 46 | ! 47 | ip tcp synwait-time 5 48 | ! 49 | ! 50 | ! 51 | ! 52 | ! 53 | interface FastEthernet0/0 54 | no ip address 55 | shutdown 56 | duplex auto 57 | speed auto 58 | ! 59 | interface Serial0/0 60 | no ip address 61 | shutdown 62 | clock rate 2000000 63 | ! 64 | interface FastEthernet0/1 65 | no ip address 66 | shutdown 67 | duplex auto 68 | speed auto 69 | ! 70 | interface Serial0/1 71 | no ip address 72 | shutdown 73 | clock rate 2000000 74 | ! 75 | interface Serial0/2 76 | no ip address 77 | shutdown 78 | clock rate 2000000 79 | ! 80 | interface Serial0/3 81 | no ip address 82 | shutdown 83 | clock rate 2000000 84 | ! 85 | interface FastEthernet1/0 86 | ! 87 | interface FastEthernet1/1 88 | switchport access vlan 2 89 | ! 90 | interface FastEthernet1/2 91 | switchport mode trunk 92 | ! 93 | interface FastEthernet1/3 94 | ! 95 | interface FastEthernet1/4 96 | ! 97 | interface FastEthernet1/5 98 | ! 99 | interface FastEthernet1/6 100 | ! 101 | interface FastEthernet1/7 102 | ! 103 | interface FastEthernet1/8 104 | ! 105 | interface FastEthernet1/9 106 | ! 107 | interface FastEthernet1/10 108 | ! 109 | interface FastEthernet1/11 110 | ! 111 | interface FastEthernet1/12 112 | ! 113 | interface FastEthernet1/13 114 | ! 115 | interface FastEthernet1/14 116 | ! 117 | interface FastEthernet1/15 118 | ! 119 | interface Vlan1 120 | ip address 192.168.1.3 255.255.255.0 121 | ! 122 | interface Vlan2 123 | ip address 192.168.2.3 255.255.255.0 124 | ! 125 | ! 126 | ip forward-protocol nd 127 | ! 128 | ! 129 | no ip http server 130 | no ip http secure-server 131 | ! 132 | no cdp log mismatch duplex 133 | ! 134 | ! 135 | ! 136 | control-plane 137 | ! 138 | ! 139 | ! 140 | ! 141 | ! 142 | ! 143 | ! 144 | ! 145 | ! 146 | ! 147 | line con 0 148 | exec-timeout 0 0 149 | privilege level 15 150 | logging synchronous 151 | line aux 0 152 | exec-timeout 0 0 153 | privilege level 15 154 | logging synchronous 155 | line vty 0 4 156 | login 157 | ! 158 | ! 159 | end -------------------------------------------------------------------------------- /第三方实验报告/3/lab3.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/第三方实验报告/3/lab3.pdf -------------------------------------------------------------------------------- /第三方实验报告/4/R1.txt: -------------------------------------------------------------------------------- 1 | R1#show running-config 2 | Building configuration... 3 | 4 | Current configuration : 2299 bytes 5 | ! 6 | version 12.4 7 | service timestamps debug datetime msec 8 | service timestamps log datetime msec 9 | no service password-encryption 10 | ! 11 | hostname R1 12 | ! 13 | boot-start-marker 14 | boot-end-marker 15 | ! 16 | ! 17 | no aaa new-model 18 | memory-size iomem 5 19 | no ip icmp rate-limit unreachable 20 | ip cef 21 | ! 22 | ! 23 | ! 24 | ! 25 | no ip domain lookup 26 | ip auth-proxy max-nodata-conns 3 27 | ip admission max-nodata-conns 3 28 | ! 29 | ! 30 | ! 31 | ! 32 | ! 33 | ! 34 | ! 35 | ! 36 | ! 37 | ! 38 | ! 39 | ! 40 | ! 41 | ! 42 | ! 43 | ! 44 | ! 45 | ! 46 | ! 47 | ip tcp synwait-time 5 48 | ! 49 | ! 50 | ! 51 | ! 52 | ! 53 | interface FastEthernet0/0 54 | ip address 10.0.0.1 255.255.0.0 55 | duplex auto 56 | speed auto 57 | ! 58 | interface Serial0/0 59 | ip address 192.168.12.1 255.255.255.0 60 | clock rate 2000000 61 | ! 62 | interface FastEthernet0/1 63 | ip address 192.168.13.1 255.255.255.0 64 | duplex auto 65 | speed auto 66 | ! 67 | interface Serial0/1 68 | no ip address 69 | shutdown 70 | clock rate 2000000 71 | ! 72 | interface Serial0/2 73 | no ip address 74 | shutdown 75 | clock rate 2000000 76 | ! 77 | interface Serial0/3 78 | no ip address 79 | shutdown 80 | clock rate 2000000 81 | ! 82 | interface FastEthernet1/0 83 | ip address 10.1.0.1 255.255.0.0 84 | duplex auto 85 | speed auto 86 | ! 87 | interface FastEthernet2/0 88 | no ip address 89 | shutdown 90 | duplex auto 91 | speed auto 92 | ! 93 | interface FastEthernet3/0 94 | no ip address 95 | shutdown 96 | duplex auto 97 | speed auto 98 | ! 99 | interface FastEthernet4/0 100 | ! 101 | interface FastEthernet4/1 102 | ! 103 | interface FastEthernet4/2 104 | ! 105 | interface FastEthernet4/3 106 | ! 107 | interface FastEthernet4/4 108 | ! 109 | interface FastEthernet4/5 110 | ! 111 | interface FastEthernet4/6 112 | ! 113 | interface FastEthernet4/7 114 | ! 115 | interface FastEthernet4/8 116 | ! 117 | interface FastEthernet4/9 118 | ! 119 | interface FastEthernet4/10 120 | ! 121 | interface FastEthernet4/11 122 | ! 123 | interface FastEthernet4/12 124 | ! 125 | interface FastEthernet4/13 126 | ! 127 | interface FastEthernet4/14 128 | ! 129 | interface FastEthernet4/15 130 | ! 131 | interface Vlan1 132 | no ip address 133 | ! 134 | ! 135 | ip forward-protocol nd 136 | ip route 0.0.0.0 0.0.0.0 192.168.12.2 137 | ip route 172.16.0.0 255.255.255.0 192.168.13.3 138 | ip route 172.16.0.0 255.255.255.0 192.168.12.2 30 139 | ip route 172.16.1.0 255.255.255.0 192.168.13.3 140 | ip route 172.16.1.0 255.255.255.0 192.168.12.2 30 141 | ip route 172.16.41.0 255.255.255.0 192.168.12.2 142 | ip route 192.168.24.4 255.255.255.255 192.168.12.2 143 | ip route 192.168.35.5 255.255.255.255 192.168.13.3 144 | ! 145 | ! 146 | no ip http server 147 | no ip http secure-server 148 | ! 149 | no cdp log mismatch duplex 150 | ! 151 | ! 152 | ! 153 | control-plane 154 | ! 155 | ! 156 | ! 157 | ! 158 | ! 159 | ! 160 | ! 161 | ! 162 | ! 163 | ! 164 | line con 0 165 | exec-timeout 0 0 166 | privilege level 15 167 | logging synchronous 168 | line aux 0 169 | exec-timeout 0 0 170 | privilege level 15 171 | logging synchronous 172 | line vty 0 4 173 | login 174 | ! 175 | ! 176 | end -------------------------------------------------------------------------------- /第三方实验报告/4/R2.txt: -------------------------------------------------------------------------------- 1 | R2#show running-config 2 | Building configuration... 3 | 4 | Current configuration : 2405 bytes 5 | ! 6 | version 12.4 7 | service timestamps debug datetime msec 8 | service timestamps log datetime msec 9 | no service password-encryption 10 | ! 11 | hostname R2 12 | ! 13 | boot-start-marker 14 | boot-end-marker 15 | ! 16 | ! 17 | no aaa new-model 18 | memory-size iomem 5 19 | no ip icmp rate-limit unreachable 20 | ip cef 21 | ! 22 | ! 23 | ! 24 | ! 25 | no ip domain lookup 26 | ip auth-proxy max-nodata-conns 3 27 | ip admission max-nodata-conns 3 28 | ! 29 | ! 30 | ! 31 | ! 32 | ! 33 | ! 34 | ! 35 | ! 36 | ! 37 | ! 38 | ! 39 | ! 40 | ! 41 | ! 42 | ! 43 | ! 44 | ! 45 | username R4 password 0 1234 46 | ! 47 | ! 48 | ip tcp synwait-time 5 49 | ! 50 | ! 51 | ! 52 | ! 53 | ! 54 | interface FastEthernet0/0 55 | ip address dhcp 56 | ip nat outside 57 | ip virtual-reassembly 58 | duplex auto 59 | speed auto 60 | ! 61 | interface Serial0/0 62 | ip address 192.168.12.2 255.255.255.0 63 | ip nat inside 64 | ip virtual-reassembly 65 | clock rate 128000 66 | ! 67 | interface FastEthernet0/1 68 | no ip address 69 | shutdown 70 | duplex auto 71 | speed auto 72 | ! 73 | interface Serial0/1 74 | ip address 192.168.24.2 255.255.255.0 75 | encapsulation ppp 76 | clock rate 2000000 77 | ! 78 | interface Serial0/2 79 | no ip address 80 | shutdown 81 | clock rate 2000000 82 | ! 83 | interface Serial0/3 84 | no ip address 85 | shutdown 86 | clock rate 2000000 87 | ! 88 | interface FastEthernet1/0 89 | no ip address 90 | shutdown 91 | duplex auto 92 | speed auto 93 | ! 94 | interface FastEthernet2/0 95 | no ip address 96 | shutdown 97 | duplex auto 98 | speed auto 99 | ! 100 | interface FastEthernet3/0 101 | no ip address 102 | shutdown 103 | duplex auto 104 | speed auto 105 | ! 106 | interface FastEthernet4/0 107 | ! 108 | interface FastEthernet4/1 109 | ! 110 | interface FastEthernet4/2 111 | ! 112 | interface FastEthernet4/3 113 | ! 114 | interface FastEthernet4/4 115 | ! 116 | interface FastEthernet4/5 117 | ! 118 | interface FastEthernet4/6 119 | ! 120 | interface FastEthernet4/7 121 | ! 122 | interface FastEthernet4/8 123 | ! 124 | interface FastEthernet4/9 125 | ! 126 | interface FastEthernet4/10 127 | ! 128 | interface FastEthernet4/11 129 | ! 130 | interface FastEthernet4/12 131 | ! 132 | interface FastEthernet4/13 133 | ! 134 | interface FastEthernet4/14 135 | ! 136 | interface FastEthernet4/15 137 | ! 138 | interface Vlan1 139 | no ip address 140 | ! 141 | ! 142 | ip forward-protocol nd 143 | ip route 0.0.0.0 0.0.0.0 172.16.41.255 144 | ip route 10.0.0.0 255.255.0.0 192.168.12.1 30 145 | ip route 10.1.0.0 255.255.0.0 192.168.12.1 30 146 | ip route 172.16.0.0 255.255.255.0 192.168.24.4 30 147 | ip route 172.16.1.0 255.255.255.0 192.168.24.4 30 148 | ip route 192.168.13.1 255.255.255.255 192.168.12.1 149 | ! 150 | ! 151 | no ip http server 152 | no ip http secure-server 153 | ip nat inside source list 2 interface FastEthernet0/0 overload 154 | ! 155 | access-list 2 permit 10.0.0.0 0.255.255.255 156 | no cdp log mismatch duplex 157 | ! 158 | ! 159 | ! 160 | control-plane 161 | ! 162 | ! 163 | ! 164 | ! 165 | ! 166 | ! 167 | ! 168 | ! 169 | ! 170 | ! 171 | line con 0 172 | exec-timeout 0 0 173 | privilege level 15 174 | logging synchronous 175 | line aux 0 176 | exec-timeout 0 0 177 | privilege level 15 178 | logging synchronous 179 | line vty 0 4 180 | login 181 | ! 182 | ! 183 | end -------------------------------------------------------------------------------- /第三方实验报告/4/R3.txt: -------------------------------------------------------------------------------- 1 | R3#show running-config 2 | Building configuration... 3 | 4 | Current configuration : 2095 bytes 5 | ! 6 | version 12.4 7 | service timestamps debug datetime msec 8 | service timestamps log datetime msec 9 | no service password-encryption 10 | ! 11 | hostname R3 12 | ! 13 | boot-start-marker 14 | boot-end-marker 15 | ! 16 | ! 17 | no aaa new-model 18 | memory-size iomem 5 19 | no ip icmp rate-limit unreachable 20 | ip cef 21 | ! 22 | ! 23 | ! 24 | ! 25 | no ip domain lookup 26 | ip auth-proxy max-nodata-conns 3 27 | ip admission max-nodata-conns 3 28 | ! 29 | ! 30 | ! 31 | ! 32 | ! 33 | ! 34 | ! 35 | ! 36 | ! 37 | ! 38 | ! 39 | ! 40 | ! 41 | ! 42 | ! 43 | ! 44 | ! 45 | ! 46 | ! 47 | ip tcp synwait-time 5 48 | ! 49 | ! 50 | ! 51 | ! 52 | ! 53 | interface FastEthernet0/0 54 | ip address 192.168.35.3 255.255.255.0 55 | duplex auto 56 | speed auto 57 | ! 58 | interface Serial0/0 59 | no ip address 60 | shutdown 61 | clock rate 2000000 62 | ! 63 | interface FastEthernet0/1 64 | ip address 192.168.13.3 255.255.255.0 65 | duplex auto 66 | speed auto 67 | ! 68 | interface Serial0/1 69 | no ip address 70 | shutdown 71 | clock rate 2000000 72 | ! 73 | interface Serial0/2 74 | no ip address 75 | shutdown 76 | clock rate 2000000 77 | ! 78 | interface Serial0/3 79 | no ip address 80 | shutdown 81 | clock rate 2000000 82 | ! 83 | interface FastEthernet1/0 84 | ip address 192.168.34.3 255.255.255.0 85 | duplex auto 86 | speed auto 87 | ! 88 | interface FastEthernet2/0 89 | no ip address 90 | shutdown 91 | duplex auto 92 | speed auto 93 | ! 94 | interface FastEthernet3/0 95 | no ip address 96 | shutdown 97 | duplex auto 98 | speed auto 99 | ! 100 | interface FastEthernet4/0 101 | ! 102 | interface FastEthernet4/1 103 | ! 104 | interface FastEthernet4/2 105 | ! 106 | interface FastEthernet4/3 107 | ! 108 | interface FastEthernet4/4 109 | ! 110 | interface FastEthernet4/5 111 | ! 112 | interface FastEthernet4/6 113 | ! 114 | interface FastEthernet4/7 115 | ! 116 | interface FastEthernet4/8 117 | ! 118 | interface FastEthernet4/9 119 | ! 120 | interface FastEthernet4/10 121 | ! 122 | interface FastEthernet4/11 123 | ! 124 | interface FastEthernet4/12 125 | ! 126 | interface FastEthernet4/13 127 | ! 128 | interface FastEthernet4/14 129 | ! 130 | interface FastEthernet4/15 131 | ! 132 | interface Vlan1 133 | no ip address 134 | ! 135 | ! 136 | ip forward-protocol nd 137 | ip route 10.0.0.0 255.255.0.0 192.168.13.1 138 | ip route 10.1.0.0 255.255.0.0 192.168.13.1 139 | ip route 172.16.0.0 255.255.255.0 192.168.34.4 140 | ip route 172.16.1.0 255.255.255.0 192.168.34.4 141 | ! 142 | ! 143 | no ip http server 144 | no ip http secure-server 145 | ! 146 | no cdp log mismatch duplex 147 | ! 148 | ! 149 | ! 150 | control-plane 151 | ! 152 | ! 153 | ! 154 | ! 155 | ! 156 | ! 157 | ! 158 | ! 159 | ! 160 | ! 161 | line con 0 162 | exec-timeout 0 0 163 | privilege level 15 164 | logging synchronous 165 | line aux 0 166 | exec-timeout 0 0 167 | privilege level 15 168 | logging synchronous 169 | line vty 0 4 170 | login 171 | ! 172 | ! 173 | end -------------------------------------------------------------------------------- /第三方实验报告/4/R4.txt: -------------------------------------------------------------------------------- 1 | R4#show running-config 2 | Building configuration... 3 | 4 | Current configuration : 2574 bytes 5 | ! 6 | version 12.4 7 | service timestamps debug datetime msec 8 | service timestamps log datetime msec 9 | no service password-encryption 10 | ! 11 | hostname R4 12 | ! 13 | boot-start-marker 14 | boot-end-marker 15 | ! 16 | ! 17 | no aaa new-model 18 | memory-size iomem 5 19 | no ip icmp rate-limit unreachable 20 | ip cef 21 | ! 22 | ! 23 | no ip dhcp use vrf connected 24 | ! 25 | ip dhcp pool 1 26 | network 172.16.0.0 255.255.255.0 27 | default-router 172.16.0.1 28 | ! 29 | ip dhcp pool 2 30 | network 172.16.1.0 255.255.255.0 31 | default-router 172.16.1.1 32 | ! 33 | ! 34 | no ip domain lookup 35 | ip auth-proxy max-nodata-conns 3 36 | ip admission max-nodata-conns 3 37 | ! 38 | ! 39 | ! 40 | ! 41 | ! 42 | ! 43 | ! 44 | ! 45 | ! 46 | ! 47 | ! 48 | ! 49 | ! 50 | ! 51 | ! 52 | ! 53 | ! 54 | username R2 password 0 1234 55 | ! 56 | ! 57 | ip tcp synwait-time 5 58 | ! 59 | ! 60 | ! 61 | ! 62 | ! 63 | interface FastEthernet0/0 64 | ip address 172.16.0.1 255.255.255.0 65 | duplex auto 66 | speed auto 67 | ! 68 | interface Serial0/0 69 | ip address 192.168.24.4 255.255.255.0 70 | encapsulation ppp 71 | clock rate 2000000 72 | ppp authentication chap 73 | ! 74 | interface FastEthernet0/1 75 | ip address 172.16.1.1 255.255.255.0 76 | duplex auto 77 | speed auto 78 | ! 79 | interface Serial0/1 80 | no ip address 81 | shutdown 82 | clock rate 2000000 83 | ! 84 | interface Serial0/2 85 | no ip address 86 | shutdown 87 | clock rate 2000000 88 | ! 89 | interface Serial0/3 90 | no ip address 91 | shutdown 92 | clock rate 2000000 93 | ! 94 | interface FastEthernet1/0 95 | ip address 192.168.34.4 255.255.255.0 96 | duplex auto 97 | speed auto 98 | ! 99 | interface FastEthernet2/0 100 | no ip address 101 | shutdown 102 | duplex auto 103 | speed auto 104 | ! 105 | interface FastEthernet3/0 106 | no ip address 107 | shutdown 108 | duplex auto 109 | speed auto 110 | ! 111 | interface FastEthernet4/0 112 | ! 113 | interface FastEthernet4/1 114 | ! 115 | interface FastEthernet4/2 116 | ! 117 | interface FastEthernet4/3 118 | ! 119 | interface FastEthernet4/4 120 | ! 121 | interface FastEthernet4/5 122 | ! 123 | interface FastEthernet4/6 124 | ! 125 | interface FastEthernet4/7 126 | ! 127 | interface FastEthernet4/8 128 | ! 129 | interface FastEthernet4/9 130 | ! 131 | interface FastEthernet4/10 132 | ! 133 | interface FastEthernet4/11 134 | ! 135 | interface FastEthernet4/12 136 | ! 137 | interface FastEthernet4/13 138 | ! 139 | interface FastEthernet4/14 140 | ! 141 | interface FastEthernet4/15 142 | ! 143 | interface Vlan1 144 | no ip address 145 | ! 146 | ! 147 | ip forward-protocol nd 148 | ip route 10.0.0.0 255.255.0.0 192.168.34.3 149 | ip route 10.0.0.0 255.255.0.0 192.168.24.2 30 150 | ip route 10.1.0.0 255.255.0.0 192.168.34.3 151 | ip route 10.1.0.0 255.255.0.0 192.168.24.2 30 152 | ip route 192.168.12.1 255.255.255.255 192.168.24.2 153 | ip route 192.168.13.1 255.255.255.255 192.168.24.2 154 | ip route 192.168.35.5 255.255.255.255 192.168.13.3 155 | ip route 192.168.35.5 255.255.255.255 192.168.34.3 156 | ! 157 | ! 158 | no ip http server 159 | no ip http secure-server 160 | ! 161 | no cdp log mismatch duplex 162 | ! 163 | ! 164 | ! 165 | control-plane 166 | ! 167 | ! 168 | ! 169 | ! 170 | ! 171 | ! 172 | ! 173 | ! 174 | ! 175 | ! 176 | line con 0 177 | exec-timeout 0 0 178 | privilege level 15 179 | logging synchronous 180 | line aux 0 181 | exec-timeout 0 0 182 | privilege level 15 183 | logging synchronous 184 | line vty 0 4 185 | login 186 | ! 187 | ! 188 | end -------------------------------------------------------------------------------- /第三方实验报告/4/R5.txt: -------------------------------------------------------------------------------- 1 | R5#show running-config 2 | Building configuration... 3 | 4 | Current configuration : 2263 bytes 5 | ! 6 | version 12.4 7 | service timestamps debug datetime msec 8 | service timestamps log datetime msec 9 | no service password-encryption 10 | ! 11 | hostname R5 12 | ! 13 | boot-start-marker 14 | boot-end-marker 15 | ! 16 | ! 17 | no aaa new-model 18 | memory-size iomem 5 19 | no ip icmp rate-limit unreachable 20 | ip cef 21 | ! 22 | ! 23 | ! 24 | ! 25 | no ip domain lookup 26 | ip auth-proxy max-nodata-conns 3 27 | ip admission max-nodata-conns 3 28 | ! 29 | ! 30 | ! 31 | ! 32 | ! 33 | ! 34 | ! 35 | ! 36 | ! 37 | ! 38 | ! 39 | ! 40 | ! 41 | ! 42 | ! 43 | ! 44 | ! 45 | ! 46 | ! 47 | ip tcp synwait-time 5 48 | ! 49 | ! 50 | ! 51 | ! 52 | ! 53 | interface FastEthernet0/0 54 | ip address 192.168.35.5 255.255.255.0 55 | ip nat outside 56 | ip virtual-reassembly 57 | duplex auto 58 | speed auto 59 | ! 60 | interface Serial0/0 61 | no ip address 62 | shutdown 63 | clock rate 2000000 64 | ! 65 | interface FastEthernet0/1 66 | ip address 192.168.0.1 255.255.255.0 67 | ip nat inside 68 | ip virtual-reassembly 69 | duplex auto 70 | speed auto 71 | ! 72 | interface Serial0/1 73 | no ip address 74 | shutdown 75 | clock rate 2000000 76 | ! 77 | interface Serial0/2 78 | no ip address 79 | shutdown 80 | clock rate 2000000 81 | ! 82 | interface Serial0/3 83 | no ip address 84 | shutdown 85 | clock rate 2000000 86 | ! 87 | interface FastEthernet1/0 88 | no ip address 89 | shutdown 90 | duplex auto 91 | speed auto 92 | ! 93 | interface FastEthernet2/0 94 | no ip address 95 | shutdown 96 | duplex auto 97 | speed auto 98 | ! 99 | interface FastEthernet3/0 100 | no ip address 101 | shutdown 102 | duplex auto 103 | speed auto 104 | ! 105 | interface FastEthernet4/0 106 | ! 107 | interface FastEthernet4/1 108 | ! 109 | interface FastEthernet4/2 110 | ! 111 | interface FastEthernet4/3 112 | ! 113 | interface FastEthernet4/4 114 | ! 115 | interface FastEthernet4/5 116 | ! 117 | interface FastEthernet4/6 118 | ! 119 | interface FastEthernet4/7 120 | ! 121 | interface FastEthernet4/8 122 | ! 123 | interface FastEthernet4/9 124 | ! 125 | interface FastEthernet4/10 126 | ! 127 | interface FastEthernet4/11 128 | ! 129 | interface FastEthernet4/12 130 | ! 131 | interface FastEthernet4/13 132 | ! 133 | interface FastEthernet4/14 134 | ! 135 | interface FastEthernet4/15 136 | ! 137 | interface Vlan1 138 | no ip address 139 | ! 140 | ! 141 | ip forward-protocol nd 142 | ip route 10.0.0.0 255.255.0.0 192.168.35.3 143 | ip route 10.1.0.0 255.255.0.0 192.168.35.3 144 | ip route 172.16.0.0 255.255.255.0 192.168.35.3 145 | ip route 172.16.1.0 255.255.255.0 192.168.35.3 146 | ! 147 | ! 148 | no ip http server 149 | no ip http secure-server 150 | ip nat inside source list 1 interface FastEthernet0/0 overload 151 | ! 152 | access-list 1 permit 192.168.0.0 0.0.0.255 153 | no cdp log mismatch duplex 154 | ! 155 | ! 156 | ! 157 | control-plane 158 | ! 159 | ! 160 | ! 161 | ! 162 | ! 163 | ! 164 | ! 165 | ! 166 | ! 167 | ! 168 | line con 0 169 | exec-timeout 0 0 170 | privilege level 15 171 | logging synchronous 172 | line aux 0 173 | exec-timeout 0 0 174 | privilege level 15 175 | logging synchronous 176 | line vty 0 4 177 | login 178 | ! 179 | ! 180 | end -------------------------------------------------------------------------------- /第三方实验报告/4/lab4.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/第三方实验报告/4/lab4.pdf -------------------------------------------------------------------------------- /第三方实验报告/5/R1.txt: -------------------------------------------------------------------------------- 1 | Building configuration... 2 | 3 | Current configuration : 2033 bytes 4 | ! 5 | version 12.4 6 | service timestamps debug datetime msec 7 | service timestamps log datetime msec 8 | no service password-encryption 9 | ! 10 | hostname R1 11 | ! 12 | boot-start-marker 13 | boot-end-marker 14 | ! 15 | ! 16 | no aaa new-model 17 | memory-size iomem 5 18 | no ip icmp rate-limit unreachable 19 | ip cef 20 | ! 21 | ! 22 | ! 23 | ! 24 | no ip domain lookup 25 | ip auth-proxy max-nodata-conns 3 26 | ip admission max-nodata-conns 3 27 | ! 28 | ! 29 | ! 30 | ! 31 | ! 32 | ! 33 | ! 34 | ! 35 | ! 36 | ! 37 | ! 38 | ! 39 | ! 40 | ! 41 | ! 42 | ! 43 | ! 44 | ! 45 | ! 46 | ip tcp synwait-time 5 47 | ! 48 | ! 49 | ! 50 | ! 51 | ! 52 | interface FastEthernet0/0 53 | ip address 10.0.0.1 255.255.255.0 54 | duplex auto 55 | speed auto 56 | ! 57 | interface Serial0/0 58 | ip address 10.0.123.241 255.255.255.252 59 | clock rate 128000 60 | ! 61 | interface FastEthernet0/1 62 | ip address 10.0.123.245 255.255.255.252 63 | duplex auto 64 | speed auto 65 | ! 66 | interface Serial0/1 67 | no ip address 68 | shutdown 69 | clock rate 2000000 70 | ! 71 | interface Serial0/2 72 | no ip address 73 | shutdown 74 | clock rate 2000000 75 | ! 76 | interface Serial0/3 77 | no ip address 78 | shutdown 79 | clock rate 2000000 80 | ! 81 | interface FastEthernet1/0 82 | no ip address 83 | shutdown 84 | duplex auto 85 | speed auto 86 | ! 87 | interface FastEthernet2/0 88 | no ip address 89 | shutdown 90 | duplex auto 91 | speed auto 92 | ! 93 | interface FastEthernet3/0 94 | no ip address 95 | shutdown 96 | duplex auto 97 | speed auto 98 | ! 99 | interface FastEthernet4/0 100 | ! 101 | interface FastEthernet4/1 102 | ! 103 | interface FastEthernet4/2 104 | ! 105 | interface FastEthernet4/3 106 | ! 107 | interface FastEthernet4/4 108 | ! 109 | interface FastEthernet4/5 110 | ! 111 | interface FastEthernet4/6 112 | ! 113 | interface FastEthernet4/7 114 | ! 115 | interface FastEthernet4/8 116 | ! 117 | interface FastEthernet4/9 118 | ! 119 | interface FastEthernet4/10 120 | ! 121 | interface FastEthernet4/11 122 | ! 123 | interface FastEthernet4/12 124 | ! 125 | interface FastEthernet4/13 126 | ! 127 | interface FastEthernet4/14 128 | ! 129 | interface FastEthernet4/15 130 | ! 131 | interface Vlan1 132 | no ip address 133 | ! 134 | ! 135 | router ospf 46 136 | log-adjacency-changes 137 | network 10.0.0.0 0.0.255.255 area 0 138 | ! 139 | router rip 140 | version 2 141 | network 10.0.0.0 142 | ! 143 | ip forward-protocol nd 144 | ! 145 | ! 146 | no ip http server 147 | no ip http secure-server 148 | ! 149 | no cdp log mismatch duplex 150 | ! 151 | ! 152 | ! 153 | control-plane 154 | ! 155 | ! 156 | ! 157 | ! 158 | ! 159 | ! 160 | ! 161 | ! 162 | ! 163 | ! 164 | line con 0 165 | exec-timeout 0 0 166 | privilege level 15 167 | logging synchronous 168 | line aux 0 169 | exec-timeout 0 0 170 | privilege level 15 171 | logging synchronous 172 | line vty 0 4 173 | login 174 | ! 175 | ! 176 | end -------------------------------------------------------------------------------- /第三方实验报告/5/R10.txt: -------------------------------------------------------------------------------- 1 | Building configuration... 2 | 3 | Current configuration : 2032 bytes 4 | ! 5 | version 12.4 6 | service timestamps debug datetime msec 7 | service timestamps log datetime msec 8 | no service password-encryption 9 | ! 10 | hostname R10 11 | ! 12 | boot-start-marker 13 | boot-end-marker 14 | ! 15 | ! 16 | no aaa new-model 17 | memory-size iomem 5 18 | no ip icmp rate-limit unreachable 19 | ip cef 20 | ! 21 | ! 22 | ! 23 | ! 24 | no ip domain lookup 25 | ip auth-proxy max-nodata-conns 3 26 | ip admission max-nodata-conns 3 27 | ! 28 | ! 29 | ! 30 | ! 31 | ! 32 | ! 33 | ! 34 | ! 35 | ! 36 | ! 37 | ! 38 | ! 39 | ! 40 | ! 41 | ! 42 | ! 43 | ! 44 | ! 45 | ! 46 | ip tcp synwait-time 5 47 | ! 48 | ! 49 | ! 50 | ! 51 | ! 52 | interface Loopback0 53 | ip address 10.3.100.1 255.255.255.252 54 | ! 55 | interface FastEthernet0/0 56 | ip address 10.3.1.1 255.255.255.0 57 | duplex auto 58 | speed auto 59 | ! 60 | interface Serial0/0 61 | no ip address 62 | shutdown 63 | clock rate 2000000 64 | ! 65 | interface FastEthernet0/1 66 | ip address 10.3.0.2 255.255.255.0 67 | duplex auto 68 | speed auto 69 | ! 70 | interface Serial0/1 71 | no ip address 72 | shutdown 73 | clock rate 2000000 74 | ! 75 | interface Serial0/2 76 | no ip address 77 | shutdown 78 | clock rate 2000000 79 | ! 80 | interface Serial0/3 81 | no ip address 82 | shutdown 83 | clock rate 2000000 84 | ! 85 | interface FastEthernet1/0 86 | no ip address 87 | shutdown 88 | duplex auto 89 | speed auto 90 | ! 91 | interface FastEthernet2/0 92 | no ip address 93 | shutdown 94 | duplex auto 95 | speed auto 96 | ! 97 | interface FastEthernet3/0 98 | no ip address 99 | shutdown 100 | duplex auto 101 | speed auto 102 | ! 103 | interface FastEthernet4/0 104 | ! 105 | interface FastEthernet4/1 106 | ! 107 | interface FastEthernet4/2 108 | ! 109 | interface FastEthernet4/3 110 | ! 111 | interface FastEthernet4/4 112 | ! 113 | interface FastEthernet4/5 114 | ! 115 | interface FastEthernet4/6 116 | ! 117 | interface FastEthernet4/7 118 | ! 119 | interface FastEthernet4/8 120 | ! 121 | interface FastEthernet4/9 122 | ! 123 | interface FastEthernet4/10 124 | ! 125 | interface FastEthernet4/11 126 | ! 127 | interface FastEthernet4/12 128 | ! 129 | interface FastEthernet4/13 130 | ! 131 | interface FastEthernet4/14 132 | ! 133 | interface FastEthernet4/15 134 | ! 135 | interface Vlan1 136 | no ip address 137 | ! 138 | ! 139 | router ospf 46 140 | log-adjacency-changes 141 | network 10.3.0.0 0.0.255.255 area 3 142 | ! 143 | ip forward-protocol nd 144 | ! 145 | ! 146 | no ip http server 147 | no ip http secure-server 148 | ! 149 | no cdp log mismatch duplex 150 | ! 151 | ! 152 | ! 153 | control-plane 154 | ! 155 | ! 156 | ! 157 | ! 158 | ! 159 | ! 160 | ! 161 | ! 162 | ! 163 | ! 164 | line con 0 165 | exec-timeout 0 0 166 | privilege level 15 167 | logging synchronous 168 | line aux 0 169 | exec-timeout 0 0 170 | privilege level 15 171 | logging synchronous 172 | line vty 0 4 173 | login 174 | ! 175 | ! 176 | end -------------------------------------------------------------------------------- /第三方实验报告/5/R2.txt: -------------------------------------------------------------------------------- 1 | Building configuration... 2 | 3 | Current configuration : 2094 bytes 4 | ! 5 | version 12.4 6 | service timestamps debug datetime msec 7 | service timestamps log datetime msec 8 | no service password-encryption 9 | ! 10 | hostname R2 11 | ! 12 | boot-start-marker 13 | boot-end-marker 14 | ! 15 | ! 16 | no aaa new-model 17 | memory-size iomem 5 18 | no ip icmp rate-limit unreachable 19 | ip cef 20 | ! 21 | ! 22 | ! 23 | ! 24 | no ip domain lookup 25 | ip auth-proxy max-nodata-conns 3 26 | ip admission max-nodata-conns 3 27 | ! 28 | ! 29 | ! 30 | ! 31 | ! 32 | ! 33 | ! 34 | ! 35 | ! 36 | ! 37 | ! 38 | ! 39 | ! 40 | ! 41 | ! 42 | ! 43 | ! 44 | ! 45 | ! 46 | ip tcp synwait-time 5 47 | ! 48 | ! 49 | ! 50 | ! 51 | ! 52 | interface Loopback0 53 | ip address 10.0.20.1 255.255.255.252 54 | ! 55 | interface FastEthernet0/0 56 | ip address 10.0.1.1 255.255.255.0 57 | duplex auto 58 | speed auto 59 | ! 60 | interface Serial0/0 61 | ip address 10.0.123.242 255.255.255.252 62 | clock rate 2000000 63 | ! 64 | interface FastEthernet0/1 65 | no ip address 66 | shutdown 67 | duplex auto 68 | speed auto 69 | ! 70 | interface Serial0/1 71 | no ip address 72 | shutdown 73 | clock rate 2000000 74 | ! 75 | interface Serial0/2 76 | no ip address 77 | shutdown 78 | clock rate 2000000 79 | ! 80 | interface Serial0/3 81 | no ip address 82 | shutdown 83 | clock rate 2000000 84 | ! 85 | interface FastEthernet1/0 86 | ip address 10.0.123.249 255.255.255.248 87 | duplex auto 88 | speed auto 89 | ! 90 | interface FastEthernet2/0 91 | no ip address 92 | shutdown 93 | duplex auto 94 | speed auto 95 | ! 96 | interface FastEthernet3/0 97 | no ip address 98 | shutdown 99 | duplex auto 100 | speed auto 101 | ! 102 | interface FastEthernet4/0 103 | ! 104 | interface FastEthernet4/1 105 | ! 106 | interface FastEthernet4/2 107 | ! 108 | interface FastEthernet4/3 109 | ! 110 | interface FastEthernet4/4 111 | ! 112 | interface FastEthernet4/5 113 | ! 114 | interface FastEthernet4/6 115 | ! 116 | interface FastEthernet4/7 117 | ! 118 | interface FastEthernet4/8 119 | ! 120 | interface FastEthernet4/9 121 | ! 122 | interface FastEthernet4/10 123 | ! 124 | interface FastEthernet4/11 125 | ! 126 | interface FastEthernet4/12 127 | ! 128 | interface FastEthernet4/13 129 | ! 130 | interface FastEthernet4/14 131 | ! 132 | interface FastEthernet4/15 133 | ! 134 | interface Vlan1 135 | no ip address 136 | ! 137 | ! 138 | router ospf 46 139 | log-adjacency-changes 140 | network 10.0.0.0 0.0.255.255 area 0 141 | ! 142 | router rip 143 | version 2 144 | network 10.0.0.0 145 | ! 146 | ip forward-protocol nd 147 | ! 148 | ! 149 | no ip http server 150 | no ip http secure-server 151 | ! 152 | no cdp log mismatch duplex 153 | ! 154 | ! 155 | ! 156 | control-plane 157 | ! 158 | ! 159 | ! 160 | ! 161 | ! 162 | ! 163 | ! 164 | ! 165 | ! 166 | ! 167 | line con 0 168 | exec-timeout 0 0 169 | privilege level 15 170 | logging synchronous 171 | line aux 0 172 | exec-timeout 0 0 173 | privilege level 15 174 | logging synchronous 175 | line vty 0 4 176 | login 177 | ! 178 | ! 179 | end -------------------------------------------------------------------------------- /第三方实验报告/5/R3.txt: -------------------------------------------------------------------------------- 1 | Building configuration... 2 | 3 | Current configuration : 2045 bytes 4 | ! 5 | version 12.4 6 | service timestamps debug datetime msec 7 | service timestamps log datetime msec 8 | no service password-encryption 9 | ! 10 | hostname R3 11 | ! 12 | boot-start-marker 13 | boot-end-marker 14 | ! 15 | ! 16 | no aaa new-model 17 | memory-size iomem 5 18 | no ip icmp rate-limit unreachable 19 | ip cef 20 | ! 21 | ! 22 | ! 23 | ! 24 | no ip domain lookup 25 | ip auth-proxy max-nodata-conns 3 26 | ip admission max-nodata-conns 3 27 | ! 28 | ! 29 | ! 30 | ! 31 | ! 32 | ! 33 | ! 34 | ! 35 | ! 36 | ! 37 | ! 38 | ! 39 | ! 40 | ! 41 | ! 42 | ! 43 | ! 44 | ! 45 | ! 46 | ip tcp synwait-time 5 47 | ! 48 | ! 49 | ! 50 | ! 51 | ! 52 | interface FastEthernet0/0 53 | no ip address 54 | shutdown 55 | duplex auto 56 | speed auto 57 | ! 58 | interface Serial0/0 59 | no ip address 60 | shutdown 61 | clock rate 2000000 62 | ! 63 | interface FastEthernet0/1 64 | ip address 10.0.123.246 255.255.255.252 65 | duplex auto 66 | speed auto 67 | ! 68 | interface Serial0/1 69 | no ip address 70 | shutdown 71 | clock rate 2000000 72 | ! 73 | interface Serial0/2 74 | no ip address 75 | shutdown 76 | clock rate 2000000 77 | ! 78 | interface Serial0/3 79 | no ip address 80 | shutdown 81 | clock rate 2000000 82 | ! 83 | interface FastEthernet1/0 84 | ip address 10.0.123.250 255.255.255.248 85 | duplex auto 86 | speed auto 87 | ! 88 | interface FastEthernet2/0 89 | no ip address 90 | shutdown 91 | duplex auto 92 | speed auto 93 | ! 94 | interface FastEthernet3/0 95 | no ip address 96 | shutdown 97 | duplex auto 98 | speed auto 99 | ! 100 | interface FastEthernet4/0 101 | ! 102 | interface FastEthernet4/1 103 | ! 104 | interface FastEthernet4/2 105 | ! 106 | interface FastEthernet4/3 107 | ! 108 | interface FastEthernet4/4 109 | ! 110 | interface FastEthernet4/5 111 | ! 112 | interface FastEthernet4/6 113 | ! 114 | interface FastEthernet4/7 115 | ! 116 | interface FastEthernet4/8 117 | ! 118 | interface FastEthernet4/9 119 | ! 120 | interface FastEthernet4/10 121 | ! 122 | interface FastEthernet4/11 123 | ! 124 | interface FastEthernet4/12 125 | ! 126 | interface FastEthernet4/13 127 | ! 128 | interface FastEthernet4/14 129 | ! 130 | interface FastEthernet4/15 131 | ! 132 | interface Vlan1 133 | no ip address 134 | ! 135 | ! 136 | router ospf 46 137 | router-id 10.0.30.1 138 | log-adjacency-changes 139 | network 10.0.0.0 0.0.255.255 area 0 140 | ! 141 | router rip 142 | version 2 143 | network 10.0.0.0 144 | ! 145 | ip forward-protocol nd 146 | ! 147 | ! 148 | no ip http server 149 | no ip http secure-server 150 | ! 151 | no cdp log mismatch duplex 152 | ! 153 | ! 154 | ! 155 | control-plane 156 | ! 157 | ! 158 | ! 159 | ! 160 | ! 161 | ! 162 | ! 163 | ! 164 | ! 165 | ! 166 | line con 0 167 | exec-timeout 0 0 168 | privilege level 15 169 | logging synchronous 170 | line aux 0 171 | exec-timeout 0 0 172 | privilege level 15 173 | logging synchronous 174 | line vty 0 4 175 | login 176 | ! 177 | ! 178 | end -------------------------------------------------------------------------------- /第三方实验报告/5/R4.txt: -------------------------------------------------------------------------------- 1 | Building configuration... 2 | 3 | Current configuration : 2104 bytes 4 | ! 5 | version 12.4 6 | service timestamps debug datetime msec 7 | service timestamps log datetime msec 8 | no service password-encryption 9 | ! 10 | hostname R4 11 | ! 12 | boot-start-marker 13 | boot-end-marker 14 | ! 15 | ! 16 | no aaa new-model 17 | memory-size iomem 5 18 | no ip icmp rate-limit unreachable 19 | ip cef 20 | ! 21 | ! 22 | ! 23 | ! 24 | no ip domain lookup 25 | ip auth-proxy max-nodata-conns 3 26 | ip admission max-nodata-conns 3 27 | ! 28 | ! 29 | ! 30 | ! 31 | ! 32 | ! 33 | ! 34 | ! 35 | ! 36 | ! 37 | ! 38 | ! 39 | ! 40 | ! 41 | ! 42 | ! 43 | ! 44 | ! 45 | ! 46 | ip tcp synwait-time 5 47 | ! 48 | ! 49 | ! 50 | ! 51 | ! 52 | interface Loopback0 53 | ip address 10.0.40.1 255.255.255.252 54 | ! 55 | interface FastEthernet0/0 56 | ip address 10.0.123.251 255.255.255.248 57 | duplex auto 58 | speed auto 59 | ! 60 | interface Serial0/0 61 | no ip address 62 | shutdown 63 | clock rate 2000000 64 | ! 65 | interface FastEthernet0/1 66 | ip address 10.1.0.1 255.255.255.0 67 | duplex auto 68 | speed auto 69 | ! 70 | interface Serial0/1 71 | no ip address 72 | shutdown 73 | clock rate 2000000 74 | ! 75 | interface Serial0/2 76 | no ip address 77 | shutdown 78 | clock rate 2000000 79 | ! 80 | interface Serial0/3 81 | no ip address 82 | shutdown 83 | clock rate 2000000 84 | ! 85 | interface FastEthernet1/0 86 | no ip address 87 | shutdown 88 | duplex auto 89 | speed auto 90 | ! 91 | interface FastEthernet2/0 92 | no ip address 93 | shutdown 94 | duplex auto 95 | speed auto 96 | ! 97 | interface FastEthernet3/0 98 | no ip address 99 | shutdown 100 | duplex auto 101 | speed auto 102 | ! 103 | interface FastEthernet4/0 104 | ! 105 | interface FastEthernet4/1 106 | ! 107 | interface FastEthernet4/2 108 | ! 109 | interface FastEthernet4/3 110 | ! 111 | interface FastEthernet4/4 112 | ! 113 | interface FastEthernet4/5 114 | ! 115 | interface FastEthernet4/6 116 | ! 117 | interface FastEthernet4/7 118 | ! 119 | interface FastEthernet4/8 120 | ! 121 | interface FastEthernet4/9 122 | ! 123 | interface FastEthernet4/10 124 | ! 125 | interface FastEthernet4/11 126 | ! 127 | interface FastEthernet4/12 128 | ! 129 | interface FastEthernet4/13 130 | ! 131 | interface FastEthernet4/14 132 | ! 133 | interface FastEthernet4/15 134 | ! 135 | interface Vlan1 136 | no ip address 137 | ! 138 | ! 139 | router ospf 46 140 | log-adjacency-changes 141 | area 1 virtual-link 10.3.90.1 142 | network 10.0.0.0 0.0.255.255 area 0 143 | network 10.1.0.0 0.0.255.255 area 1 144 | ! 145 | ip forward-protocol nd 146 | ! 147 | ! 148 | no ip http server 149 | no ip http secure-server 150 | ! 151 | no cdp log mismatch duplex 152 | ! 153 | ! 154 | ! 155 | control-plane 156 | ! 157 | ! 158 | ! 159 | ! 160 | ! 161 | ! 162 | ! 163 | ! 164 | ! 165 | ! 166 | line con 0 167 | exec-timeout 0 0 168 | privilege level 15 169 | logging synchronous 170 | line aux 0 171 | exec-timeout 0 0 172 | privilege level 15 173 | logging synchronous 174 | line vty 0 4 175 | login 176 | ! 177 | ! 178 | end -------------------------------------------------------------------------------- /第三方实验报告/5/R5.txt: -------------------------------------------------------------------------------- 1 | Building configuration... 2 | 3 | Current configuration : 2438 bytes 4 | ! 5 | version 12.4 6 | service timestamps debug datetime msec 7 | service timestamps log datetime msec 8 | no service password-encryption 9 | ! 10 | hostname R5 11 | ! 12 | boot-start-marker 13 | boot-end-marker 14 | ! 15 | ! 16 | no aaa new-model 17 | memory-size iomem 5 18 | no ip icmp rate-limit unreachable 19 | ip cef 20 | ! 21 | ! 22 | ! 23 | ! 24 | no ip domain lookup 25 | ip auth-proxy max-nodata-conns 3 26 | ip admission max-nodata-conns 3 27 | ! 28 | ! 29 | ! 30 | ! 31 | ! 32 | ! 33 | ! 34 | ! 35 | ! 36 | ! 37 | ! 38 | ! 39 | ! 40 | ! 41 | ! 42 | ! 43 | ! 44 | ! 45 | ! 46 | ip tcp synwait-time 5 47 | ! 48 | ! 49 | ! 50 | ! 51 | ! 52 | interface Loopback0 53 | ip address 10.1.50.1 255.255.255.252 54 | ! 55 | interface FastEthernet0/0 56 | ip address 10.1.1.1 255.255.255.0 57 | duplex auto 58 | speed auto 59 | ! 60 | interface Serial0/0 61 | no ip address 62 | encapsulation frame-relay 63 | clock rate 2000000 64 | frame-relay lmi-type ansi 65 | ! 66 | interface Serial0/0.1 multipoint 67 | ip address 10.1.2.1 255.255.255.0 68 | ip ospf network point-to-multipoint 69 | frame-relay map ip 10.1.2.3 102 broadcast 70 | frame-relay interface-dlci 102 71 | ! 72 | interface Serial0/0.2 multipoint 73 | ip address 10.1.2.2 255.255.255.0 74 | ip ospf network point-to-multipoint 75 | frame-relay map ip 10.1.2.4 103 broadcast 76 | frame-relay interface-dlci 103 77 | ! 78 | interface FastEthernet0/1 79 | ip address 10.1.0.2 255.255.255.0 80 | duplex auto 81 | speed auto 82 | ! 83 | interface Serial0/1 84 | no ip address 85 | shutdown 86 | clock rate 2000000 87 | ! 88 | interface Serial0/2 89 | no ip address 90 | shutdown 91 | clock rate 2000000 92 | ! 93 | interface Serial0/3 94 | no ip address 95 | shutdown 96 | clock rate 2000000 97 | ! 98 | interface FastEthernet1/0 99 | no ip address 100 | shutdown 101 | duplex auto 102 | speed auto 103 | ! 104 | interface FastEthernet2/0 105 | no ip address 106 | shutdown 107 | duplex auto 108 | speed auto 109 | ! 110 | interface FastEthernet3/0 111 | no ip address 112 | shutdown 113 | duplex auto 114 | speed auto 115 | ! 116 | interface FastEthernet4/0 117 | ! 118 | interface FastEthernet4/1 119 | ! 120 | interface FastEthernet4/2 121 | ! 122 | interface FastEthernet4/3 123 | ! 124 | interface FastEthernet4/4 125 | ! 126 | interface FastEthernet4/5 127 | ! 128 | interface FastEthernet4/6 129 | ! 130 | interface FastEthernet4/7 131 | ! 132 | interface FastEthernet4/8 133 | ! 134 | interface FastEthernet4/9 135 | ! 136 | interface FastEthernet4/10 137 | ! 138 | interface FastEthernet4/11 139 | ! 140 | interface FastEthernet4/12 141 | ! 142 | interface FastEthernet4/13 143 | ! 144 | interface FastEthernet4/14 145 | ! 146 | interface FastEthernet4/15 147 | ! 148 | interface Vlan1 149 | no ip address 150 | ! 151 | ! 152 | router ospf 46 153 | log-adjacency-changes 154 | network 10.1.0.0 0.0.255.255 area 1 155 | ! 156 | ip forward-protocol nd 157 | ! 158 | ! 159 | no ip http server 160 | no ip http secure-server 161 | ! 162 | no cdp log mismatch duplex 163 | ! 164 | ! 165 | ! 166 | control-plane 167 | ! 168 | ! 169 | ! 170 | ! 171 | ! 172 | ! 173 | ! 174 | ! 175 | ! 176 | ! 177 | line con 0 178 | exec-timeout 0 0 179 | privilege level 15 180 | logging synchronous 181 | line aux 0 182 | exec-timeout 0 0 183 | privilege level 15 184 | logging synchronous 185 | line vty 0 4 186 | login 187 | ! 188 | ! 189 | end -------------------------------------------------------------------------------- /第三方实验报告/5/R6.txt: -------------------------------------------------------------------------------- 1 | Building configuration... 2 | 3 | Current configuration : 2073 bytes 4 | ! 5 | version 12.4 6 | service timestamps debug datetime msec 7 | service timestamps log datetime msec 8 | no service password-encryption 9 | ! 10 | hostname R6 11 | ! 12 | boot-start-marker 13 | boot-end-marker 14 | ! 15 | ! 16 | no aaa new-model 17 | memory-size iomem 5 18 | no ip icmp rate-limit unreachable 19 | ip cef 20 | ! 21 | ! 22 | ! 23 | ! 24 | no ip domain lookup 25 | ip auth-proxy max-nodata-conns 3 26 | ip admission max-nodata-conns 3 27 | ! 28 | ! 29 | ! 30 | ! 31 | ! 32 | ! 33 | ! 34 | ! 35 | ! 36 | ! 37 | ! 38 | ! 39 | ! 40 | ! 41 | ! 42 | ! 43 | ! 44 | ! 45 | ! 46 | ip tcp synwait-time 5 47 | ! 48 | ! 49 | ! 50 | ! 51 | ! 52 | interface Loopback0 53 | ip address 10.0.60.1 255.255.255.252 54 | ! 55 | interface FastEthernet0/0 56 | ip address 10.0.123.252 255.255.255.248 57 | duplex auto 58 | speed auto 59 | ! 60 | interface Serial0/0 61 | no ip address 62 | shutdown 63 | clock rate 2000000 64 | ! 65 | interface FastEthernet0/1 66 | ip address 10.2.1.2 255.255.255.0 67 | duplex auto 68 | speed auto 69 | ! 70 | interface Serial0/1 71 | no ip address 72 | shutdown 73 | clock rate 2000000 74 | ! 75 | interface Serial0/2 76 | no ip address 77 | shutdown 78 | clock rate 2000000 79 | ! 80 | interface Serial0/3 81 | no ip address 82 | shutdown 83 | clock rate 2000000 84 | ! 85 | interface FastEthernet1/0 86 | no ip address 87 | shutdown 88 | duplex auto 89 | speed auto 90 | ! 91 | interface FastEthernet2/0 92 | no ip address 93 | shutdown 94 | duplex auto 95 | speed auto 96 | ! 97 | interface FastEthernet3/0 98 | no ip address 99 | shutdown 100 | duplex auto 101 | speed auto 102 | ! 103 | interface FastEthernet4/0 104 | ! 105 | interface FastEthernet4/1 106 | ! 107 | interface FastEthernet4/2 108 | ! 109 | interface FastEthernet4/3 110 | ! 111 | interface FastEthernet4/4 112 | ! 113 | interface FastEthernet4/5 114 | ! 115 | interface FastEthernet4/6 116 | ! 117 | interface FastEthernet4/7 118 | ! 119 | interface FastEthernet4/8 120 | ! 121 | interface FastEthernet4/9 122 | ! 123 | interface FastEthernet4/10 124 | ! 125 | interface FastEthernet4/11 126 | ! 127 | interface FastEthernet4/12 128 | ! 129 | interface FastEthernet4/13 130 | ! 131 | interface FastEthernet4/14 132 | ! 133 | interface FastEthernet4/15 134 | ! 135 | interface Vlan1 136 | no ip address 137 | ! 138 | ! 139 | router ospf 46 140 | log-adjacency-changes 141 | network 10.0.0.0 0.0.255.255 area 0 142 | network 10.2.0.0 0.0.255.255 area 2 143 | ! 144 | ip forward-protocol nd 145 | ! 146 | ! 147 | no ip http server 148 | no ip http secure-server 149 | ! 150 | no cdp log mismatch duplex 151 | ! 152 | ! 153 | ! 154 | control-plane 155 | ! 156 | ! 157 | ! 158 | ! 159 | ! 160 | ! 161 | ! 162 | ! 163 | ! 164 | ! 165 | line con 0 166 | exec-timeout 0 0 167 | privilege level 15 168 | logging synchronous 169 | line aux 0 170 | exec-timeout 0 0 171 | privilege level 15 172 | logging synchronous 173 | line vty 0 4 174 | login 175 | ! 176 | ! 177 | end -------------------------------------------------------------------------------- /第三方实验报告/5/R7.txt: -------------------------------------------------------------------------------- 1 | Building configuration... 2 | 3 | Current configuration : 2401 bytes 4 | ! 5 | version 12.4 6 | service timestamps debug datetime msec 7 | service timestamps log datetime msec 8 | no service password-encryption 9 | ! 10 | hostname R7 11 | ! 12 | boot-start-marker 13 | boot-end-marker 14 | ! 15 | ! 16 | no aaa new-model 17 | memory-size iomem 5 18 | no ip icmp rate-limit unreachable 19 | ip cef 20 | ! 21 | ! 22 | ! 23 | ! 24 | no ip domain lookup 25 | ip auth-proxy max-nodata-conns 3 26 | ip admission max-nodata-conns 3 27 | ! 28 | ! 29 | ! 30 | ! 31 | ! 32 | ! 33 | ! 34 | ! 35 | ! 36 | ! 37 | ! 38 | ! 39 | ! 40 | ! 41 | ! 42 | ! 43 | ! 44 | ! 45 | ! 46 | ip tcp synwait-time 5 47 | ! 48 | ! 49 | ! 50 | ! 51 | ! 52 | interface Loopback0 53 | ip address 10.1.70.1 255.255.255.252 54 | ! 55 | interface FastEthernet0/0 56 | ip address 10.2.3.1 255.255.255.0 57 | duplex auto 58 | speed auto 59 | ! 60 | interface Serial0/0 61 | ip address 10.1.2.3 255.255.255.0 62 | encapsulation frame-relay 63 | ip ospf network point-to-multipoint 64 | clock rate 2000000 65 | frame-relay map ip 10.1.2.1 201 broadcast 66 | frame-relay interface-dlci 201 67 | frame-relay lmi-type ansi 68 | ! 69 | interface FastEthernet0/1 70 | no ip address 71 | shutdown 72 | duplex auto 73 | speed auto 74 | ! 75 | interface Serial0/1 76 | no ip address 77 | shutdown 78 | clock rate 2000000 79 | ! 80 | interface Serial0/2 81 | no ip address 82 | shutdown 83 | clock rate 2000000 84 | ! 85 | interface Serial0/3 86 | no ip address 87 | shutdown 88 | clock rate 2000000 89 | ! 90 | interface FastEthernet1/0 91 | no ip address 92 | shutdown 93 | duplex auto 94 | speed auto 95 | ! 96 | interface FastEthernet2/0 97 | no ip address 98 | shutdown 99 | duplex auto 100 | speed auto 101 | ! 102 | interface FastEthernet3/0 103 | no ip address 104 | shutdown 105 | duplex auto 106 | speed auto 107 | ! 108 | interface FastEthernet4/0 109 | ! 110 | interface FastEthernet4/1 111 | ! 112 | interface FastEthernet4/2 113 | ! 114 | interface FastEthernet4/3 115 | ! 116 | interface FastEthernet4/4 117 | ! 118 | interface FastEthernet4/5 119 | ! 120 | interface FastEthernet4/6 121 | ! 122 | interface FastEthernet4/7 123 | ! 124 | interface FastEthernet4/8 125 | ! 126 | interface FastEthernet4/9 127 | ! 128 | interface FastEthernet4/10 129 | ! 130 | interface FastEthernet4/11 131 | ! 132 | interface FastEthernet4/12 133 | ! 134 | interface FastEthernet4/13 135 | ! 136 | interface FastEthernet4/14 137 | ! 138 | interface FastEthernet4/15 139 | ! 140 | interface Vlan1 141 | no ip address 142 | ! 143 | ! 144 | router ospf 46 145 | log-adjacency-changes 146 | network 10.1.2.1 0.0.0.0 area 1 147 | network 10.1.2.2 0.0.0.0 area 1 148 | network 10.1.2.3 0.0.0.0 area 1 149 | network 10.1.2.4 0.0.0.0 area 1 150 | network 10.1.70.0 0.0.0.255 area 1 151 | network 10.1.0.0 0.0.255.255 area 1 152 | network 10.2.0.0 0.0.255.255 area 2 153 | ! 154 | ip forward-protocol nd 155 | ! 156 | ! 157 | no ip http server 158 | no ip http secure-server 159 | ! 160 | no cdp log mismatch duplex 161 | ! 162 | ! 163 | ! 164 | control-plane 165 | ! 166 | ! 167 | ! 168 | ! 169 | ! 170 | ! 171 | ! 172 | ! 173 | ! 174 | ! 175 | line con 0 176 | exec-timeout 0 0 177 | privilege level 15 178 | logging synchronous 179 | line aux 0 180 | exec-timeout 0 0 181 | privilege level 15 182 | logging synchronous 183 | line vty 0 4 184 | login 185 | ! 186 | ! 187 | end -------------------------------------------------------------------------------- /第三方实验报告/5/R8.txt: -------------------------------------------------------------------------------- 1 | Building configuration... 2 | 3 | Current configuration : 2077 bytes 4 | ! 5 | version 12.4 6 | service timestamps debug datetime msec 7 | service timestamps log datetime msec 8 | no service password-encryption 9 | ! 10 | hostname R8 11 | ! 12 | boot-start-marker 13 | boot-end-marker 14 | ! 15 | ! 16 | no aaa new-model 17 | memory-size iomem 5 18 | no ip icmp rate-limit unreachable 19 | ip cef 20 | ! 21 | ! 22 | ! 23 | ! 24 | no ip domain lookup 25 | ip auth-proxy max-nodata-conns 3 26 | ip admission max-nodata-conns 3 27 | ! 28 | ! 29 | ! 30 | ! 31 | ! 32 | ! 33 | ! 34 | ! 35 | ! 36 | ! 37 | ! 38 | ! 39 | ! 40 | ! 41 | ! 42 | ! 43 | ! 44 | ! 45 | ! 46 | ip tcp synwait-time 5 47 | ! 48 | ! 49 | ! 50 | ! 51 | ! 52 | interface Loopback0 53 | ip address 10.2.80.1 255.255.255.252 54 | ! 55 | interface FastEthernet0/0 56 | ip address 10.2.3.2 255.255.255.0 57 | duplex auto 58 | speed auto 59 | ! 60 | interface Serial0/0 61 | no ip address 62 | shutdown 63 | clock rate 2000000 64 | ! 65 | interface FastEthernet0/1 66 | ip address 10.2.1.1 255.255.255.0 67 | duplex auto 68 | speed auto 69 | ! 70 | interface Serial0/1 71 | no ip address 72 | shutdown 73 | clock rate 2000000 74 | ! 75 | interface Serial0/2 76 | no ip address 77 | shutdown 78 | clock rate 2000000 79 | ! 80 | interface Serial0/3 81 | no ip address 82 | shutdown 83 | clock rate 2000000 84 | ! 85 | interface FastEthernet1/0 86 | ip address 10.2.2.1 255.255.255.0 87 | duplex auto 88 | speed auto 89 | ! 90 | interface FastEthernet2/0 91 | no ip address 92 | shutdown 93 | duplex auto 94 | speed auto 95 | ! 96 | interface FastEthernet3/0 97 | no ip address 98 | shutdown 99 | duplex auto 100 | speed auto 101 | ! 102 | interface FastEthernet4/0 103 | ! 104 | interface FastEthernet4/1 105 | ! 106 | interface FastEthernet4/2 107 | ! 108 | interface FastEthernet4/3 109 | ! 110 | interface FastEthernet4/4 111 | ! 112 | interface FastEthernet4/5 113 | ! 114 | interface FastEthernet4/6 115 | ! 116 | interface FastEthernet4/7 117 | ! 118 | interface FastEthernet4/8 119 | ! 120 | interface FastEthernet4/9 121 | ! 122 | interface FastEthernet4/10 123 | ! 124 | interface FastEthernet4/11 125 | ! 126 | interface FastEthernet4/12 127 | ! 128 | interface FastEthernet4/13 129 | ! 130 | interface FastEthernet4/14 131 | ! 132 | interface FastEthernet4/15 133 | ! 134 | interface Vlan1 135 | no ip address 136 | ! 137 | ! 138 | router ospf 46 139 | log-adjacency-changes 140 | network 10.1.0.0 0.0.255.255 area 1 141 | network 10.2.0.0 0.0.255.255 area 2 142 | ! 143 | ip forward-protocol nd 144 | ! 145 | ! 146 | no ip http server 147 | no ip http secure-server 148 | ! 149 | no cdp log mismatch duplex 150 | ! 151 | ! 152 | ! 153 | control-plane 154 | ! 155 | ! 156 | ! 157 | ! 158 | ! 159 | ! 160 | ! 161 | ! 162 | ! 163 | ! 164 | line con 0 165 | exec-timeout 0 0 166 | privilege level 15 167 | logging synchronous 168 | line aux 0 169 | exec-timeout 0 0 170 | privilege level 15 171 | logging synchronous 172 | line vty 0 4 173 | login 174 | ! 175 | ! 176 | end -------------------------------------------------------------------------------- /第三方实验报告/5/R9.txt: -------------------------------------------------------------------------------- 1 | Building configuration... 2 | 3 | Current configuration : 2275 bytes 4 | ! 5 | version 12.4 6 | service timestamps debug datetime msec 7 | service timestamps log datetime msec 8 | no service password-encryption 9 | ! 10 | hostname R9 11 | ! 12 | boot-start-marker 13 | boot-end-marker 14 | ! 15 | ! 16 | no aaa new-model 17 | memory-size iomem 5 18 | no ip icmp rate-limit unreachable 19 | ip cef 20 | ! 21 | ! 22 | ! 23 | ! 24 | no ip domain lookup 25 | ip auth-proxy max-nodata-conns 3 26 | ip admission max-nodata-conns 3 27 | ! 28 | ! 29 | ! 30 | ! 31 | ! 32 | ! 33 | ! 34 | ! 35 | ! 36 | ! 37 | ! 38 | ! 39 | ! 40 | ! 41 | ! 42 | ! 43 | ! 44 | ! 45 | ! 46 | ip tcp synwait-time 5 47 | ! 48 | ! 49 | ! 50 | ! 51 | ! 52 | interface FastEthernet0/0 53 | no ip address 54 | shutdown 55 | duplex auto 56 | speed auto 57 | ! 58 | interface Serial0/0 59 | ip address 10.1.2.4 255.255.255.0 60 | encapsulation frame-relay 61 | ip ospf network point-to-multipoint 62 | clock rate 2000000 63 | frame-relay map ip 10.1.2.2 301 broadcast 64 | frame-relay interface-dlci 301 65 | frame-relay lmi-type ansi 66 | ! 67 | interface FastEthernet0/1 68 | ip address 10.3.0.1 255.255.255.0 69 | duplex auto 70 | speed auto 71 | ! 72 | interface Serial0/1 73 | no ip address 74 | shutdown 75 | clock rate 2000000 76 | ! 77 | interface Serial0/2 78 | no ip address 79 | shutdown 80 | clock rate 2000000 81 | ! 82 | interface Serial0/3 83 | no ip address 84 | shutdown 85 | clock rate 2000000 86 | ! 87 | interface FastEthernet1/0 88 | no ip address 89 | shutdown 90 | duplex auto 91 | speed auto 92 | ! 93 | interface FastEthernet2/0 94 | no ip address 95 | shutdown 96 | duplex auto 97 | speed auto 98 | ! 99 | interface FastEthernet3/0 100 | no ip address 101 | shutdown 102 | duplex auto 103 | speed auto 104 | ! 105 | interface FastEthernet4/0 106 | ! 107 | interface FastEthernet4/1 108 | ! 109 | interface FastEthernet4/2 110 | ! 111 | interface FastEthernet4/3 112 | ! 113 | interface FastEthernet4/4 114 | ! 115 | interface FastEthernet4/5 116 | ! 117 | interface FastEthernet4/6 118 | ! 119 | interface FastEthernet4/7 120 | ! 121 | interface FastEthernet4/8 122 | ! 123 | interface FastEthernet4/9 124 | ! 125 | interface FastEthernet4/10 126 | ! 127 | interface FastEthernet4/11 128 | ! 129 | interface FastEthernet4/12 130 | ! 131 | interface FastEthernet4/13 132 | ! 133 | interface FastEthernet4/14 134 | ! 135 | interface FastEthernet4/15 136 | ! 137 | interface Vlan1 138 | no ip address 139 | ! 140 | ! 141 | router ospf 46 142 | log-adjacency-changes 143 | area 0 range 10.0.0.0 255.255.0.0 144 | area 1 virtual-link 10.0.40.1 145 | network 10.1.0.0 0.0.255.255 area 1 146 | network 10.3.90.0 0.0.0.255 area 3 147 | network 10.3.0.0 0.0.255.255 area 3 148 | ! 149 | ip forward-protocol nd 150 | ! 151 | ! 152 | no ip http server 153 | no ip http secure-server 154 | ! 155 | no cdp log mismatch duplex 156 | ! 157 | ! 158 | ! 159 | control-plane 160 | ! 161 | ! 162 | ! 163 | ! 164 | ! 165 | ! 166 | ! 167 | ! 168 | ! 169 | ! 170 | line con 0 171 | exec-timeout 0 0 172 | privilege level 15 173 | logging synchronous 174 | line aux 0 175 | exec-timeout 0 0 176 | privilege level 15 177 | logging synchronous 178 | line vty 0 4 179 | login 180 | ! 181 | ! 182 | end -------------------------------------------------------------------------------- /第三方实验报告/5/lab5.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/第三方实验报告/5/lab5.pdf -------------------------------------------------------------------------------- /第三方实验报告/6/R1.txt: -------------------------------------------------------------------------------- 1 | Building configuration... 2 | 3 | Current configuration : 2761 bytes 4 | ! 5 | version 12.4 6 | service timestamps debug datetime msec 7 | service timestamps log datetime msec 8 | no service password-encryption 9 | ! 10 | hostname R1 11 | ! 12 | boot-start-marker 13 | boot-end-marker 14 | ! 15 | ! 16 | no aaa new-model 17 | memory-size iomem 5 18 | no ip icmp rate-limit unreachable 19 | ip cef 20 | ! 21 | ! 22 | ! 23 | ! 24 | no ip domain lookup 25 | ip auth-proxy max-nodata-conns 3 26 | ip admission max-nodata-conns 3 27 | ! 28 | ipv6 unicast-routing 29 | ! 30 | ! 31 | ! 32 | ! 33 | ! 34 | ! 35 | ! 36 | ! 37 | ! 38 | ! 39 | ! 40 | ! 41 | ! 42 | ! 43 | ! 44 | ! 45 | ! 46 | ! 47 | ip tcp synwait-time 5 48 | ! 49 | ! 50 | ! 51 | ! 52 | ! 53 | interface Tunnel0 54 | no ip address 55 | ipv6 address FEC0::1020:10/112 56 | ipv6 address FEC0::1020:20/112 57 | tunnel source FastEthernet1/0 58 | tunnel destination 192.168.25.2 59 | tunnel mode ipv6ip 60 | ! 61 | interface FastEthernet0/0 62 | ip address 10.0.1.10 255.255.255.0 63 | duplex auto 64 | speed auto 65 | ! 66 | interface Serial0/0 67 | no ip address 68 | shutdown 69 | clock rate 2000000 70 | ! 71 | interface FastEthernet0/1 72 | no ip address 73 | duplex auto 74 | speed auto 75 | ipv6 address FEC0::6500:101:1/112 76 | ! 77 | interface Serial0/1 78 | no ip address 79 | shutdown 80 | clock rate 2000000 81 | ! 82 | interface Serial0/2 83 | no ip address 84 | shutdown 85 | clock rate 2000000 86 | ! 87 | interface Serial0/3 88 | no ip address 89 | shutdown 90 | clock rate 2000000 91 | ! 92 | interface FastEthernet1/0 93 | ip address 192.168.13.1 255.255.255.0 94 | duplex auto 95 | speed auto 96 | ! 97 | interface FastEthernet2/0 98 | ip address 192.168.16.1 255.255.255.0 99 | duplex auto 100 | speed auto 101 | ipv6 address FEC0::6500:16:1/112 102 | ! 103 | interface FastEthernet3/0 104 | no ip address 105 | shutdown 106 | duplex auto 107 | speed auto 108 | ! 109 | interface FastEthernet4/0 110 | ! 111 | interface FastEthernet4/1 112 | ! 113 | interface FastEthernet4/2 114 | ! 115 | interface FastEthernet4/3 116 | ! 117 | interface FastEthernet4/4 118 | ! 119 | interface FastEthernet4/5 120 | ! 121 | interface FastEthernet4/6 122 | ! 123 | interface FastEthernet4/7 124 | ! 125 | interface FastEthernet4/8 126 | ! 127 | interface FastEthernet4/9 128 | ! 129 | interface FastEthernet4/10 130 | ! 131 | interface FastEthernet4/11 132 | ! 133 | interface FastEthernet4/12 134 | ! 135 | interface FastEthernet4/13 136 | ! 137 | interface FastEthernet4/14 138 | ! 139 | interface FastEthernet4/15 140 | ! 141 | interface Vlan1 142 | no ip address 143 | ! 144 | ! 145 | router bgp 65001 146 | no synchronization 147 | bgp log-neighbor-changes 148 | network 10.0.1.0 mask 255.255.255.0 149 | network 192.168.13.0 150 | network 192.168.16.0 151 | neighbor 192.168.13.3 remote-as 65003 152 | neighbor 192.168.16.6 remote-as 65006 153 | neighbor FEC0::6500:16:6 remote-as 65006 154 | no neighbor FEC0::6500:16:6 activate 155 | no auto-summary 156 | ! 157 | address-family ipv6 158 | neighbor FEC0::6500:16:6 activate 159 | network FEC0::6500:16:0/112 160 | network FEC0::6500:101:0/112 161 | redistribute static 162 | no synchronization 163 | exit-address-family 164 | ! 165 | ip forward-protocol nd 166 | ! 167 | ! 168 | no ip http server 169 | no ip http secure-server 170 | ! 171 | no cdp log mismatch duplex 172 | ipv6 route FEC0::6500:201:0/112 Tunnel0 173 | ipv6 route FEC0::6500:202:0/112 Tunnel0 174 | ! 175 | ! 176 | ! 177 | control-plane 178 | ! 179 | ! 180 | ! 181 | ! 182 | ! 183 | ! 184 | ! 185 | ! 186 | ! 187 | ! 188 | line con 0 189 | exec-timeout 0 0 190 | privilege level 15 191 | logging synchronous 192 | line aux 0 193 | exec-timeout 0 0 194 | privilege level 15 195 | logging synchronous 196 | line vty 0 4 197 | login 198 | ! 199 | ! 200 | end 201 | -------------------------------------------------------------------------------- /第三方实验报告/6/R2.txt: -------------------------------------------------------------------------------- 1 | Building configuration... 2 | 3 | Current configuration : 2430 bytes 4 | ! 5 | version 12.4 6 | service timestamps debug datetime msec 7 | service timestamps log datetime msec 8 | no service password-encryption 9 | ! 10 | hostname R2 11 | ! 12 | boot-start-marker 13 | boot-end-marker 14 | ! 15 | ! 16 | no aaa new-model 17 | memory-size iomem 5 18 | no ip icmp rate-limit unreachable 19 | ip cef 20 | ! 21 | ! 22 | ! 23 | ! 24 | no ip domain lookup 25 | ip auth-proxy max-nodata-conns 3 26 | ip admission max-nodata-conns 3 27 | ! 28 | ipv6 unicast-routing 29 | ! 30 | ! 31 | ! 32 | ! 33 | ! 34 | ! 35 | ! 36 | ! 37 | ! 38 | ! 39 | ! 40 | ! 41 | ! 42 | ! 43 | ! 44 | ! 45 | ! 46 | ! 47 | ip tcp synwait-time 5 48 | ! 49 | ! 50 | ! 51 | ! 52 | ! 53 | interface Tunnel0 54 | no ip address 55 | ipv6 address FEC0::1020:20/112 56 | tunnel source FastEthernet1/0 57 | tunnel destination 192.168.13.1 58 | tunnel mode ipv6ip 59 | ! 60 | interface FastEthernet0/0 61 | ip address 10.0.2.20 255.255.255.0 62 | duplex auto 63 | speed auto 64 | ! 65 | interface Serial0/0 66 | no ip address 67 | shutdown 68 | clock rate 2000000 69 | ! 70 | interface FastEthernet0/1 71 | no ip address 72 | duplex auto 73 | speed auto 74 | ipv6 address FEC0::6500:201:2/112 75 | ! 76 | interface Serial0/1 77 | no ip address 78 | shutdown 79 | clock rate 2000000 80 | ! 81 | interface Serial0/2 82 | no ip address 83 | shutdown 84 | clock rate 2000000 85 | ! 86 | interface Serial0/3 87 | no ip address 88 | shutdown 89 | clock rate 2000000 90 | ! 91 | interface FastEthernet1/0 92 | ip address 192.168.25.2 255.255.255.0 93 | duplex auto 94 | speed auto 95 | ! 96 | interface FastEthernet2/0 97 | ip address 192.168.28.2 255.255.255.0 98 | duplex auto 99 | speed auto 100 | ! 101 | interface FastEthernet3/0 102 | no ip address 103 | shutdown 104 | duplex auto 105 | speed auto 106 | ! 107 | interface FastEthernet4/0 108 | ! 109 | interface FastEthernet4/1 110 | ! 111 | interface FastEthernet4/2 112 | ! 113 | interface FastEthernet4/3 114 | ! 115 | interface FastEthernet4/4 116 | ! 117 | interface FastEthernet4/5 118 | ! 119 | interface FastEthernet4/6 120 | ! 121 | interface FastEthernet4/7 122 | ! 123 | interface FastEthernet4/8 124 | ! 125 | interface FastEthernet4/9 126 | ! 127 | interface FastEthernet4/10 128 | ! 129 | interface FastEthernet4/11 130 | ! 131 | interface FastEthernet4/12 132 | ! 133 | interface FastEthernet4/13 134 | ! 135 | interface FastEthernet4/14 136 | ! 137 | interface FastEthernet4/15 138 | ! 139 | interface Vlan1 140 | no ip address 141 | ! 142 | ! 143 | router bgp 65002 144 | no synchronization 145 | bgp log-neighbor-changes 146 | network 10.0.2.0 mask 255.255.255.0 147 | network 192.168.25.0 148 | network 192.168.28.0 149 | neighbor 192.168.25.5 remote-as 65003 150 | neighbor 192.168.28.8 remote-as 65008 151 | no auto-summary 152 | ! 153 | ip forward-protocol nd 154 | ! 155 | ! 156 | no ip http server 157 | no ip http secure-server 158 | ! 159 | no cdp log mismatch duplex 160 | ipv6 route FEC0::6500:101:0/112 Tunnel0 161 | ipv6 route FEC0::6500:601:0/112 Tunnel0 162 | ! 163 | ! 164 | ! 165 | control-plane 166 | ! 167 | ! 168 | ! 169 | ! 170 | ! 171 | ! 172 | ! 173 | ! 174 | ! 175 | ! 176 | line con 0 177 | exec-timeout 0 0 178 | privilege level 15 179 | logging synchronous 180 | line aux 0 181 | exec-timeout 0 0 182 | privilege level 15 183 | logging synchronous 184 | line vty 0 4 185 | login 186 | ! 187 | ! 188 | end 189 | -------------------------------------------------------------------------------- /第三方实验报告/6/R3.txt: -------------------------------------------------------------------------------- 1 | Building configuration... 2 | 3 | Current configuration : 2344 bytes 4 | ! 5 | version 12.4 6 | service timestamps debug datetime msec 7 | service timestamps log datetime msec 8 | no service password-encryption 9 | ! 10 | hostname R3 11 | ! 12 | boot-start-marker 13 | boot-end-marker 14 | ! 15 | ! 16 | no aaa new-model 17 | memory-size iomem 5 18 | no ip icmp rate-limit unreachable 19 | ip cef 20 | ! 21 | ! 22 | ! 23 | ! 24 | no ip domain lookup 25 | ip auth-proxy max-nodata-conns 3 26 | ip admission max-nodata-conns 3 27 | ! 28 | ! 29 | ! 30 | ! 31 | ! 32 | ! 33 | ! 34 | ! 35 | ! 36 | ! 37 | ! 38 | ! 39 | ! 40 | ! 41 | ! 42 | ! 43 | ! 44 | ! 45 | ! 46 | ip tcp synwait-time 5 47 | ! 48 | ! 49 | ! 50 | ! 51 | ! 52 | interface Loopback0 53 | ip address 192.168.30.1 255.255.255.0 54 | ! 55 | interface FastEthernet0/0 56 | ip address 192.168.34.3 255.255.255.0 57 | duplex auto 58 | speed auto 59 | ! 60 | interface Serial0/0 61 | no ip address 62 | shutdown 63 | clock rate 2000000 64 | ! 65 | interface FastEthernet0/1 66 | no ip address 67 | shutdown 68 | duplex auto 69 | speed auto 70 | ! 71 | interface Serial0/1 72 | no ip address 73 | shutdown 74 | clock rate 2000000 75 | ! 76 | interface Serial0/2 77 | no ip address 78 | shutdown 79 | clock rate 2000000 80 | ! 81 | interface Serial0/3 82 | no ip address 83 | shutdown 84 | clock rate 2000000 85 | ! 86 | interface FastEthernet1/0 87 | ip address 192.168.13.3 255.255.255.0 88 | duplex auto 89 | speed auto 90 | ! 91 | interface FastEthernet2/0 92 | no ip address 93 | shutdown 94 | duplex auto 95 | speed auto 96 | ! 97 | interface FastEthernet3/0 98 | no ip address 99 | shutdown 100 | duplex auto 101 | speed auto 102 | ! 103 | interface FastEthernet4/0 104 | ! 105 | interface FastEthernet4/1 106 | ! 107 | interface FastEthernet4/2 108 | ! 109 | interface FastEthernet4/3 110 | ! 111 | interface FastEthernet4/4 112 | ! 113 | interface FastEthernet4/5 114 | ! 115 | interface FastEthernet4/6 116 | ! 117 | interface FastEthernet4/7 118 | ! 119 | interface FastEthernet4/8 120 | ! 121 | interface FastEthernet4/9 122 | ! 123 | interface FastEthernet4/10 124 | ! 125 | interface FastEthernet4/11 126 | ! 127 | interface FastEthernet4/12 128 | ! 129 | interface FastEthernet4/13 130 | ! 131 | interface FastEthernet4/14 132 | ! 133 | interface FastEthernet4/15 134 | ! 135 | interface Vlan1 136 | no ip address 137 | ! 138 | ! 139 | router ospf 46 140 | log-adjacency-changes 141 | redistribute bgp 65003 subnets 142 | network 192.168.0.0 0.0.255.255 area 0 143 | ! 144 | router bgp 65003 145 | synchronization 146 | bgp log-neighbor-changes 147 | network 192.168.13.0 148 | network 192.168.34.0 149 | redistribute ospf 46 150 | neighbor 192.168.13.1 remote-as 65001 151 | neighbor 192.168.50.1 remote-as 65003 152 | neighbor 192.168.50.1 update-source Loopback0 153 | no auto-summary 154 | ! 155 | ip forward-protocol nd 156 | ! 157 | ! 158 | no ip http server 159 | no ip http secure-server 160 | ! 161 | no cdp log mismatch duplex 162 | ! 163 | ! 164 | ! 165 | control-plane 166 | ! 167 | ! 168 | ! 169 | ! 170 | ! 171 | ! 172 | ! 173 | ! 174 | ! 175 | ! 176 | line con 0 177 | exec-timeout 0 0 178 | privilege level 15 179 | logging synchronous 180 | line aux 0 181 | exec-timeout 0 0 182 | privilege level 15 183 | logging synchronous 184 | line vty 0 4 185 | login 186 | ! 187 | ! 188 | end 189 | -------------------------------------------------------------------------------- /第三方实验报告/6/R4.txt: -------------------------------------------------------------------------------- 1 | Building configuration... 2 | 3 | Current configuration : 2042 bytes 4 | ! 5 | version 12.4 6 | service timestamps debug datetime msec 7 | service timestamps log datetime msec 8 | no service password-encryption 9 | ! 10 | hostname R4 11 | ! 12 | boot-start-marker 13 | boot-end-marker 14 | ! 15 | ! 16 | no aaa new-model 17 | memory-size iomem 5 18 | no ip icmp rate-limit unreachable 19 | ip cef 20 | ! 21 | ! 22 | ! 23 | ! 24 | no ip domain lookup 25 | ip auth-proxy max-nodata-conns 3 26 | ip admission max-nodata-conns 3 27 | ! 28 | ! 29 | ! 30 | ! 31 | ! 32 | ! 33 | ! 34 | ! 35 | ! 36 | ! 37 | ! 38 | ! 39 | ! 40 | ! 41 | ! 42 | ! 43 | ! 44 | ! 45 | ! 46 | ip tcp synwait-time 5 47 | ! 48 | ! 49 | ! 50 | ! 51 | ! 52 | interface Loopback0 53 | ip address 192.168.40.1 255.255.255.0 54 | ! 55 | interface FastEthernet0/0 56 | ip address 192.168.34.4 255.255.255.0 57 | duplex auto 58 | speed auto 59 | ! 60 | interface Serial0/0 61 | no ip address 62 | shutdown 63 | clock rate 2000000 64 | ! 65 | interface FastEthernet0/1 66 | ip address 192.168.45.4 255.255.255.0 67 | duplex auto 68 | speed auto 69 | ! 70 | interface Serial0/1 71 | no ip address 72 | shutdown 73 | clock rate 2000000 74 | ! 75 | interface Serial0/2 76 | no ip address 77 | shutdown 78 | clock rate 2000000 79 | ! 80 | interface Serial0/3 81 | no ip address 82 | shutdown 83 | clock rate 2000000 84 | ! 85 | interface FastEthernet1/0 86 | no ip address 87 | shutdown 88 | duplex auto 89 | speed auto 90 | ! 91 | interface FastEthernet2/0 92 | no ip address 93 | shutdown 94 | duplex auto 95 | speed auto 96 | ! 97 | interface FastEthernet3/0 98 | no ip address 99 | shutdown 100 | duplex auto 101 | speed auto 102 | ! 103 | interface FastEthernet4/0 104 | ! 105 | interface FastEthernet4/1 106 | ! 107 | interface FastEthernet4/2 108 | ! 109 | interface FastEthernet4/3 110 | ! 111 | interface FastEthernet4/4 112 | ! 113 | interface FastEthernet4/5 114 | ! 115 | interface FastEthernet4/6 116 | ! 117 | interface FastEthernet4/7 118 | ! 119 | interface FastEthernet4/8 120 | ! 121 | interface FastEthernet4/9 122 | ! 123 | interface FastEthernet4/10 124 | ! 125 | interface FastEthernet4/11 126 | ! 127 | interface FastEthernet4/12 128 | ! 129 | interface FastEthernet4/13 130 | ! 131 | interface FastEthernet4/14 132 | ! 133 | interface FastEthernet4/15 134 | ! 135 | interface Vlan1 136 | no ip address 137 | ! 138 | ! 139 | router ospf 46 140 | log-adjacency-changes 141 | network 192.168.0.0 0.0.255.255 area 0 142 | ! 143 | ip forward-protocol nd 144 | ! 145 | ! 146 | no ip http server 147 | no ip http secure-server 148 | ! 149 | no cdp log mismatch duplex 150 | ! 151 | ! 152 | ! 153 | control-plane 154 | ! 155 | ! 156 | ! 157 | ! 158 | ! 159 | ! 160 | ! 161 | ! 162 | ! 163 | ! 164 | line con 0 165 | exec-timeout 0 0 166 | privilege level 15 167 | logging synchronous 168 | line aux 0 169 | exec-timeout 0 0 170 | privilege level 15 171 | logging synchronous 172 | line vty 0 4 173 | login 174 | ! 175 | ! 176 | end 177 | -------------------------------------------------------------------------------- /第三方实验报告/6/R5.txt: -------------------------------------------------------------------------------- 1 | Building configuration... 2 | 3 | Current configuration : 2322 bytes 4 | ! 5 | version 12.4 6 | service timestamps debug datetime msec 7 | service timestamps log datetime msec 8 | no service password-encryption 9 | ! 10 | hostname R5 11 | ! 12 | boot-start-marker 13 | boot-end-marker 14 | ! 15 | ! 16 | no aaa new-model 17 | memory-size iomem 5 18 | no ip icmp rate-limit unreachable 19 | ip cef 20 | ! 21 | ! 22 | ! 23 | ! 24 | no ip domain lookup 25 | ip auth-proxy max-nodata-conns 3 26 | ip admission max-nodata-conns 3 27 | ! 28 | ! 29 | ! 30 | ! 31 | ! 32 | ! 33 | ! 34 | ! 35 | ! 36 | ! 37 | ! 38 | ! 39 | ! 40 | ! 41 | ! 42 | ! 43 | ! 44 | ! 45 | ! 46 | ip tcp synwait-time 5 47 | ! 48 | ! 49 | ! 50 | ! 51 | ! 52 | interface Loopback0 53 | ip address 192.168.50.1 255.255.255.0 54 | ! 55 | interface FastEthernet0/0 56 | no ip address 57 | shutdown 58 | duplex auto 59 | speed auto 60 | ! 61 | interface Serial0/0 62 | no ip address 63 | shutdown 64 | clock rate 2000000 65 | ! 66 | interface FastEthernet0/1 67 | ip address 192.168.45.5 255.255.255.0 68 | duplex auto 69 | speed auto 70 | ! 71 | interface Serial0/1 72 | no ip address 73 | shutdown 74 | clock rate 2000000 75 | ! 76 | interface Serial0/2 77 | no ip address 78 | shutdown 79 | clock rate 2000000 80 | ! 81 | interface Serial0/3 82 | no ip address 83 | shutdown 84 | clock rate 2000000 85 | ! 86 | interface FastEthernet1/0 87 | ip address 192.168.25.5 255.255.255.0 88 | duplex auto 89 | speed auto 90 | ! 91 | interface FastEthernet2/0 92 | no ip address 93 | shutdown 94 | duplex auto 95 | speed auto 96 | ! 97 | interface FastEthernet3/0 98 | no ip address 99 | shutdown 100 | duplex auto 101 | speed auto 102 | ! 103 | interface FastEthernet4/0 104 | ! 105 | interface FastEthernet4/1 106 | ! 107 | interface FastEthernet4/2 108 | ! 109 | interface FastEthernet4/3 110 | ! 111 | interface FastEthernet4/4 112 | ! 113 | interface FastEthernet4/5 114 | ! 115 | interface FastEthernet4/6 116 | ! 117 | interface FastEthernet4/7 118 | ! 119 | interface FastEthernet4/8 120 | ! 121 | interface FastEthernet4/9 122 | ! 123 | interface FastEthernet4/10 124 | ! 125 | interface FastEthernet4/11 126 | ! 127 | interface FastEthernet4/12 128 | ! 129 | interface FastEthernet4/13 130 | ! 131 | interface FastEthernet4/14 132 | ! 133 | interface FastEthernet4/15 134 | ! 135 | interface Vlan1 136 | no ip address 137 | ! 138 | ! 139 | router ospf 46 140 | log-adjacency-changes 141 | redistribute bgp 65003 subnets 142 | network 192.168.0.0 0.0.255.255 area 0 143 | ! 144 | router bgp 65003 145 | synchronization 146 | bgp log-neighbor-changes 147 | network 192.168.25.0 148 | network 192.168.45.0 149 | neighbor 192.168.25.2 remote-as 65002 150 | neighbor 192.168.30.1 remote-as 65003 151 | neighbor 192.168.30.1 update-source Loopback0 152 | no auto-summary 153 | ! 154 | ip forward-protocol nd 155 | ! 156 | ! 157 | no ip http server 158 | no ip http secure-server 159 | ! 160 | no cdp log mismatch duplex 161 | ! 162 | ! 163 | ! 164 | control-plane 165 | ! 166 | ! 167 | ! 168 | ! 169 | ! 170 | ! 171 | ! 172 | ! 173 | ! 174 | ! 175 | line con 0 176 | exec-timeout 0 0 177 | privilege level 15 178 | logging synchronous 179 | line aux 0 180 | exec-timeout 0 0 181 | privilege level 15 182 | logging synchronous 183 | line vty 0 4 184 | login 185 | ! 186 | ! 187 | end 188 | -------------------------------------------------------------------------------- /第三方实验报告/6/R6.txt: -------------------------------------------------------------------------------- 1 | Building configuration... 2 | 3 | Current configuration : 2407 bytes 4 | ! 5 | version 12.4 6 | service timestamps debug datetime msec 7 | service timestamps log datetime msec 8 | no service password-encryption 9 | ! 10 | hostname R6 11 | ! 12 | boot-start-marker 13 | boot-end-marker 14 | ! 15 | ! 16 | no aaa new-model 17 | memory-size iomem 5 18 | no ip icmp rate-limit unreachable 19 | ip cef 20 | ! 21 | ! 22 | ! 23 | ! 24 | no ip domain lookup 25 | ip auth-proxy max-nodata-conns 3 26 | ip admission max-nodata-conns 3 27 | ! 28 | ipv6 unicast-routing 29 | ! 30 | ! 31 | ! 32 | ! 33 | ! 34 | ! 35 | ! 36 | ! 37 | ! 38 | ! 39 | ! 40 | ! 41 | ! 42 | ! 43 | ! 44 | ! 45 | ! 46 | ! 47 | ip tcp synwait-time 5 48 | ! 49 | ! 50 | ! 51 | ! 52 | ! 53 | interface FastEthernet0/0 54 | ip address 192.168.67.6 255.255.255.0 55 | duplex auto 56 | speed auto 57 | ! 58 | interface Serial0/0 59 | no ip address 60 | shutdown 61 | clock rate 2000000 62 | ! 63 | interface FastEthernet0/1 64 | no ip address 65 | duplex auto 66 | speed auto 67 | ipv6 address FEC0::6500:601:6/112 68 | ! 69 | interface Serial0/1 70 | no ip address 71 | shutdown 72 | clock rate 2000000 73 | ! 74 | interface Serial0/2 75 | no ip address 76 | shutdown 77 | clock rate 2000000 78 | ! 79 | interface Serial0/3 80 | no ip address 81 | shutdown 82 | clock rate 2000000 83 | ! 84 | interface FastEthernet1/0 85 | no ip address 86 | shutdown 87 | duplex auto 88 | speed auto 89 | ! 90 | interface FastEthernet2/0 91 | ip address 192.168.16.6 255.255.255.0 92 | duplex auto 93 | speed auto 94 | ipv6 address FEC0::6500:16:6/112 95 | ! 96 | interface FastEthernet3/0 97 | no ip address 98 | shutdown 99 | duplex auto 100 | speed auto 101 | ! 102 | interface FastEthernet4/0 103 | ! 104 | interface FastEthernet4/1 105 | ! 106 | interface FastEthernet4/2 107 | ! 108 | interface FastEthernet4/3 109 | ! 110 | interface FastEthernet4/4 111 | ! 112 | interface FastEthernet4/5 113 | ! 114 | interface FastEthernet4/6 115 | ! 116 | interface FastEthernet4/7 117 | ! 118 | interface FastEthernet4/8 119 | ! 120 | interface FastEthernet4/9 121 | ! 122 | interface FastEthernet4/10 123 | ! 124 | interface FastEthernet4/11 125 | ! 126 | interface FastEthernet4/12 127 | ! 128 | interface FastEthernet4/13 129 | ! 130 | interface FastEthernet4/14 131 | ! 132 | interface FastEthernet4/15 133 | ! 134 | interface Vlan1 135 | no ip address 136 | ! 137 | ! 138 | router bgp 65006 139 | no synchronization 140 | bgp log-neighbor-changes 141 | network 192.168.16.0 142 | network 192.168.67.0 143 | neighbor 192.168.16.1 remote-as 65001 144 | neighbor 192.168.67.7 remote-as 65007 145 | neighbor FEC0::6500:16:1 remote-as 65001 146 | no neighbor FEC0::6500:16:1 activate 147 | no auto-summary 148 | ! 149 | address-family ipv6 150 | neighbor FEC0::6500:16:1 activate 151 | network FEC0::6500:16:0/112 152 | network FEC0::6500:601:0/112 153 | exit-address-family 154 | ! 155 | ip forward-protocol nd 156 | ! 157 | ! 158 | no ip http server 159 | no ip http secure-server 160 | ! 161 | no cdp log mismatch duplex 162 | ! 163 | ! 164 | ! 165 | control-plane 166 | ! 167 | ! 168 | ! 169 | ! 170 | ! 171 | ! 172 | ! 173 | ! 174 | ! 175 | ! 176 | line con 0 177 | exec-timeout 0 0 178 | privilege level 15 179 | logging synchronous 180 | line aux 0 181 | exec-timeout 0 0 182 | privilege level 15 183 | logging synchronous 184 | line vty 0 4 185 | login 186 | ! 187 | ! 188 | end 189 | -------------------------------------------------------------------------------- /第三方实验报告/6/R7.txt: -------------------------------------------------------------------------------- 1 | Building configuration... 2 | 3 | Current configuration : 2105 bytes 4 | ! 5 | version 12.4 6 | service timestamps debug datetime msec 7 | service timestamps log datetime msec 8 | no service password-encryption 9 | ! 10 | hostname R7 11 | ! 12 | boot-start-marker 13 | boot-end-marker 14 | ! 15 | ! 16 | no aaa new-model 17 | memory-size iomem 5 18 | no ip icmp rate-limit unreachable 19 | ip cef 20 | ! 21 | ! 22 | ! 23 | ! 24 | no ip domain lookup 25 | ip auth-proxy max-nodata-conns 3 26 | ip admission max-nodata-conns 3 27 | ! 28 | ! 29 | ! 30 | ! 31 | ! 32 | ! 33 | ! 34 | ! 35 | ! 36 | ! 37 | ! 38 | ! 39 | ! 40 | ! 41 | ! 42 | ! 43 | ! 44 | ! 45 | ! 46 | ip tcp synwait-time 5 47 | ! 48 | ! 49 | ! 50 | ! 51 | ! 52 | interface FastEthernet0/0 53 | ip address 192.168.67.7 255.255.255.0 54 | duplex auto 55 | speed auto 56 | ! 57 | interface Serial0/0 58 | no ip address 59 | shutdown 60 | clock rate 2000000 61 | ! 62 | interface FastEthernet0/1 63 | ip address 192.168.78.7 255.255.255.0 64 | duplex auto 65 | speed auto 66 | ! 67 | interface Serial0/1 68 | no ip address 69 | shutdown 70 | clock rate 2000000 71 | ! 72 | interface Serial0/2 73 | no ip address 74 | shutdown 75 | clock rate 2000000 76 | ! 77 | interface Serial0/3 78 | no ip address 79 | shutdown 80 | clock rate 2000000 81 | ! 82 | interface FastEthernet1/0 83 | no ip address 84 | shutdown 85 | duplex auto 86 | speed auto 87 | ! 88 | interface FastEthernet2/0 89 | no ip address 90 | shutdown 91 | duplex auto 92 | speed auto 93 | ! 94 | interface FastEthernet3/0 95 | no ip address 96 | shutdown 97 | duplex auto 98 | speed auto 99 | ! 100 | interface FastEthernet4/0 101 | ! 102 | interface FastEthernet4/1 103 | ! 104 | interface FastEthernet4/2 105 | ! 106 | interface FastEthernet4/3 107 | ! 108 | interface FastEthernet4/4 109 | ! 110 | interface FastEthernet4/5 111 | ! 112 | interface FastEthernet4/6 113 | ! 114 | interface FastEthernet4/7 115 | ! 116 | interface FastEthernet4/8 117 | ! 118 | interface FastEthernet4/9 119 | ! 120 | interface FastEthernet4/10 121 | ! 122 | interface FastEthernet4/11 123 | ! 124 | interface FastEthernet4/12 125 | ! 126 | interface FastEthernet4/13 127 | ! 128 | interface FastEthernet4/14 129 | ! 130 | interface FastEthernet4/15 131 | ! 132 | interface Vlan1 133 | no ip address 134 | ! 135 | ! 136 | router bgp 65007 137 | no synchronization 138 | bgp log-neighbor-changes 139 | network 192.168.67.0 140 | network 192.168.78.0 141 | neighbor 192.168.67.6 remote-as 65006 142 | neighbor 192.168.78.8 remote-as 65008 143 | no auto-summary 144 | ! 145 | ip forward-protocol nd 146 | ! 147 | ! 148 | no ip http server 149 | no ip http secure-server 150 | ! 151 | no cdp log mismatch duplex 152 | ! 153 | ! 154 | ! 155 | control-plane 156 | ! 157 | ! 158 | ! 159 | ! 160 | ! 161 | ! 162 | ! 163 | ! 164 | ! 165 | ! 166 | line con 0 167 | exec-timeout 0 0 168 | privilege level 15 169 | logging synchronous 170 | line aux 0 171 | exec-timeout 0 0 172 | privilege level 15 173 | logging synchronous 174 | line vty 0 4 175 | login 176 | ! 177 | ! 178 | end 179 | -------------------------------------------------------------------------------- /第三方实验报告/6/R8.txt: -------------------------------------------------------------------------------- 1 | Building configuration... 2 | 3 | Current configuration : 2215 bytes 4 | ! 5 | version 12.4 6 | service timestamps debug datetime msec 7 | service timestamps log datetime msec 8 | no service password-encryption 9 | ! 10 | hostname R8 11 | ! 12 | boot-start-marker 13 | boot-end-marker 14 | ! 15 | ! 16 | no aaa new-model 17 | memory-size iomem 5 18 | no ip icmp rate-limit unreachable 19 | ip cef 20 | ! 21 | ! 22 | ! 23 | ! 24 | no ip domain lookup 25 | ip auth-proxy max-nodata-conns 3 26 | ip admission max-nodata-conns 3 27 | ! 28 | ! 29 | ! 30 | ! 31 | ! 32 | ! 33 | ! 34 | ! 35 | ! 36 | ! 37 | ! 38 | ! 39 | ! 40 | ! 41 | ! 42 | ! 43 | ! 44 | ! 45 | ! 46 | ip tcp synwait-time 5 47 | ! 48 | ! 49 | ! 50 | ! 51 | ! 52 | interface FastEthernet0/0 53 | no ip address 54 | shutdown 55 | duplex auto 56 | speed auto 57 | ! 58 | interface Serial0/0 59 | no ip address 60 | shutdown 61 | clock rate 2000000 62 | ! 63 | interface FastEthernet0/1 64 | ip address 192.168.78.8 255.255.255.0 65 | duplex auto 66 | speed auto 67 | ! 68 | interface Serial0/1 69 | no ip address 70 | shutdown 71 | clock rate 2000000 72 | ! 73 | interface Serial0/2 74 | no ip address 75 | shutdown 76 | clock rate 2000000 77 | ! 78 | interface Serial0/3 79 | no ip address 80 | shutdown 81 | clock rate 2000000 82 | ! 83 | interface FastEthernet1/0 84 | no ip address 85 | shutdown 86 | duplex auto 87 | speed auto 88 | ! 89 | interface FastEthernet2/0 90 | ip address 192.168.28.8 255.255.255.0 91 | duplex auto 92 | speed auto 93 | ! 94 | interface FastEthernet3/0 95 | no ip address 96 | shutdown 97 | duplex auto 98 | speed auto 99 | ! 100 | interface FastEthernet4/0 101 | ! 102 | interface FastEthernet4/1 103 | ! 104 | interface FastEthernet4/2 105 | ! 106 | interface FastEthernet4/3 107 | ! 108 | interface FastEthernet4/4 109 | ! 110 | interface FastEthernet4/5 111 | ! 112 | interface FastEthernet4/6 113 | ! 114 | interface FastEthernet4/7 115 | ! 116 | interface FastEthernet4/8 117 | ! 118 | interface FastEthernet4/9 119 | ! 120 | interface FastEthernet4/10 121 | ! 122 | interface FastEthernet4/11 123 | ! 124 | interface FastEthernet4/12 125 | ! 126 | interface FastEthernet4/13 127 | ! 128 | interface FastEthernet4/14 129 | ! 130 | interface FastEthernet4/15 131 | ! 132 | interface Vlan1 133 | no ip address 134 | ! 135 | ! 136 | router bgp 65008 137 | no synchronization 138 | bgp log-neighbor-changes 139 | network 192.168.28.0 140 | network 192.168.78.0 141 | neighbor 192.168.28.2 remote-as 65002 142 | neighbor 192.168.78.7 remote-as 65007 143 | neighbor 192.168.78.7 distribute-list 1 out 144 | no auto-summary 145 | ! 146 | ip forward-protocol nd 147 | ! 148 | ! 149 | no ip http server 150 | no ip http secure-server 151 | ! 152 | access-list 1 deny 10.0.2.0 0.0.0.255 153 | access-list 1 permit any 154 | no cdp log mismatch duplex 155 | ! 156 | ! 157 | ! 158 | control-plane 159 | ! 160 | ! 161 | ! 162 | ! 163 | ! 164 | ! 165 | ! 166 | ! 167 | ! 168 | ! 169 | line con 0 170 | exec-timeout 0 0 171 | privilege level 15 172 | logging synchronous 173 | line aux 0 174 | exec-timeout 0 0 175 | privilege level 15 176 | logging synchronous 177 | line vty 0 4 178 | login 179 | ! 180 | ! 181 | end 182 | -------------------------------------------------------------------------------- /第三方实验报告/6/lab6.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/第三方实验报告/6/lab6.pdf -------------------------------------------------------------------------------- /第三方实验报告/7/Lab7.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/第三方实验报告/7/Lab7.pdf -------------------------------------------------------------------------------- /第三方实验报告/7/source/Global.h: -------------------------------------------------------------------------------- 1 | #ifndef __SOCKET_EXP_GLOBAL_H__ 2 | #define __SOCKET_EXP_GLOBAL_H__ 3 | #include 4 | #include 5 | #include 6 | #include 7 | // 8 | #include 9 | #include 10 | // 11 | #include 12 | #include 13 | #include 14 | // 15 | #include 16 | #include 17 | #include 18 | 19 | #define MAX_CLIENT_NUM 10 20 | #define READ_BUFFER_SIZE 1024 21 | #define DATA_LENGTH 256 22 | 23 | typedef struct { 24 | int num; 25 | char ip[15]; 26 | int port; 27 | int isThisMyfd = 0; 28 | } client_info; 29 | 30 | enum Operation { 31 | CONNECT = 1, 32 | CLOSE, 33 | TIME, 34 | NAME, 35 | ACTIVE_LIST, 36 | MESSAGE, 37 | EXIT, 38 | ERROR 39 | }; 40 | 41 | class PacketHeader { 42 | public: 43 | int source; //source fd 44 | int destination; //destination fd 45 | int length; //total length of data needed to pass; 46 | int type; //1:require 0:reply 2:error 47 | Operation op; //illustrate the operation(get name/time...) of this packet 48 | 49 | PacketHeader() {} 50 | PacketHeader(int sourece, int destination, int length, int type, Operation op) 51 | : source(sourece) 52 | , destination(destination) 53 | , length(length) 54 | , type(type) 55 | , op(op) 56 | { 57 | } 58 | }; 59 | 60 | typedef struct { 61 | unsigned char data[DATA_LENGTH]; 62 | client_info list[MAX_CLIENT_NUM]; 63 | } PacketData; 64 | 65 | class Packet { 66 | public: 67 | PacketHeader header; 68 | PacketData body; 69 | Packet() {} 70 | Packet(int sourece, int destination, int length, int type, Operation op, unsigned char* in_data) 71 | : header(sourece, destination, length, type, op) 72 | { 73 | memset(body.data, 0, DATA_LENGTH); 74 | } 75 | }; 76 | #endif //__SOCKET_EXP_GLOBAL_H__ 77 | -------------------------------------------------------------------------------- /第三方实验报告/7/source/server.cpp: -------------------------------------------------------------------------------- 1 | #include "Global.h" 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | using namespace std; 9 | 10 | #define MAX_LISTEN_SIZE 10 11 | 12 | const int keepAlive = 1; 13 | const int keepIdle = 10000; 14 | const int keepInterval = 1; 15 | const int keepCount = 5; 16 | 17 | char server_name[100] = { 0 }; 18 | void* clientThread(void*); 19 | 20 | static int conn_fd; 21 | static int listen_fd; 22 | 23 | vector client_list; 24 | 25 | int main(int argc, char* argv[]) 26 | { 27 | gethostname(server_name, sizeof(server_name)); 28 | int pId, portNo; 29 | pthread_t thread_pool[MAX_CLIENT_NUM]; 30 | struct sockaddr_in server_address, client_address; 31 | socklen_t len = sizeof(client_address); 32 | 33 | if (argc < 2) { 34 | cerr << "\033[31mThere are too few arguments:\033[0m\n\t\033[1mSERVER_NAME \033[0m" << endl; 35 | return 0; 36 | } 37 | 38 | portNo = atoi(argv[1]); 39 | if ((portNo > 65535) || (portNo < 1025)) { 40 | cerr << "\033[31mPlease enter a port number between \033[1m1025 - 65535\033[0m" << endl; 41 | return 0; 42 | } 43 | 44 | listen_fd = socket(AF_INET, SOCK_STREAM, 0); 45 | if (listen_fd < 0) { 46 | cerr << "\033[31mCannot open socket\033[0m" << endl; 47 | return 0; 48 | } 49 | 50 | unsigned int timeout = 10; 51 | #ifdef __APPLE__ 52 | setsockopt(listen_fd, IPPROTO_TCP, TCP_CONNECTIONTIMEOUT, &timeout, sizeof(timeout)); 53 | setsockopt(listen_fd, IPPROTO_TCP, TCP_KEEPALIVE, &keepIdle, sizeof(keepIdle)); 54 | #else 55 | setsockopt(listen_fd, IPPROTO_TCP, TCP_USER_TIMEOUT, &timeout, sizeof(timeout)); 56 | setsockopt(listen_fd, IPPROTO_TCP, TCP_KEEPIDLE, &keepIdle, sizeof(keepIdle)); 57 | #endif 58 | setsockopt(listen_fd, SOL_SOCKET, SO_KEEPALIVE, &keepAlive, sizeof(keepAlive)); 59 | setsockopt(listen_fd, IPPROTO_TCP, TCP_KEEPINTVL, &keepInterval, sizeof(keepInterval)); 60 | setsockopt(listen_fd, IPPROTO_TCP, TCP_KEEPCNT, &keepCount, sizeof(keepCount)); 61 | 62 | memset((char*)&server_address, 0, sizeof(server_address)); 63 | 64 | server_address.sin_family = AF_INET; 65 | server_address.sin_addr.s_addr = INADDR_ANY; 66 | server_address.sin_port = htons(portNo); 67 | 68 | //bind socket 69 | #ifdef __APPLE__ 70 | if (::bind(listen_fd, (struct sockaddr*)&server_address, sizeof(server_address)) < 0) { 71 | cerr << "\033[31mCannot bind\033[0m" << endl; 72 | return 0; 73 | } 74 | #else 75 | if (bind(listen_fd, (struct sockaddr*)&server_address, sizeof(server_address)) < 0) { 76 | cerr << "\033[31mCannot bind\033[0m" << endl; 77 | return 0; 78 | } 79 | #endif 80 | 81 | listen(listen_fd, MAX_LISTEN_SIZE); 82 | 83 | int thread_num = 0; 84 | while (thread_num < MAX_CLIENT_NUM) { 85 | cout << "=====================\nListening..." << endl; 86 | 87 | int conn_fd = accept(listen_fd, (struct sockaddr*)&client_address, &len); 88 | if (conn_fd < 0) { 89 | cerr << "\033[31m\033[1mCannot accept connection\033[0m" << endl; 90 | return 0; 91 | } else { 92 | cout << "\033[32m\033[1mConnection successful\033[0m" << endl; 93 | } 94 | 95 | cout << "\tIP address: \033[1m" << inet_ntoa(client_address.sin_addr) << "\033[0m" << endl; 96 | cout << "\tport: \033[1m" << (int)ntohs(client_address.sin_port) << "\033[0m\n" 97 | << endl; 98 | 99 | char* ip_address = inet_ntoa(client_address.sin_addr); 100 | client_info temp; 101 | temp.num = conn_fd; 102 | memset(temp.ip, 0, 15); 103 | strncpy(temp.ip, ip_address, strlen(ip_address)); 104 | temp.port = (int)ntohs(client_address.sin_port); 105 | client_list.push_back(temp); 106 | 107 | int* args = &conn_fd; 108 | pthread_create(&thread_pool[thread_num], NULL, clientThread, (void*)args); 109 | 110 | thread_num++; 111 | } 112 | 113 | for (int i = 0; i < thread_num; i++) { 114 | pthread_join(thread_pool[i], NULL); 115 | } 116 | close(listen_fd); 117 | } 118 | 119 | void* clientThread(void* args) 120 | { 121 | int conn_fd = *(int*)args; 122 | int cnt = 0; 123 | 124 | cout << "\033[34m[Thread No. " << pthread_self() << "]\033[0m" 125 | << " Connect ID " << conn_fd << endl; 126 | 127 | while (1) { 128 | unsigned char test[READ_BUFFER_SIZE]; 129 | memset(test, 0, READ_BUFFER_SIZE); // set read buffer 130 | 131 | // read from socket 132 | int packet_size = sizeof(Packet); 133 | int received = 0; 134 | int bytes = 0; 135 | do { 136 | bytes = recv(conn_fd, test + received, packet_size - received, 0); 137 | if (bytes < 0) 138 | cerr << "\033[31mERROR reading recv_buffer from socket\033[0m"; 139 | if (bytes == 0) 140 | break; 141 | received += bytes; 142 | } while (received < packet_size); 143 | 144 | if (bytes == 0) // client shut down 145 | { 146 | cout << "\033[34mThe client is shut down.\033[0m\n" 147 | << client_list.size() << endl; 148 | 149 | auto iter = client_list.begin(); 150 | for (; iter != client_list.end();) { 151 | if (conn_fd == iter->num) { 152 | iter = client_list.erase(iter); 153 | } else 154 | iter++; 155 | } 156 | break; 157 | } 158 | Packet* phead = (Packet*)test; 159 | int data_length = phead->header.length - sizeof(PacketHeader); 160 | 161 | cout << "# Data: [[\033[33m\n" 162 | << phead->body.data << "\033[0m\n]]" << endl; 163 | if (data_length > 0 && data_length > sizeof(Packet) - sizeof(PacketHeader)) { // extra read 164 | received = 0; 165 | cout << "# Extra Read #" << endl; 166 | do { 167 | bytes = recv(conn_fd, test + packet_size + received, data_length - received, 0); 168 | 169 | if (bytes < 0) 170 | cerr << "\033[31mERROR reading recv_buffer from socket.\033[0m"; 171 | if (bytes == 0) //the server is closed 172 | { 173 | break; 174 | } 175 | received += bytes; 176 | 177 | } while (received < data_length); 178 | } 179 | 180 | switch (phead->header.op) { 181 | case TIME: { 182 | cout << "[Get time request]" << endl; 183 | 184 | cnt++; 185 | time_t nowtime; 186 | nowtime = time(NULL); 187 | Packet to_send(listen_fd, conn_fd, sizeof(Packet), 0, TIME, nullptr); 188 | strncpy((char*)to_send.body.data, (const char*)&nowtime, sizeof(nowtime)); //copy data 189 | send(conn_fd, &to_send, sizeof(to_send), 0); 190 | 191 | cout << "\033[32m# Send to client success " << sizeof(to_send) << "\033[0m" << endl; 192 | cout << "\033[32m# Send Time to client success " 193 | << "\033[0m" << endl; 194 | cout << "# Raw data: [[\033[33m\n" 195 | << to_send.body.data << "\033[0m\n]]" << endl; 196 | cout << "# Data is: [[\033[33m\n" 197 | << *((time_t*)to_send.body.data) << "\033[0m\n]]" << endl; 198 | cout << "[" << ctime(&nowtime) << "]" << endl; 199 | cout << " ---- cnt: " << cnt << "\n" 200 | << endl; 201 | break; 202 | } 203 | case NAME: { 204 | cout << "[Get name request]\n"; 205 | 206 | Packet to_send(listen_fd, conn_fd, sizeof(Packet), 0, NAME, nullptr); 207 | strncpy((char*)to_send.body.data, (const char*)server_name, strlen(server_name) + 1); 208 | send(conn_fd, &to_send, sizeof(to_send), 0); 209 | 210 | cnt++; 211 | cout << "\033[32m# Send to client success " << sizeof(to_send) << "\033[0m" << endl; 212 | cout << "\033[32m# Send name to client success " 213 | << "\033[0m" << endl; 214 | cout << "# Raw data: [[\033[33m\n" 215 | << (char*)to_send.body.data << "\033[0m\n]]" << endl; 216 | cout << ((char*)to_send.body.data) << endl; 217 | cout << " ---- cnt: " << cnt << "\n" 218 | << endl; 219 | break; 220 | } 221 | case ACTIVE_LIST: { 222 | cout << "[Get active list request]\n"; 223 | 224 | Packet to_send(listen_fd, conn_fd, sizeof(Packet), 0, ACTIVE_LIST, nullptr); 225 | for (int i = 0; i < client_list.size(); ++i) { 226 | to_send.body.list[i].port = client_list[i].port; 227 | to_send.body.list[i].num = client_list[i].num; 228 | strncpy(to_send.body.list[i].ip, client_list[i].ip, 15); 229 | if (conn_fd == to_send.body.list[i].num) { 230 | to_send.body.list[i].isThisMyfd = 1; 231 | cout << "...done" << endl; 232 | } else 233 | to_send.body.list[i].isThisMyfd = 0; 234 | } 235 | int n = client_list.size(); 236 | strncpy((char*)to_send.body.data, (const char*)&n, sizeof(int)); //copy data 237 | send(conn_fd, &to_send, sizeof(to_send), 0); 238 | cout << "\033[32m# Send to client success " << sizeof(to_send) << "\033[0m" << endl; 239 | cout << "\033[32m# Send name to client success " << sizeof(to_send) - sizeof(PacketHeader) << "\033[0m" << endl; 240 | cout << "# Raw data: [[\033[33m\n" 241 | << (char*)to_send.body.data << "\033[0m\n]]" << endl; 242 | cout << "# num of data is : " << *(int*)to_send.body.data << endl; 243 | for (int i = 0; i < *(int*)to_send.body.data; ++i) { 244 | cout << "* " << to_send.body.list[i].ip; 245 | cout << ":" << to_send.body.list[i].port; 246 | cout << "\t\tNAME:\"" << sizeof(to_send.body.list[i].ip) << "\"" << endl; 247 | } 248 | cnt++; 249 | cout << " ---- cnt: " << cnt << "\n" 250 | << endl; 251 | break; 252 | } 253 | case MESSAGE: { 254 | if (phead->header.type == 1) { // message request 255 | cout << "[Get message request]\n"; 256 | 257 | Packet to_send = *phead; 258 | bool isExist = 0; 259 | for (auto i : client_list) { 260 | if (i.num == to_send.header.destination) { 261 | isExist = true; 262 | break; 263 | } 264 | } 265 | 266 | if (isExist == false) { 267 | cerr << "No such client!" << endl; 268 | Packet error_info(listen_fd, conn_fd, sizeof(Packet), 2, ERROR, nullptr); 269 | send(conn_fd, &error_info, sizeof(error_info), 0); 270 | cout << "\033[32m# Send error message to client success " << conn_fd << "\033[0m" << endl; 271 | } else { 272 | cout << "req:" << to_send.header.source << " to " << to_send.header.destination << endl; 273 | send(to_send.header.destination, &to_send, sizeof(to_send), 0); 274 | cout << "\033[32m# Send message request to client success " << sizeof(to_send) << "\033[0m" << endl; 275 | cout << "# Raw data: [[\033[33m\n" 276 | << (char*)to_send.body.data << "\033[0m\n]]" << endl; 277 | cout << "# fd is : " << to_send.header.destination << endl; 278 | } 279 | 280 | cnt++; 281 | cout << " ---- cnt: " << cnt << "\n" 282 | << endl; 283 | } else { 284 | cout << "[Get message reply]\n"; 285 | 286 | Packet to_send = *phead; 287 | cout << to_send.header.source << " send to:" << to_send.header.destination << endl; 288 | send(to_send.header.destination, &to_send, sizeof(to_send), 0); //maybe bug 289 | cout << "\033[32m# Send message reply to client success " << sizeof(to_send) << "\033[0m" << endl; 290 | cout << "# Raw data: [[\033[33m\n" 291 | << (char*)to_send.body.data << "\033[0m\n]]" << endl; 292 | cout << "# num of data is : " << *(int*)to_send.body.data << endl; 293 | 294 | cnt++; 295 | cout << " ---- cnt: " << cnt << "\n" 296 | << endl; 297 | } 298 | break; 299 | } 300 | default: { 301 | cout << "\033[31mRequest Error!\033[0m\n"; 302 | } 303 | } 304 | } 305 | } 306 | -------------------------------------------------------------------------------- /第三方实验报告/8/lab8.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/第三方实验报告/8/lab8.pdf -------------------------------------------------------------------------------- /第三方实验报告/8/src/NetworkManager.cpp: -------------------------------------------------------------------------------- 1 | #include "NetworkManager.hpp" 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #define MAX_CONN 1024 12 | 13 | static int listen_port(int port); 14 | static int net_accept(int socket, struct sockaddr* addr, socklen_t* addrlen); 15 | 16 | NetworkManager::NetworkManager() 17 | : listen_fd(-1) 18 | , conn_fd(-1) 19 | { 20 | } 21 | void NetworkManager::Listen(int port) 22 | { 23 | int rc; 24 | rc = listen_port(port); 25 | if (rc < 0) 26 | perror("Listen error"); 27 | else 28 | listen_fd = rc; 29 | } 30 | 31 | int NetworkManager::Accept() 32 | { 33 | int clientlen; 34 | struct sockaddr_in clientaddr; 35 | clientlen = sizeof(clientaddr); 36 | conn_fd = net_accept(listen_fd, (sockaddr*)&clientaddr, (socklen_t*)&clientlen); 37 | if (conn_fd < 0) { 38 | perror("Accept error"); 39 | return -1; 40 | } else 41 | return conn_fd; 42 | } 43 | 44 | void NetworkManager::Close() 45 | { 46 | int rc; 47 | rc = close(conn_fd); 48 | if (rc < 0) 49 | perror("Close error"); 50 | else 51 | return; 52 | } 53 | 54 | int listen_port(int port) 55 | { 56 | // Reference: CSAPP 57 | struct sockaddr_in serveraddr; 58 | int listenfd, optval; 59 | 60 | /* Create a socket */ 61 | if ((listenfd = socket(AF_INET, SOCK_STREAM, 0)) < 0) 62 | return -1; 63 | 64 | /* Eliminate "Address already in use" */ 65 | if (setsockopt(listenfd, SOL_SOCKET, SO_REUSEADDR, 66 | (const void*)&optval, sizeof(int)) 67 | < 0) 68 | return -1; 69 | 70 | /* Set up the address */ 71 | bzero((char*)&serveraddr, sizeof(serveraddr)); 72 | serveraddr.sin_family = AF_INET; 73 | serveraddr.sin_addr.s_addr = htonl(INADDR_ANY); 74 | serveraddr.sin_port = htons((unsigned short)port); 75 | if (bind(listenfd, (struct sockaddr*)&serveraddr, sizeof(serveraddr)) < 0) 76 | return -1; 77 | 78 | /* Listen to the socket */ 79 | if (listen(listenfd, MAX_CONN) < 0) 80 | return -1; 81 | 82 | /* Return the socket*/ 83 | return listenfd; 84 | } 85 | 86 | int net_accept(int socket, struct sockaddr* addr, socklen_t* addrlen) 87 | { 88 | int rc; 89 | rc = accept(socket, addr, addrlen); 90 | if (rc < 0) { 91 | perror("Accept error"); 92 | return -1; 93 | } else 94 | return rc; 95 | } 96 | -------------------------------------------------------------------------------- /第三方实验报告/8/src/NetworkManager.hpp: -------------------------------------------------------------------------------- 1 | #ifndef NETWORKMANAGER_HPP 2 | #define NETWORKMANAGER_HPP 3 | 4 | class NetworkManager 5 | { 6 | /* Use the following interface to manage connection */ 7 | public: 8 | NetworkManager(); 9 | void Listen(int port); 10 | int Accept(); 11 | void Close(); 12 | 13 | /* The two file descriptor is private */ 14 | private: 15 | int listen_fd, conn_fd; 16 | }; 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /第三方实验报告/8/src/NetworkManager.hpp.gch: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/第三方实验报告/8/src/NetworkManager.hpp.gch -------------------------------------------------------------------------------- /第三方实验报告/8/src/RequestManager.cpp: -------------------------------------------------------------------------------- 1 | #include "RequestManager.hpp" 2 | #include "csapp.h" 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | 14 | #define LINE_MAX_LENGTH 8192 15 | #define BUFFER_SIZE 8192 16 | 17 | //===================================== 18 | // Static functions 19 | //===================================== 20 | static ssize_t rio_read(rio_t* rp, char* usrbuf, size_t n); 21 | static void MakeResponse_Post(int connfd, bool log); 22 | static void HandlePost(int fd, char* uri, rio_t* rio); 23 | static void HandleGet(int fd, char* uri, rio_t* rio); 24 | void* Request_Handler(void* arg); 25 | void iClient_error(int connfd, char* err, char* shortmsg, char* longmsg); 26 | 27 | RequestManager::RequestManager(int connfd) 28 | : connfd(connfd) 29 | { 30 | } 31 | 32 | void RequestManager::Start() 33 | { 34 | pthread_t tid; 35 | if (pthread_create(&tid, NULL, Request_Handler, (void*)(&connfd)) == -1) { 36 | perror("Error creating new thread"); 37 | return; 38 | } 39 | pthread_join(tid, NULL); 40 | } 41 | 42 | void* Request_Handler(void* arg) 43 | { 44 | rio_t rio; 45 | 46 | int connfd = *(int*)arg; 47 | rio_readinitb(&rio, connfd); 48 | 49 | char Buffer[LINE_MAX_LENGTH], method[LINE_MAX_LENGTH], uri[LINE_MAX_LENGTH], version[LINE_MAX_LENGTH]; 50 | rio_readlineb(&rio, Buffer, LINE_MAX_LENGTH); 51 | 52 | sscanf(Buffer, "%s %s %s", method, uri, version); 53 | 54 | std::cout << "\n------------------------------------------" << std::endl; 55 | std::cout << "\033[31mMethod: \033[0m" << method << std::endl; 56 | std::cout << "\033[31mURI: \033[0m" << uri << std::endl; 57 | std::cout << "\033[31mVERSION: \033[0m" << version << std::endl; 58 | if (!strcasecmp(method, "POST")) { 59 | HandlePost(connfd, uri, &rio); 60 | pthread_exit(NULL); 61 | } else if (!strcasecmp(method, "GET")) { 62 | HandleGet(connfd, uri, &rio); 63 | pthread_exit(NULL); 64 | } else { 65 | iClient_error(connfd, "501", "Not implemented", "This kind of request is not supported in this server!"); 66 | pthread_exit(NULL); 67 | } 68 | } 69 | 70 | /* Read_RequestHeader: 71 | Does not use any information in the request header, only reads the header 72 | */ 73 | void Read_RequestHeader(rio_t* rp) 74 | { 75 | char Buffer[LINE_MAX_LENGTH]; 76 | 77 | rio_readlineb(rp, Buffer, LINE_MAX_LENGTH); 78 | while (strcmp(Buffer, "\r\n")) { 79 | // The empty text line in the header of the termination request is composed of a carriage return and a line feed 80 | rio_readlineb(rp, Buffer, LINE_MAX_LENGTH); 81 | printf("%s", Buffer); 82 | } 83 | return; 84 | } 85 | 86 | /* URI_Prase: 87 | Assume that the main directory of static content is the current directory; the main directory of the executable is ./cgi-bin/, and any URI containing the string is considered a request for dynamic content 88 | Parse the URI into a file name and an optional CGI parameter string 89 | */ 90 | int URI_Prase(char* uri, char* filename, char* cgiargs) 91 | { 92 | char* ptr; 93 | 94 | if (strstr(uri, "cgi-bin")) { 95 | // Dynamic content:Take all the CGi parameters and convert the rest of the URI to a corresponding unix file name 96 | ptr = index(uri, '?'); 97 | if (!ptr) { 98 | strcpy(cgiargs, ptr + 1); 99 | *ptr = '\0'; 100 | } else { 101 | cgiargs[0] = '\0'; 102 | } 103 | strcpy(filename, "."); 104 | strcat(filename, uri); 105 | return 0; 106 | } else { 107 | // static content: Clear the CGI parameter string, and then convert the URI to a relative unix path name 108 | strcpy(filename, "."); // begin convert1 109 | strcat(filename, uri); // end convert1 110 | if (uri[strlen(uri) - 1] == '/') { 111 | // slash check:If ending with "/", append the default file name to the end 112 | strcat(filename, "home.html"); // append default 113 | } 114 | return 1; 115 | } 116 | } 117 | 118 | /* get_filetype: 119 | derive file type from file name 120 | */ 121 | void get_filetype(char* filename, char* filetype) 122 | { 123 | if (!filename || !filetype) 124 | return; 125 | if (strstr(filename, ".html")) { 126 | strcpy(filetype, "text/html"); 127 | } else if (strstr(filename, ".jpg")) { 128 | strcpy(filetype, "image/jpeg"); 129 | } else if (strstr(filename, ".gif")) { 130 | strcpy(filetype, "image/gif"); 131 | } else { 132 | strcpy(filetype, "text/plain"); 133 | } 134 | } 135 | 136 | /* serve_static: 137 | Send an HTTP response with the body containing the contents of a local file 138 | */ 139 | void serve_static(int fd, char* filename, int filesize) 140 | { 141 | char *srcp, filetype[LINE_MAX_LENGTH], buf[LINE_MAX_LENGTH]; 142 | int srcfd; 143 | 144 | // send response headers to client 145 | get_filetype(filename, filetype); // get filetype 146 | 147 | sprintf(buf, "HTTP/1.0 200 OK\r\n Server: Tiny Web Server\r\n Content-length: %d\r\n Content-type: %s\r\n\r\n", filesize, filetype); // begin serve 148 | rio_writen(fd, buf, strlen(buf)); // end serve 149 | 150 | // send response body to client 151 | srcfd = Open(filename, O_RDONLY, 0); // open 152 | srcp = (char*)Mmap(0, filesize, PROT_READ, MAP_PRIVATE, srcfd, 0); 153 | // mmap: map the requested file to a virtual memory space, 154 | // Call mmap to map the first filesize bytes of file srcfd to a private read-only memory area starting at address srcp 155 | Close(srcfd); 156 | // Perform the actual file transfer to the client, copy the filesize bytes starting from the srcp position to the client's connected descriptor 157 | rio_writen(fd, srcp, filesize); 158 | // Frees mapped virtual memory areas to avoid potential memory leaks 159 | Munmap(srcp, filesize); 160 | } 161 | 162 | /* serve_dynamic: 163 | Forking a child process and running a CGI program in the context of the child process to provide various types of dynamic content 164 | */ 165 | void serve_dynamic(int fd, char* filename, char* cgiargs) 166 | { 167 | char buf[LINE_MAX_LENGTH], *emptylist[] = { NULL }; 168 | 169 | // return first part of HTTP response 170 | sprintf(buf, "HTTP/1.0 200 OK\r\n"); 171 | rio_writen(fd, buf, strlen(buf)); 172 | sprintf(buf, "Server: Tiny Web Server\r\n"); 173 | rio_writen(fd, buf, strlen(buf)); 174 | 175 | if (Fork() == 0) { // child 176 | // real server sould set all CGI vars here 177 | setenv("QUERY_STRING", cgiargs, 1); // setenv 178 | Dup2(fd, STDOUT_FILENO); // redirect stdout to client, dup2 179 | Execve(filename, emptylist, environ); // run CGI program, execve 180 | } 181 | Wait(NULL); // parent waits for and reaps chile 182 | } 183 | 184 | void HandleGet(int connfd, char* uri, rio_t* rio) 185 | { 186 | int isStatic; 187 | char FileName[LINE_MAX_LENGTH], cgi_Args[LINE_MAX_LENGTH]; 188 | struct stat sbuf; 189 | 190 | Read_RequestHeader(rio); 191 | // parse URI from GET request 192 | isStatic = URI_Prase(uri, FileName, cgi_Args); 193 | if (stat(FileName, &sbuf) < 0) { 194 | iClient_error(connfd, "404", "Not found", "Tiny could not find this file"); 195 | return; 196 | } 197 | 198 | if (isStatic) { 199 | // static content:Verify that static content is a normal file with read permission 200 | if (!(S_ISREG(sbuf.st_mode)) || !(S_IRUSR & sbuf.st_mode)) { 201 | iClient_error(connfd, "403", "Forbidden", "Tiny could not read the file"); 202 | return; 203 | } 204 | serve_static(connfd, FileName, sbuf.st_size); 205 | } else { 206 | // dynamic sontent:Dynamic content, verify that it is executable, and if so, provide dynamic content 207 | if (!(S_ISREG(sbuf.st_mode)) || !(S_IRUSR & sbuf.st_mode)) { 208 | iClient_error(connfd, "403", "Forbidden", "Tiny could not run the CGI program"); 209 | return; 210 | } 211 | serve_dynamic(connfd, FileName, cgi_Args); 212 | } 213 | } 214 | 215 | void HandlePost(int connfd, char* uri, rio_t* rio) 216 | { 217 | char Buffer[LINE_MAX_LENGTH]; 218 | char login[LINE_MAX_LENGTH], pass[LINE_MAX_LENGTH]; 219 | bool log = false; 220 | if (strcasecmp(uri, "/html/dopost") || strcasecmp(uri, "/dopost")) { 221 | int contentlength; 222 | rio_readlineb(rio, Buffer, LINE_MAX_LENGTH); 223 | std::cout << Buffer; 224 | 225 | /* Read till \r\n appear */ 226 | while (strcmp(Buffer, "\r\n")) { 227 | if (strstr(Buffer, "Content-Length:")) 228 | sscanf(Buffer + strlen("Content-Length:"), "%d", &contentlength); 229 | rio_readlineb(rio, Buffer, LINE_MAX_LENGTH); 230 | std::cout << Buffer; 231 | } 232 | std::cout << "\033[31m[Finish reading header]\033[0m" << std::endl; 233 | /* Now we get the body */ 234 | rio_readlineb(rio, Buffer, contentlength + 1); 235 | /* Output the body */ 236 | std::cout << "Body: [[" << Buffer << "]]" << std::endl; 237 | if (strstr(Buffer, "login=") && strstr(Buffer, "pass=")) { 238 | char* p = strstr(Buffer, "login="); 239 | int li = 0, pi = 0; 240 | while (*p++ != '=') 241 | ; 242 | while (*p != '&') { 243 | login[li++] = *p++; 244 | } 245 | login[li] = 0; 246 | while (*p++ != '=') 247 | ; 248 | while (*p) { 249 | pass[pi++] = *p++; 250 | } 251 | pass[pi] = 0; 252 | } 253 | /* Login status check */ 254 | std::cout << "Username: " << login << "\nPasswd: " << pass << std::endl; 255 | if (!strcmp(login, "3170103746") && !strcmp(pass, "12345")) 256 | log = true; 257 | else 258 | log = false; 259 | 260 | /* Return status */ 261 | MakeResponse_Post(connfd, log); 262 | return; 263 | } else { 264 | iClient_error(connfd, "404", "Not found", "This kind of resource is not available in this server"); 265 | return; 266 | } 267 | } 268 | 269 | void MakeResponse_Post(int connfd, bool log) 270 | { 271 | char* failmsg = "Fail"; 272 | char* successmsg = "Success"; 273 | char Buffer[LINE_MAX_LENGTH]; 274 | 275 | sprintf(Buffer, "HTTP/1.0 200 OK\r\nServer: Server Content-length: %d\r\nContent-type: text/html\r\n\r\n", log ? strlen(successmsg) : strlen(failmsg)); 276 | 277 | /* Log in successful */ 278 | 279 | rio_writen(connfd, Buffer, strlen(Buffer)); 280 | if (log) 281 | rio_writen(connfd, successmsg, strlen(successmsg)); 282 | else 283 | rio_writen(connfd, failmsg, strlen(failmsg)); 284 | } 285 | 286 | void iClient_error(int connfd, char* err, char* shortmsg, char* longmsg) 287 | { 288 | char Buffer[LINE_MAX_LENGTH], body[LINE_MAX_LENGTH]; 289 | sprintf(body, "%s: %s\r\n%s\r\nError msg from Web Server\r\n", err, shortmsg, longmsg); 290 | 291 | sprintf(Buffer, "HTTP/1.0 %s %s\r\n", err, shortmsg); 292 | rio_writen(connfd, Buffer, strlen(Buffer)); 293 | sprintf(Buffer, "Content-type: text/html\r\n"); 294 | rio_writen(connfd, Buffer, strlen(Buffer)); 295 | sprintf(Buffer, "Content-length: %d\r\n\r\n", (int)strlen(body)); 296 | rio_writen(connfd, Buffer, strlen(Buffer)); 297 | 298 | rio_writen(connfd, body, strlen(body)); 299 | } 300 | -------------------------------------------------------------------------------- /第三方实验报告/8/src/RequestManager.hpp: -------------------------------------------------------------------------------- 1 | #ifndef REQUESTMANAGER_HPP 2 | #define REQUESTMANAGER_HPP 3 | 4 | class RequestManager { 5 | public: 6 | void Start(); 7 | RequestManager(int connfd); 8 | private: 9 | int connfd; 10 | }; 11 | 12 | 13 | #endif 14 | -------------------------------------------------------------------------------- /第三方实验报告/8/src/csapp.h: -------------------------------------------------------------------------------- 1 | /* $begin csapp.h */ 2 | #ifndef __CSAPP_H__ 3 | #define __CSAPP_H__ 4 | 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include 24 | #include 25 | #include 26 | 27 | /* Default file permissions are DEF_MODE & ~DEF_UMASK */ 28 | /* $begin createmasks */ 29 | #define DEF_MODE S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH 30 | #define DEF_UMASK S_IWGRP | S_IWOTH 31 | /* $end createmasks */ 32 | 33 | /* Simplifies calls to bind(), connect(), and accept() */ 34 | /* $begin sockaddrdef */ 35 | typedef struct sockaddr SA; 36 | /* $end sockaddrdef */ 37 | 38 | /* Persistent state for the robust I/O (Rio) package */ 39 | /* $begin rio_t */ 40 | #define RIO_BUFSIZE 8192 41 | typedef struct { 42 | int rio_fd; /* Descriptor for this internal buf */ 43 | int rio_cnt; /* Unread bytes in internal buf */ 44 | char* rio_bufptr; /* Next unread byte in internal buf */ 45 | char rio_buf[RIO_BUFSIZE]; /* Internal buffer */ 46 | } rio_t; 47 | /* $end rio_t */ 48 | 49 | /* External variables */ 50 | extern int h_errno; /* Defined by BIND for DNS errors */ 51 | extern char** environ; /* Defined by libc */ 52 | 53 | /* Misc constants */ 54 | #define MAXLINE 8192 /* Max text line length */ 55 | #define MAXBUF 8192 /* Max I/O buffer size */ 56 | #define LISTENQ 1024 /* Second argument to listen() */ 57 | 58 | /* Our own error-handling functions */ 59 | void unix_error(char* msg); 60 | void posix_error(int code, char* msg); 61 | void dns_error(char* msg); 62 | void app_error(char* msg); 63 | 64 | /* Process control wrappers */ 65 | pid_t Fork(void); 66 | void Execve(const char* filename, char* const argv[], char* const envp[]); 67 | pid_t Wait(int* status); 68 | pid_t Waitpid(pid_t pid, int* iptr, int options); 69 | void Kill(pid_t pid, int signum); 70 | unsigned int Sleep(unsigned int secs); 71 | void Pause(void); 72 | unsigned int Alarm(unsigned int seconds); 73 | void Setpgid(pid_t pid, pid_t pgid); 74 | pid_t Getpgrp(); 75 | 76 | /* Signal wrappers */ 77 | typedef void handler_t(int); 78 | handler_t* Signal(int signum, handler_t* handler); 79 | void Sigprocmask(int how, const sigset_t* set, sigset_t* oldset); 80 | void Sigemptyset(sigset_t* set); 81 | void Sigfillset(sigset_t* set); 82 | void Sigaddset(sigset_t* set, int signum); 83 | void Sigdelset(sigset_t* set, int signum); 84 | int Sigismember(const sigset_t* set, int signum); 85 | 86 | /* Unix I/O wrappers */ 87 | int Open(const char* pathname, int flags, mode_t mode); 88 | ssize_t Read(int fd, void* buf, size_t count); 89 | ssize_t Write(int fd, const void* buf, size_t count); 90 | off_t Lseek(int fildes, off_t offset, int whence); 91 | void Close(int fd); 92 | int Select(int n, fd_set* readfds, fd_set* writefds, fd_set* exceptfds, 93 | struct timeval* timeout); 94 | int Dup2(int fd1, int fd2); 95 | void Stat(const char* filename, struct stat* buf); 96 | void Fstat(int fd, struct stat* buf); 97 | 98 | /* Memory mapping wrappers */ 99 | void* Mmap(void* addr, size_t len, int prot, int flags, int fd, off_t offset); 100 | void Munmap(void* start, size_t length); 101 | 102 | /* Standard I/O wrappers */ 103 | void Fclose(FILE* fp); 104 | FILE* Fdopen(int fd, const char* type); 105 | char* Fgets(char* ptr, int n, FILE* stream); 106 | FILE* Fopen(const char* filename, const char* mode); 107 | void Fputs(const char* ptr, FILE* stream); 108 | size_t Fread(void* ptr, size_t size, size_t nmemb, FILE* stream); 109 | void Fwrite(const void* ptr, size_t size, size_t nmemb, FILE* stream); 110 | 111 | /* Dynamic storage allocation wrappers */ 112 | void* Malloc(size_t size); 113 | void* Realloc(void* ptr, size_t size); 114 | void* Calloc(size_t nmemb, size_t size); 115 | void Free(void* ptr); 116 | 117 | /* Sockets interface wrappers */ 118 | int Socket(int domain, int type, int protocol); 119 | void Setsockopt(int s, int level, int optname, const void* optval, int optlen); 120 | void Bind(int sockfd, struct sockaddr* my_addr, int addrlen); 121 | void Listen(int s, int backlog); 122 | int Accept(int s, struct sockaddr* addr, socklen_t* addrlen); 123 | void Connect(int sockfd, struct sockaddr* serv_addr, int addrlen); 124 | 125 | /* DNS wrappers */ 126 | struct hostent* Gethostbyname(const char* name); 127 | struct hostent* Gethostbyaddr(const char* addr, int len, int type); 128 | 129 | /* Pthreads thread control wrappers */ 130 | void Pthread_create(pthread_t* tidp, pthread_attr_t* attrp, 131 | void* (*routine)(void*), void* argp); 132 | void Pthread_join(pthread_t tid, void** thread_return); 133 | void Pthread_cancel(pthread_t tid); 134 | void Pthread_detach(pthread_t tid); 135 | void Pthread_exit(void* retval); 136 | pthread_t Pthread_self(void); 137 | void Pthread_once(pthread_once_t* once_control, void (*init_function)()); 138 | 139 | /* POSIX semaphore wrappers */ 140 | void Sem_init(sem_t* sem, int pshared, unsigned int value); 141 | void P(sem_t* sem); 142 | void V(sem_t* sem); 143 | 144 | /* Rio (Robust I/O) package */ 145 | ssize_t rio_readn(int fd, void* usrbuf, size_t n); 146 | ssize_t rio_writen(int fd, void* usrbuf, size_t n); 147 | void rio_readinitb(rio_t* rp, int fd); 148 | ssize_t rio_readnb(rio_t* rp, void* usrbuf, size_t n); 149 | ssize_t rio_readlineb(rio_t* rp, void* usrbuf, size_t maxlen); 150 | 151 | /* Wrappers for Rio package */ 152 | ssize_t Rio_readn(int fd, void* usrbuf, size_t n); 153 | void Rio_writen(int fd, void* usrbuf, size_t n); 154 | void Rio_readinitb(rio_t* rp, int fd); 155 | ssize_t Rio_readnb(rio_t* rp, void* usrbuf, size_t n); 156 | ssize_t Rio_readlineb(rio_t* rp, void* usrbuf, size_t maxlen); 157 | 158 | /* Client/server helper functions */ 159 | int open_clientfd(char* hostname, int portno); 160 | int open_listenfd(int portno); 161 | 162 | /* Wrappers for client/server helper functions */ 163 | int Open_clientfd(char* hostname, int port); 164 | int Open_listenfd(int port); 165 | 166 | #endif /* __CSAPP_H__ */ 167 | /* $end csapp.h */ 168 | -------------------------------------------------------------------------------- /第三方实验报告/8/src/html/noimg.html: -------------------------------------------------------------------------------- 1 | 2 | Test 3 | 4 |

This is a test

5 |
6 | Login: 7 | Pass: 8 | 9 |
10 | 11 | 12 | -------------------------------------------------------------------------------- /第三方实验报告/8/src/html/test.html: -------------------------------------------------------------------------------- 1 | 2 | Test 3 | 4 |

This is a test

5 | 6 |
7 | Login: 8 | Pass: 9 | 10 |
11 | 12 | 13 | -------------------------------------------------------------------------------- /第三方实验报告/8/src/img/logo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/第三方实验报告/8/src/img/logo.jpg -------------------------------------------------------------------------------- /第三方实验报告/8/src/main.cpp: -------------------------------------------------------------------------------- 1 | #include "NetworkManager.hpp" 2 | #include "RequestManager.hpp" 3 | 4 | #include 5 | 6 | int main(int argc, char** argv) 7 | { 8 | NetworkManager NetMng; 9 | 10 | NetMng.Listen(3746); 11 | std::cout << "\033[31m[LOG] \033[0m" 12 | << "Web Server started. Waiting for request" << std::endl; 13 | 14 | /* Infinity loop on accepting request and handling */ 15 | while (true) { 16 | int connfd; 17 | connfd = NetMng.Accept(); 18 | RequestManager rm(connfd); 19 | std::cout << "\033[31m[LOG] \033[0m" 20 | << "Connection Established, socket id = " << connfd << std::endl; 21 | rm.Start(); 22 | NetMng.Close(); 23 | } 24 | 25 | return 0; 26 | } 27 | -------------------------------------------------------------------------------- /第三方实验报告/8/src/makefile: -------------------------------------------------------------------------------- 1 | CC = g++ 2 | 3 | LIB = -lpthread 4 | 5 | 6 | PRG=server 7 | OBJ=RequestManager.o NetworkManager.o main.o csapp.o 8 | 9 | 10 | $(PRG):$(OBJ) 11 | $(CC) -g -o $@ $(OBJ) $(LIB) 12 | 13 | .SUFFIXES: .cpp .o .hpp 14 | .cpp.o: 15 | $(CC) $(CC_FLAG) -g -c $*.cpp -o $*.o $(LIB) 16 | 17 | .PRONY:clean 18 | 19 | clean: 20 | @echo "Removing linked and compiled files" 21 | rm -f $(OBJ) $(PRG) 22 | -------------------------------------------------------------------------------- /第三方实验报告/8/src/readme.md: -------------------------------------------------------------------------------- 1 | # How to run 2 | 3 | On UNIX, Linux or macOS: 4 | 5 | Use `make` to build , then use `./server` to run, finally use `make clean` to clean all Intermediate file and executable object. -------------------------------------------------------------------------------- /第三方实验报告/8/src/txt/test.txt: -------------------------------------------------------------------------------- 1 | Hello World! 2 | This is a test txt. 3 | -------------------------------------------------------------------------------- /计网复习资料/2022lkj100.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/计网复习资料/2022lkj100.docx -------------------------------------------------------------------------------- /计网复习资料/2022lkj100答案版.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/计网复习资料/2022lkj100答案版.docx -------------------------------------------------------------------------------- /计网复习资料/计算机网络 2018-2019 Fall&Winter Final.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/计网复习资料/计算机网络 2018-2019 Fall&Winter Final.pdf -------------------------------------------------------------------------------- /计网复习资料/计算机网络 2018-2019 我的答案.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/计网复习资料/计算机网络 2018-2019 我的答案.pdf -------------------------------------------------------------------------------- /计网复习资料/试卷整理.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/计网复习资料/试卷整理.pdf -------------------------------------------------------------------------------- /计网复习资料/错题.assets/9321673094790_.pic.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/计网复习资料/错题.assets/9321673094790_.pic.jpg -------------------------------------------------------------------------------- /计网复习资料/错题.md: -------------------------------------------------------------------------------- 1 | ![9321673094790_.pic](./错题.assets/9321673094790_.pic.jpg) 2 | 3 | \1. The cable between toll office and the end office of telephone company are known as the ________. 4 | 5 | A. local loop **B. trunk** C. microwave line D. coaxial cable 6 | 7 | 8 | 9 | \2. It is impossible for ________ to cause transmission impairments of telephone local loop. 10 | 11 | A. different Fourier components propagating at different speed 12 | 13 | B. thermal noise 14 | 15 | C. crosstalk between two close wires 16 | 17 | **D. multipath fading** 18 | 19 | 20 | 21 | \1. If a binary signal is sent over a 3-kHz channel whose signal-to-noise ratio S/N is 31, what is the maximum achievable data rate? 22 | 23 | **A. 6 kbps** B. 12 kbps C. 15 kbps D. 18 kbps 24 | 25 | 26 | 27 | \1. The three central concepts of the OSI model are ________. 28 | 29 | **A. services, interfaces and protocols** B. architecture, model and switching 30 | 31 | C. subnet, layering and port D. protocols, layers and interfaces 32 | 33 | 34 | 35 | \2. Once upon a time, people thought that the OSI model and its protocols were going to take over the world and push everything else out of their way. This did not happen. Why? A look back at some of the reasons may be useful. They can be summarized as following except for _______: 36 | 37 | A. Bad timing. B. Bad technology. **C. Bad price.** D. Bad implementations. 38 | 39 | 40 | 41 | \1. With Hamming code, the code which can correct 3 bit errors at most may detect at most ________ error(s). 42 | 43 | A. 5 B.6 **C.7** D. 8 44 | 45 | 注意这里是最多,7/8码距汉明码都是纠3bit 46 | 47 | 48 | 49 | \1. What is the baud rate of classic 10-Mbps Ethernet? 50 | 51 | A. 10M B. 15M **C. 20M** D. 25M 52 | 53 | 54 | 55 | \1. The hosts connected by a single new router may belong to 56 | 57 | A. the same collision domain and the same broadcast domain 58 | 59 | B. the same collision domain but different broadcast domains 60 | 61 | C. the same broadcast domain but different collision domains 62 | 63 | **D. different collision domains and different broadcast domains** 64 | 65 | 66 | 67 | \1. Which is not the CSMA/CA rule of 802.11? 68 | 69 | A. If station X received RTS of station A, X must remain silent for a short time so that X will not interfere with A’s receipt of CTS. 70 | 71 | B. If station X received RTS, but did not receive CTS, then X can transmit its data and will not interfere with other stations. 。 72 | 73 | C. If station X has not received RTS, but received CTS, then X may not transmit its data.. 74 | 75 | **D. If station X has received both RTS and CTS, then X may transmit its data.** 76 | 77 | 78 | 79 | \1. The IP protocol provides for ______ service. 80 | 81 | A. reliable and connection-oriented 82 | 83 | B. non-routable 84 | 85 | **C. unreliable and connectionless** 86 | 87 | D. none of the above 88 | 89 | 可不可靠,有没有连接只管当前,不管下层 90 | 91 | 92 | 93 | \1. In the TCP / IP reference model, _____ provides a direct service for ICMP. 94 | 95 | A. PPP **B. IP** C. UDP D. TCP 96 | 97 | 98 | 99 | \1. ______ is a small java program that has been compiled into binary instruction running in JVM, and can be embedded into HTML pages, interpreted by JVM-capable browsers. 100 | 101 | A. JavaScript B. JavaBean **C. Applet** D. JSP 102 | 103 | 104 | 105 | \1. There are two types of transmission technology that are in widespread use. They are Point-to-point links and ________ . 106 | 107 | **A. Broadcast links.** B. end-to-end links 108 | 109 | C. peer-to-peer links D. virtual links. 110 | 111 | 112 | 113 | \1. Which key will be used if A wants to send encrypted data to B when using public-key algorithms? 114 | 115 | A. The public key of A B. The private key of A 116 | 117 | **C. The public key of B** D. The private key of B -------------------------------------------------------------------------------- /计网笔记.assets/Screenshot 2022-10-30 at 19.46.33.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/计网笔记.assets/Screenshot 2022-10-30 at 19.46.33.png -------------------------------------------------------------------------------- /计网笔记.assets/image-20220927101827694.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/计网笔记.assets/image-20220927101827694.png -------------------------------------------------------------------------------- /计网笔记.assets/image-20220927105825252.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/计网笔记.assets/image-20220927105825252.png -------------------------------------------------------------------------------- /计网笔记.assets/image-20220927113559664.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/计网笔记.assets/image-20220927113559664.png -------------------------------------------------------------------------------- /计网笔记.assets/image-20220927114319170.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/计网笔记.assets/image-20220927114319170.png -------------------------------------------------------------------------------- /计网笔记.assets/image-20220927114432504.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/计网笔记.assets/image-20220927114432504.png -------------------------------------------------------------------------------- /计网笔记.assets/image-20220927114619841.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/计网笔记.assets/image-20220927114619841.png -------------------------------------------------------------------------------- /计网笔记.assets/image-20220927115025141.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/计网笔记.assets/image-20220927115025141.png -------------------------------------------------------------------------------- /计网笔记.assets/image-20221012111133883.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/计网笔记.assets/image-20221012111133883.png -------------------------------------------------------------------------------- /计网笔记.assets/image-20221012112514968.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/计网笔记.assets/image-20221012112514968.png -------------------------------------------------------------------------------- /计网笔记.assets/image-20221012112856390.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/计网笔记.assets/image-20221012112856390.png -------------------------------------------------------------------------------- /计网笔记.assets/image-20221012113929618.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/计网笔记.assets/image-20221012113929618.png -------------------------------------------------------------------------------- /计网笔记.assets/image-20221012122552656.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/计网笔记.assets/image-20221012122552656.png -------------------------------------------------------------------------------- /计网笔记.assets/image-20221012122610551.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/计网笔记.assets/image-20221012122610551.png -------------------------------------------------------------------------------- /计网笔记.assets/image-20221012122937249.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/计网笔记.assets/image-20221012122937249.png -------------------------------------------------------------------------------- /计网笔记.assets/image-20221012123701717.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/计网笔记.assets/image-20221012123701717.png -------------------------------------------------------------------------------- /计网笔记.assets/image-20221012123739030.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/计网笔记.assets/image-20221012123739030.png -------------------------------------------------------------------------------- /计网笔记.assets/image-20221012125111535.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/计网笔记.assets/image-20221012125111535.png -------------------------------------------------------------------------------- /计网笔记.assets/image-20221012141438822.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/计网笔记.assets/image-20221012141438822.png -------------------------------------------------------------------------------- /计网笔记.assets/image-20221012145916567.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/计网笔记.assets/image-20221012145916567.png -------------------------------------------------------------------------------- /计网笔记.assets/image-20221012162105560.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/计网笔记.assets/image-20221012162105560.png -------------------------------------------------------------------------------- /计网笔记.assets/image-20221017102703084.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/计网笔记.assets/image-20221017102703084.png -------------------------------------------------------------------------------- /计网笔记.assets/image-20221017104047121.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/计网笔记.assets/image-20221017104047121.png -------------------------------------------------------------------------------- /计网笔记.assets/image-20221017111640583.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/计网笔记.assets/image-20221017111640583.png -------------------------------------------------------------------------------- /计网笔记.assets/image-20221030154057054.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/计网笔记.assets/image-20221030154057054.png -------------------------------------------------------------------------------- /计网笔记.assets/image-20221030193926262.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/计网笔记.assets/image-20221030193926262.png -------------------------------------------------------------------------------- /计网笔记.assets/image-20221030200325849.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/计网笔记.assets/image-20221030200325849.png -------------------------------------------------------------------------------- /计网笔记.assets/image-20221030201126230.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/计网笔记.assets/image-20221030201126230.png -------------------------------------------------------------------------------- /计网笔记.assets/image-20221031094628481.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/计网笔记.assets/image-20221031094628481.png -------------------------------------------------------------------------------- /计网笔记.assets/image-20221031100856744-7182138.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/计网笔记.assets/image-20221031100856744-7182138.png -------------------------------------------------------------------------------- /计网笔记.assets/image-20221031100856744.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/计网笔记.assets/image-20221031100856744.png -------------------------------------------------------------------------------- /计网笔记.assets/image-20221031101025919.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/计网笔记.assets/image-20221031101025919.png -------------------------------------------------------------------------------- /计网笔记.assets/image-20221031101515402.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/计网笔记.assets/image-20221031101515402.png -------------------------------------------------------------------------------- /计网笔记.assets/image-20221031102201202.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/计网笔记.assets/image-20221031102201202.png -------------------------------------------------------------------------------- /计网笔记.assets/image-20221031102851091.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/计网笔记.assets/image-20221031102851091.png -------------------------------------------------------------------------------- /计网笔记.assets/image-20221031103617293.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/计网笔记.assets/image-20221031103617293.png -------------------------------------------------------------------------------- /计网笔记.assets/image-20221031103738760.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/计网笔记.assets/image-20221031103738760.png -------------------------------------------------------------------------------- /计网笔记.assets/image-20221107100724584.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/计网笔记.assets/image-20221107100724584.png -------------------------------------------------------------------------------- /计网笔记.assets/image-20221107102201820.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/计网笔记.assets/image-20221107102201820.png -------------------------------------------------------------------------------- /计网笔记.assets/image-20221107103653569.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/计网笔记.assets/image-20221107103653569.png -------------------------------------------------------------------------------- /计网笔记.assets/image-20221107104841712.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/计网笔记.assets/image-20221107104841712.png -------------------------------------------------------------------------------- /计网笔记.assets/image-20221107105527285.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/计网笔记.assets/image-20221107105527285.png -------------------------------------------------------------------------------- /计网笔记.assets/image-20221107110449483.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/计网笔记.assets/image-20221107110449483.png -------------------------------------------------------------------------------- /计网笔记.assets/image-20221107112352387.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/计网笔记.assets/image-20221107112352387.png -------------------------------------------------------------------------------- /计网笔记.assets/image-20221107114858921.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/计网笔记.assets/image-20221107114858921.png -------------------------------------------------------------------------------- /计网笔记.assets/image-20221107115325467.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/计网笔记.assets/image-20221107115325467.png -------------------------------------------------------------------------------- /计网笔记.assets/image-20221114114340708.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/计网笔记.assets/image-20221114114340708.png -------------------------------------------------------------------------------- /计网笔记.assets/image-20221114115832580.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/计网笔记.assets/image-20221114115832580.png -------------------------------------------------------------------------------- /计网笔记.assets/image-20221114121814849.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/计网笔记.assets/image-20221114121814849.png -------------------------------------------------------------------------------- /计网笔记.assets/image-20221114121910741.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/计网笔记.assets/image-20221114121910741.png -------------------------------------------------------------------------------- /计网笔记.assets/image-20221114122429032.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/计网笔记.assets/image-20221114122429032.png -------------------------------------------------------------------------------- /计网笔记.assets/image-20221114122439926.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/计网笔记.assets/image-20221114122439926.png -------------------------------------------------------------------------------- /计网笔记.assets/image-20221114132438605.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/计网笔记.assets/image-20221114132438605.png -------------------------------------------------------------------------------- /计网笔记.assets/image-20221114134709648.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/计网笔记.assets/image-20221114134709648.png -------------------------------------------------------------------------------- /计网笔记.assets/image-20221114140316597.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/计网笔记.assets/image-20221114140316597.png -------------------------------------------------------------------------------- /计网笔记.assets/image-20221114145136100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/计网笔记.assets/image-20221114145136100.png -------------------------------------------------------------------------------- /计网笔记.assets/image-20221114145712230.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/计网笔记.assets/image-20221114145712230.png -------------------------------------------------------------------------------- /计网笔记.assets/image-20221114192551060.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/计网笔记.assets/image-20221114192551060.png -------------------------------------------------------------------------------- /计网笔记.assets/image-20221115123753275.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/计网笔记.assets/image-20221115123753275.png -------------------------------------------------------------------------------- /计网笔记.assets/image-20221115125834763.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/计网笔记.assets/image-20221115125834763.png -------------------------------------------------------------------------------- /计网笔记.assets/image-20221117195500559.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/计网笔记.assets/image-20221117195500559.png -------------------------------------------------------------------------------- /计网笔记.assets/image-20221121144048915.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/计网笔记.assets/image-20221121144048915.png -------------------------------------------------------------------------------- /计网笔记.assets/image-20221121145450769.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/计网笔记.assets/image-20221121145450769.png -------------------------------------------------------------------------------- /计网笔记.assets/image-20221121145516907.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/计网笔记.assets/image-20221121145516907.png -------------------------------------------------------------------------------- /计网笔记.assets/image-20221121150849094.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/计网笔记.assets/image-20221121150849094.png -------------------------------------------------------------------------------- /计网笔记.assets/image-20221121151502598.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/计网笔记.assets/image-20221121151502598.png -------------------------------------------------------------------------------- /计网笔记.assets/image-20221128103018999.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/计网笔记.assets/image-20221128103018999.png -------------------------------------------------------------------------------- /课程网站答案/Ch.5 exercise1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/课程网站答案/Ch.5 exercise1.png -------------------------------------------------------------------------------- /课程网站答案/Ch.5 exercise2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/课程网站答案/Ch.5 exercise2.png -------------------------------------------------------------------------------- /课程网站答案/Ch.5 exercise3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/课程网站答案/Ch.5 exercise3.png -------------------------------------------------------------------------------- /课程网站答案/Ch.5 exercise4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/课程网站答案/Ch.5 exercise4.png -------------------------------------------------------------------------------- /课程网站答案/Ch.5 exercise5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/课程网站答案/Ch.5 exercise5.png -------------------------------------------------------------------------------- /课程网站答案/Ch.5 exercise6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/课程网站答案/Ch.5 exercise6.png -------------------------------------------------------------------------------- /课程网站答案/Ch.6 exercise1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/课程网站答案/Ch.6 exercise1.png -------------------------------------------------------------------------------- /课程网站答案/Ch.6 exercise2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/课程网站答案/Ch.6 exercise2.png -------------------------------------------------------------------------------- /课程网站答案/Ch.6 exercise3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/课程网站答案/Ch.6 exercise3.png -------------------------------------------------------------------------------- /课程网站答案/Ch.6 exercise4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/课程网站答案/Ch.6 exercise4.png -------------------------------------------------------------------------------- /课程网站答案/Ch.6 exercise5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/课程网站答案/Ch.6 exercise5.png -------------------------------------------------------------------------------- /课程网站答案/Ch.7 exercise1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/课程网站答案/Ch.7 exercise1.png -------------------------------------------------------------------------------- /课程网站答案/Ch.7 exercise2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/课程网站答案/Ch.7 exercise2.png -------------------------------------------------------------------------------- /课程网站答案/Quiz5-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/课程网站答案/Quiz5-1.png -------------------------------------------------------------------------------- /课程网站答案/Quiz5-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/课程网站答案/Quiz5-2.png -------------------------------------------------------------------------------- /课程网站答案/Quiz6-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/课程网站答案/Quiz6-1.png -------------------------------------------------------------------------------- /课程网站答案/Quiz6-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/课程网站答案/Quiz6-2.png -------------------------------------------------------------------------------- /课程网站答案/Quiz6-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/课程网站答案/Quiz6-3.png -------------------------------------------------------------------------------- /课程网站答案/Quiz6-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/课程网站答案/Quiz6-4.png -------------------------------------------------------------------------------- /课程网站答案/Quiz6-5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/课程网站答案/Quiz6-5.png -------------------------------------------------------------------------------- /课程网站答案/Quiz7-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/课程网站答案/Quiz7-1.png -------------------------------------------------------------------------------- /课程网站答案/Quiz7-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/课程网站答案/Quiz7-2.png -------------------------------------------------------------------------------- /课程网站答案/Quiz7-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/课程网站答案/Quiz7-3.png -------------------------------------------------------------------------------- /课程网站答案/Quiz7-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/课程网站答案/Quiz7-4.png -------------------------------------------------------------------------------- /课程网站答案/Quiz7-5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/课程网站答案/Quiz7-5.png -------------------------------------------------------------------------------- /课程网站答案/Quiz8-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/课程网站答案/Quiz8-1.png -------------------------------------------------------------------------------- /课程网站答案/Quiz8-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/课程网站答案/Quiz8-2.png -------------------------------------------------------------------------------- /课程网站答案/Quiz8-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/课程网站答案/Quiz8-3.png -------------------------------------------------------------------------------- /课程网站答案/Quiz8-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/课程网站答案/Quiz8-4.png -------------------------------------------------------------------------------- /课程网站答案/Quiz8-5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yile-liu/ZJU_computer_network/485b7b6d04fa1b2ca5fccec13e0928441cc4de38/课程网站答案/Quiz8-5.png --------------------------------------------------------------------------------