chapter 9 naming, addressing and routing - 立命館...

21
Chapter 9 Naming, Addressing and Routing 9.1 Addressing ....................... 64 9.1.1 MAC Addresses .................... 64 9.1.2 IP Addresses ..................... 65 9.1.3 Service Addresses ................... 67 9.2 Routing ......................... 68 9.2.1 Routing Tables .................... 69 9.2.2 Special IP Addresses ................. 71 9.3 Naming ......................... 71 9.3.1 Domain Names .................... 72 9.3.2 The Domain Name System ............. 73 9.4 Quality of Service ................... 73 9.4.1 Transport Layer QoS ................. 74 9.4.2 Link Layer QoS .................... 74 9.5 Address Exhaustion and IPv6 ............ 77 9.6 Glossary ......................... 78 A name indicates what we seek. An address indicates where it is. A route indicates how to get there. — RFC 791 Even on a physical bus, where transmissions are heard by all connected devices, the intended recipient is often a specific device or even a particular process executing on a specific device. Addressing is the mechanism by which 63

Upload: dinhdiep

Post on 23-May-2018

229 views

Category:

Documents


5 download

TRANSCRIPT

Page 1: Chapter 9 Naming, Addressing and Routing - 立命館 …piumarta/networks/notes/NetWeek09_Notes.pdfChapter 9 Naming, Addressing and Routing ... with the remaining bits identifying

Chapter 9

Naming, Addressing and Routing

9.1 Addressing . . . . . . . . . . . . . . . . . . . . . . . 649.1.1 MAC Addresses . . . . . . . . . . . . . . . . . . . . 649.1.2 IP Addresses . . . . . . . . . . . . . . . . . . . . . 659.1.3 Service Addresses . . . . . . . . . . . . . . . . . . . 67

9.2 Routing . . . . . . . . . . . . . . . . . . . . . . . . . 689.2.1 Routing Tables . . . . . . . . . . . . . . . . . . . . 699.2.2 Special IP Addresses . . . . . . . . . . . . . . . . . 71

9.3 Naming . . . . . . . . . . . . . . . . . . . . . . . . . 719.3.1 Domain Names . . . . . . . . . . . . . . . . . . . . 729.3.2 The Domain Name System . . . . . . . . . . . . . 73

9.4 Quality of Service . . . . . . . . . . . . . . . . . . . 739.4.1 Transport Layer QoS . . . . . . . . . . . . . . . . . 749.4.2 Link Layer QoS . . . . . . . . . . . . . . . . . . . . 74

9.5 Address Exhaustion and IPv6 . . . . . . . . . . . . 779.6 Glossary . . . . . . . . . . . . . . . . . . . . . . . . . 78

A name indicates what we seek.

An address indicates where it is.

A route indicates how to get there.

— RFC 791

Even on a physical bus, where transmissions are heard by all connecteddevices, the intended recipient is often a specific device or even a particularprocess executing on a specific device. Addressing is the mechanism by which

63

Page 2: Chapter 9 Naming, Addressing and Routing - 立命館 …piumarta/networks/notes/NetWeek09_Notes.pdfChapter 9 Naming, Addressing and Routing ... with the remaining bits identifying

64 CHAPTER 9. NAMING, ADDRESSING AND ROUTING

we identify the sender and recipient of a particular transmission. Addressingoccurs at the link (LAN), network (WAN) and transport (inter-process, whenIP is being used) layers of the OSI model.

Within the link layer, addresses are assigned for a single hop between apair of locally-connected devices. Routing and naming are therefore not nor-mally performed within the link layer. Within the network layer, addressesare global and identify hosts that may be many hops away from each other.Routing and naming are therefore very important at the network layer.

Information on computer networks can be sent to all connected machines(broadcast), to a set of participating machines (multicast), or to a specificrecipient (unicast). Each kind of addressing has its own conventions but ingeneral a certain pattern of bits will be reserved to represent the broadcast

address and a specific range of addresses with a fixed prefix will representa multicast address. For multicast addresses, the variable portion of theaddress identifies a multicast group to which the transmission is being set.Membership of a multicast group is dynamic, and devices can join and leavewhen instructed to do so by software.

Naming allows us to associate a symbolic (human-readable, mnemonic)name with a numeric address. Software at the application layer performsname translation (or name resolution) to convert these names into numericnetwork addresses for us. Routing provides a path through the networkfrom source to destination, passing through routers and gateways during thejourney.

9.1 Addressing

Addressing assigns a unique numeric identifier to a device or host. Addressescan refer to local devices, global network nodes, or processes running withina global node. Each kind of address has its own representation and meaning.

9.1.1 MAC Addresses

The link layer is concerned with the exchange of frames on a shared physicalmedium between devices such as Network Interface Cards (NICs) in com-puters and routers. Such devices have a Medium Access Control (MAC)address that is unique within their local area network. A MAC address is

Page 3: Chapter 9 Naming, Addressing and Routing - 立命館 …piumarta/networks/notes/NetWeek09_Notes.pdfChapter 9 Naming, Addressing and Routing ... with the remaining bits identifying

9.1. ADDRESSING 65

10:8C:CF:42:2A:45

OrganisationallyUnique

Identifier

NICSerial

Number

90-49-FA-17-47-70 01:00:00:00:00:00

FF:FF:FF:FF:FF:FFMulticast Address

Broadcast Address

Figure 9.1: Examples of MAC addresses. The first three bytes identify the or-

ganisation that manufactured the device, and the second three bytes are a serial

number belonging to the device. 90-49-FA identifies a device manufactured by In-

tel Corporation (e.g., a computer NIC), and 10:8C:CF a device manufactured by

Cisco (e.g., a router or gateway).

six bytes long and is usually written as six pairs of hexadecimal digits, eachpair separated by hyphens or colons (Figure 9.1).

Link layer addressing supports broadcast and multicast addressing. Broad-cast MAC addresses have all bits set to 1 (e.g., FF:FF:FF:FF:FF:FF). Multi-cast MAC addresses have a 1 in the least significant bit of the most significantbyte (e.g., 01:00:00:00:00:00) with the remaining bits identifying the mul-ticast group to which the frame is being sent.

9.1.2 IP Addresses

The network layer is concerned with the exchange of packets between devicesthat do not necessarily share a common physical medium. Multiple hops maybe required to deliver a packet from the sender to its destination.

Every device connected to the Internet has its own Internet Protocol (IP)address. Devices with IP addresses include routers, computers, printers, faxmachines, and Voice-over IP (VoIP) telephones. IP addresses are differentfrom MAC addresses because they are assigned by software rather then beingpermanently associated with a specific piece of hardware.

Two versions of the Internet Protocol are currently used. The mostwidely-used type of IP address is IPv4, IP version 4. Each IPv4 addressconsists of four bytes (also known as octets, to emphasise that they con-tain exactly eight bits) usually written as four decimal numbers separatedby dots. This is called ‘dotted quad notation’. Each number represents onebyte, so it can have any value between 0 and 255. (For example, the machinenamed rtfm.mit.edu had the IP address 18.181.2.75 at the time this waswritten.) For ordinary IP addresses, this allows 2564 — or 232, a little over

Page 4: Chapter 9 Naming, Addressing and Routing - 立命館 …piumarta/networks/notes/NetWeek09_Notes.pdfChapter 9 Naming, Addressing and Routing ... with the remaining bits identifying

66 CHAPTER 9. NAMING, ADDRESSING AND ROUTING

105.24.53.107

145.24.53.107

195.24.53.107

Class AClass BClass C

network

host

105.24.53.107/8

145.24.53.107/16

195.24.53.107/24

Figure 9.2: Classful network addressing. The first few bits of an Internet address

used to determine the size of the network and host portions of the address. Since

1993, Classless Internet Domain Routing (CIDR) has replaced classful network

addressing, and network/host address portions can now be more finely divided. In

CIDR, the size (in bits) of the network portion (the routing prefix) of an address

is indicated after the address. The CIDR equivalent for the three example classful

addresses is shown on the right.

4 thousand million — addresses.IP addresses are hierarchical, just like a telephone numbers. Each IP

address has two parts, a network part and a host part. The size of each partcan vary from one to three octets, depending on the class of the address, butthe sum of the two parts always totals four bytes.

IP Classes

There are five classes of IP address, called A, B, C, D and E. The class towhich a given address belongs is determined by the first few bits.

Class A addresses are reserved for large organisations. They begin with abinary 0, so the first octet must be between 0 and 127. The First octet is thenetwork portion, and the last three octets are the host portion. In principle,this provides for single networks with up to 16,777,216 directly-connecteddevices.

Class B is reserved for medium-sized organisations, such as college cam-puses. Class B addresses begin with a binary 10, so the first octet must bebetween 128 and 191. The first two octets are the network portion and thelast two octets are the host portion, allowing in principle a local networkwith up to 65,536 directly-connected devices.

Class C is intended for smaller organisations. Class C addresses beginwith a binary 110 so the first octet must be between 192 and 223. The first

Page 5: Chapter 9 Naming, Addressing and Routing - 立命館 …piumarta/networks/notes/NetWeek09_Notes.pdfChapter 9 Naming, Addressing and Routing ... with the remaining bits identifying

9.1. ADDRESSING 67

three octets are the network portion and the last octet is the host portion,allowing in principle up to 256 directly-connected devices.

Classes D & E are reserved for special purposes. Class D is used formulticast communication and begins with a binary 1110, so the first octetmust be between 224 and 239. Class E is reserved by the IETF for its ownexperimental purposes. Class E addresses begin with binary 1111, so thefirst octet must be between 240 and 255. For both class D and class E, thefirst octet is the network portion of the address.

An IP address with the host bits all set to 1 (e.g., 145.24.255.255) isthe local broadcast address.

Classless Network Addressing

The above classful network addressing scheme was relaxed in 1993, in aneffort to slow the exhaustion of IPv4 addresses and to reduce the size ofrouting tables inside routers. It was replaced by Classless Inter-DomainRouting (CIDR) in which the network portion can be of any size.

In CIDR notation, the size (in bits) of the network portion of an ad-dress is written after the address and separated from it by a forward slashcharacter (‘/’). When writing a network address, any trailing bytes thatare zero can be omitted from the written representation. For example, theloopback address 127.0.0.1/8 is part of the Class A loopback network127.0.0.0/8 which can be written 127/8, and the Class B private network192.168.0.0/16 can be written 192.168/16.

Classful addressing remains important because the vast majority of as-signed Internet addresses obey its structure and numbering rules, and muchof the networking literature still uses the terminology.

9.1.3 Service AddressesThe transport layer is concerned with the exchange of datagrams or data

streams between processes or network applications running on remote ma-chines. Within the IP suite, the transport-layer User Datagram Protocol(UDP) and Transmission Control Protocol (TCP) use port numbers to iden-tify a communication endpoint associated with a specific client, server or peerprocess running on a remote network device.

Just as an IP packet header contains a source and destination IP address,UDP and TCP headers contain a source and destination port number. Port

Page 6: Chapter 9 Naming, Addressing and Routing - 立命館 …piumarta/networks/notes/NetWeek09_Notes.pdfChapter 9 Naming, Addressing and Routing ... with the remaining bits identifying

68 CHAPTER 9. NAMING, ADDRESSING AND ROUTING

numbers are 16 bits wide and so in principle provide for 65,356 communi-cation endpoints on a single network device. This 16-bit address space isdivided into three ranges: well-known (or system) ports, registered ports, anddynamic (or private) ports.

The well-known port numbers range from 0 to 1023. Communication toservers for network services that are critical to the functioning of the mostpopular Internet applications can be established or performed on ports lo-cated in this range. Examples include the Simple Mail Transfer Protocol(SMPT, for sending e-mail messages) on port 25 and the Hypertext TransferProtocol (HTTP, implementing the World Wide Web) on port 80. Specialprivileges are usually required for an application to advertise or provide ser-vices on a well-known port.

The registered port numbers range from 1024 through 49151. These areavailable for use by individuals and organisations for their own applications.

The dynamic port numbers range from 49152 to 65535. These can beused informally by anyone for any purposes, and are also used by TCPfor dynamically-allocated ports on which client-server communication is per-formed once the connection to the server has been established.

The Internet Assigned Numbers Authority (IANA) maintains an officiallist of well-known and registered port numbers. On Unix-like machines (in-cluding MacOS X and Linux) a list of these port numbers can be found inthe file /etc/services.

9.2 RoutingThe network portion of an IP address defines a subnet, a set of hosts thatshare the same network address. Hosts whose IP addresses have the samenetwork portion are attached to a single link and can communicate witheach other in a single hop; there is no need to route those packets through aWAN from source machine to destination machine. Hosts whose IP addresseshave different network portions are not connected to the same local network;routing is required to send packets between these hosts.

To determine whether routing is required, the network layer uses a net-

work mask (usually abbreviated to ‘netmask ’) that has a 1 for each bit in thenetwork portion of local addresses, and a 0 in the host portion bits. Perform-ing a bitwise and operation between any IP address and the local netmaskallows the network layer to find out if a given IP address belongs to the local

Page 7: Chapter 9 Naming, Addressing and Routing - 立命館 …piumarta/networks/notes/NetWeek09_Notes.pdfChapter 9 Naming, Addressing and Routing ... with the remaining bits identifying

9.2. ROUTING 69

network or to a foreign network.Routing simply means sending packets through the network with the

intention of getting each one to its proper destination. A router uses packet

forwarding to send a packet: if the packet cannot be delivered locally to itsfinal destination then the router uses its routing tables to find the best routetowards the destination and forwards the packet to the next device along theroute.

Packets sent to an IP address that is part of the local network will bedelivered directly to the final destination, by encapsulating them in a framewhose MAC address is that of the destination device.

Packets sent to an IP address that is not part of the local network willbe delivered to the designated router (or gateway) for the local network, byencapsulating them in a frame whose MAC address is that of the router.

A router is usually directly connected to at least two networks. When apacket arrives at the router, either the packet can be delivered directly to ahost on one of the connected networks or it must be forwarded to anotherrouter closer to its final destination. The router’s network layer inspectsthe destination IP address of arriving packets. If the destination addressis associated with a network connected directly to a NIC on the router,the packet is forwarded (via link-layer encapsulation) directly to its finaldestination. Otherwise the router uses the information in its routing tablesto determine the ‘best’ destination for the packet — the one that moves it‘closest’ to its final destination — which will be another router (or gateway).The packet is forwarded directly to that router, moving it one hop closer toits destination. The routing process repeats, from the start of this paragraph,in the new router.

9.2.1 Routing TablesRouting tables tell a network device or router where to send a packet basedon its destination IP address. Routing tables typically contain three kindsof entry indicating network, host and default routes.

A network route indicates a destination interface or gateway based onthe network portion of the destination IP address. A router with severalconnected LANs will have network routes that allow traffic between thoseLANs to be forwarded to the correct interface for local delivery.

A host route indicates a destination interface or gateway based on theentire destination IP address.

Page 8: Chapter 9 Naming, Addressing and Routing - 立命館 …piumarta/networks/notes/NetWeek09_Notes.pdfChapter 9 Naming, Addressing and Routing ... with the remaining bits identifying

70 CHAPTER 9. NAMING, ADDRESSING AND ROUTING

Destination Gateway Interface0.0.0.0 10.0.1.1 en010.0.1.1 00:16:01:98:0d:20 en010.0.1/24 link#4 en010.0.1.255 link#4 en010.0.1.120 127.0.0.1 lo0127.0.0.1 127.0.0.1 lo0127/8 127.0.0.1 lo010.0.1.124 84:38:35:60:45:12 en0

Table 9.1: A very simple routing table, typical of a personal computer connected

to a private LAN. The default route (destination 0.0.0.0) sends packets to the

LAN’s router at 10.0.1.1 from where the entire Internet is reachable. A host

route for the LAN’s router directs traffic to its MAC address 00:16:01:98:0d:20over the Ethernet interface en0. A network route for 10.0.1/24 sends all other

packets bound for the local subnet to their destinations via en0, and an explicit

host route for the local broadcast address directs traffic to the same interface. The

IP address of the local machine is 10.0.1.120 and a host route directs packets

sent to that address back to the loopback interface lo0 at the conventional address

127.0.0.1. The next two entries indicate that traffic to the loopback address

127.0.0.1 and the loopback network 127/8 will also be sent to the loopback inter-

face lo0. Finally, a dynamic host route has been added for a machine on the local

network, 10.0.1.124, and packets sent to that address will be forwarded directly

to the machine’s MAC address 84:38:35:60:45:12 over the interface en0.

The default route indicates a destination interface or gateway to whichpackets should be sent when there is no explicit route for them. (If a gatewayis specified as the default route then the routing table should also contain ahost route entry for the gateway.)

Routes that depend only on the local network topology can be configuredstatically. These are called static routes. Some routers, such as gateways,monitor traffic or perform other computations to keep their routing tables up-to-date with the best available routes as network conditions change. Routesthat enter the table as part of this process are called dynamic routes (oradaptive routes).

Routing tables are present in many network devices that are not ded-icated routers. Most personal computers can be connected to more thanone network at once (to both a wired Ethernet and to a wireless network,for example), and the loopback device is almost always attached to a vir-

Page 9: Chapter 9 Naming, Addressing and Routing - 立命館 …piumarta/networks/notes/NetWeek09_Notes.pdfChapter 9 Naming, Addressing and Routing ... with the remaining bits identifying

9.3. NAMING 71

tual interface that is distinct from any physical network interface. Sendinga packet out from such a machine requires routing to determine which inter-face to transmit on, and whether delivery should be attempted directly orindirectly via a router. Table 9.1 shows an example of such a routing table.

9.2.2 Special IP AddressesSome IP addresses and subnets are reserved for special use on LANs, eitherby standardisation or by convention.

• 0.0.0.0 is a source-only ‘wildcard’ address used during configurationof software and/or hardware. When used as a destination in a routingtable entry it denotes the default route.

• 10.0.0.0/8 is a large private network, for example a corporate internalnetwork.

• 127.0.0.1 is the ‘loopback’ address — a way of addressing the localmachine, regardless of its actual IP address on the LAN.

• 169.254.0.0/16 is a medium-size private network used for self-assignedIP addresses used, for example, when two hosts are communicating di-rectly on a single link and no IP address is otherwise specified.

• 192.168.0.0/16 is medium-size private network popular for creatinga home and office LANs.

• 255.255.255.255 is the broadcast address for the local network.

9.3 NamingOne feature of the Internet that makes it accessible to the general popula-tion is the use of symbolic names that refer to machines and services. If wecombine the name of an organisation of interest (such as Ritsumeikan Uni-versity) with the name of its organisational type and/or country (such as .acand .jp), and remember that Web servers within organisations are usuallyrunning on hosts called www., we can immediately form a likely address andenter it into an Internet application and have some hope of contacting thatorganisation’s Web site or other Internet service. At the very least we caneasily remember the names of several large Internet search providers (suchas startpage.com) which will very quickly tell us that what we needed was

Page 10: Chapter 9 Naming, Addressing and Routing - 立命館 …piumarta/networks/notes/NetWeek09_Notes.pdfChapter 9 Naming, Addressing and Routing ... with the remaining bits identifying

72 CHAPTER 9. NAMING, ADDRESSING AND ROUTING

www.ritsumei.ac.jp. Given these names, an Internet service automaticallyprovides us with their numeric IP addresses.

The service that performs this name translation (or name resolution)is called the Domain Name System (DNS) and the machines that providethat service are called DNS servers. Every network device that performsname resolution (including personal computers and laptops) must have theaddresses of one or more DNS servers configured by their administrator.

Host addresses, server names, and numeric Internet addresses can allchange over time. The DNS is therefore organised as a self-updating dis-tributed database in which local modifications take only a few hours to prop-agate to the rest of the world. Moving a service from one machine to another,or changing the symbolic name of a service while keeping the underling serverunchanged, can be accomplished very easily and quickly with no disruptionto the affected services.

9.3.1 Domain NamesA domain name is a string that identifies an IP resource such as a computer,a web server, or any other service communicated via the Internet. Domainnames are usually chosen to be memorable or mnemonic, and when associ-ated with a particular organisation they will often include the name of theorganisation. Note that the term domain refers to a realm of administra-tive authority and that a single computer, or a single service running on acomputer, can represent an entire domain.

A domain name is associated with a numeric IP address. The domain

name system (DNS) translates domain names into their numeric IP ad-dresses, which are needed to locate and communicate with IP network ser-vices and devices.

Naming within the DNS is is hierarchical and each domain name consistsof several individual names belonging to adjacent levels within the hierarchy.The individual names are separated by dots (‘.’) and written from the leastsignificant (e.g., the name of a single computer such as www) to the mostsignificant (e.g., a country code such as jp).

At the top of the DNS hierarchy is the root domain, which has no name.It is almost always omitted from Internet address names. A fully-qualified

domain name (FQDN) is a domain name that includes names for all levelsin the DNS hierarchy, making its interpretation unambiguous. Since the lastcomponent of a FQDN is the root domain, which has no name, all FQDNs

Page 11: Chapter 9 Naming, Addressing and Routing - 立命館 …piumarta/networks/notes/NetWeek09_Notes.pdfChapter 9 Naming, Addressing and Routing ... with the remaining bits identifying

9.4. QUALITY OF SERVICE 73

end with a single dot character (followed, in principle, by the name of theroot domain — which is an empty string).

Immediately under the root domain are the top-level domains (TLDs).Domain names that are written without the root domain usually end with aTLD such as .com, .org, .jp, etc. When the TLD is related to the name ofa country, as in the case of .jp, it is called a country-code TLD (ccTLD).

Domain names can only contain ASCII characters. In 2003 a systemcalled Internationalized Domain Names in Applications (IDNA) was intro-duced to allow non-ASCII characters to be encoded within an ASCII domainname that would be decoded and displayed correctly as Unicode characters byapplication software. Since 2010, ccTLDs in the native alphabets of severalcountries have been allowed into the root domain as Internationalized Do-

main Name Country Code TLDs (IDN ccTLDs), encoding their non-westernUnicode characters within a DNS-friendly ASCII string.

9.3.2 The Domain Name SystemPhysically the DNS is a database composed of many name servers distributedthroughout the world that cooperate with each other to provide namingservices.

Each server is responsible for managing a zone of domain names withinthe Internet’s name space. A zone is usually associated with one or moredomain names that are adjacent to each other at a particular level in theDNS hierarchy. A server might also be responsible for all of the subdomainsbelonging to one or more of its domains. A server is said to be authoritative

for the domain names in its zone.

9.4 Quality of ServiceQuality of Service (QoS) covers a range of techniques intended to improvethe experience of network communication. Channels that offer quality ofservice guarantees try to provide more predictable communication behaviourfor their applications.

Within the transport layer, higher-quality communication means avoidingerrors such as dropped, delayed, or out-of-order packets.

Link layers usually provide a best-effort service (or best effort delivery)that has no guarantee of quality or priority. In particular, delivery of any

Page 12: Chapter 9 Naming, Addressing and Routing - 立命館 …piumarta/networks/notes/NetWeek09_Notes.pdfChapter 9 Naming, Addressing and Routing ... with the remaining bits identifying

74 CHAPTER 9. NAMING, ADDRESSING AND ROUTING

packet can be delayed because of local congestion anywhere along the route.

9.4.1 Transport Layer QoSNetwork conditions are constantly changing and gateways are constantly up-dating their routing metrics in response to those changes. Packets sent insequence may be delivered to the destination by different routes. If an earlierpacket travels over a slower route, and a later packet over a faster route, thelater packet may be delivered before the earlier one. The packets will bedelivered out of order.

Packet loss occurs when a packet fails to arrive at the destination. Thiscan be caused by many factors including signal degradation within the medium(corrupted packets will be dropped because of incorrect checksums) and con-gestion within a channel (a packet will be dropped after too many retrans-mission failures). Packet loss (and other service degradation) can also becaused intentionally by network operators attempting to control or dissuadecertain kinds of traffic. Examples include blocking unauthorised VoIP (e.g.,Skype) over a mobile telephone’s wifi connection, or throttling peer-to-peer

file sharing connections on a home subscriber’s Internet connection.Packet duplication can occur for several reasons including routers mistak-

enly forwarding a packet over more than one route and link-layer protocolsmistakenly detecting a dropped packet and retransmitting it.

Transport layer services can improve the quality of service by request-ing retransmission when packets are overdue, discarding duplicates when re-ceived, and reconstructing an orderly sequence of packets before delivery tothe receiver. Examples of this include the connection-oriented protocols suchas TCP, and several datagram-oriented protocols such as the Reliable User

Datagram Protocol (RUDP) and Reliable Datagram Sockets (RDS). Simplerprotocols, such as UDP, offer no quality of service improvements and passon all the imperfections of the the underlying network and link layers to theapplication.

9.4.2 Link Layer QoSNetwork administrators can assign explicit priorities to different kinds ofnetwork traffic in order to maintain predictable results. Voice-over-IP (VoIP)depends on jitter and latency being minimised (late packets are useless).Streaming media (audio and video) works best when a minimum average

Page 13: Chapter 9 Naming, Addressing and Routing - 立命館 …piumarta/networks/notes/NetWeek09_Notes.pdfChapter 9 Naming, Addressing and Routing ... with the remaining bits identifying

9.4. QUALITY OF SERVICE 75

0 1 2 3 4 5 6 7

precedence D T R 0 0

precedence bits 0–2:111 : Network Control110 : Internetwork Control101 : Critical (Voice RTP)100 : Flash Override011 : Flash (Video, VoIP)010 : Immediate001 : Priority000 : Routine (best-effort)

precedence bits 3–5:D : 1 = low delayT : 1 = high throughputR : 1 = high reliability

other bits 6–7: unused

Table 9.2: RFC 791 (Internet Protocol) Type of Service (ToS) byte. The first

three bits define a precedence for the packet. Priorities are typically enforced

by processing high-priority packets before any lower-priority packets that might

already be queued for processing. The highest priority is given to control messages

intended for local network and internetwork control, followed by various grades of

streaming media, and finally the lowest priority is given to bulk transfers where

overall bandwidth is more important than communication consistency. The next

three bits indicates whether the communication would benefit from low latency,

high throughput, and/or high reliability.

throughput is maintained (pausing to wait for a playback buffer to refill isannoying for the audience). Bulk transfers of data work better if higheroverall throughput can be traded for uneven throughput (fast completion ismore important than the smoothness of the transfer).

Asynchronous Transfer Mode (ATM) is an example of a link layer tech-nology that provides a very high quality of service by preallocating resourcesfor specific uses and by using small (53-byte) frames called ATM cells. It waspopular with telephone companies and providers of streaming media, but hasbeen declining in favour of IP-only networks that use IP and Ethernet QoSfeatures instead.

Throughput

In network connectivity, throughput is the rate of packets successfully de-livered. It can be measured in bits per second (bps) or packets per unittime. Mathematical models of throughput in communications networks were

Page 14: Chapter 9 Naming, Addressing and Routing - 立命館 …piumarta/networks/notes/NetWeek09_Notes.pdfChapter 9 Naming, Addressing and Routing ... with the remaining bits identifying

76 CHAPTER 9. NAMING, ADDRESSING AND ROUTING

priority queue

level IEEE 802.1p description priority

0 best-effort normal1 background low2 spare low3 excellent effort (business critical) normal4 controlled load (streaming multimedia) high5 video (interactive media) [< 100ms latency and jitter] high6 voice [< 10ms latency and jitter] highest7 network control [lowest latency and jitter] highest

Table 9.3: IEEE 802.1p Ethernet frame priorities and the queue priorities assigned

to them by one particular manufacturer of network equipment. The mapping is

neither one-to-one (there are only four queue priorities and so the mapping is

many-to-one) nor monotonic (the default best-effort service has higher priority

than transfers at background or spare priorities).

developed in the early 20th century, initially to model the requirements ofearly telephone exchanges. This led to the field of Queuing Theory, whichtoday is applied to the study of packets in queues and stacks. The numberof packets arriving at a queue per time unit (usually either per second orper service time) is usually denoted λ. Throughput can be asymmetricaland is characterised as uplink throughput (think ‘uploading’) and downlink

throughput (think ‘downloading’).

Latency

Latency, or delay, is the amount of time that elapses between data being sentand its final delivery. Jitter is a measure of the variance of latency over time.When the latency varies greatly from packet to packet, a high level of jitteris present. Network latency and jitter can be caused by many factors:

• transmission delay: the time required to place the bits onto the physicalmedium;

• propagation delay: the time for a packet to travel over a medium fromsender to receiver;

• queuing delay: the time a packet spends waiting in a queue to beprocessed by sender or receiver;

Page 15: Chapter 9 Naming, Addressing and Routing - 立命館 …piumarta/networks/notes/NetWeek09_Notes.pdfChapter 9 Naming, Addressing and Routing ... with the remaining bits identifying

9.5. ADDRESS EXHAUSTION AND IPV6 77

• processing delay: the time needed for encapsulation, or to decode andthen modify the header for forwarding or remove it for delivery to alocal process.

9.5 Address Exhaustion and IPv6A 32-bit addressing scheme allows for approximately 4.2 × 109 unique ad-dresses. Even with local subnets and many devices being connected to pri-vate networks behind a single, public, Internet-facing address, the number ofIPv4 addresses is a severely limited resource.

On 31 January 2011, the last two IPv4 /8 networks were allocated (toAPNIC, the Asia Pacific Network Information Centre, in Australia). At thetime of writing (2014) some of the five Regional Internet Registries (RIRs,responsible for allocation of IP addresses for a particular geographical areaof the world) have already exhausted their supply. The remaining RIRs areexpected to run out of unallocated addresses within the next few years.

The exhaustion of IPv4 addresses has been anticipated by the IETF sincethe Internet began to experience exponential growth in the late 1980s. Inresponse to this and other shortcomings with IPv4, RFC 2460 introduceda new IP called IPv6 which has (amongst other improvements) a 128-bitaddress space that allows for about 3.4× 1038 unique addresses.

IPv6 addresses are usually written as eight groups of four hexadecimaldigits, each group representing 16 bits of the address, with colons separatingthe groups (for example, 2001:db8:85a3::8a2e:370:7334). One consecu-tive sequence of groups in an address whose values are all zero can be replacedwith a double colon. (The IPv6 loopback address

0000:0000:0000:0000:0000:0000:0000:0001

may therefore be abbreviated to ::1.)Despite the maturity of the IPv6 specifications and the fact that many

network devices are designed to handle IPv6 traffic, IPv4 remains the domi-nant protocol used on the public Internet and carries (as of May 2014) morethan 96% of its traffic. No one really knows how well IPv6 would work onexisting infrastructure if it were to replace IPv4 entirely.

Page 16: Chapter 9 Naming, Addressing and Routing - 立命館 …piumarta/networks/notes/NetWeek09_Notes.pdfChapter 9 Naming, Addressing and Routing ... with the remaining bits identifying

78 CHAPTER 9. NAMING, ADDRESSING AND ROUTING

9.6 Glossary

adaptive routes — routing table entries which change in response to chang-ing network conditions.

addressing — assigning a numeric identifier to a device or service, and theact of directing communication to that device or service.

Asynchronous Transfer Mode — a link-layer technology with strong QoSguarantees that was popular within telephone and streaming media compa-nies.

ATM cell — a 53-byte frame in an ATM network.

authoritative — (name server) the name server that manages a given do-main.

best effort — with no guarantee of quality or reliability.

best-effort service — a service that is provided on a best-effort basis.

broadcast address — an address to which packets can be sent which willcause them to be received by all attached network devices as if they had beenaddressed specifically to each device in turn.

broadcast — communication with all locally-connected machines at once.

classful network addressing — an IP addressing scheme in which the sizeof the network portion of an address is determined by its first few bits.

Classless Internet Domain Routing (CIDR) — an IP addressing schemein which the size of the network portion of an address is determined bynetwork hardware configuration.

class — (IP address) the class to which an address belongs, based on its firstfew bits.

country-code TLD (ccTLD) — a top-level domain for a country formedfrom the letters used to identify that country, for example .jp is the ccTLDfor IP addresses within Japan.

data streams — a continuous flow of information between one host andanother over a connection-oriented communications link.

datagrams — the name given to unreliable packets that are being used totransmit application-level data directly.

Page 17: Chapter 9 Naming, Addressing and Routing - 立命館 …piumarta/networks/notes/NetWeek09_Notes.pdfChapter 9 Naming, Addressing and Routing ... with the remaining bits identifying

9.6. GLOSSARY 79

default route — the machine (and/or interface) to which packets will besent in the absence of any explicit route for the destination host or networkaddress.

delayed — not received in a timely fashion.

DNS servers — a service that provides name resolution within the DNS.

Domain Name System — a global distributed database that maps sym-bolic names of Internet resources to numeric IP addresses.

domain — an Internet host or a group of related Internet hosts, each ofwhich is a sub-domain within the group.

domain name — the name of a resource on the Internet. A domain namemay refer to an individual host or be a parent to a group of sub-domains.

dotted quad notation — a way of writing IPv4 addresses as four decimalnumbers separated by dots.

downlink — the flow of information into a network device.

dropped — discarded due to data corruption, congestion or circular routing.

dynamic port — a client-server session communication port whose numberis assigned randomly, during (e.g.) TCP connection negotiation, in the range49152 to 65535.

dynamic route — a routing table entry that is added, modified or removedin response to changing network conditions.

frame — a unit of data within the link layer.

fully-qualified domain name — a domain name in which none of thehierarchical elements are missing. FQDNs end with a dot, because the rootdomain’s name is empty.

hierarchical — consisting of elements at different levels of significance.

hop — movement of a packet from one host to another locally-connectedhost.

host route — a routing table entry that describes the interface and/orrouter to which packets addressed to a specific host should be sent.

host — a device connected to the Internet.

Page 18: Chapter 9 Naming, Addressing and Routing - 立命館 …piumarta/networks/notes/NetWeek09_Notes.pdfChapter 9 Naming, Addressing and Routing ... with the remaining bits identifying

80 CHAPTER 9. NAMING, ADDRESSING AND ROUTING

IEEE 802.1p — a IEEE working group that developed QoS extensions forEthernet frames.

Internationalized Domain Name Country Code TLD (IDN ccTLD) —a country-code top-level domain name that contains an ASCII encoding ofnon-western Unicode characters used to write the country’s name in its localscript.

Internationalized Domain Names in Applications (IDNA) — a con-vention for encoding non-western Unicode characters within an ASCII do-main name for the purpose of displaying that domain name correctly inapplication level software.

Internet Assigned Numbers Authority (IANA) — the authority thatallocates and manages numeric IP addresses.

IP Address — the numeric address of a host or resource on the Internetand which can be used as the source or destination address in an IP packet.

IPv4 Address — a 32-bit IP address as used by IPv4.

IPv4 — version 4 of the Internet Protocol, defined by RFC 791.

IPv6 Address — a 128-bit address as used by IPv6.

IPv6 — version 6 of the Internet Protocol, defined by RFC 2460.

jitter — the variability in the latency of communication between two com-munication endpoints.

latency — the time that elapses between the transmission of data and itsreception.

MAC Address — a six-byte address used by the link layer to identify adirectly-connected device on the local network.

membership — (multicast group) the state of being part of a multicastgroup and of having packets sent to that group delivered as if they wereaddressed directly to the member.

multicast — sending a packet to several hosts as once, all of which aremembers of the group identified by a multicast address.

multicast address — an IP address that identifies a multicast group.

name — a human-readable, often mnemonic, name associated with a net-work host or resource.

Page 19: Chapter 9 Naming, Addressing and Routing - 立命館 …piumarta/networks/notes/NetWeek09_Notes.pdfChapter 9 Naming, Addressing and Routing ... with the remaining bits identifying

9.6. GLOSSARY 81

name resolution — converting a symbolic host or resource name into anumeric IP address.

name translation — the same as name resolution.

naming — the process of associating symbolic names with network re-sources.

netmask — a shorter form of network mask.

network mask — a bit mask that separates the network portion of an IPaddress from the host portion.

network route — a routing table entry that describes the interface and/orrouter to which traffic destined for a particular network should be sent.

network — a group of machines connected by a communications medium.

numeric address — a unique binary identifier associated with a networkhost or service.

octet — another word for byte, emphasising that it contains 8 bits.

out-of-order — (packets or reception) occuring in an sequence that is notthe same as the sequence in which sending occurred.

packet — a unit of data exchanged between network devices. ‘Packet’usually refers to network-layer communication, in contrast with datagrams(transport layer) and frames (link layer).

packet duplication — receiving the same packet more than once when onlyone delivery was expected.

packet forwarding — relaying packets from one network segment to an-other by devices in a computer network.

packet loss — failing to receive a packet.

peer-to-peer file sharing — the sharing of large files (typically music ormovies) between peers within a decentralised structure.

port number — a 16-bit numeric address associated with a particular pro-cess, service, or connected endpoint.

precedence — an indication of the order in which data should be deliveredor operations should be performed.

priority — the relative importance of a packet or the data within it.

Page 20: Chapter 9 Naming, Addressing and Routing - 立命館 …piumarta/networks/notes/NetWeek09_Notes.pdfChapter 9 Naming, Addressing and Routing ... with the remaining bits identifying

82 CHAPTER 9. NAMING, ADDRESSING AND ROUTING

private network —

private port — a port (in the range 49152 to 65536) reserved for individual,private use or one which was allocated for the duration of a single client-serverconnection.

Quality of Service — a characterisation of communication based on metricssuch as reliability, throughput, latency and jitter.

Regional Internet Registry (RIR) — an organisation that allocate In-ternet addresses within one of five geographical regions.

registered port — a port in the range 1024 to 49151 that has been officiallyreserved for specific use by an individual or organisation.

Reliable Datagram Sockets (RDS) — a high-performance, low-latency,reliable, connectionless, transport-layer protocol for delivering datagrams.Developed by Oracle.

Reliable User Datagram Protocol (RUDP) — a transport layer pro-tocol that implements TCP-like features with less overhead. Developed byBell Labs.

root domain — the (empty) name of the top-level DNS zone in the hierar-chical namespace of the Internet DNS.

router — a network device that receives and forwards packets on behalf ofcommunication Internet hosts.

routing metrics — measures of network characteristics such as reachabilityand delay that are used to pick a particular route while forwarding a packet.

routing prefix — the sequence of bits at the start of an IP address corre-sponding to its network portion.

routing tables — tables of host, network and default routes within a router.

routing — the process of forwarding a packet between hosts until it reachesits final destination, along a path that is implicit in the routing tables of therouters involved.

service — a process offering data processing or other computation for clients,typically over the network. Examples include DNS name resolution, e-maildelivery via SMTP, and serving World Wide Web pages via HTTP.

static routes — routes that are manually added to a routing table.

Page 21: Chapter 9 Naming, Addressing and Routing - 立命館 …piumarta/networks/notes/NetWeek09_Notes.pdfChapter 9 Naming, Addressing and Routing ... with the remaining bits identifying

9.6. GLOSSARY 83

subnet — a subdivision of an IP network into a smaller network. It can beaccomplished by extending the routing prefix into the host portion of an IPaddress.

symbolic names — mnemonic or memorable, human-readable names givento network hosts or resources.

system port — a port in the range 0 to 1023 reserved for a critical Internetservice such as e-mail delivery via SMTP or Web page retrieval via HTTP.

throughput — a measure of the amount of data being sent through a net-work, in bits per second or packets per unit time.

top-level domain — one of the domains that is immediately below theroot domain and which typically end most Internet addresses as they arecommonly written. Examples include .com, .org and .jp.

unicast — sending a packet to a single destination.

uplink — the flow of information out of a network device.

Voice-over IP — the carriage of telephone or other voice traffic over an IPnetwork.

well-known port — another name for system port.

zone — a collection of one or more Internet domains, managed by a specificDNS server which provides authoritative name resolution for domains withinthe zone.

Copyright © 2014 E.W. Cooper and I.K. PiumartaAll rights reserved.

Permission is granted for you to download, save and then view orprint one copy of this document for personal study purposes. No otherform of publishing, duplication or redistribution is permitted withoutexplicit prior consent.