CS计算机代考程序代写 algorithm COMP 3331/9331: Computer Networks and Applications

COMP 3331/9331: Computer Networks and Applications
Announcements + Final Exam + Review + Sample Problems
Review 1

Feedback
• myExperience On-line Survey
• You should have received email
• Active till 3rd November
• Accessible via Moodle
• Please enter answers for both parts – (i) Course and (ii) Teacher
• I would greatly appreciate 5-10 minutes of your time
• I need to hear from you about your experience with this course and my teaching
• Helps us improve the quality for future sessions
• Written comments are encouraged
• Feedback is anonymous
Review 2

Course Announcements
• Assignment 2
• Deadline – midnight, Friday, Week 13 (28th June)
• Remember to test your programs on a CSE machine before submitting
• We won’t be lenient as with the first assignment if your code cannot be executed • Submission instructions provided in spec
• Solutions to all sample questions posted
• Attempt to answer them yourself before examining answers
• Several other questions on the lecture content page • Please discuss the solutions
Review 3

Recap from Week 1: A top-down approach
We’ve covered networking using a top-down
q end-system applications, end-end transport
q network core: routing, hooking nets together
q link-level protocols, e.g., Ethernet
q other stuff: security, wireless networks
Review 4

What you have accomplished
• Comprehensive overview of the entire protocol stack with a particular focus on the Internet
• Key principles
• Layering, scale, hierarchy, etc.
• Key design issues
• Application architectures, reliability, congestion control,
routing, medium access, etc.
• Hands-on practical laboratory experiments using several diagnostic tools and ns-2
• Two “real-world” assignments
• Stripped down implementation of TCP
• Link state routing protocol Review 5

Key topics (1)
• Organisationprinciples
• Layering, hierarchy, encapsulation
• Some researchers speculate that layering is also useful in biological systems/evolution
• Application layer
• Protocol design, P2P, socket programming
• Transportlayer
• Error detection, reliable data transfer, flow control,
congestion control
• TCP and UDP
Review 6

Key topics (2)
• Network layer
• Network addressing, scalability, hierarchical addressing
• Fragmentation as an example to deal with heterogeneous link layer technologies
• Routing protocols and algorithms: link state, distance vector
• Link layer
• Addressing, ARP
• Medium access control, especially random access
• Interaction between link and network layers
Review 7

Key topics (3)
• WirelessNetworks • 802.11, CDMA
• Security
• Symmetric key and public key cryptography
• Confidentiality, message integrity, authentication
• The role of encryption in these
• Firewalls
Review 8

What next?
• COMP 9332: Network Switching and Routing
• COMP 9334: System Capacity and Planning
• COMP4336/9336:MobileDataNetworks
• COMP 3441/9441: Security Engineering ( + new security courses to be launched)
• COMP4337/9337: Wireless Network Security
• COMP6337: IoT Experimental Design Studio
• Undergraduate/Postgraduate Projects and Thesis – Come work with us (Networked Systems and Security Research Group)
Review 9

Final Exam (1)
• Friday, 16th November, Wednesday 13:45 – 17:00
• Check seating arrangement
• Time: 3 hours + 10 minutes (reading time)
• MaximumMarks:35
• Recall that, to pass the course, one requirement is that you must score >= 14 marks (40%) in the final exam
• Allowed to carry forward max 3 bonus marks (2 from
assignment 1 and 1 from assignment 2) to final score Review 10

• •
Final Exam (2)
Closed book
What to bring
• Student ID
• Calculator will NOT be provided. BYO – GET THEM APPROVED (CSE STUDENT OFFICE)
• Pen, Pencil, etc.
Review 11

Final Exam (3)
• Not a memory test, questions will examine your understanding of concepts
• Tests your understanding
• Tests whether you can apply the principles in a
situation that you haven’t seen before
• You can use the mid-session exam as a guide on what the expectations are
Review 12

Final Exam (4)
• Syllabus: Comprehensive
• See the next few slides for content on the exam
• More focus on the material after the mid-semester exam
• Self-study material is examinable
• External links, News Items and Research Items discussed in lectures not covered
• Questions may also examine multiple layers at the same time
• No questions on programming or lab exams
• However reading through the lab exercise solutions may be instructive for understanding certain concepts
• You are asked to show your steps and tell us your
arguments in answering questions
Review 13

Final Exam (5)
• How to prepare?
• Read and thoroughly understand all content
• Practice, Practice, Practice
• Go through all the sample questions, sample exam papers, lecture Q&A, textbook questions, etc. for practice
• Don’t panic and get stressed if you come across a hard question
NOTE: Sample final exam paper has been posted on the Final Exam Page linked to course webpage
Review 14

Examinable Content (1)
❒ Introduction and Overview
❍ No specific questions but the general concepts may be
examined in some questions
❍ No questions on circuit/packet switching
❒ Application Layer
❍ No specific questions but some applications may be
referenced in some questions
❍ General understanding of applications should be sufficient
❍ No questions on DHT or peer to peer networks
Review 15

Examinable Content (2)
❒ Transport Layer
❍ All content is examinable
❍ No questions on finite state machines
❒ Network Layer
❍ All content is examinable excluding the following:
• IPv6
• ICMP
• Specific routing protocols such as BGP, RIP, OSPF (was not
covered in the lectures)
• Broadcast and Multicast Routing (was not covered in the lectures)
Review 16

Examinable Content (3)
❒ Link Layer
❍ All content is examinable excluding the following:
• DOCSIS: Link layer for Cable Internet Access • Virtual LANs
• Link Virtualisation
• Data Center Networking
❒ WirelessNetworks
❍ Wireless Links and Network characteristics, CDMA, WiFi, 802.11 MAC are all included
Review 17

Examinable Content (4)
❒ Network Security
❍ Symmetric and Public key cryptography
• General questions only, no math questions, you don’t need to know details of AES/DES
❍ Message Integrity and Digital Signatures ❍ End-Point Authentication
❍ Firewalls
❍ No specific questions on Secure E-mail
Review 18

How do I seek help?
• Post any questions on the course forum
• Engage in discussions (peer learning)
• I will arrange for consults in the days leading to the exam
Review 19

Practice Problem (1)
• Consider a TCP connection with initial congestion window of one segment and a constant RTT of 1 second. The ssthresh parameter is initially set to 32,000 bytes. All segments carry 1,000 bytes of data. The receiver’s advertising window is 64,000 bytes. Suppose that the connection does not experience any losses or queuing delays. How long will it take to transfer a 200,000 bytes file? You may ignore the connection establishment latency.
Review 20

Practice Problem (1)
Answer: Since each segment carries 1000 bytes, the file will be transferred in 200 segments. The RTT is a constant 1 second. To compute the latency, we will determine how many RTTs (i.e. rounds) it takes to transfer the file. The initial sstresh is 32 segments and the receiver window is 64 segments. The following table lists the size of the transmission window and the cumulative delivered data in each round
Round CongWin (in RcvWin (in Data Sent segments) segments) (in segments) = min
(CongWin, RcvWin)
11641 22642
34644 48648
Cumulative Data Sent (in segments)
1 3
7
15
31
63
96
130
165
201
5 16 6 32 7 33 8 34 9 35 10 36
64 16
64 32
64 33
64 34
64 35
64 36
Review 21

Practice Problem (2)
• Consider a TCP Reno connection between two hosts with a large amount of data packets flowing in only one direction. Assume a malicious router along the path drops every other data segment of this connection (i.e. it drops 2, 4, 6, etc.). Assume that the receiver’s advertised window is 256 MSS. Also assume that there is plenty of bandwidth available on the path, so as to accommodate a TCP window size of 64 MSS in the absence of the malicious router.
• (a) What is the maximum window size achieved on this connection?
• (b) Repeat (a) for the case when the malicious drops every eight packet (say 8, 16, 24, etc.)
Review 22

Practice Problem (2)
• Answer:
(a) Maximum window size = 2. This is because the transmission of every second packet causes a timeout followed by slow start. In other words, the window size will oscillate between 1 and 2.
Review 23

Practice Problem (2)
(b) Window size will grow up to 8. When packet # 8 is dropped, the congestion window = 8. Several duplicate ACKs are returned which would trigger fast retransmit and the window would be cut to 4 (threshold also would be 4). TCP will now enter congestion avoidance and increase the window linearly to 5. Since every 8th packet is dropped, in the back- to-back rounds when the window size is 4 and 5 respectively, there will always be a packet loss event. As such the window will never increase beyond 5. So the maximum window size achieved will be 8 during the initial slow start phase.
Review 24


Practice Problem (3)
The picture below shows you the IP address of my machine connected to the uniwide wireless network.
However when I ask Google it says my IP address is as noted below. Can you explain the discrepancy?

Review 25

Practice Problem (3)
• Answer:
• The IP address assigned by Uniwide is a private IP address that is only relevant in the private UNSW network. The IP address noted by Google is the WAN side IP address for the NAT router that is connecting the private subnet that my computer is a part of, to the rest of the Internet
Review 26


• •
Practice Problem (4)
Can you express the subnet address for the subnet that my machine belongs to (see picture above) in the CIDR format (i.e. a.b.c.d/x) ?
What is the broadcast address for this subnet? How many hosts can be part of this subnet?
Review 27

Practice Problem (4)
• Answer:
• The subnet mask is 255.255.240.0 which indicates that the network part of the address is 20 bits and the host part is 12 bits. Thus the CIDR address of the subnet is 10.248.0.0/20.
• The broadcast address in the subnet is 10.248.15.255
• The total # of usable address (and thus hosts) is 212 – 2 = 4094
Review 28

Practice Problem (5)
Describe the complete sequence of steps involved for getting data sent from the network layer of host A to the network layer of host E. Be sure to include all steps involved at the network layer and data link layers.
Review 29

Practice Problem (5)
❒ Answer:
Review 30

Practice Problem (6)
Q: Suppose Ethernet was the only existing LAN technology, so every host in the Internet was part of a local Ethernet and thus had a globally-unique Ethernet address. Would you recommend getting rid of IP addresses by simply using Ethernet addresses instead of IP addresses? Why or why not?
Review 31

Practice Problem (6)
❒ Answer:
No. It would not scale due to (1) the need for broadcast for discovery and (2) forwarding tables would be very large as MAC addresses are not topologically assigned and thus cannot be aggregated.
Review 32

QUESTION 4: A routed and bridged network (14 POINTS) Practice Problem (7)
R2b.ip R2b.mac
SRC
H1.ip H1.mac
H2.ip H2.mac
B1.ip B1a.mac
B1.ip
B2.ip
B2b.mac B2
R2
R2c.mac
R2a.ip R2a.mac
R2c.ip
B1c.mac B1
B1.ip B1b.mac
B2.ip B2a.mac
Above is a picture of a network with 2 switches (bridges) and 1 router. Each interface is labeled with an IP address and a MAC address. Imagine that host H1 is
Above is a picture of a network with 2 bridges and 1 router. Each interface is labeled with both an IP address and a MAC address. Imagine that host H1 is sending a packet to host H2. Please
sending packet to host H2. Answer the following:
answer the following questions about this figure:
– How many subnets in the above topology?
– Just before the packet reaches bridge B1, what is the destination MAC address in the
4A. How many (datalink) networks are shown above? Ethernet frame?
3 — The networks hanging off of R2
– Just before the packet reaches bridge B2, what is the source MAC address in the Ethern4eBt. frJuasmt be?fore the packet reaches bridge B1, what is its layer 2 destination?
– Just after the packet leaves router R2, what is the source IP address in the datagram? R2a.mac
4C. Just before the packet reaches bridge B2, what is its layer 2 source? Review
33
DST
R2c.mac

Practice Problem (7)
❒ Answers:
❍ Total 3 subnets ❍ R2a.mac
❍ R2c.mac
❍ H1.ip
Review 34

Practice Problem (8)
• Consider the following 3 applications over a wireless network
• Voice-over-IP, where packets are very small and the send rate is constant
• MPEG movie streaming, where the packet size is large and the send rate is variable
• Instant messenger chat, where packet size is small and send rate is variable
• For each application, list and explain which of the following MAC protocols you would use – (i) TDMA, (ii) plain CSMA/CA (iii) CSMA/CA + RTS/CTS
Review 35

Practice Problem (8)
• Answer:
• VoIP:TDMA,becausewecaneasilysplitupeach
constant rate flow into constant size slots.
• Movies: CSMA/CA + RTS/CTS because collisions of large packets are expensive and we want to avoid them. TDMA would not allow efficient use of the medium because the send rate is variable.
• Messaging:plainCSMA/CAsincetheoverheadof RTS/CTS is not worth it for small packets. TDMA is not suitable for the same reason as above
Review 36

Practice Problem (9)
• Assume that a group of 10 people wishes to communicate securely with each other. Each member of the group needs to send secret data to the other 9 people within the group. All communication between any two people p and q is visible to all other people in this group and no other person in the group should be able to decode their communication.
• (a) If the group decides to use symmetric key encryption, how many keys are required in the system as a whole?
• (b) Instead if public key encryption is chosen, how many keys would be required?
Review 37

Practice Problem (9)
• Answer:
(a) if symmetric key encryption is used, then each pair of people communicating would require their own unique key. For N people this comes out to N(N-1)/2. Hence, for N=10, we have 45 (= 1 + 2 + 3 + ….+ 9)
(b) For public key encryption, each user needs its own public private key pair. All the other users to send data to him can use the public key. So in this case, 10 pairs of public and private keys will be needed
Review 38

Last Goodbye 🙁
• Hope you enjoyed the course
• Hope you learnt a lot
• Hope you know more about computer networks than you did 3 months ago
• Good Bye !!
• Good luck for the exam and the future
• Haveagreatbreak
• Pleasefillinfeedback
Review 39