Beruflich Dokumente
Kultur Dokumente
20.1
Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
20-1 INTERNETWORKING
In this section, we discuss internetworking, connecting networks together to make an internetwork or an internet.
20.3
When frames come to the switch it does not know which interface to go. Data link layer has no routing table. The destination address is local in data link layer.
20.4
20.5
The source check its routing table to find the routing info. (outgoing interface, physical address). If the packet is too large, it will be fragmented. The destination is responsible for address verification and if the packet is fragmented, the network layer must reassembly
20.6
20.7
Internet
Switching at the network layer in the Internet uses the datagram approach to packet switching. Communication in the network layer in the internet is connectionless (best effort).
20.8
20-2 IPv4
The Internet Protocol version 4 (IPv4) is the delivery mechanism used by the TCP/IP protocols. IPv4 is a best-effort delivery service (no guarantee). There is no error and flow control. Topics discussed in this section:
Datagram Fragmentation Checksum Options
20.9
20.10
If a machine uses different protocol version then the datagram is discarded (rather than incorrectly interpreted) Header length is needed because it is variable. It specifies the length in a unit of 4 bytes. TTL specifies the maximum number of hops visited by the datagram. Each router decrements this number by 1. When the value is zero , the router discards the datagram TTL is used to prevent datagrams that travels in network for a long time without ever getting delivered
20.11
Precedence defines the priority (0-7) when there is congestion. Datagram with lowest priority is discarded first. Datagram used for management should get higher priority. Precedence subfield is never used. Application programs can request for specific type of services (table next slide). Codepoint: - when 3 rigthmost bits are all 0s, the 3 leftmost bits are interpreted the same as precedence. - when 3 rigthmost bits are not all 0s, the 6 bits define 64 services based on the priority assignment by Internet authority or local authority. 1. xxxxx0 assigned by internet authority 2. xxxx11 assigned by local authority 3. xxxx01 assigned for experimental purposes.
20.12
20.13
Note
The total length field defines the total length of the datagram including the header.
20.14
Total length is needed when padding is used in the data link layer to determine how much data is contained in the frame.
20.15
Example 20.1
An IPv4 packet has arrived with the first 8 bits as shown: 01000010 The receiver discards the packet. Why? Solution There is an error in this packet. The 4 leftmost bits (0100) show the version, which is correct. The next 4 bits (0010) show an invalid header length (2 4 = 8). The minimum number of bytes in the header must be 20. The packet has been corrupted in transmission.
20.16
Example 20.2
In an IPv4 packet, the value of HLEN is 1000 in binary. How many bytes of options are being carried by this packet? Solution The HLEN value is 8, which means the total number of bytes in the header is 8 4, or 32 bytes. The first 20 bytes are the base header, the next 12 bytes are the options.
20.17
Example 20.3
In an IPv4 packet, the value of HLEN is 5, and the value of the total length field is 0x0028. How many bytes of data are being carried by this packet? Solution The HLEN value is 5, which means the total number of bytes in the header is 5 4, or 20 bytes (no options). The total length is 40 bytes, which means the packet is carrying 20 bytes of data (40 20).
20.18
Example 20.4
An IPv4 packet has arrived with the first few hexadecimal digits as shown. 0x45000028000100000102 . . . How many hops can this packet travel before being dropped? The data belong to what upper-layer protocol? Solution To find the time-to-live field, we skip 8 bytes. The time-tolive field is the ninth byte, which is 01. This means the packet can travel only one hop. The protocol field is the next byte (02), which means that the upper-layer protocol is IGMP.
20.19
Because a datagram may travel through different networks with different link layer protocols and different frame sizes, fragmentation may be needed to fit the IP datagram into a smaller frame size. MTU defines the maximum size of the data field in a specific data link protocol.
20.20
20.21
Fragmentation
Fragmentation can be performed at the source host or any router in the path. Only the final destination host can reassemble the fragmented datagrams. A datagram can be fragmented as many times as needed. Identification helps the destination to reassemble the datagram. IPv4 uses counter to label the datagrams. When sending a datagram, IPv4 copies current value of the counter to the identification field and increase the counter by 1. Combination of identification and source IPv4 address must uniquely define a datagram. If do not flag is 1 and the machine cannot pass the datagram without fragmentation, it will discard. more fragments equal to 0 means this is the last or the only fragment. Fragment offset show relative position of this fragment with respect to the whole datagram. The offset is in unit of 8 bytes. (next slide)
20.22
Suppose a datagram is 4000 bytes in lengths. We want to divide into three fragments. First and second fragments have 1400 bytes each and the third one has 1200 bytes.
20.23
20.24
Example 20.5
A packet has arrived with an M bit value of 0. Is this the first fragment, the last fragment, or a middle fragment? Do we know if the packet was fragmented? Solution If the M bit is 0, it means that there are no more fragments; the fragment is the last one. However, we cannot say if the original packet was fragmented or not. A non-fragmented packet is considered the last fragment.
20.25
Example 20.6
A packet has arrived with an M bit value of 1. Is this the first fragment, the last fragment, or a middle fragment? Do we know if the packet was fragmented? Solution If the M bit is 1, it means that there is at least one more fragment. This fragment can be the first one or a middle one, but not the last one. We dont know if it is the first one or a middle one; we need more information (the value of the fragmentation offset).
20.26
Example 20.7
A packet has arrived with an M bit value of 1 and a fragmentation offset value of 0. Is this the first fragment, the last fragment, or a middle fragment? Solution Because the M bit is 1, it is either the first fragment or a middle one. Because the offset value is 0, it is the first fragment.
20.27
Example 20.8
A packet has arrived in which the offset value is 100. What is the number of the first byte? Do we know the number of the last byte? Solution To find the number of the first byte, we multiply the offset value by 8. This means that the first byte number is 800. We cannot determine the number of the last byte unless we know the length.
20.28
Example 20.9
A packet has arrived in which the offset value is 100, the value of HLEN is 5, and the value of the total length field is 100. What are the numbers of the first byte and the last byte? Solution The first byte number is 100 8 = 800. The total length is 100 bytes, and the header length is 20 bytes (5 4), which means that there are 80 bytes in this datagram. If the first byte number is 800, the last byte number must be 879.
20.29
Example 20.10
Figure 20.13 shows an example of a checksum calculation for an IPv4 header without options. The header is divided into 16-bit sections. All the sections are added and the sum is complemented. The result is inserted in the checksum field.
20.30
20.31
Options can be 40 bytes maximum. No-operation --1 byte option used as a filler between options End-of-option used for padding at the end of option field Record route to record the routers that handle the datagram (for debugging purpose) Strict source route to predetermine the routers that the datagram must visit so that sender can choose route with minimum delay, max throughput, etc.. Loose source route -- less rigid, the datagram can also visit other routers. Timestamp record the time of datagram processing by a router, expressed in ms form midnight GMT, help tracking behaviors of routers.
20.32
20-3 IPv6
The network layer protocol in the TCP/IP protocol suite is currently IPv4. Although IPv4 is well designed, data communication has evolved since the inception of IPv4 in the 1970s. IPv4 has some deficiencies that make it unsuitable for the fast-growing Internet. Topics discussed in this section:
Advantages Packet Format Extension Headers
20.33
Advantage of IPv6
Larger address space 128 bits against 32 bits. Better header format simplifies and speed up routing process. New options allow additional functionalities Allowance for extension IPv6 allows extension of the protocol. Support resource allocation flow label mechanism can be used to support real-time applications. Support more security IPv6 has encryption and authentication.
20.34
20.35
- noncongestion-controlled traffic is the applications such real-time video that cannot tolerate delays, lost, or out-of-order . Priorities are assigned based on how much redundancy is in the data.
20.36
20.37
20.38
20.39
Hop-by-hop used when the source needs to pass info to all routers visited by the datagram. Source routing similar to IPv4. Fragmentation only original source can fragment. A source must use path MTU discovery technique to find the smallest MTU supported by any network on the path, then fragment. Authentication validate the sender to ensure integrity of the data. Destination option used when the source needs to pass info to the destination only. Intermediate routers are not allowed to access this info.
20.40
Table 20.10 Comparison between IPv4 options and IPv6 extension headers
20.41
20.43
20.44
When two computers with IPv6 want to communicate and the packet must pass through a region using IPv4. IPv6 packet is encapsulated in IPv4 packet and leaves its capsule when exiting the region. To make clear that the IPv4 is carrying an IPv6 packet as data, the protocol value is set to 41.
20.45
20.46
HW # 6
Assigned Date: 3/26/2013 Ch: 19 Prob:3, 5, 7, 16, 17, 18, 19, 20, 21, 23, 24, 25, 29, 30. Due Date: 4/2/2013
20.47