Anda di halaman 1dari 209

Lecture – 11

Advanced Computer Networks


(MCA-206)

by
Ruby Dahiya (Faculty – IT, IITM)
Task Menu for Today
• Historical facts about IPv4
• CIDR: A solution for IPv4 Address Exhaustion
problem
• From Emergency measures …
• Historical facts about IPv6
• Why is it IPv6, not IPv5?

2
Historical facts about IPv4
• At the end of 60s (USA uni. & res. centers)
• 1972 : ARPANET renamed to DARPA
• Few years of standardization…
• 1981, Sept. : TCP/IPv4, rfc791
• 80s : TCP/IP implementation (BSD, UNIX)
• 1983 : Research network for ~ 100
• computers

3
Historical facts about IPv4
• 1992 : Commercial activity
• Exponential growth
• 1993 : Exhaustion of the class B address space
• Forecast of network collapse for 1994

4
Classless Inter Domain Routing (CIDR)
• Allocate exceptionally class B addresses
• Re-use class C address space
• CIDR (Classless Inter Domain Routing)
– RFC 1519 (Sept. 1993)
– network address = prefix/prefix length
– less address waste
– allows aggregation (reduces routing table size)

5
Variable-length blocks

• Number of addresses in a block must be a power of two(2,4,8,…)

• First address must be evenly divisible by the number of addresses

• E.g. If a block contains 4 addresses, the first address must be


divisible by 4
Format of classless addressing address

• In classless addressing, the address must be accompanied by the


mask.
• n after slash defines the number of bits that are same in every
address in the block.
• If n is 20,it means 20 leftmost bits are identical in each address
with 12 bits not the same.
Note:

Classful addressing is a special case of


classless addressing.

• In classless addressing, the prefix length is mask.


• Address in classless addressing are guaranteed to be
contiguous & prefix determines the number of 1s so ANDing
the mask and the address gives the first address
• Just keep the first n bits and change rest of the bits to 0s
Example

What is the first address in the block if one of the


addresses is 167.199.170.82/27?

Solution
The prefix length is 27, which means that we must
keep the first 27 bits as is and change the remaining
bits (5) to 0s. The following shows the process:
Address in binary: 10100111 11000111 10101010 01010010
Keep the left 27 bits: 10100111 11000111 10101010 01000000
Result in CIDR notation: 167.199.170.64/27
First Short Cut method
• Divide the prefix length into 4 groups & find
the no. of 1s in each group
• If the no. of 1s in a group is 8,corresponding
byte in the first address is the same
• If no. of 1s in the group is zero, corresponding
byte in the first address is 0
• If the no. of 1s in a group is between 0 and
eight, keep the corresponding bits in that group
Example

What is the first address in the block if one of the


addresses is 140.120.84.24/20?

Solution
Figure shows the solution. The first, second, and
fourth bytes are easy; for the third byte we keep the
bits corresponding to the number of 1s in that group.
The first address is 140.120.80.0/20.
Example
Second Short Cut Method
• To avoid using binary numbers,an alternative
method for a byte that is neither all 1s nor all 0s.
• Write the byte in the address as a sum of powers
of 2(128,64,32,16,8,2,1)
• If a power is missing insert a 0 as a placeholder.
• Choose the m highest powers, where m is the
corresponding number in the prefix length
Example

Find the first address in the block if one of the


addresses is 140.120.84.24/20.
Solution
The first, second, and fourth bytes are as defined in
the previous example. To find the third byte, we write
84 as the sum of powers of 2 and select only the
leftmost 4 (m is 4) as shown in Figure. The first
address is 140.120.80.0/20.
Example
Number of addresses in the Block

Total number of addresses in the block is


(232-n )
Example

Find the block if one of the addresses is


190.87.140.202/29.
Solution
We follow the procedure in the previous examples to
find the first address, the number of addresses, and
the last address. To find the first address, we notice
that the mask (/29) has five 1s in the last byte. So we
write the last byte as powers of 2 and retain only the
leftmost five as shown below:
Example 10 (Continued)

202 ➡ 128 + 64 + 0 + 0 + 8 + 0 + 2 + 0
The leftmost 5 numbers are ➡ 128 + 64 + 0 + 0 + 8
The first address is 190.87.140.200/29

The number of addresses is 232−29 or 8. To find the last address,


we use the complement of the mask. The mask has twenty-nine
1s; the complement has three 1s. The complement is 0.0.0.7. If
we add this to the first address, we get 190.87.140.207/29. In
other words, the first address is 190.87.140.200/29, the last
address is 190.87.140.207/20. There are only 8 addresses in this
block.
Example 11

Show a network configuration for the block in the previous


example.

Solution
The organization that is granted the block in the previous
example can assign the addresses in the block to the hosts in its
network. However, the first address needs to be used as the
network address and the last address is kept as a special
address (limited broadcast address). Figure 5.5 shows how the
block can be used by an organization. Note that the last
address ends with 207, which is different from the 255 seen in
classful addressing.
Example
Note:

In classless addressing, the last


address in the block does not
necessarily end in 255.
Note:

In CIDR notation, the block granted is


defined by the first address and the
prefix length.
SUBNETTING

When an organization is granted a block of


addresses, it can create subnets to meet its needs.
The prefix length increases to define the subnet
prefix length.
Note:

In fixed-length subnetting, the number


of subnets is a power of 2.

• No. of desired subnets defines the subnet prefix


• No. of subnets is s, no. of extra 1s in the prefix
length is log2s where s = 2 number of extra 1s
Example

An organization is granted the block 130.34.12.64/26.


The organization needs 4 subnets. What is the subnet
prefix length?

Solution
We need 4 subnets, which means we need to add two
more 1s (log2 4 = 2) to the site prefix. The subnet
prefix is then /28.
Example

What are the subnet addresses and the range of


addresses for each subnet in the previous example?

Solution
Figure in the next slide shows one configuration.
Example
Example (Continued)

The site has 232−26 = 64 addresses. Each subnet has


232–28 = 16 addresses. Now let us find the first and last
address in each subnet.
1. The first address in the first subnet is 130.34.12.64/28,
using the procedure we showed in the previous examples.
Note that the first address of the first subnet is the first
address of the block. The last address of the subnet can
be found by adding 15 (16 −1) to the first address. The
last address is 130.34.12.79/28.
Example (Continued)

2.The first address in the second subnet is


130.34.12.80/28; it is found by adding 1 to the last
address of the previous subnet. Again adding 15 to
the first address, we obtain the last address,
130.34.12.95/28.

3. Similarly, we find the first address of the third


subnet to be 130.34.12.96/28 and the last to be
130.34.12.111/28.

4. Similarly, we find the first address of the fourth


subnet to be 130.34.12.112/28 and the last to be
130.34.12.127/28.
Example

An organization is granted a block of addresses with the


beginning address 14.24.74.0/24. There are 232−24= 256
addresses in this block. The organization needs to have 11
subnets as shown below:
a. two subnets, each with 64 addresses.
b. two subnets, each with 32 addresses.
c. three subnets, each with 16 addresses.
d. four subnets, each with 4 addresses.
Design the subnets.
Example 14
Example 14 (Continuted)

1. We use the first 128 addresses for the first two


subnets, each with 64 addresses. Note that the mask
for each network is /26. The subnet address for each
subnet is given in the figure.
2. We use the next 64 addresses for the next two
subnets, each with 32 addresses. Note that the mask
for each network is /27. The subnet address for each
subnet is given in the figure.
Example 14 (Continuted)

3. We use the next 48 addresses for the next three


subnets, each with 16 addresses. Note that the mask
for each network is /28. The subnet address for each
subnet is given in the figure.
4. We use the last 16 addresses for the last four
subnets, each with 4 addresses. Note that the mask for
each network is /30. The subnet address for each
subnet is given in the figure.
ADDRESS ALLOCATION

Address allocation is the responsibility of a global


authority called the Internet Corporation for
Assigned Names and Addresses (ICANN). It usually
assigns a large block of addresses to an ISP to be
distributed to its Internet users.
Example

An ISP is granted a block of addresses starting with


190.100.0.0/16 (65,536 addresses). The ISP needs to
distribute these addresses to three groups of customers
as follows:
a. The first group has 64 customers; each needs 256
addresses.
b. The second group has 128 customers; each needs 128
addresses
c. The third group has 128 customers; each needs 64
addresses.
Example (Continued)

Design the sub blocks and find out how many


addresses are still available after these allocations.

Solution
Figure in the next slide shows the situation.
Example
Example (Continued)

Group 1
For this group, each customer needs 256 addresses.
This means the suffix length is 8 (28 =256). The prefix
length is then 32 − 8 = 24. The addresses are:

1st Customer 190.100.0.0/24 190.100.0.255/24


2nd Customer 190.100.1.0/24 190.100.1.255/24
...
64th Customer 190.100.63.0/24 190.100.63.255/24
Total = 64 × 256 = 16,384
Example (Continued)

Group 2
For this group, each customer needs 128 addresses.
This means the suffix length is 7 (27 =128). The prefix
length is then 32 − 7 = 25. The addresses are:

1st Customer 190.100.64.0/25 190.100.64.127/25


2nd Customer 190.100.64.128/25 190.100.64.255/25
···
128th Customer 190.100.127.128/25 190.100.127.255/25
Total = 128 × 128 = 16,384
Example (continued)

Group 3
For this group, each customer needs 64 addresses.
This means the suffix length is 6 (26 = 64). The prefix
length is then 32 − 6 = 26. The addresses are:

1st Customer 190.100.128.0/26 190.100.128.63/26


2nd Customer 190.100.128.64/26 190.100.128.127/26
···
128th Customer 190.100.159.192/26 190.100.159.255/26
Total = 128 × 64 = 8,192
Example (continued)

Number of granted addresses to the ISP: 65,536


Number of allocated addresses by the ISP: 40,960
Number of available addresses: 24,576
Private Addresses
(RFC 1918 BCP)

• Allow private addressing plans


• Addresses are used internally
• Similar to security architecture with firewall
• Use of proxies or NAT to go outside
– RFC 1631, 2663 and 2993

42
NAT (summarized)
Advantages Disadvantages
– Reduce the need of – Translation sometime
official addresses complex (e.g. FTP)
– Apps using dynamic
– Ease the internal
ports
addressing plan – Does not scale
– Transparent to some – Introduce states inside
applications the network:
– “Security” • Multihomed networks
– Breaks the end-to-end
– Netadmins / sysadmin
paradigm
– Security with IPSec
43
Emergency Measures
• These emergency measures gave time to
develop a new version of IP, named IPv6
• IPv6 keeps principles that have made the
success of IP.
• Corrects what was wrong with the current
version (v4)
• BUT are emergency measures enough?

44
Historical Facts about IPv6
• Steven Deering (Xerox PARC) and Robert
Hinden (Ipsilon Networks / Nokia) – IP new
generation (IPng) or IPv6
• 1995, Dec. : IPv6, RFC1883
• Academic networks
• 21st century
• 2000 – 2004 IPv6 implementation

45
What about IPv5?
• IPv5 never existed.
• The version number 5 in the IP header was
assigned to identify packets carrying an
experimental, non-IP, real-time stream protocol
called ST.
• ST was never widely used.
• ST is described in RFC 1819.
• Since the version number 5 had already been
allocated, the new version of IP was given the
number 6.

46
Network Address Translation
(NAT)
Topics to be covered
• What is NAT?
• Why use NAT?
• Reserved Addresses
• Address Translation
• Transition Table
• Translation Modes
• NAT Types
• Advantages of NAT
• Problems with NAT
48
What is NAT?
• First described in RFC 1631
• Network address translation (NAT) allows a site to use a set of
private addresses for internal communication and a set of global
Internet addresses for communication with another site. The site
must have only one single connection to the global Internet through a
router that runs NAT software.
• NAT is a technology that allows a private network to use a set of
private addresses for internal communication
• It can expand IP address space by deploying private address and
translating them into publicly registered addresses.

49
Topology

50
Continue….
• NAT can be accomplished by modifying packet header
– Source address
– Destination address
– IP port number
– IP / TCP / UDP checksums

51
Why Use NAT?
• The shortage of IP addresses
• Security and Privacy
Reserved Addresses
• To separate the addresses used inside the home or business and the
ones used for the Internet, the Internet authorities have reserved
three sets of addresses as private addresses
• Any organization can use an address out of this set without
permission from the Internet authorities.

Table 26.1 Addresses for private networks


Address Translation
.

NAT router replaces the source address in the outgoing packets with
the global NAT address (200.24.5.8).
Router replaces the destination address (the NAT router global
address) in the incoming packets with appropriate private address.
Transition Table
(a). Using One IP Address
• It is simplest form, a translation table has only two columns: the
private address and the external address (destination address of the
packet). When the router translates the source address of the
outgoing packet, it also makes note of the destination address where
the packet is going. When the response comes back from the
destination, the router uses the source address of the packet (as the
external address)to find the private address of the packet.
• In this strategy, communication must always be initiated by the
private network.
Translation
(b). Using a Pool of IP Addresses
• To remove the previous restriction, the NAT router uses a pool
of global addresses
• Since the NAT router has only one global address, only one private
network host can access the same external host. To remove this
restriction, the NAT router uses a pool of global addresses.
• In this case, many private network hosts can communicate with the
same external host at the same time because each pair of addresses
defines connection.
• Drawback :
(1). No more than four connections can be made to the same
destination.
(2). No private-network host can access two external server
programs (e.g., HTTP and FTP) at the same time
NAT address translation: using pool of IP addresses
For example: instead of using one global address 200.24.5.8 ,the NAT router can
uses four addresses (200.24.5.8, 200.24.5.9,200.24.5.10, 200.24.5.11). In this
case Four private network hosts can communicate the same external host at the
same time because each pair of addresses defines a connection.
(c). Using Both IP Addresses and Port Numbers
• To allow a many-to-many relationship between private-network hosts
and external server programs.
• Translation table has five columns, instead of two, that include the
source and destination port numbers of the transport layer protocol,
the ambiguity is eliminated.

Table 26.2 Five-column translation table


Translation Modes
• Dynamic Translation (IP Masquerading)
– large number of internal users share a single external address

• Static Translation
– a block external addresses are translated to a same size block of
internal addresses

60
NAT Types
• Static
Internal IP is always mapped to same External IP
• Dynamic / Pooled
Internal IP is mapped to random external
• Overloading
• Overlapping
Static NAT
•Mapping an unregistered IP address to a registered IP address on a
one-to-one basis.
•Particularly useful when a device needs to be accessible from outside
the network.
•In static NAT, the computer with the IP address of 192.168.32.10 will
always translate to 213.18.123.110
Dynamic NAT
•Maps an unregistered IP address to a registered IP address from a
group of registered IP addresses.
•In dynamic NAT, the computer with the IP address of 192.168.32.10 will
translate to the first available address in the range from 213.18.123.100
to 213.18.123.150:
Overloading
•A form of dynamic NAT that maps multiple unregistered IP addresses to
a single registered IP address by using different ports.
•In overloading, each computer on the private network is translated to
the same IP address (213.18.123.100) but with a different port number
assignment:
Overlapping
•When the IP addresses used on your internal network are registered IP
addresses in use on another network, the router must maintain a lookup
table of these addresses so that it can intercept them and replace them
with registered unique IP addresses.
•The internal IP range (237.16.32.xx) is also a registered range used by
another network. Therefore, the router is translating the addresses to
avoid a potential conflict with another network.
Advantages of NAT
• NAT is transparent to the client and, therefore, allows you to
support a wider range of clients.
• It eliminates costs associated with host renumbering
• It conserves IP addresses
• It eases IP address management
• It enhances network privacy
• Improved security: NAT router is gateway to LAN
• Fully compatible with current Internet
• It can grow stepwise, user by user
• It can grow stepwise functionally
Problems with NAT
• Can’t be used with:
– protocols that require a separate back-channel
– protocols that encrypt TCP headers
– embed TCP address info
– specifically use original IP for some security reason
• Protocols that “talk”about addresses and ports
– FTP: port command informs about IP address and port to be used
for data transfer
– ICMP: Payload contains part of the IP packet reported about
(including part of TCP/UDP header with ports)
– All network management and debugging protocols
Services that NAT has problems with
• H.323, CUSeeMe, VDO Live – video teleconferencing applications
• Xing – Requires a back channel
• IRC – Internet Relay Chat – requires a back channel
• PPTP – Point-to-Point Tunneling Protocol
• SQLNet2 – Oracle Database Networking Services
• FTP – Must be RFC-1631 compliant to work
• IKE – Internet Key Exchange Protocol
• ESP – IP Encapsulating Security Payload
IPV6
(Internet Protocol Version 6)
IPv6 Overview

•IPv6 was designed to take an evolutionary


step from IPv4.
•It was not a design goal to take a radical step
away from IPv4.
•Functions that work in IPv4 were kept in
IPv6.Functions that didn't work were
removed.
The changes from IPv4 to IPv6 fall primarily into
the following categories:

• Header Format Simplification.


• Improved Support for Options.
• Expanded Routing and Addressing Capabilities.
• Quality-of-Service Capabilities.
• Authentication and Privacy Capabilities.
IPv6 features

The following are the features of the IPv6 protocol:


• New header format
• Large address space
• Efficient and hierarchical addressing and routing
infrastructure
• Built-in security
• Better support for quality of service (QoS) .
• New protocol for neighboring node interaction.
• Extensibility .
Address format
• The length of an IPv6 address is 128 bits,
compared to 32 bits in IPv4. The address space
therefore has 2128 or approximately 3.4×1038
addresses.
• The standard size of a subnet in IPv6 is 264
addresses, the square of the size of the entire
IPv4 address space.
• Thus, actual address space utilization rates will be
small in IPv6, but network management and
routing efficiency is improved by the large subnet
space and hierarchical route aggregation.
128-bit IPv6 Address
3FFE:085B:1F1F:0000:0000:0000:00A9:1234

8 groups of 16-bit hexadecimal numbers separated by “:”


Leading zeros can be
removed

3FFE:85B:1F1F::A9:1234

:: = all zeros in one or more group of 16-bit hexadecimal numbers


IPv6 routing
• Routing in IPv6 is almost identical to IPv4 routing under CIDR
except that the addresses are 128-bit IPv6 addresses instead
of 32-bit IPv4 addresses.
• With very straightforward extensions, all of IPv4's routing
algorithms (OSPF, RIP, IDRP, ISIS,etc.) can used to route IPv6.
• IPv6 also includes simple routing extensions that support
powerful new routing functionality. These capabilities
include:
 Provider Selection (based on policy, performance, cost, etc.)
 Host Mobility (route to current location)
 Auto-Readdressing (route to new address)
Security in IPv6
• The current Internet has a number of security
problems and lacks effective privacy and
authentication mechanisms below the
application layer.
IPv6 remedies these shortcomings by having two
integrated options that provide security services.
 IPv6 Authentication Header.
 IPv6 Encapsulating Security Header.
IPv6 Quality-of-Service
• The Flow Label and the Traffic Class fields in the
IPv6 header may be used by a host to identify
those packets for which it requests special
handling by IPv6 routers, such as non-default
quality of service or "real-time" service.

• This capability is important in order to support


applications that require some degree of
consistent throughput, delay, and/or jitter.
IPv6 Extensions
The IPv6 extension headers that are currently defined are:

 Routing: Extended Routing (like IPv4 loose source route).


 Fragmentation: Fragmentation and Reassembly.
 Authentication: Integrity and Authentication. Security
 Encapsulation: Confidentiality.
 Hop-by-Hop Options: Special options which require hop-by-
hop processing.
 Destination Options: Optional information to be examined
by the destination node.
IPv4 Vs IPv6
IPv4 Address IPv6 Address
Address Length – 32 bits 128 bits

Address Representation - decimal hexadecimal

Internet address classes Not applicable in IPv6

Multicast addresses (224.0.0.0/4) IPv6 multicast addresses (FF00::/8)

Broadcast addresses Not applicable in IPv6

Unspecified address is 0.0.0.0 Unspecified address is ::

Loopback address is 127.0.0.1 Loopback address is ::1

Public IP addresses Global unicast addresses

Private IP addresses (10.0.0.0/8, Site-local addresses (FEC0::/10)


172.16.0.0/12, and 192.168.0.0/16)
Autoconfigured addresses (169.254.0.0/16) Link-local addresses (FE80::/64)

IPv6 Packet Format


IPv4 Vs IPv6(contd..)
IPv4 Address IPv6 Address

Text representation: Dotted Text representation: Colon hexadecimal


decimal notation format with suppression of leading zeros and
zero compression. IPv4-compatible addresses
are expressed in dotted decimal notation.

Network bits representation: Network bits representation: Prefix length


Subnet mask in dotted decimal notation only
notation or prefix length
DNS name resolution: IPv4 DNS name resolution: IPv6 host address
host address (A) resource (AAAA) resource record
record
DNS reverse resolution: IN- DNS reverse resolution: IP6.ARPA domain
ADDR.ARPA domain
IPv4 & IPv6 Header Comparison

IPv4 Header IPv6 Header


IH Type of
Version Total Length Versi Traffic
L Service Flow Label
on Class
Fragment
Identification Flags
Offset
Next
Time to Live Protocol Header Checksum Payload Length Hop Limit
Header
Source Address
Destination Address
Options Padding Source Address

- field’s name kept from IPv4 to IPv6


Legend

- fields not kept in IPv6 Destination Address


- Name & position changed in IPv6
- New field in IPv6
IPv6 Header Format

40 Bytes
IPv6 Header Fields
• Based on these rules, RFC 2460 defines the following IPv6 header fields:

1. Version (4 bits)
 4 bits are used to indicate the version of IP and is set to 6
2. Traffic Class (8 bits)
This field is used by the source and routers to identify the packets belonging
to the same traffic class and thus distinguish between packets with different
priorities
3. Flow Label (20 bits)
 identifies a flow and it is intended to enable the router to identify packets that
should be treated in a similar way without the need for deep lookups within those
packets.
 set by the source and should not be changed by routers along the path to
destination.
 unique & powerful tool to IPv6

IPv6 Packet Format


IPv6 Header Fields
4. Payload Length (16 bits)
 With the header length fixed at 40 bytes, it is enough to indicate the
length of the payload to determine the length of the entire packet.
5. Next Header (8 bits)
 Indicates either the first extension header (if present) or the protocol
in the upper layer PDU (such as TCP, UDP, or ICMPv6).
 When indicating an upper layer protocol above the Internet layer, the
same values used in the IPv4 Protocol field are used here.
6. Hop Limit (8 bits)
 In IPv6, the IPv4 TTL was appropriately renamed Hop Limit because it
is the variable which is Decremented by one by each node that
forwards the packet. When the hop limit field reaches zero, the
packet is discarded.

IPv6 Packet Format


IPv6 Header Fields
7. Source IPv6 Address (128 bits)
 Stores the IPv6 address of the originating host.
8. Destination IPv6 Address (128 bits)
 Stores the IPv6 address of the current destination host.
Lecture – 14
Advanced Computer Networks
(MCA-206)

by
Ruby Dahiya (Faculty – IT, IITM)
Task Menu for Today
• Extension Header Format
• Extension Header Types
• Various Options

87
Extension header format

88
Extension header types

89
Hop-by-hop option header format

90
Format of options in a hop-by-hop
option header

91
Pad1

92
PadN

93
Jumbo payload

94
Source routing

95
Source routing example

96
Fragmentation

97
Authentication

98
Calculation of authentication data

99
Encrypted security payload

100
Transport mode encryption

101
Tunnel-mode encryption

102
Lecture – 15
Advanced Computer Networks
(MCA-206)

by
Ruby Dahiya (Faculty – IT, IITM)
Task Menu for Today

• IPv6 Addressing Mechanism


• Types of addresses
- Provider-based addresses
- Local addresses
- Multicast addresses
• Priority Assignment

104
IPv6 address

105
Abbreviated Address

106
Abbreviated address with consecutive zeros

107
CIDR address

108
Address structure

109
Type prefixes for IPv6 addresses

110
Provider-based address

111
Address hierarchy

112
Unspecified address

113
Loopback address

114
Compatible address

115
Mapped address

116
Link local address

117
Site local address

118
Multicast address

119
Priorities for congestion-controlled traffic

120
Priorities for non congestion-controlled traffic

121
Lecture – 16
Advanced Computer Networks
(MCA-206)

by
Ruby Dahiya (Faculty – IT, IITM)
Task Menu for Today

– Auto-configuration in IPv6
– Stateful Auto-configuration
– Stateless Auto-configuration
– Advanced Routing Capabilities

123
Need of Auto-configuaration
• The proliferation of network enabled mobile
devices has introduced the requirements of a
mobile device to arbitrarily change locations on
an IPv6 network while still maintaining its existing
connections.
• IPv6 allows plug and play option i.e ,network
devices by allowing them to configure themselves
independently.
• IPv6 offers two types of auto-configuration:
 Stateful auto configuration
 Stateless auto configuration.
Stateful Auto-Configuration
• It requires some human intervention as it
makes use of the Dynamic Host Configuration
Protocol for IPv6 (DHCPv6).
• The DHCPv6 server maintains a list of nodes
and the information about their state to know
the availability of each IP address from the
range specified by the network administrator.
DHCPv6
• The Dynamic Host Configuration Protocol (DHCP)
facilitates the addition of new machines in a network.
• The protocol allows the network devices to obtain the
different parameters that are required by the clients to
operate in an Internet Protocol (IP) network.
• The dynamic host configuration is made possible with
the automatic assignment of IP addresses, default
gateway, subnet masks and other IP parameters.
• DHCP allocates IP addresses to the network devices in
three different modes:
 dynamic mode
 automatic mode (DHCP Reservation)
 manual mode
Stateless Auto-configuration
• It ‘s a boon for the Network Administrators since it
has automated the IP address configuration of
individual network devices.
• IPv6 allows the network devices to automatically
acquire IP addresses and also has provision for
renumbering/reallocation of the IP addresses en
masse.
• It allows each host to determine its address from the
contents of received user advertisements.
• The word "stateless" is derived from the fact that
this method doesn't require the host to be aware of
its present state so as to be assigned an IP address
by the DHCP server.
Stateless Auto-configuration Process
• Link-Local Address Generation - The device is assigned
a link-local address. It comprises of '1111111010' as
the first ten bits followed by 54 zeroes and a 64 bit
interface identifier.
• Link-Local Address Uniqueness Test - In this step, the
networked device ensures that the link-local address
generated by it is not already used by any other device
i.e. the address is tested for its uniqueness.
• Link-Local Address Assignment - Once the uniqueness
test is cleared, the IP interface is assigned the link local
address. The address becomes usable on the local
network but not over the Internet.
Stateless Auto-configuration Process
(Contd…)
• Router Contact - The networked device makes
contact with a local router to determine its next
course of action in the auto configuration process.

• Router Direction - The node receives specific


directions from the router on its next course of
action in the auto configuration process.

• Global Address Configuration - The host configures


itself with its globally unique Internet address. The
address comprises of a network prefix provided by
the router together with the device identifier.
Advantages of Stateless Autoconfiguration
1.Doesn't require support of a DHCP server
2. Allows hot plugging of network devices
3.Suitable for applications requiring secure
connection without additional intermediaries in
the form of a proxy or a DHCP server
4.Cost effective
5.Suitable for wireless networks
IPv6 Routing
• Routing in IPv6 is almost identical to IPv4 routing under
CIDR.
• Difference: addresses are 128-bit IPv6 addresses instead of
32-bit IPv4 addresses.
• With very straightforward extensions, all of IPv4's routing
algorithms, such as OSPF, RIP, IDRP, IS-IS, can be used to
route IPv6.
• IPv6 offers the new routing capabilities:
 Provider selection that is based on policy, performance,
cost, and so on
 Host mobility, route to current location
 Auto-readdressing, route to new address

• An IPv6 source uses the routing option to list one or more


intermediate nodes, or topological group, to be visited on
the way to a packet's destination.
Contd…
• In order to make address sequences a general function,
IPv6 hosts are required, in most instances, to reverse
routes in a packet that a host receives.
• The packet must be successfully authenticated by using
the IPv6 authentication header.
• The packet must contain address sequences in order to
return the packet to its originator.
• This technique forces IPv6 host implementations to
support the handling and reversal of source routes.
• The new features include provider selection and
extended addresses.
Neighbor Discovery
• The Neighbor Discovery Protocol or NDP in
the IPv6 is an improvement over the Internet
Control Message Protocol (ICMP).
• It is essentially a messaging protocol that
facilitates the discovery of neighboring devices
over a network.
• The NDP uses two kinds of addresses: unicast
addresses and multicast addresses.
Neighbor Discovery Protocol Tasks
ICMPv6 - Overview
• The Internet Control Message Protocol Version
6(ICMPv6) is a multipurpose protocol which is
new version of the ICM protocol .
• ICMPv6 messages are transported within an IPv6
packet that may include IPv6 extension headers.
• ICMPv6 is used for a variety of activities including
error reporting in packet processing, diagnostic
activities, Neighbor Discovery process and IPv6
multicast membership reporting.
ICMPv6 Messages
• Error Messages - ICMPv6 error messages belong to
four different categories:
1. Destination Unreachable
2. Time Exceeded
3. Packet Too Big
4. Parameter Problems.

• Information Messages - ICMPv6 information


messages are subdivided into three groups:
1. Diagnostic messages
2. Neighbor Discovery messages
3. Messages for the management of multicast groups.
Packets Format
ICMPv6 Message Types
Lecture – 17
Advanced Computer Networks
(MCA-206)

by
Ruby Dahiya
(Faculty – IT, IITM)
Task Menu for Today
• Background of Socket Programming
• Byte Ordering
• Socket and its Types
• Socket Structures
• Application Programming Interface Example

140
Demultiplexing
● Convert host-to-host packet delivery service into
a process-to-process communication channel
Application Application Application
process process process
0 16 31
Ports
SrcPort DstPort
Length Checksum
Queues
Data

Packets
demultiplexed
Transport

Packets arrive 141


Byte Ordering
● Two types of Byte ordering
-Network Byte Order: High-order byte of the number is
stored in memory at the lowest address
-Host Byte Order: Low-order byte of the number is
stored in memory at the lowest address
- Network stack (TCP/IP) expects Network Byte Order
● Conversions:
- htons() - Host to Network Short
- htonl() - Host to Network Long
- ntohs() - Network to Host Short
- ntohl() - Network to Host Long

142
What is Socket?
● Socket: An interface between an application
process and transport layer
-The application process can send/receive messages
to/from another application process (local or
remote)via a socket

In Unix jargon, a socket is a file descriptor an
integer associated with an open file
● Types of Sockets: Internet Sockets, unix sockets,
X.25 sockets etc
-Internet sockets characterized by IP Address (4 bytes),
port number (2 bytes)

143
Socket Description

144
Encapsulation

145
Types of Internet Sockets

● Stream Sockets (SOCK_STREAM)


- Connection oriented
-Rely on TCP to provide reliable two-way connected
communication
● Datagram Sockets (SOCK_DGRAM)
- Rely on UDP
- Connection is unreliable

146
socket() -- Get the file descriptor

int socket(int domain, int type, int protocol);
- domain should be set to PF_INET
- type can be SOCK_STREAM or SOCK_DGRAM
- set protocol to 0 to have socket choose the correct
protocol based on type
- socket() returns a socket descriptor for use in later
system calls or -1 on error

int sockfd;
sockfd = socket (PF_INET, SOCK_STREAM, 0);
147
Socket Structures
● struct sockaddr: Holds socket address information
for many types of sockets
struct sockaddr {
unsigned short sa_family; //address family AF_xxx
unsigned short sa_data[14]; //14 bytes of protocol addr
}
● struct sockaddr_in: A parallel structure that makes
it easy to reference elements of the socket address
struct sockaddr_in {
short int sin_family; // set to AF_INET
unsigned short int sin_port; // Port number
struct in_addr sin_addr; // Internet address
unsigned char sin_zero[8]; //set to all zeros
}
● sin_port and sin_addr must be in Network Byte
Order 148
Dealing with IP Addresses
● struct in_addr {
unsigned long s_addr; // that's a 32bit long, or 4 bytes
};

int inet_aton(const char *cp, struct in_addr *inp);
struct sockaddr_in my_addr;
my_addr.sin_family = AF_INET;
my_addr.sin_port = htons(MYPORT);
inet_aton("10.0.0.5",&(my_addr.sin_addr));
memset(&(my_addr.sin_zero),'\0',8);

- inet_aton() gives non-zero on success; zero on failure


● To convert binary IP to string: inet_noa()
printf( %s ,inet_ntoa(my_addr.sin_addr));
149
bind() - what port am I on?
● Used to associate a socket with a port on the local
machine
- The port number is used by the kernel to match an
incoming packet to a process

int bind(int sockfd, struct sockaddr *my_addr, int addrlen)
- sockfd is the socket descriptor returned by socket()
- my_addr is pointer to struct sockaddr that contains
information about your IP address and port
- addrlen is set to sizeof(struct sockaddr)
- returns -1 on error
- my_addr.sin_port = 0; //choose an unused port at
random
- my_addr.sin_addr.s_addr = INADDR_ANY; //use my IP
150
adr
Example
int sockfd;
struct sockaddr_in my_addr;
sockfd = socket(PF_INET, SOCK_STREAM, 0);
my_addr.sin_family = AF_INET; // host byte order
my_addr.sin_port = htons(MYPORT); // short, network byte
order
my_addr.sin_addr.s_addr = inet_addr("172.28.44.57");
memset(&(my_addr.sin_zero), '\0', 8); // zero the rest of the struct
bind(sockfd, (struct sockaddr *)&my_addr, sizeof(struct
sockaddr));
/****** Code needs error checking. Don't forget to do that ****** /
151
connect() - Hello!
● Connects to a remote host

int connect(int sockfd, struct sockaddr *serv_addr, int
addrlen)
- sockfd is the socket descriptor returned by socket()
- serv_addr is pointer to struct sockaddr that
contains information on destination IP address and
port
- addrlen is set to sizeof(struct sockaddr)
- returns -1 on error
● No need to bind(), kernel will choose a port
152
Example
#define DEST_IP "172.28.44.57"
#define DEST_PORT 5000
main(){
int sockfd;
struct sockaddr_in dest_addr; // will hold the destination addr
sockfd = socket(PF_INET, SOCK_STREAM, 0);
dest_addr.sin_family = AF_INET; // host byte order
dest_addr.sin_port = htons(DEST_PORT); // network byte
order
dest_addr.sin_addr.s_addr = inet_addr(DEST_IP);
memset(&(dest_addr.sin_zero), '\0', 8); // zero the rest of the
struct connect(sockfd, (struct sockaddr *)&dest_addr,
sizeof(struct sockaddr));
/*** * Don't forget error checking *** **/
153
listen() - Call me please!
● Waits for incoming connections

int listen(int sockfd, int backlog);
- sockfd is the socket file descriptor returned by
socket()
- backlog is the number of connections allowed on
the incoming queue
- listen() returns -1 on error
- Need to call bind() before you can listen()
● socket()
● bind()

listen()
● accept()
154
accept() - Thank you for calling !
● accept() gets the pending connection on the
port you are listen()ing on

int accept(int sockfd, void *addr, int *addrlen);
- sockfd is the listening socket descriptor
- information about incoming connection is stored in
addr which is a pointer to a local struct sockaddr_in
- addrlen is set to sizeof(struct sockaddr_in)
- accept returns a new socket file descriptor to use
for this accepted connection and -1 on error

155
Example
#include <string.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#define MYPORT 3490 // the port users will be connecting to
#define BACKLOG 10 // pending connections queue will hold
main(){
int sockfd, new_fd; // listen on sock_fd, new connection on
new_fd
struct sockaddr_in my_addr; // my address information
struct sockaddr_in their_addr; // connector's address information
int sin_size;
sockfd = socket(PF_INET, SOCK_STREAM, 0);
156
Cont...
my_addr.sin_family = AF_INET; // host byte order
my_addr.sin_port = htons(MYPORT); // short, network byte
order
my_addr.sin_addr.s_addr = INADDR_ANY; // auto-fill with my IP
memset(&(my_addr.sin_zero), '\0', 8); // zero the rest of the struct
// don't forget your error checking for these calls:
bind(sockfd, (struct sockaddr *)&my_addr, sizeof(struct
sockaddr));
listen(sockfd, BACKLOG);
sin_size = sizeof(struct sockaddr_in);
new_fd = accept(sockfd, (struct sockaddr *)&their_addr,
&sin_size); 157
send() and recv() - Let's talk!
● The two functions are for communicating over
stream sockets or connected datagram sockets.

int send(int sockfd, const void *msg, int len, int
flags);
- sockfd is the socket descriptor you want to send data to
(returned by socket() or got from accept())
- msg is a pointer to the data you want to send
- len is the length of that data in bytes
- set flags to 0 for now
- sent() returns the number of bytes actually sent (may
be less than the number you told it to send) or -1 on
error 158
send() and recv() - Let's talk!

int recv(int sockfd, void *buf, int len, int flags);
- sockfd is the socket descriptor to read from
- buf is the buffer to read the information into
- len is the maximum length of the buffer
- set flags to 0 for now
- recv() returns the number of bytes actually read into
the buffer or -1 on error
- If recv() returns 0, the remote side has closed
connection on you

159
sendto() and recvfrom() - DGRAM
style

int sendto(int sockfd, const void *msg, int len, int
flags, const struct sockaddr *to, int tolen);
- to is a pointer to a struct sockaddr which contains the
destination IP and port
- tolen is sizeof(struct sockaddr)

int recvfrom(int sockfd, void *buf, int len, int flags,
struct sockaddr *from, int *fromlen);
- from is a pointer to a local struct sockaddr that will be
filled with IP address and port of the originating
machine
- fromlen will contain length of address stored in from
160
close() - Bye Bye!


int close(int sockfd);
- Closes connection corresponding to the socket
descriptor and frees the socket descriptor
- Will prevent any more sends and recvs

161
Connection Oriented Protocol
Server Client
socket()

bind() socket()

listen() connect()

accept()

send() recv()

recv() send()

close() close()
162
Connectionless Protocol
Server Client
socket()

bind() socket()

bind()

recvfrom() sendto()

sendto() recvfrom()

close() close()
163
Miscellaneous Routines

int getpeername(int sockfd, struct sockaddr
*addr, int *addrlen);
- Will tell who is at the other end of a connected
stream socket and store that info in addr

int gethostname(char *hostname, size_t size);
- Will get the name of the computer your program is
running on and store that info in hostname

164
Miscellaneous Routines
● struct hostent *gethostbyname(const char
*name);
struct hostent {
char *h_name; //official name of host
char **h_aliases; //alternate names for the host
int h_addrtype; //usually AF_NET
int h_length; //length of the address in bytes
char **h_addr_list; //array of network addresses for the host
}
#define h_addr h_addr_list[0]

● Example Usage:
struct hostent *h;
h = gethostbyname("www.iitk.ac.in");
printf("Host name : %s \n", h>h_name);
printf("IP Address: %s\n",inet_ntoa(*((struct in_addr *)h>h_addr)));
165
Summary

● Sockets help application process to communicate


with each other using standard Unix file
descriptors
● Two types of Internet sockets: SOCK_STREAM
and SOCK_DGRAM

Many routines exist to help ease the process of
communication

166
Lecture – 18(a)
Advanced Computer Networks
(MCA-206)

by
Ruby Dahiya (Faculty – IT, IITM)
Task Menu for Today

• Introduction to Switched WANs


• X.25 Protocol
• Frame Relay
• Internet Design and Architecture

168
Switched WANs

• A WAN that covers large area and provide


access at several points to the user.
• The three common switched WAN s are:
- X.25
- Frame Relay
- Asynchronous Transfer Mode (ATM): also
known as cell relay.

169
Switched WAN versus LAN
• Instead of bus or star topology, switches
are used to create multiple paths.
• LAN is connectionless, whereas switched
WAN is connection-oriented.
• Connection identifier is used instead of the
source and destination address in LAN
technology.

170
X.25 Protocol
• Introduced in 1970 (used in US and Europe)
• Used as public network to connect individual
computers/LANs.
• X.25 is a standard for WAN communications that
defines how connections between user devices and
network devices are established and maintained.
• It is typically used in the packet-switched networks
(PSNs) of common carriers, such as the telephone
companies.
• Subscribers are charged based on their use of the
network.
171
X.25 Network Devices
• X.25 network devices fall into three general
categories: data terminal equipment (DTE), data
circuit-terminating equipment (DCE), and packet-
switching exchange (PSE) as shown in Fig.

172
Functions of DTE, DCE and PSE
• Data terminal equipment devices are end systems
that communicate across the X.25 network. They are
usually terminals, personal computers, or network
hosts, and are located on the premises of individual
subscribers.
• DCE devices are communications devices, such as
modems and packet switches that provide the
interface between DTE devices and a PSE, and are
generally located in the carrier's facilities.
• PSEs are switches that compose the bulk of the
carrier's network. They transfer data from one DTE
device to another through the X.25 PSN
173
X.25 Protocol Suite
• The X.25 protocol suite maps to the lowest three
layers of the OSI reference model.

174
Layers in X.25 Protocol

• Physical layer: Deals with the physical interface


between an attached station and the link that
attaches that station to the packet-switching node.

X.21 is the most commonly used physical layer


standard.

• Frame layer: Facilitates reliable transfer of data


across the physical link by transmitting the data as
a sequence of frames.

Uses a subset of HDLC known as Link Access


Protocol Balanced (LAPB), bit oriented protocol.
175
cont’d

• Packet layer: Responsible for end-to-end connection


between two DTEs. Functions performed are:

 Establishing connection
 Transferring data
 Terminating a connection
 Error and flow control

176
Functionalities of Physical Layer
• At the physical layer X.21 is specifically defined for
X.25 by ITU-T.
• The X.21 interface operates over eight interchange
circuits (i.e., signal ground, DTE common return,
transmit, receive, control, indication, signal
element timing and byte timing)
• Their functions is defined in recommendation of
X.24 and their electrical characteristics in
recommendation of X.27.
• The recommendation specifies how the DTE can
setup and clear calls by exchanging signals with
the DCE.
177
X.21 Signals
Line Name From DTE From DCE
G Signal ground
Ga DTE Common return X
T Transmit X X
R Receive X
C Control X
I Indication X
S Signal element timing X
B Byte Timing X

178
Functionalities of Link Level

• Transfer of data in an efficient and timely fashion.


• Synchronization of the link to ensure that the
receiver is in step with the transmitter.
• Detection of transmission errors and recovery from
such errors
• Identification and reporting of procedural errors to
higher levels, for recovery

179
Protocols used in Link Level
• Link Access Protocol, Balanced (LAPB) is derived from HDLC and
is the most commonly used. It enables to form a logical link
connection besides all the other characteristics of HDLC.

• Link Access Protocol (LAP) is an earlier version of LAPB and is


seldom used today.

• Link Access Procedure, D Channel (LAPD) is derived from LAPB


and it is used for Integrated Services Digital Networks (ISDN) i.e.
it enables data transmission between DTEs through D channel,
especially between a DTE and an ISDN node.

• Logical Link Control (LLC) is an IEEE 802 Local Area Network


(LAN) protocol which enables X.25 packets to be transmitted
through a LAN channel.
180
Different modes of PLP
• Call setup mode is used to establish SVCs between
DTE devices. A PLP uses the X.121 addressing
scheme to set up the virtual circuit. The call setup
mode is executed on a per-virtual-circuit basis.

• Data transfer mode is used for transferring data


between two DTE devices across a virtual circuit. In
this mode, PLP handles segmentation and
reassembly, bit padding, and error and flow control.

• Idle mode is used when a virtual circuit is


established but data transfer is not occurring .
181
cont’d

• Call clearing mode is used to end communication


sessions between DTE devices and to terminate
SVCs. This mode is executed on a per-virtual-
circuit basis and is used only with SVCs.

• Restarting mode is used to synchronize


transmission between a DTE device and a locally
connected DCE device. This mode is not executed
on a per-virtual-circuit basis. It affects all the DTE
device's established virtual circuits

182
Key functions of X.25 protocol

• Call control packets are used for call set-up.


• Multiplexing of virtual circuits take place in
packet layer.
• Both link layer and packet layer performs
flow control and error control.

183
Four types of PLP packet fields

• General Format Identifier (GFI) - Identifies packet


parameters, such as whether the packet carries user
data or control information, what kind of
windowing is being used, and whether delivery
confirmation is required.
• Logical Channel Identifier (LCI) - identifies the
virtual circuit across the local DTE/DCE interface.
• Packet Type Identifier (PTI) - identifies the packet
as one of 17 different PLP packet types.
• User Data - Contains encapsulated upper-layer
information. This field is present only in data
packets. Otherwise, additional fields containing
control information are added.
184
Advantages of Frame Relay over X.25
• High Data Rate (1.544 Mbps)
• Bursty Data (grants users an average data
rate that can be exceeded when needed)
• Less Overhead due to transmission media
(No error checking and requirement of
acknowledgement)

185
Frame Relay
• Frame Relay is a high-performance WAN
protocol which provides low level (physical
and data link layer) service and supports
protocols recognized by ANSI.

186
Architecture
• Data Terminal Equipment (DTE) are the devices that
connect users to the network.
• Data Communication Equipment (DCE) are the
switches that route the frames through the
network.
• Frame relay is normally used as a WAN to connect
LANs or mainframe PCs.
• In former case, router / bridge can serve as DTE and
connects through leased line, the LAN to frame
relay switch is considered DCE.
• In latter case, mainframe itself can be used as a DTE
with installation of appropriate software. 187
Frame Relay Layers
• Physical Layer - Frame relay supports any one
of the protocols recognized by ANSI, and thus
the choice of physical layer protocol is up to
the implementer.
• Data Link Layer - Simpler version is used
because HDLC provides extensive error and
flow control fields that are not needed in
frame relay.

188
Frame Relay Frame Format

189
Fields Description of Frame Format
• Flags—Delimits the beginning and end of the frame. The
value of this field is always the same and is represented
either as the hexadecimal number 7E or as the binary
number 01111110.
• Address—Contains the following information:
• DLCI—The 10-bit DLCI represents the virtual connection
between the DTE device and the switch. The first 6-bits of
the first byte make up part 1 of the DLCI, and second part
of DLCI uses the first 4-bits of second byte.
• Extended Address (EA)—The EA is used to indicate whether
the byte in which the EA value is 1 is the last addressing
field. If the value is 1, then the current byte is determined
to be the last DLCI octet.

190
contd.
• C/R—The C/R is the bit that follows the most significant
DLCI byte in the Address field. The C/R bit is not currently
defined.
• Congestion Control—This consists of the 3 bits that
control the Frame Relay congestion-notification
mechanisms. These are the FECN, BECN, and DE bits,
which are the last 3 bits in the Address field.
• Data—Contains encapsulated upper-layer data. Each
frame in this variable-length field includes a user data or
payload field that will vary in length up to 16,000 octets.
This field serves to transport the higher-layer protocol
packet (PDU) through a Frame Relay network.
• Frame Check Sequence—Ensures the integrity of
transmitted data. This value is computed by the source
device and verified by the receiver to ensure integrity of
transmission.
191
Lecture – 18
Advanced Computer Networks
(MCA-206)

by
Ruby Dahiya (Faculty – IT, IITM)
Task Menu for Today

• ISDN Overview
• Overview of Asynchronous Transfer Mode
• Benefits of ATM
• Characteristics of ATM
• ATM Devices and Network Interfaces
• ATM Cell Format

193
What is ISDN?

• Integrated Services Digital Network (ISDN) –


A set of international standards for access to
advanced, all-digital public
telecommunications networks.

194
Integrated Services

• Voice
• Video
• Image
• Data
• Mixed media at a number of standard data rates

195
Digital

• Digital terminal equipment


• Digital local loops
• Digital trunks
• Digital switching
• Digital signaling

196
Network
• Worldwide, interoperating communications fabric
under distributed control using common
standards

197
Switched WANs

• A WAN that covers large area and provide


access at several points to the user.
• The three common switched WAN s are:
- X.25
- Frame Relay
- Asynchronous Transfer Mode (ATM): also
known as cell relay.

198
Switched WAN versus LAN
• Instead of bus or star topology, switches
are used to create multiple paths.
• LAN is connectionless, whereas switched
WAN is connection-oriented.
• Connection identifier is used instead of the
source and destination address in LAN
technology.

199
Overview of ATM
• ATM is Asynchronous Transfer Mode.

• ATM is originally the transfer mode for implementing


Broadband ISDN (B-ISDN).

• In 1988, CCITT (from ITU) issued the first two


recommendations relating to B-ISDN:
– I.113 Vocabulary of Terms for Broadband Aspects of ISDN
– I.121 Broadband Aspects of ISDN

200
Overview of ATM (contd…)
• Connection-oriented packet-switched network
• Used in both WAN and LAN settings
• Designed for high-performance multimedia
networking
• Packets are called cells (53 bytes)
– 5-byte header + 48-byte payload
• Commonly transmitted over SONET
– other physical layers possible
• Connections can be switched (SVC), or permanent
(PVC).

201
Benefits of ATM.
• Dynamic bandwidth for bursty traffic meeting application
needs and delivering
• Smaller header with respect to the data to make the
efficient use of bandwidth.
• Can handle Mixed network traffic very efficiently:
• Cell network: All data is loaded into identical cells that can
be transmitted with complete predictability and uniformity.
• Class-of-service support for multimedia traffic allowing
applications with varying throughput and latency
requirements to be met on a single network.
• Common LAN / WAN Architecture
• Scalability in speed and network size supporting link speeds
(622 Mbps).
• International standards compliance in central office and
customer-premises.
202
Variable vs. Fixed-Length Packets
• No Optimal Length
– if small: high header-to-data overhead
– if large: low utilization for small messages
• Fixed-Length Easier to Switch in Hardware
– simpler
– enables parallelism

203
ATM Devices
• ATM switch is responsible for cell transit through an
ATM network.
– accepts the incoming cell from an ATM endpoint or
another ATM switch.
– reads and updates the cell header information.
– switches the cell to an output interface towards its
destination.
• ATM endpoints (or end system) contains an ATM
network interface adapter.
Examples: Workstations, routers LAN switches, and
video coder-decoders (Codec’s) .

204
ATM Characteristics
• ATM is a cell-switching and multiplexing
technology.
• Provides scalable bandwidth from a few
megabits per second (Mbps) to many gigabits
per second (Gbps).
• ATM is more efficient than synchronous
technologies, such as time-division
multiplexing (TDM).

205
ATM Network Interfaces
• ATM network consists of a set of ATM
switches interconnected by point-to-point
ATM links or interfaces.
• ATM switches support two primary types of
interfaces: UNI and NNI

206
ATM Network Interfaces (contd…)
• UNI – User Network Interface
- connects end systems to ATM switches.
• NNI – Network Network Interface
- connects ATM switches.
There are also two different ATM cell header
formats: UNI and NNI.

207
Cell Format
4 8 16 3 1 8 384 (48 bytes)

GFC VPI VCI Type CLP HEC (CRC-8) Payload

• User-Network Interface (UNI)


– host-to-switch format
– GFC: Generic Flow Control
– VCI: Virtual Circuit Identifier
– VPI: Virtual Path Identifier
– Type: management, congestion control, AAL5 (later)
– CLPL Cell Loss Priority
– HEC: Header Error Check (CRC-8)

208
Cell Format
12 16 3 1 8 384 (48 bytes)
VPI VCI PTI CLP HEC (CRC-8) Payload

• Network-Network Interface (NNI)


– switch-to-switch format
– GFC becomes part of VPI field

209

Anda mungkin juga menyukai