ISM 4220 Chapter 8

Ace your homework & exams now with Quizwiz!

Routing table

- A router uses its rows and columns to make the routing decision - What to do with the arriving packet

Router ports are called?

Interfaces

Steps in the routing decision: Step 2 - Selecting the Best-Match row

List of matching rows - At the end of step 1, the router have a list of matching rows - From these, the router must select the best-match row, the row that represents the best route for an IPv4 address

IPv6: Outgrowing IPv4

- Although IPv4 continues to dominate the Internet's traffic, the Internet Assigned Numbers Authority (IANA) initially did a poor job at distributing IPv4 addresses - Today, there are no more to distribute - Yet new devices like mobile phones are exploding, and each needs its own IPv6 address - This is forcing organizations to use IPv6 addresses - Today, all firms must support IPv6 - The most fundamental change in IPv6 is the move from 32-bit addresses to 128-bit addresses - This does not produce merely four times as many addresses. Each additional bit DOUBLES the number of addresses - So while there are just under 4.3 Billion IPv4 addresses, there are 34 undecillion IPv6 addresses - Even with the Internet of Things, IPv6 will solve the address availability problem for many years to come

IPv4 Network mask (Study Figure)

- An IPv4 mask is 32 bits long - It begins with a series of 1s - The remaining bits are 0s - Example (broken into octets for readability): 11111111 11110000 00000000 00000000 - Prefix notation (number of leading 1s) for this example: /12

Version Number Field

- Both headers begin with a 4-bit Version Number Field - For IPv4, the field value is 0100 (four) and for IPv6, the field value is 0110 (six)

Variable Part Lengths

- Can you tell just by looking at an IPv4 address which bits correspond to the network, subnet, and host parts? - NO - For instance, if you see the IPv4 address 60.47.7.23, you may have an 8-bit network part of 60, and 8-bit subnet part of 47, and a 16-bit host part of 7.23 - Or you may have a network part of 16 bits, a subnet part of 8 bits, and a host part of 8 bits - In fact, parts may not even break conveniently at 8-bit boundaries. You may have a network part of 20 bits, a subnet part of 12 bits, and a host part of 12 bits. - The only thing you can tell when looking at an IPv4 address is that it is 32 bits long

Routing table: Rows are routes for all IPv4 Addresses in a range

- Each row represents a route for all IPv4 addresses within a range of IPv4 addresses, typically addresses within a particular network or subnet - It does not specify the full route, however, it only specifies the next step in the route (either the next-hop router to handle the packet next or, on the last router, the destination host) - This is important because the routing table does not need a row for each IPv4 address as an Ethernet switching table does for EUI-48 addresses. - It only needs a row for each GROUP of IPv4 addresses. - This means that a router needs many fewer rows than an Ethernet switch would for the same number of addresses. - However there are many more IPv4 addresses on the Internet than there are Ethernet addresses on an Ethernet network. - Even with rows representing groups of IPv6 addresses, core routers in the Internet backbone still have several hundred thousand rows. - This is important. We will see that routers need to do calculations for ALL rows.

Notes on Network on the Internet

- On the internet, 'network' does not mean single network like an Ethernet LAN - Rather, network is an organizational concept - It means the routers and switches and data links are owned by a recognized organization, which is an end-user organization or an ISP

The IPv6 Main Header

- Figure 8-18 shows the IPv4 header. Actually, we will call this the IPv6 main header because, as we will see, an IPv6 packet can have multiple extension headers before the Data Field - The obvious difference between the IPv4 and IPv6 headers are that IPv4 addresses are 32 bits while IPv6 addresses are 128 bits - The second difference is that the IPv6 main header, although longer, is simpler than the IPv4 header, with fewer fields for hosts and routers to consider. ^ This relative simplicity means that routers process longer IPv6 headers faster than they process IPv4 headers. This makes them cheaper for the amount of traffic that they process

Masking IPv4 addresses

- Figure 8-8 shows what happens when a mask is applied to an IPv4 address, 128.171.17.13. - The mask is 255.255.0.0 - Where the mask has 1s, the result is the original bits of the IPv4 address - There are 16 1s. This is two octets. So the first two octets of the result would be 128.171. - For the remaining 16 bits, which are 0s, the result of the masking is 0. So the masking result is 128.171.0.0

Subnet masks example

- For subnet masks, in turn, the initial 1s indicate the number of bits in both the network and subnet parts - Therefore, if 128.171 is the network part, and 17 is the subnet part, then the subnet mask will be 255.255.255.0 (/24). If you mask 128.171.17.13 with /24, you get 128.171.17.0^2

Step 1 (Row matches)

- How does the router know which IPv4 addresses match a row? The answer is that it uses the Destination Network or Subnet column and the Mask columns

Hierarchical IPv4 Addressing

- IPv4 addresses are 32 bits long - However, IPv4 addresses are not simple 32-bit strings. They have internal structure, and this internal structure is important in routing

Hierarchical Addressing

- IPv4 addresses are hierarchical - They consist of 3 parts (groups of bits) that locate a host in progressively smaller parts of the Internet. - They are the network, subnet, and host parts. - This hierarchical structure of IPv4 addressing simplifies routing tables

No Checksum Field?

- IPv4 has a Header Checksum Field to check for packet header errors - When IPv4 was created, there was a concern that if packet headers contained errors, they could cause serious problems for the Internet - Experience proved this concern to be groundless, so IPv6 has no checksum field - The computations needed to check for errors in IPv4 were taxing, even for a 20-octet header - Dropping the checksum field slashes packet handling time on routers

Hierarchical IPv6 Address (chapter 9)

- IPv6 addresses are also hierarchical and consist of 3 parts that are similar to those of IPv4 addresses - However, there are differences between IPv4 parts and IPv6 parts, and to discuss these, we need a better understanding of IPv6. - We will look at hierarchical IPv6 addresses in Chapter 9

Hop limit field

- IPv6 has a hop limit field that is like the IPv4 Time to Live (TTL) field. - Each router along the way decrements this field's value by 1, and if a router decrements it to zero, the router discards the packet

Main Header and Extension Header

- IPv6 took a different approach to options - As figure 8-19 shows, the main header can be followed by multiple extension headers. - Each extension header has a well defined purpose, such as providing information for security or mobile operation - Each extension header serves the role that an option does in IPv4

Network part

- Identifies the host's recognized network on the internet - The network part for the University of Hawaii network is 128.171. - All host IPv4 addresses in the UofHawaii's network (UH Network) begin with the network part 128.171. This is two IP 8-bit address segments. Therefore, UH Network's part is 16 bits long. - Don't get hung up on the network part being 16 bits. The UH Network is just an example. Different organizations have different network parts that range from 8-24 bits in length.

Step 3: Reducing Multiple Single-Zero Fields

- If there are two or more single-zero fields in a sequence, such as :0:0:0: in this example, you shorted this to a single pair of colons (::) - So if an IP address has the sequence :0000:0000:0000:, this can be replaced by :: - This further simplifies our IPv6 address to the following: 2001:27:fe56::cd3f:fca - Note that a single field will all zeros is not a group of all-zero fields. - So if you have 2000:0:fa, you do not shorten this to 2000::fa

Fields in TCP (Transmission Control Protocol)/IP Segments

- In Ch 2, we briefly looked at the syntax of TCP segments. - In this section, we look at the syntax of TCP segments in more depth. - When IP was designed, it was made to be a very simple "best effort" protocol (although its routing tables are complex) - The IETF left more complex internetwork transmission control tasks to TCP. - Consequently, network professionals need to understand TCP very well

Step 3 (Interface)

- Recall that router ports are called interfaces - the fifth column in figure 8-11 is the interface number - If a router selects a row as the best match, the router sends the packet out the interface designated in that row

IP routing

- Routers make decisions about forwarding packets, which interface to send an arriving packet back out to get it closer to its destination. - For routers, ports are called interfaces - Router forwarding is much more complex than the Ethernet switching. This higher complexity requires routers to do more work per arriving packet than switches do per arriving frame - Consequently, routers are more expensive than switches for a given volume of traffic - Common network adage: "Switch where you can, route where you must."

Routing tables for IPv6 addresses

- Routing tables for IPv6 addresses have the same columns that routing tables for IPv4 addresses have - However, the destination address in an arriving packet is 128-bit IPv6 address, the mask is 128 bits long, and the destination network and the subnet address value is 128 bits long - However we have not looked at part lengths in hierarchical IPv6 addresses, so we cannot discuss routing tables for IPv6 addresses yet.

Switching vs Routing (Figure 8-9)

- In Chapter 5 we saw that Ethernet switching is very simple. Ethernet switches must be organized in a hierarchy. Therefore, there is only a single possible path between any two hosts across the network. When a frame arrives, there is only one possible port to send the frame back out. In an Ethernet switching table, each Ethernet address only appears in one row. This single row can be found quickly, so an Ethernet switch does little work per frame. This makes Ethernet switching fast and inexpensive. - In contrast, routers are organized in meshes. This gives more reliability because it allows many possible alternative routes between endpoints. However, in a mesh, there are multiple ways to send a packet back out to reach its destination. In a routing table, several rows may match an IPv4 address. Row 1 calls for sending the packet out Interface 1 to Next-Hop Router B. Row 3, in turn, calls for sending the packet out Interface 2 to Next-Hop Router C. - The fact that a packet may be matched by multiple rows requires a fairly complex process to be performed on each packet. To route a packet, a router must first find ALL rows that apply to an incoming packet. In fact, it will have to look at every row in the table to see if it is a match to the packet's destination IPv4 address. It must then pick the best alternative route from this list of matches. All this requires quite a bit of work per packet, making routing much more expensive than switching per message handled.

Payload length

- In IPv6, the Payload Length field gives the length of the packet payload, which is everything beyond the 40-octet main packet header - The payload length field is 16 bits long, so a payload can be up to 65,536 octets long

Step 3 (Next-hop router)

- In a switch, a port connects directly to another switch or to a computer - However, a router interface connects to an entire subnet or network - Therefore, it is not enough to select an interface to send the packet out. It is also necessary to specify a particular device on the subnet - In most cases, the router will send the packet on to another router, called the next-hop router - The next-hop router column specifies the router that should receive the packet - It will then be up to that next-hop router to decide what to do next - The default row's next hop router is H. This router is called the default router, and any packet not matching a specific row other than the default row will be send to router H - In some cases, however, the destination host itself will be on the subnet out a particular interface. In that case, there is no reason to send the packet on to another router - Instead, the router will send the packet directly to the destination host. - To indicate that the next destination is the destination host, the next hop router column will say local.

IPv4 Fields: The first row

- In an IPv4 packet, the first four bits constitute the Version Number Field. - This field has the value 0100 (binary for 4). - This indicates that it is an IPv4 packet - The next field gives the total length of the packet - Between the header and total length fields, two fields govern transmission quality - The Differentiated Services Control Point field can be used for priority or other quality of service purposes - The Explicit Congestion Notification (ECN) field can be used to reduce the transmission frequency between a pair of hosts to copy with congestion in the transmission system between them

IPv6 LETS GOOOOO

- In its 1994 meeting, the IETF decided to created a new version of the Internet Protocol, IPv6 - Over the next few years, the IPv6 standards family grew and matured - It would soon be ready to be used, and many networking and computer vendors began to build IPv6 into their products - Organizations soon found that using these new equipment capabilities was a great deal more work than simply turning them on - For many years, few organizations saw the need to make the expensive upgrade to IPv6 because they had enough addresses - In addition, we will see how Network Address Translation (NAT) greatly extended the use of IPv4 addresses in firms, at the cost of some complexity, but at the gain of some security. - IPv6 would have the mandatory inclusion of IPsec security functionality, but IPsec was quickly modified to work with IPv4 as well - Seeing no hard business case for upgrading, few companies did - Now that IPv4 addresses are no longer available, nearly all companies are rushing to IPv6 - IPv6 is now growing explosively. In 2017, IPv6 accounted for 17% of all IP traffic received by Google - This is no longer a trend that can be avoided - Companies have found that IPv6 implementation is a long and complex process. They need employees who understand this new protocol and other "v6" protocols such as ICMPv6 and DHCPv6. In addition, tools to manage IPv6 are still lest robust than those used to manage IPv4

Steps in the routing decision: Step 3- Sending the Packet back out

- In step 1, the router found all rows that matched the destination IPv4 address of the arriving packet - In step 2, it found the best-match row - In step 3, the router sends the packet back out

TCP: Options fields

- It is common for TCP segments to have options fields - Unfortunately, this feature was not well thought out in the original design, so there is no simple way to talk about TCP options

Subnet part

- Most large organizations further divide their networks into smaller units called subnets - After the network part in an IPv4 address come the bits of the subnet part. - The subnet part bits specify a particular subnet within the network - Example: in the UH IPv4 address 128.171.17.13, the first 16 bits (128.171) is the network part, and the next 8 bits (17) corresponds to a subnet on this network. Subnet 17 in this example is the College of Business subnet in the UH network. All host IPv4 addresses within this subnet begin with 128.171.17 - Again do not get hung up on the subnet part being 8 bits long. In different organizations, subnet lengths vary widely.

Network masks example

- Network masks, as noted earlier, have 1s in the network part and 0s for the remaining bits. - If the network mask is 255.255.0.0, and the IP address is 128.171.17.13, then the result of the masking is 128.171.0.0. - This tells us that 128.171 is the network part

Border Routers connect different networks

- Networks and subnets are very important in router operation - A border router's main job is to connect different networks Figure 8-6 example: - This border router connects the 192.168.x.x network within the firm to the 60.x.x.x network of the firm's Internet service provider. - Here, the x's are the remaining bits of the IPv4 addresses, so 192.168 and 60 are the network parts of the two networks

Example of IP network and subnet masks

- Suppose the mask is 255.255.0.0 - This means that the four 8 bit segments of the mask have the values of 255,255,0 and 0 - In dotted decimal notation, 8 1s is 255 and 8 0s is 0 - Therefore, the four segments have, in order, eight 1s, eight 1s, eight 0s, and eight 0s - Putting this together, the mask has sixteen 1s followed by sixteen 0s

TCP: Sequence Numbers

- TCP can handle application messages of almost any length. TCP does this by fragmenting long messages into many pieces and sending each segment in its own TCP segment. - For the receiver to put the pieces of the application messages back in order, each TCP segment has a Sequence Number Field that gives its position in the stream of segments - The receiving TCP process uts the segments in order of increasing sequence number and reassembles the application message - The TCP process then passes the application message up to the correct application process indicated in the port number

IPv4 Fields: The second row

- TCP fragments application messages and sends them in individual packets - This has benefits that we saw in CH 1 and 2 - When IPv4 was created, it was decided to allow routers to further fragment packets - Although this seemed like a good idea at the time, it led to many problems - Today, operating systems by default tell routers not to fragment IPv4 packets - When IPv6 was developed, packet fragmentation was not allowed at all - The second row has information that the destination host uses to reassemble fragmented packets - Given the unimportance of IPv4 packet fragmentation, we will ignore the fields in this row - It is about as useful as the human appendix, often a burst human appendix at that

TCP: Flag fields

- TCP has 9 single-bit fields - Single-bit fields are called flag fields - If they have a value 1, they are said to be set. A 0 means that a flag field is not set - If the ACK bit is set, then the segment acknowledges another segment. If the ACK bit is set, the acknowledgement field must be filled in to indicate which message is being acknowledged. - If the SYN (synchronization) bit is set, then the segment requests a connection opening - If the FIN (finish) bit is set, then the segment requests a normal connection closing

TCP: Acknowlegement numbers

- TCP uses acknowledgements (ACKs) to achieve reliability - If a transport process receives a TCP segment correctly, it sends back a TCP segment acknowledging the reception. If the sending transport process does not receive an ACK, it transmits the TCP segment again - The Acknowledgement Number Field indicates which segment is being acknowledged. - One might expect that if a segment has a sequence number X, then the acknowledgement number in the segment that acknowledges it would also be X. Online Module A shows that the situation is more complex, but the acknowledgement number is at least related to the sequence number of the segment being acknowledged

Step 1 (The need to look at ALL rows)

- Thanks to their mesh topology, internets have many alternative routes. - Consequently a router cannot stop the first time it finds a row match for each arriving packet bc there may be a better match further on - A router must look at each and every row in the routing table to see which rows match.

IPv4 Fields: IP Options

- The IPv4 header allows options - There are several possible options, and they may come in any order - Some are only read by the destination host - However, a lack of required order means that each router must look at every option to see if it applies - This is time consuming

Extension headers

- The IPv4 packet has option fields that allow the sender to add options. Few IPv4 packets have options, but each router must check each packet for options, and this can cost a lot of time, especially bc many options are only relevant to the destination host - Main Header and Extension Header - Next Header Field

Network mask

- The bits in the network part of the mask are 1s, and the remaining bits are 0s EX: UH network - The network part is 16 bits and the subnet part is 8 bits - So the network mask will have 16 1s followed by 16 0s

Subnet mask

- The bits of both the network and the subnet parts are 1s, and the remaining bits are 0s EX: UH network - The network part is 16 bits and the subnet part is 8 bits - The subnet mask will have 24 1s followed by 8 0s

Step 1 (Row Number Column)(Figure 8-11)

- The first column contains route (row) numbers. - Routing tables do not actually have this column. - We include it to refer to specific rows in our discussion - Again, each row specifies a route to a destination

Traffic class and Flow label fields

- The first row of the IPv6 header also contains an 8 bit traffic class field and a 20-bit flow label field. The two fields specify how routing will be handled in terms of priority and other quality of service matters Traffic Class field - Has two subfields: - The 6-bit Differentiated Services (Diffserv) subfield specifies whether this particular packet should be given routine best-effort service, high priority low latency service, or some other type of service - The last 2 bits are for congestion notification The Flow Label field - Indicates that the packet is a member of a particular flow - This router has rules that apply to every packet in the flow

Steps in the routing decision: Step 1 - Finding all row matches

- The first step is to find which of the rows in the routing table match the destination IPv4 address in an arriving packet. - Due to the existence of alternative routes in a router mesh, most packets will match more than one row.

Next Header Field

- The headers are daisy chained together based on the Next Header Field - The main header's Next Header Field specifies the first extension header - In figure 8-19, the value is 0, meaning that the first extension header has hop-by-hop options that every router along the way must content with - This is often the only extension header that routers need to deal with - That extension header's Next Header Field has the value 6, indicating that this header is followed by the TCP segment - It is easy to confuse the terms payload and data field. The data field is the content message being delivered. The payload is everything that follows the main header. So the payload consists of both extension headers and the data field

Step 1 (the default row)

- The last row in figure 8-11 has the destination 0.0.0.0 and the mask 0.0.0.0. This row will match every IPv4 address because masking any IPv4 address with 0.0.0.0 will give 0.0.0.0, which is the value of the destination field of row 13. - This now ensures that at least one row will match the destination IPv4 address of every arriving packet - This is called the default row. - In general, a default is something you get if you do not have a more specific choice

Host part

- The remaining bits in the 32-bit IPv4 address constitute the host part, which specifies a particular host in a subnet - Example: in the UH Network address of 128.171.17.13, the host part is 8 bits long with a segment value of 13. This corresponds to a particular host on the College of business subnet of the UH network. - Again, host parts in different organizations differ in length

Internal routers connect different subnets

- The site network also has an internal router - An internal router only connects different subnets within a network - Many sites have multiple internal routers to link the site's subnets Figure 8-6 example: - in this case, the internal router connects the 192.168.1.x, 192.168.2.x, and 192.168.3.x subnets

Step 2: Remove leading zeros from segments

- This is still long. - Fortunately, there are rules to help us shorten the writing of IPv6 addresses a little. - The first is that in each field, any leading 0s are dropped. - This is easy to understand. If the reader sees: 27, this must be 0027 - Dropping leading zeros is also natural because we do that when writing decimal numbers. - Here is what IPv6 addresses look like after leading zeros are dropped: 2001:27:fe56:0:0:0:cd3f:fc0 - Note that there is an exception to the rule about dropping leading zeros. If a field consists of all zeros (0000), shorten this to 0 instead of writing nothing

Step 1 (mask and compare)

- This may seem like an odd way to see if a row matches the arriving IPv4 address. - A human can look at two different addresses and see that they do not match - However, routers do not possess human pattern-matching abilities - On the other hand, routers (and all computers) have specialized circuitry for doing masking and comparing- the two operations that row matching requires. - Thanks to this specialized circuitry, routers can blaze thru hundreds of thousands of rows in a tiny fraction of a second

Step 1: Convert to Hexadecimal notation

- To simplify the IPv6 address, do not use dotted decimal notation as IPv4 does. Rather, IPv6 uses hexadecimal notation, which we saw in Chapter 5, in the context of Ethernet EUI-48 addresses - Each 'nibble' of 4 bits is converted into a hex symbol from 0 through F. A 128-bit IPv6 address, then, would be translated into 32 hex symbols (128 divided by 4) - In another annoying inconsistency in terminology, groups of IPv4 bits are collected into segments in dotted decimal notation, but groups of bits in IPv6 are called fields. This is an unfortunate use of terminology, because fields within an IPv6 are different from fields in the IPv6 header in general - In Ethernet, we write hex symbols in pairs, separating each pair with a dash. This gives us addresses like A1-B2-C3-D4-E5-F6. - In IPv6, in contrast, we group hex symbols in tetrad (groups of 4) fields. An example of a field is fe56 - Note that we write hex symbols in lowercase when writing hex symbols in IPv6 addresses - Each symbol is still 4 bits, so fe56 represents 16 bits. A full IPv6 address will have 8 of these fields separated by colons (128 bits divided by 16). - The following is an IPv6 address written in hexadecimal notation: 2001:0027:fe56:0000:0000:0000:cd3f:0fc0

Hierarchical IPv4 Addressing: Single Networks VS Networks on the Internet

- To understand IPv4 addressing, you must understand what the term 'network' means on the internet. - It does not mean a single network, like an Ethernet network. - Rather a network on the Internet is a collection of routers and data links owned by a recognized organization. Your home network is not a recognized network. The University of Hawaii's network is a recognized organization. So is Amazon.com. - Both ^^ are end-user organizations. - Internet Service Providers (ISPs) are also recognized organizations. - ISPs are not end user organizations

The Internet Protocol Version 4 (IPv4) Fields

- We have focused on IP routing. However, the Internet Protocol has other properties that networking professionals need to understand - As seen in Chapter 1, most traffic on the Internet and private internets today is governed by the IPv4 Standard - We looked at the header checksum, the source IPv4 address, and the destination IPv4 address in the first two chapters - Now we will look at the other fields in the IPv4 header.

Networks and subnet masks

- We have seen on the UH network, the first 16 bits in IPv4 addresses are the network part, the next 8 are the subnet part, and the final 8 are the host part - However, because the sizes of the network, subnet, and host parts differ, routers need a way to tell the sizes of key parts. - The tools that allow them to do this are masks

Openings and Abrupt TCP Closes

- We know that TCP is a connection-oriented protocol. Connection-oriented protocols have formal openings and closings - We have looked at normal closings. Just as you do not simply hang up on a telephone call when you want to finish talking, if you are polite, a normal TCP close consists of two FIN segments, one in each direction, plus their acknowledgements - However, TCP also permits another type of close. This is an abrupt close - Whenever each side wishes to end a conversation, it can simply send a TCP reset segment. - This is a segment with the RST (reset) flag bit set. - A reset may occur if a problem is encountered during a connection, for security reasons, or for several other reasons - An RST segment is not acknowledged. - The side that sent the RST segment is not listening any longer, so acknowledging a rest would be pointless - The RST segment is one of two segment types that are not acknowledged. A segment that is nothing more than an acknowledgement (a pure acknowledgement) is not acknowledged because doing so would create an endless loop of acknowledgements

The Limited Maximum length of User Datagram Protocol (UDP) Datagrams

- We saw UDP in Chapter 2. This is a very simple protocol, so the discussion in that chapter is sufficient except for one point. This is the fact that UCP, unlike TCP, cannot do segmentation - The entire application message must fit into a single UDP Datagram. - The Length Field in the UDP header is 16 bits long, so the maximum length of the UDP data field (and therefore max length of an application message) is 65,536 octets - On the plus side, there is no need for sequence numbers, openings, closings, acknowledgements, or other things that require a longer header

Writing IPv6 addresses in Canonical Text Notation (RFC 5952)

- We write IPv4 addresses for human consumption in dotted decimal notation- four segments of decimal numbers between 0 and 255 - These segments are separated by dots - Humans can remember these addresses, and they are easier to read and write than 32 1s and 0s - For the 128-bit addresses of IPv6 ,we would also like simpler ways to write them, but anything we do will still overload human memory. - Consequently, when we write IPv6 addresses for human consumption, we do so to make the reading and writing easier - We also want to make the simplified IPv6 address searchable in text documents bc they are often presented in such documents - To write IPv6 addresses in the IPv6 Canonical Text Representation, we must follow a precise set of rules laid out in RFC 5952 (Figure 8-17)

Cheating (Decision Cashing)

- What will the router do if the next packet has the same destination IPv4 address? - The answer is that the router should go through the entire process again. Even if a thousand packets arrive that are going to the same destination IPv4 address, the router should go through the entire 3 step process for each of them - As you might expect, a router might cheat, or as it is euphemistically named, cache (remember) the decision it made for a destination IPv4 address. - It will then use this decision for successive IPv4 packets going to the same destination. - Using a decision cache greatly reduces the work that a router will do for each successive packet to the same destination address - Decision caching is not in the Internet Protocol. This is because it is not entirely safe. - The Internet changes constantly as routers come and go and as links between routers change. - Consequently a cached decision that is used for too long will result in non-optimal routing or even routes that will not work and that will effectively send packets into a black hole

Prefix notation for masks

- Writing 255.255.255.0 is not very difficult, but network professionals often use a shortcut called prefix notation - The mask 255.255.255.0 is 24 1s followed by 8 0s. - In prefix notation, this mask is represented as /24 - In prefix notation, a mask is represented by a slash followed by the # of initial 1s in the mask - What about 255.0.0.0? the prefix notation of the mask is /8 - Prefix notation is simpler to write than dotted decimal notation - We call this prefix notation bc it focuses on the first part of the mask, the part that is all 1s - Another advantage of prefix notation for a mask is that it is simple even if the number of leading 1s is not a multiple of eight - For example ^ suppose the mask is 18 1s followed by 14 0s. The mask is obviously /18. What if you saw the mask in dotted decimal notation: 255.255.48.0? The first two octets are obviously all 1s. However, you would need your decimal to binary calculator to figure out that 48 is 110000.

32 bit strings and masks

- an IPv4 mask is a string of 32 bits, like an IPv4 address. - However, a mask always begins with a series of 1s, this is always followed by a series of 0s - The total length of an IPv4 mask is always 32 bits, so if a mask begins with twelve 1s, it will end with twenty 0s - Two kinds of masks: Network mask and subnet mask

Step 3: if you have more than one group of single -zero fields, the following rules apply:

1. If there is more than one group of single-zero fields, only one group of single-zero fields may be shortened to :: 2. If there are multiple sequences of all-zero fields, the longest group of all-zero fields should be shortened. This just makes sense. One might as well shorten things as much as possible 3. If two groups of single-zero fields tie for the longest number of all-zero groups, the first of these groups must be shortened - These rules seem daunting, but these rules mean everyone writes shortened IPv6 addresses the same way - This is critical so that programs can test whether two addresses in written documentation are the same by comparing the text strings that are the simplified IPv6 notation

3 parts of IPv4 addresses

1. network part 2. subnet part 3. host part

Step 2 (Basic rule)

Basic rule (always used): Longest match - Router decides to follow the rule of selecting the longest match, the longest number of initial 1s in the mask - By the way, note that the default row has a prefix of /0 - This is the shortest possible length of match - Consequently, if any other row matches, its length of match will be longer, and the default row will never be chosen as the best-match row

Internetworking deals with which layer standards?

Governed by Layer 3 and Layer 4 standards (Internet and Transport)

IPv4 Fields: The third row

IP Time to Live (TTL) Field - In the early days of the ARPANET, which was the precursor to the Internet, packets that were misaddressed would theoretically circulate endlessly among packet switches in search on their nonexistent destinations. - To prevent this, IP added an ominous-sounding Time to Live (TTL) field that is assigned a value by the source host. - Different operating systems have different TTL defaults - Most insert the TTL value 128 - Each router along the way decrements (decreases) the TTL field by 1 when a packet arrives before going through the routing process - A router decrementing the TTL to 0 will discard the packet IP Protocol Field - The Protocol Field reveals the contents of the Data Field. - TCP and UDP have protocol values of 6 and 17, respectively - If the Protocol Field value is 1, the IPv4 packet carries an Internet Control Message Protocol (IMCP) message in its data field. As we will see later in Chapter 9, IP is a lean mean routing machine with no time for supervisory messages. - ICMP is TCP/IPs tool for carrying internet layer supervisory messages - After decapsulation, the internet layer process must pass the contents of the packet's Data Field up to another process - The Protocol Field value tells the receiver which process should receive these contents - If the Protocol Field's value is 1, then the internet process will pass the contents of the Data Field to the ICMP process bc these contents are an ICMP message

The routing process

Routing - Processing an individual packet and passing it closer to its destination is called routing The routing table - Each router has a routing table that it uses to make routing decisions - Routing tables have rows - Each row represents a route for a range of IP addresses - often packets going to the same network or subnet The routing decision 1. Find all row matches 2. Find the best match row 3. Send the frame out, based on the information in that row

Steps in Writing IPv6 Addresses in IPv6 Canonical Text Representation following RFC 5952

Step 1: Convert to hexadecimal notation; write letters in lowercase, divide four-symbol fields by colons Step 2: Remove leading 0s from each field. However, there must be at least a single value left, so change 0000 to 0. Do not remove trailing zeroes Step 3: Shorten ONE group of more than two groups of single-zero fields to two colons. If there are multiple groups of more than two colons, shorten the longest. If there is a tie for longest, choose the first Step 4: The final address in simplified IPv6 notation. Shortened but not short.

Steps in the routing decision

Step 1: Find all row matches - The router looks at the destination IP address in an arriving packet. - For each row: Apply the row's mask to the destination IP address in the packet, compare the result with the row's destination value, if the two match the row is a match - The router must do this to ALL rows because there may be multiple matches - This step ends with a set of matching rows Step 2: Find the Best-Match row - The router examines the matching rows it found in step 1 to find the best-match row. - Basic rule (always used): It selects the row with the longest match (Initial 1s in the row match). If it finds one, there is no need to go onto the tie breaker rule - Tie Breaker rule (only when needed): if there is a tie on the longest match, select among the tie rows based on a metric. For cost metric, choose the row with the lowest metric value. For speed metric, choose the row with the highest metric value. - The router now knows the best-match row Step 3: Send the packet back out - Send the packet out on the interface (router port) designated in the best-match row - If the address says Local, the destination host is on that interface - Sends the packet to the destination IP address in a frame

We only look at ____ and ____ internetworking

TCP and IP - Because TCP and IP dominates the work of network professionals at the internet and transport layers - Real world routers cannot limit themselves to TCP/IP internetworking. Commercial routers are multiprotocol routers which can route not only IP packets but also IPX packets, SNA packets, AppleTalk packets, and other minor types of packets

Step 2 (tie breaker rule)

Tie breaker rule (only when needed): Best metric value - What if there was a tie and not a win? - In the case of a tie for longest match, the tie-breaker rule is to use the metric column, which describes the desirability of a route - Cost: lower cost is better than the higher cost - If the metric had been Speed, the more speed the better, so the router would choose the row with the higher speed


Related study sets

Fundamentals of Nursing: Chapter 39

View Set

Abnormal Psychology Chapter 13 Notes

View Set

4.1.6 restrictions on free trade

View Set

PSY285 Sampling examples (khan academy)

View Set

Chapter 9 - Real Estate Contracts

View Set

Chapter 10: Written and Electronic Communication

View Set