• Không có kết quả nào được tìm thấy

An Introduction to Computer Networks

N/A
N/A
Nguyễn Gia Hào

Academic year: 2023

Chia sẻ "An Introduction to Computer Networks"

Copied!
894
0
0

Loading.... (view fulltext now)

Văn bản

0 PREFACE

  • Licensing
  • Classroom Use
  • Acknowledgments
  • Progress Notes
  • Technical considerations
  • A Note On the Cover
  • Recent Changes

Below is a list of institutions that I am aware of so far where the book has been approved. In coining the name Mahagonny, Leokadja Begbick of the opera explains it as "City of Nets", i.e.

1 AN OVERVIEW OF NETWORKS

Layers

We'll come back to this later in 1.15 IETF and OSI, where we'll introduce two more obscure layers that complement these seven-layer models.

Data Rate, Throughput and Bandwidth

Packets

If a TCP connection sends 512 bytes of data per packet, then the headers amount to 10% of the total, a not unreasonable expense. For a typical Voice-over-IP option, packets contain 160 bytes of data and 54 bytes of header, making the header about 25% of the total.

Datagram Forwarding

Thus, we can replace the interface entries in the next_hop column with the name of the corresponding neighbor. A key feature of datagram forwarding is that each packet is forwarded "in isolation"; the switches involved have no awareness of any higher-layer logical connections established between endpoints.

Topology

  • Traffic Engineering

Quality of Service data can be set by the end user, in which case the ISP may only want to acknowledge it for certain users, which in turn means that the ISP will implicitly use the source of the traffic when making routing decisions. Alternatively, the quality of service information is set by the ISP itself based on its best guess about the application; that is, the ISP may use the packet size, port number (1.12 Transport), and other content as part of the routing decision.

Routing Loops

However, we have already suggested that datagram forwarding can be extended to consider quality of service information; this can be used to make voice traffic—relatively low-bandwidth but latency-intolerant—take a completely different path than bulk file transfers. D may believe that the best path to B is D–E–C–B (perhaps because it believes that the A–D connection should be avoided).

Congestion

Similarly, if E decides that the best path to B is E-D-A-B, and if D and E both choose their next_hop for B based on these best paths, then a linear routing loop is formed: D routes to B through E, and E routes to B through D. Senders of bulk traffic (although not real-time senders) try to send as fast as possible, and congestion is simply the feedback from the network that the maximum transmission rate has been reached.

Packets Again

However, monitoring links and routers for congestion can help determine exactly which parts of the network would most benefit from an upgrade.

LANs and Ethernet

The network interface constantly monitors all incoming packets; if it sees any packet that contains a destination address that matches its own physical address, it grabs the packet and forwards it to the attached CPU (via a CPU interrupt). A host sending to the broadcast address has its packet received by every other host on the network; if a switch receives a broadcast packet on one port, it sends the packet out every other port.

IP - Internet Protocol

  • IP Forwarding
  • The Future of IPv4

A consequence of this rule is that outside the site only the network bits need be looked at to route a packet to the site. If the answer is yes, then the router is using direct LAN delivery to the destination, as above.

Transport

  • Transport Communications Patterns
  • Content-Distribution Networks

However, all those clients to the same port are kept separate because they all come from a unique xhost,porty pair. See 13.1.1 The Somewhat-Steady State for an idealized sawtooth graph; for some "real" (simulated) sawtooth graphs see 16.4.1 Some TCP Reno cwnd graphs.

Firewalls

A CDN can cache all or most of the static content on each of its edge servers so that the dynamic content comes from a centralized server. Finally, for HTTP applications, a centralized server can find the user's approximate location and then redirect the web page to the nearest edge server.

Some Useful Utilities

In general, common workstations do not need to accept connections from the Internet; client machines instead initiate connections to (better protected) servers. The last router (andintronetworks.cs.luc.eduitself) does not respond to traceroute packets, so the list is not quite complete.

IETF and OSI

What often happens is that the application layer manages its own transport connections and is responsible for reading and writing data directly to and from the transport layer. Applications generally read and write data directly to the SSL/TLS endpoint, which in turn usually includes the underlying TCP connection.

Berkeley Unix

Epilog

Exercises

The next switch along the path cannot be S1, due to the hypothesis that S1 and S4 are not directly connected. a) Suppose a network is as follows, with the only path from A to C passing through B:. You must find the path through S1-S6 with the lowest total cost (that is, with the smallest sum of weights), for each of the following broadcasts.

2 ETHERNET

2.1 10-Mbps Classic Ethernet

  • Ethernet Packet Format
  • Ethernet Multicast
  • Ethernet Address Internal Structure
  • The LAN Layer
  • The Slot Time and Collisions
  • Exponential Backoff Algorithm
  • Capture effect
  • Hubs and topology
  • Errors
  • CSMA persistence
  • Analysis of Classic Ethernet
    • The ALOHA models
    • ALOHA and Ethernet

Although the term "switch" is now much more common than "bridge", the latter is still in use, especially by the IEEE. The ALOHA model yields roughly similar throughput values ​​to the O(N) model of the previous section.

2.2 100 Mbps (Fast) Ethernet

Gigabit Ethernet

Gigabit Ethernet 1000Base-T uses the so-called PAM-5 encoding below, which supports a special pattern (or symbol) that cannot appear in the data. However, Gigabit Ethernet slot timing is largely irrelevant as full duplex (two-way) operation is almost always supported.

Ethernet Switches

  • Ethernet Learning Algorithm
  • Switch Hardware

Such a switch may be forced to queue outgoing packets on that port, but this does not represent a lack of performance on the switch's part. It is simple for the coder to resolve the connections by selecting, for example, the number of the first matching register.

Spanning Tree Algorithm and Redundancy

  • Example 1: Switches Only
  • Example 2: Switches and Segments

The S5 has two options; hears of equal-cost paths to the root from S2 and S4. Now we come to rule 3, which deals with how segments (and thus their hosts) connect to the root.

Virtual LAN (VLAN)

One would likely want the root switch, for example, to be geographically at least somewhat centralized, and for high-speed backbone connections to be preferred over slow connections. When the source and destination ports are on the same switch, nothing should be added to the packet; switch can keep track of the color of each of its ports.

TRILL and SPB

The second part of the process is for the RBridges to each understand the overall topology; ie each builds a complete map of all RBridges and their interconnections. If a link between two RBridges fails, then the link endpoints send IS-IS Update messages to notify all other RBridges of the failure.

Software-Defined Networking

  • OpenFlow Switches
  • Learning Switches in OpenFlow
  • Other OpenFlow examples
    • Interconnection Fabric
    • Load Balancer

S will report the packet to the controller (not shown in the diagram), which will send it back to S to be flooded. The only match is to the original default rule, and the packet is sent to the controller.

Epilog

One advantage of the SDN approach described here is that the individual front-line servers require no special configuration; all the load sharing awareness is contained within the SDN network. Furthermore, the SDN switches do virtually no additional work beyond ordinary forwarding; they only need to engage the controller when the first new TCP packet of each connection arrives.

Exercises

Again, if S does not report the packet to C, then S must have a forwarding table entry for that destination and thus can forward the packet normally. At this point, the switch floods the packet (because the destination was not supposed to be known).

3 OTHER LANS

Virtual Private Networks

When the VPN is set up, the home host's stun0 interface appears to be locally connected to site A, so the home host is allowed to connect to a private zone within site A. This may require a so-called host-specific forwarding table entry on the resident end to route packets carrying VPN tunnel traffic correctly through eth0.

Carrier Ethernet

As a result, if the home worker downloads a large file from a non-workplace site, it first travels to the workplace, then returns to the internet via the VPN connection and finally arrives at the home. If such a tag is applied to the outer, encapsulated packet, and the tags are not transferred on the VPN's remote endpoint to the inner, encapsulated packet, the tags will be lost.

Token Ring

It is also possible that the physical ring exists only within the token-ring switch, and that stations are connected to that switch using the usual point-to-point wiring.). Due to fairness and the lack of collisions, IBM Token Ring was once considered the premium LAN mechanism.

Virtual Circuits

This might also apply to forwarding datagrams and virtual circuits, although see below on per-connection charging. Virtual circuit switching (or routing) is an alternative to datagram switching, which was introduced in Chapter 1.

Asynchronous Transfer Mode: ATM

  • ATM Segmentation and Reassembly

For AAL 3/4, we first define a high-level "wrapper" for an IP packet called the CS-PDU (Convergence Sublayer - Protocol Data Unit). The CS-PDU is now broken into 48-byte chunks, which are then used as the full body of each ATM cell.

Adventures in Radioland

  • Privacy
  • Collisions
  • Hidden Nodes
  • Band Width
    • OFDM
  • Cost
  • Multipath
  • Power
  • Tangle
  • Wi-Fi and Collisions
    • Link-Layer ACKs
    • Collision Avoidance and Backoff
    • Wi-Fi RTS/CTS
    • Hidden-Node Problem
    • Wi-Fi Fragmentation
  • Dynamic Rate Scaling
  • Multiple Spatial Streams
  • Access Points
    • Joining a Network
    • MAC Address Randomization
    • Roaming
    • Mesh Networks
  • Wi-Fi Security
    • WPA2 Four-way handshake
    • WPA2-Enterprise
    • WPA3
    • Encryption Coverage
  • Wi-Fi Monitoring
  • Wi-Fi Polling Mode
  • MANETs
    • Routing in MANETs

The Wi-Fi Alliance's EasyMesh standard is not exactly the same as the IEEE 802.11s standard. A data packet from an access point addressed to station B may also carry, inserted in the Wi-Fi header, a poll request to another station C; this saves the download.

WiMAX and LTE

  • Uplink Scheduling
  • Ranging
  • Network Entry
  • Mobility

The uplink planning of the previous section requires each subscriber station to know its distance from the base station. If a subscriber station is to transmit so that its message reaches the base station at a.

Fixed Wireless

  • Terrestrial Wireless
  • Satellite Internet

Those identities are learned as the new subscribers transmit to the base station according to this initial schedule. If there is no collision, each subscriber station can use the base station's initial response transmission to make its first distance measurement.

Epilog

Exercises

Provide the route for each link and the VCI for each route link. Simplify the difference (due to reversing the reflection phases by 180°) between the field-of-view and reflected signal paths.

4 LINKS

  • Encoding and Framing
    • NRZI
    • Manchester
    • Framing
  • Time-Division Multiplexing
    • T-Carrier Lines
    • SONET
    • Optical Transport Network
    • Other Optical Fiber
  • Epilog
  • Exercises

AT1line – the lowest level of the T-carrier hierarchy and known at the logical level as aDS1line – represents 24 DS0 lines multiplexed via TDM, where each channel sends one byte at a time. Alternatively, their use can reduce the bit error rate by as much as hundreds of times, which will be important in 14.9 The High Bandwidth TCP Problem.

5 PACKETS

  • Packet Delay
    • Delay examples
    • Bandwidth ˆ Delay
  • Packet Delay Variability
  • Packet Size
    • Error Rates and Packet Size
    • Packet Size and Real-Time Traffic
  • Error Detection
    • Cyclical Redundancy Check: CRC
    • Error-Correcting Codes
  • Epilog
  • Exercises

The second bit of the code is also false, so the first bit of the position bits must be 1. Note that this is not the same as two's-complement sum of halves.

6 ABSTRACT SLIDING WINDOWS

Building Reliable Transport: Stop-and-Wait

  • Packet Loss
  • Sorcerer’s Apprentice Bug
  • Flow Control

Both sides can also implement retransmit-on-duplicate; this was done by the receiver in the second example above, but not by the sender in the third example (the sender received another ACK[N] but did not retransmit Data[N+1]). At least one side must implement retransmission on timeout; otherwise, a lost packet leads to deadlock, as both sender and receiver wait forever.

Sliding Windows

  • Bandwidth ˆ Delay
  • The Receiver Side
  • Loss Recovery Under Sliding Windows

If packet reordering is possible, it is common for the receiver to use the same winsize as the sender. At any time, the receiver is willing to accept Data[last_ACKed+1] via Data[last_ACKed+winsize].

Linear Bottlenecks

  • Simple fixed-window-size analysis
    • Case 1: winsize = 2
    • Case 2: winsize = 4
    • Case 3: winsize = 6
  • RTT Calculations
  • Graphs at the Congestion Knee Consider the following graphs of winsize versus
  • Simple Packet-Based Sliding-Windows Implementation

Looking at the table, we see that there are indeed two packets queued on R1 every second. Regardless of the value of winsize, in the stable state the transmitter never transmits faster than the bandwidth of the bottleneck.

Epilog

Exercises

As in the text examples, assume a bandwidth delay of 1 packet/s for links R1ÝÑR2, R2ÝÑR3, R3ÝÑR4, and R4ÝÑB. Hint: The “R1 Sends” column will look like the “R2 Sends” column for the hint in the previous problem, except it will start at T=0 instead of T=1.

7 IP VERSION 4

The IPv4 Header

In other words, the IPv4 packet length cannot be determined from the LAN level packet size. The sender would insert a list of IPv4 addresses in the IPv4 header options area; the packet would be routed to go through each of those IPv4 addresses in turn.

Interfaces

  • Multihomed hosts

In fact, this seemingly simple question is not very easy to answer if by "my IP address" one means the IP address assigned to the interface that connects directly to the Internet. In general, this means a separate IP address for each interface, although some point-to-point interfaces can be used without an IP address assigned to them (7.12 Unnumbered Interfaces).

Special Addresses

Tài liệu tham khảo

Tài liệu liên quan

The goals of this chapter are to introduce: • basic neural networks from the simple perceptron to multi-layer neural networks, • different network architectures and encodings to