程序代写 CS 6843 CS 6843 TCP – Sliding Window Protocol, SYN,

CS 6843 CS 6843 TCP – Sliding Window Protocol, SYN,
ACK, FIN, Nagle’s Algorithm, TCP
Delayed Ack Protocol
Explain how TCP works; sequence number, ack numbers , receive windows, sliding window, etc. you may use one or more diagrams to help with your explanation.

Copyright By PowCoder代写 加微信 powcoder

TCP handshake
sequence number: The sequence number is a counter used to keep track of every byte sent outward by a host
ack numbers: The server will respond with a sequence number and ack number to the client. This ACK number shows that the server has received the data and it is ready for the next data segment
receive windows: This is a windows to show how much data can be sent from the server sliding window: It is a packet-based data transmission protocol. It is used where reliable in-order delivering packets is required.
FIN :This message, sometimes called a FIN, serves as a connection termination request to the other device, while also possibly carrying data like a regular segment. The device receiving the FIN responds with an acknowledgment to the FIN to indicate that it was received. The

connection as a whole is not considered terminated until both sides have finished the shut down procedure by sending a FIN and receiving an ACK.
Suppose you wanted to send an urgent message from a remote client to a server as fast as possible. Would you use UDP or TCP? Why? (Hint: compare RTTs.) [10 points]
UDP does not have acknowledge packet(ACK) but TCP need ACK to guarantee the continuous stream, so the RTT of UDP is less than TCP which is faster under this scenario
What is Nagle’s algorithm? What problem does it aim to solve and how? [10 points]
Nagle’s Algorithm is to not send the new TCP segment when the window size or available sent data less than MSS (mss maximum segment size), and the pipe still has unconfirmed data. Except conditions above all, it will send data. This Algorithm solve problem about an application repeatedly send data in small chunks through the method I describe above
g) Explain one potential scenario in which delayed ACK could be problematic. [10 points]
It will reduce the efficiency of data transmitting between sender and receiver. Let’s say two machines A and B, there is no data sent from B to A, and A is continuing to send data to B, and B uses delayed ACK here. B will always have to wait for a certain amount of time to send back the ACK (delayed ACK), this action has significantly less efficiency than sending back ACK immediately
Delayed ACK:
In essence, several ACK responses may be combined into a single response, reducing protocol overhead. However, in some circumstances, the technique can reduce application performance.
UDP – Protocol Sockets
DNS – Name space, Domain Names,
domains, subdomains, zones,
authoritative servers, reverse lookup
https://simpledns.plus/help

a) (5 pts) What is an A record and how is it used?
A record type is an address record type. It points a domain name to an IP address which is used to determine which IP address belongs to which domain name.
For example,
R1.cn. IN A 10.10.10.1
This will point R1.cn. domain name to 10.10.10.1 IP address so the I can just type R1.cn. without memorizing the actual IP address
b) (5 pts) What is a NS record and how is it used?
NS records identify the DNS servers responsible (authoritative) for a zone For example
example.com IN NS R1.cn.
NS means ‘nameserver,’ and the nameserver record shows which DNS worker is definitive for that space (for example which worker contains the real DNS records). Fundamentally, NS records advise the Internet where to go to discover an area’s IP address
c) (5 pts) What is a PTR record and how is it used?
PTR record is a pointer resource record. It points an IP address to a domain, which is used for reverse lookup. Basically, an inverse of A record.
For example
10.10.11.1 IN PTR R2.second.cn.
d) (5 pts) What is a MX record and how is it used?
Mail Exchange (MX) records are DNS records that are necessary for delivering email to your address. In simple DNS terms, an MX record is used to tell the world which mail servers accept incoming mail for your domain and where emails sent to your domain should be routed to.
Nyu.edu. IN MX 10 mail.nyu.edu

e) (10 pts) Describe Recursive vs Iterative DNS?
In the recursive DNS, a DNS server continues querying other DNS servers recursively until it gets an IP address to send to the client. Recursive methods can reduce communication cost. Recursive DNS puts higher performance demand on each name server. Recursive works better with caching.
In the Iterative DNS, each DNS query responds directly to the client with an address for another DNS server to ask, and the client continues querying DNS servers until one of them responds with the correct IP address for the given domain, or it time out, or an error occurs.
左边: Iterative, 右边: Recursive
f) (5 pts) Describe a situation where one might be more favorable than the other.
In the situation where you want faster performance. Recursive DNS usually solves the situation faster than iterative queries when recursive DNS server caches the results for each query and saves it for a set amount of time determined by time to live.
However, if you want a more secure DNS, iterative is more favorable than recursive DNS because recursive DNS queries have security issues. It is vulnerable for DNS amplification attacks and DNS cache poisoning.

g) (5 pts) In your DNS lab, was your DNS server authoritative for cnlab? Explain
Yes, it is authoritative for CN. Because we add the NS record into the R1 so that R1 is authoritative for the primary zone cn.
h) What is an authoritative server?
There are two main types of name servers:
1. Authoritative: maintains the data
a. Master: where the data is edited
b. Slave: where the data is replicated to
2. Caching: stores data obtained from an authoritative server
Authoritative Server: The name servers that load a complete zone are the authoritative server of that zone. More than one name servers are authoritative for the same zone. A single name server might be authoritative for many zones.
i) start of authority (SOA)
https://simpledns.plus/help/soa-records
A SOA-record is automatically created when you create a new zone
– Primary name server
– Hostmaster email
– Serial #; time-to-refresh/retry/expire; min TTL
– Contains administrative information about the zone, especially regarding zone transfers (Wikipedia)
IEEE 802.11 – 802.11 vs 802.3, RTS, CTS, Access Point
Access Point: https://stackoverflow.com/questions/4929438/does-wifi-access-points-have-an-ip-address#:~:text=Wifi%2 0access%20points%20need%20not,DHCP%20servers%20and%20network%20gateways.

a) (5 pts) What values are in the ARP table of the host when it is associated with AP1?
IPR and MacR
b) (5 pts) What values are in the ARP table of the host after it moves and is associated with AP2?
IPR and MacR
(for a&b: Access point does not have IP address so it cannot store AP1 or AP2 info in ARP tables)
c) (5 pts) 802.3 can detect frame collisions while 802.11 is not. Why
802.11 uses CSMA/CA. CA stands for collision avoidance which cannot detect the collision but only to avoid it. The data is sent only the channel is idle and if no acknowledgement received, it resends the data. In this way, there is no collision occurs, so 802.11 is not able to perform frame collision.
Furthermore, the wireless cannot do collision because since, the hidden node is visible to Access point but not the other nodes communicating with that AP, different nodes from different access point cannot detect collision while transmitting data.
802.3 uses CSMA/CD. CD stands for Collision Detection, which means the collision is only detected not avoided. When two station send the frame simultaneously via the same medium, the collision occurs and detected. The participant will send a Jam signal so all other can detect the collision. Then counters for retransmission is reset and successfully complete frame transmission if maximum number of transmission attempts is not reached. In conclusion the 802.3 performs frame collision
RTS, CTS :

sender first transmits small request-to-send (RTS) packets to BS using CSMA • RTSs may still collide with each other (but they’re short) BS broadcasts clear-to-send CTS in response to RTS CTS heard by all nodes • sender transmits data frame • other stations defer transmissions
MPLS – Virtual Circuits vs packet routing, RSVP, RSVP-TE, 1+1 & 1+m backups, label, switching vs routing, LER, LSR, SVC, PVC, circuit setup
a) (5 pts) In MPLS what is a circuit and how is it created? Be specific and refer to protocols.
MPLS circuit is a virtual circuit packet switching technology. MPLS directs data from one network element to another based on short path labels. It is independent of any routing protocol. It supports multiple protocol such as ethernet frame, IP packet etc.
First, to set up an logical circuit between the source and destination, we need to find the ingress for the source and the egress router for the destination. Assign every virtual circuit an ID. The source set-up will establish the path which is a series of router that support MPLS for the virtual circuit. Switch will then map the Virtual circuit to an outgoing link. The packet will then have a fixed length label in the header.
b) (5 pts) Why is label switching more efficient the routing?
In routing, the information is stored in routing table. The routing table has the destination address for entries. In a big network, the routers have different netmasks associate with different address in the routing table so it will be time consuming to look up which address in the routing table and then determine the address associated with any specific netmask in that router.
Label switching is more efficient because it uses label between routers. The label is assigned initially. The label is used to index into table. The routers just need to match the labels along the path that is established. The routers don’t need to perform any additional IP lookup which is more efficient than the traditional ip routing.
c) (5 pts) Why is routing more flexible than label switching? Or is it?

Routing table can be changed to find the best path. However in label switching, the path is fixed after it is established

Describe a Label Switched Path LSP
A label-switch path (LSP) is a Unidirectional path through an MPLS network. LSPs are represented by the series of ingress/egress labels of the MPL routers in the path.
What is Label Edge Router(LER) and what role does in play in MPLS
An LER is a router on the edge of the MPLS network.On ingress, it checks on the final destination and decides which of the LSPs to use. It then assigns a label as it sends packets into theMPLS network. On egress it removes the label and the packet is delivered by standard routing protocols
What is a Label Switching Router(LSR)
An LSR is an MPLS router in the interior of
an MPLS network. It accepts labeled packets looks up the label in its lookup table and sends the packet out
with a new label from the label table.
Compare Label Switching to IP Routing

In label switching, once a path is established between two networks, it follows the same path for the entire communication irrespective of traffic. This makes it less flexible than ip routing. In dynamic routing, routing table are changing continuosly to find the best path.
No routing lookups in LSP once set up. Output interfaces are chosen by label in label table. Faster
What role does RSVP (Resource Reservation Protocol) play in an MPLS network and how does it work?
In an MPLS network ,RSVP is to reserve bandwidth of the LSP. it form source LER to destination LER to reserve bandwidth and then back to the source to set the maximum bandwidth of the LSP
What is MPLS Fast Reroute?
An MPLS fast reroute is a backup
LSP that is used is and when the primary LSP fails for some reason. Since it is already setup, traffic quickly switches to the backup LSP
One to one protection/detour: an individual backup path is fully signalled through RSVP for every LSP, at every point where protection is provided (i.e every node).
Many-to-one protection: a single bypass LSP is created between two nodes to be protected. During a failure, multiple LSPs are rerouted over the bypass LSP.
PVC vs. SVC
1.“PVC” is a virtual circuit which is available permanently. It is a type of virtual circuit where the end points do not signal the circuit. The virtual circuit values are manual. However, “SVC” is a circuit which is an on-demand circuit established by the user signals.
2.“PVC” is a permanent circuit while “SVC” must be re-established every time when there is a need for a data transfer.
3.The SVC disappears as soon as the data is transferred
1. Using constrained routing, RSVP-TE looks for the shortest path with enough available bandwidth to carry a particular LSP.
2. Classic routing algorithms use non-TE routing.
Routes are based on a metric like cost per link, and a shortest path first (SPF) algorithm
is used to find the shortest path.
Traffic engineering takes this and adds additional constraints.
For example, find the shortest path that also has the available bandwidth.

Main principle is to take the uncongested path even though he latency maybe higher, than to congest the shortest path on one link while leaving available bandwidth unused on another link.
Multicast – IP Multicast Group
Membership, Ethernet Multicast What netmask is used to specify an IP Multicast Group.
No net mask for IP multicast group
For a multicast group consisting of one source and two listeners, all within the same IP subnet; for each IP packet sent out by the source how many IP multicast packets are generated for the listeners? How many Ethernet Multicast frames are generated? Explain
Two IP multicast packets are generated for the listener. Only one ethernet multicast frame is generated.
Explanation: In multicast, the source only sends the IP multicast packet once each time. The source sends one IP multicast packet which is embedded in one ethernet multicast frame. At the source, a multicast destination IP is directly mapped to an ethernet multicast address. The nodes in the network will replicate the packet and send the copied packet to each of the listeners in the multicast group.
multicast group contain 1 source and 2 listener, al within the same ip subnet, therefore for each sent out by the source only 1 ethernet multicast packet will be generated for the listender, because members of the same ip subnet has the same multicast address. i.e. to get the multicast address of the subnet, put all 1 in the host id part of that subnet ip address. Therefore the router will send the 2 ip multicast packets to all the listeners in that multicast group.
A:MacA, IPA, MultiCast_IP, MultiCast_Mac B:MacB, IPB, MultiCast_IP, MultiCast_Mac
Send multicast, send 到: IP:MultiCast_IP, MAC: MultiCast_Mac 后面会有router 处理, 去把这个packet分发给A和B

OSPF – announced networks, LSA, flooding, all (ospf) routers IP Multicast, default routes, longest prefix match
1. Support only IP routing: True
2. Forms neighbor relations with adjacent routers : True
3. OSPF advertises the status of directly connected links using
Link_state_AdvertisementsL: True
4. OSPF uses the Dijkstra Algorithm : True
5. LSAs, are flooded throughout the network: True
Explain how the Administrative Address is set in OSPF
Manually specify the OSPF router ID. So this router ID will be the administrative address in OSPF
In vtysh we type the following command: Configure terminal
router ospf
router-id (specify your router ID here)
The address 0.0.0.0 is a non-routable meta-address in Internet Protocol Version 4 that is used to identify an invalid, undefined, or non-applicable target. This address has different meanings depending on the context, such as on clients or servers.
When a DHCP request fails, the address a host assigns to itself, assuming the host’s IP stack accepts it. In current operating systems, the APIPA mechanism has replaced this usage.
0.0.0.0 will refer to “all IPv4 addresses on the local computer” in the form of servers. If a host has two IP addresses, 192.168.1.1 and 10.1.2.1, and a node on the host is configured to listen on 0.0.0.0, it would be reachable from both.

OSPF is controlled by a single autonomous system (AS). However, networks within this single AS can be split into many categories. Area 0 is generated by default. Area 0 can operate independently or as the OSPF backbone for a wider group of areas. Each OSPF region is identified by a 32-bit integer that is written in the same dotted-decimal notation as an IP4 address in most cases. Area 0 is often written as 0.0.0.0, for example.

程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com