ashokpbrvits.files.wordpress.com · web viewpackets are transmitted from node to node ,processed...

30
UNIT-IV NETWORK LAYER Network Layer Design Issues Store‐and‐Forward Packet Switching Services Provided to the Transport Layer Implementation of Connectionless Service Implementation of Connection‐Oriented Service Comparison of Virtual‐Circuit and Datagram Subnets Store and Forward Packet Switching Packet Switching Data is divided into small parts (packets) Packets are transmitted from node to node ,processed and forwarded Also known as store‐and‐forward switching Two connection types Connectionless: datagram Connection‐oriented: virtual circuit Services Provided to Transport Layer Services should be independent of router technology Topology of network should be hidden Network addresses available to transport layer should use be uniform, even across LANs and WANs Network layer designers have freedom in writing specs of services to transport layer Implementation of Connectionless Service No connection setup Message is broken into packets Called datagram (in analogy with telegram)

Upload: others

Post on 02-Sep-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: ashokpbrvits.files.wordpress.com · Web viewPackets are transmitted from node to node ,processed and forwarded Also known as store‐and‐forward switching Two connection types Connectionless:

UNIT-IVNETWORK LAYER

Network Layer Design Issues Store‐and‐Forward Packet Switching Services Provided to the Transport Layer Implementation of Connectionless Service Implementation of Connection‐Oriented Service Comparison of Virtual‐Circuit and Datagram SubnetsStore and Forward Packet Switching

Packet Switching Data is divided into small parts (packets) Packets are transmitted from node to node ,processed and forwarded Also known as store‐and‐forward switching Two connection types Connectionless: datagram Connection‐oriented: virtual circuitServices Provided to Transport Layer Services should be independent of router technology Topology of network should be hidden Network addresses available to transport layer should use be uniform, even across LANs and WANs Network layer designers have freedom in writing specs of services to transport layer

Implementation of Connectionless Service

No connection setup Message is broken into packets Called datagram (in analogy with telegram) Each packet is individually routed Routers decides line based on routing table Packets may follow different paths Not guaranteed to arrive in order

Implementation of Connection-Oriented Service

Page 2: ashokpbrvits.files.wordpress.com · Web viewPackets are transmitted from node to node ,processed and forwarded Also known as store‐and‐forward switching Two connection types Connectionless:

Path from source to destination must be established before any data can be sent Connection is called a VC (virtual circuit) analogy with physical circuit in phone system why virtual? Avoid choosing new route for each packet Same route used for all packets in connection Each packet has ID for which VC it belongs to

Comparison of Virtual‐Circuit and Datagram Subnets

Routing

Unicast routingMost of the traffic on the internet and intranets known as unicast data or unicast traffic is sent with specified destination. Routing unicast data over the internet is called unicast routing. It is the simplest form of routing because the destination is already known. Hence the router just has to look up the routing table and forward the packet to next hop.

Page 3: ashokpbrvits.files.wordpress.com · Web viewPackets are transmitted from node to node ,processed and forwarded Also known as store‐and‐forward switching Two connection types Connectionless:

Broadcast routingBy default, the broadcast packets are not routed and forwarded by the routers on any network. Routers create broadcast domains. But it can be configured to forward broadcasts in some special cases. A broadcast message is destined to all network devices.

Broadcast routing can be done in two ways (algorithm):

A router creates a data packet and then sends it to each host one by one. In this case, the router creates multiple copies of single data packet with different destination addresses. All packets are sent as unicast but because they are sent to all, it simulates as if router is broadcasting.This method consumes lots of bandwidth and router must destination address of each node.

Secondly, when router receives a packet that is to be broadcasted, it simply floods those packets out of all interfaces. All routers are configured in the same way.

This method is easy on router's CPU but may cause the problem of duplicate packets received from peer routers.

Reverse path forwarding is a technique, in which router knows in advance about its predecessor from where it should receive broadcast. This technique is used to detect and discard duplicates.

Multicast RoutingMulticast routing is special case of broadcast routing with significance difference and challenges. In broadcast routing, packets are sent to all nodes even if they do not want it. But in Multicast routing, the data is sent to only nodes which wants to receive the packets.

The router must know that there are nodes, which wish to receive multicast packets (or stream) then only it should forward. Multicast routing works spanning tree protocol to avoid looping.Multicast routing also uses reverse path Forwarding technique, to detect and discard duplicates and loops.Routing algorithms can be divided into two groups:

i. Nonadaptive algorithms:

For this type of algorithms, the routing decision is not based on the measurement or estimations of current traffic and topology. However the choice of the route is done in advance, and known as static routing.

ii. Adaptive algorithms:

For these algorithms the routing decision can be changed if there are any changes in topology or traffic etc. This is called as dynamic routing.

The examples of static algorithms are:

Page 4: ashokpbrvits.files.wordpress.com · Web viewPackets are transmitted from node to node ,processed and forwarded Also known as store‐and‐forward switching Two connection types Connectionless:

i. Shortest path routing:

Given a network topology and a set of weights describing the cost to send data across each link in the network Find the shortest path from a specified source to all other destinations in the network.

The arrows indicate the working node

Shortest path algorithm first developed by E. W. Dijkstra

a. Mark the source node as permanent.

b. Designate the source node as the working node.

c. Set the tentative distance to all other nodes to infinity.

d. While some nodes are not marked permanent

Compute the tentative distance from the source to all nodes adjacent to the working node. If this is shorter than the current tentative distance replace the tentative distance of the destination and record the label of the working node there. Examine ALL tentatively labelled nodes in the graph. Select the node with the smallest value and make it the new working node. Designate the node permanent.

ii. Flooding:

In this algorithm every incoming packet is sent out on every outgoing line except the line on which it has arrived. One disadvantage of flooding is that it generate a large number of duplicate packets. In fact it produces infinite number of

duplicate packets unless we some how dump the process. Therefore, we use selective flooding. In this algorithm every incoming packet is not sent out on every output line. Instead packet is sent only on those lines which are approximately going in the right direction.

iii. Flow Based Routing

Flow-based routing uses network topology, traffic matrices, and capacity matrices to determine static routes. For example in figure below,there is always a huge traffic from A to B and/or B to D.

Page 5: ashokpbrvits.files.wordpress.com · Web viewPackets are transmitted from node to node ,processed and forwarded Also known as store‐and‐forward switching Two connection types Connectionless:

Then the traffic from A to D should not be routed through B. Instead route it through ACFED even though it is a longer path than ABD. This is called flow based routing.

The example of Dynamic Routing Algorithms are:

i. Distance vector Routing Algorithm

In this algorithm, each router maintains a table called vector, such a table gives the best known distance to each destination and the information about which line to be used to reach there.

In this, we assume that each router knows the identity of every other router in the network, but the shortest path to each router is not known.

Count to Infinity problem:

One of the important issue in Distance Vector Routing is County of Infinity Problem. Consider a linear subnet of Figure 4.4 which has five nodes. The delay metric used is the number of hops.

Assume that A is initially down and that all the other routers know this. So all the routers have recorded that the delay to A is infinity.

When A becomes OK, the other routers come to know about it via the vector exchanges. Then suddenly a vector exchanges at all the routers will take place simultaneously.

At the time of first vector exchange, B comes to know that its left neighbor has a zero delay to 1. So as shown in Figure 4.4.B makes an entry in its routing table that A is one hop away to the left.

All the other routers still think that A is down. So in the second row of Figure 4.4, the entries below C D E are ∞ On the Second vector exchange, C comes to know that B has a path of 1 hop length to A, so C updates its routing table and

indicates a path of 2 hop length. But D and E do not change their table entries.

Page 6: ashokpbrvits.files.wordpress.com · Web viewPackets are transmitted from node to node ,processed and forwarded Also known as store‐and‐forward switching Two connection types Connectionless:

ii. Link State Routing

The link state routing is simple and each router has to perform the following operations

Each router should discover its neighbors and obtain their network addresses. Then it should measure the delay or cost to each of these neighbors. It should construct a packet containing the network addresses and the delays of all the neighbors . Send this packet to all other routers Compute the shortest path to every other router.

Sometimes the network becomes so large that the size of the router table becomes excessively large and practically it becomes impossible for every router to have an entry for every other router. Then the hierarchical routing such as the one used in telephone networks should be adopted.

Hierarchical Routing

  PREV UP NEXT  

Network graph and A's routing table

Page 7: ashokpbrvits.files.wordpress.com · Web viewPackets are transmitted from node to node ,processed and forwarded Also known as store‐and‐forward switching Two connection types Connectionless:

As you see, in both LS and DV algorithms, every router has to save some information about other routers. When the network size grows, the number of routers in the network increases. Consequently, the size of routing tables increases, as well, and routers can't handle network traffic as efficiently. We use hierarchical routing to overcome this problem. Let's examine this subject with an example .We use DV algorithms to find best routes between nodes. In the situation depicted below, every node of the network has to save a routing table with 17 records. Here is a typical graph and routing table for A. In hierarchical routing, routers are classified in groups known as regions. Each router has only the information about the routers in its own region and has no information about routers in other regions. So routers just save one record in their table for every other region. In this example, we have classified our network into five regions (see below).If A wants to send packets to any router in region 2 (D, E, F or G), it sends them to B, and so on. As you can see, in this type of routing, the tables can be summarized, so network efficiency improves. The above example shows two-level hierarchical routing. We can also use three- or four-level hierarchical routing. In three-level hierarchical routing, the network is classified into a number of clusters. Each cluster is made up of a number of regions, and each region contains a number or routers. Hierarchical routing is widely used in Internet routing and makes use of several routing protocols.

Congestion Control Techniques

Congestion control refers to the mechanisms and techniques used to control congestion and keep the traffic below the capacity of the network. As shown in Fig. 7.5.2, the congestion control techniques can be broadly classified two broad categories:

• Open loop: Protocols to prevent or avoid congestion, ensuring that the system (or network under consideration) never enters a Congested State.

• Close loop: Protocols that allow system to enter congested state, detect it, and remove it.

Factors that Cause Congestiona) Packet arrival rate exceeds the outgoing link capacity.b) Insufficient memory to store arriving packetsc) Bursty trafficd) Slow processor

Page 8: ashokpbrvits.files.wordpress.com · Web viewPackets are transmitted from node to node ,processed and forwarded Also known as store‐and‐forward switching Two connection types Connectionless:

Leaky Bucket Algorithm

Consider a Bucket with a small hole at the bottom, whatever may be the rate of water pouring into the bucket, the rate at which water comes out from that small hole is constant. This scenario is depicted in figure 7.5.3(a). Once the bucket is full, any additional water entering it spills over the sides and is lost The same idea of leaky bucket can be applied to packets, as shown in Fig. 7.5.3(b). Conceptually each network interface contains a leaky bucket. And the following steps are performed:

When the host has to send a packet, the packet is thrown into the bucket. The bucket leaks at a constant rate, meaning the network interface transmits packets at a constant rate. Bursty traffic is converted to a uniform traffic by the leaky bucket. In practice the bucket is a finite queue that outputs at a finite rate.

This arrangement can be simulated in the operating system or can be built into the hardware. Implementation of this algorithm is easy and consists of a finite queue. Whenever a packet arrives, if there is room in the queue it is queued up and if there is no room then the packet is discarded.

Token Bucket AlgorithmThe leaky bucket algorithm described above, enforces a rigid pattern at the output stream, irrespective of the pattern of the input. For many applications it is better to allow the output to speed up somewhat when a larger burst arrives than to loose the data. Token Bucket algorithm provides such a solution. In this algorithm leaky bucket holds token, generated at regular intervals. Main steps of this algorithm can be described as follows:

In regular intervals tokens are thrown into the bucket. The bucket has a maximum capacity. If there is a ready packet, a token is removed from the bucket, and the packet is send. If there is no token in the bucket, the packet cannot be send.

Figure 7.5.4 shows the two scenarios before and after the tokens present in the bucket have been consumed. In Fig. 7.5.4(a) the bucket holds two tokens, and three packets are waiting to be sent out of the interface, in Fig. 7.5.4(b) two packets have been sent out by consuming two tokens, and 1 packet is still left.The token bucket algorithm is less restrictive than the leaky bucket algorithm, in a sense that it allows bursty traffic. However, the limit of burst is restricted by the number of tokens available in the bucket at a particular instant of time.

The implementation of basic token bucket algorithm is simple; a variable is used just to count the tokens. This counter is incremented every t seconds and is decremented whenever a packet is sent. Whenever this counter reaches zero, no further packet is sent out as shown in Fig. 7.5.5.

Figure 7.5.4(a) Token bucket holding two tokens, before packets are send out, (b) Token bucket after two packets are send, one packet still remains as no token is left.

Page 9: ashokpbrvits.files.wordpress.com · Web viewPackets are transmitted from node to node ,processed and forwarded Also known as store‐and‐forward switching Two connection types Connectionless:

Figure 7.5.5 Implementation of the Token bucket algorithm

IPV4 AddressesAn IPv4 address is a 32-bit address that uniquely and universally defines the connection of a device. IPv4 addresses are unique. They are unique in the sense that each address defines one, and only one, connection to the Internet. Two devices on the Internet can never have the same address at the same time.Address SpaceA protocol such as IPv4 that defines addresses has an address space. An address space is the total number of addresses used by the protocol. If a protocol uses N bits to define an address, the address space is 2N because each bit can have two different values (0 or 1) and N bits can have 2N values. IPv4 uses 32-bit addresses, which means that the address space is 232 or 4,294,967,296 (more than 4 billion).NotationsThere are two prevalent notations to show an IPv4 address: binary notation and dotted decimal notation.

Classful AddressingIPv4 addressing, at its inception, used the concept of classes. This architecture is called classful addressing. Although this scheme is becoming obsolete, we briefly discuss it here to show the rationale behind classless addressing. In classful addressing, the address space is divided into five classes: A, B, C, D, and E. Each class occupies some part of the address space.We can find the class of an address when given the address in binary notation or dotted-decimal notation. If the address is given in binary notation, the first few bits can immediately tell us the class of the address. If the address is given in decimal-dotted notation, the first byte defines the class.

Classes and BlocksOne problem with classful addressing is that each class is divided into a fixed number of blocks with each block having a fixed size as shown in Table

Page 10: ashokpbrvits.files.wordpress.com · Web viewPackets are transmitted from node to node ,processed and forwarded Also known as store‐and‐forward switching Two connection types Connectionless:

1) In Classful addressing it divides IP address into network ID and host ID

for example Class A :- has first octet as network ID and last three octet as Host ID

Class B :- has first two as network ID and last three two as Host ID

Class C :- has first three as network ID and last  octet as Host ID

2) Here class A,B and C are used where as class D is used for multicasting and class D for research

3) Disadvantage is that it limit the number of network that can be provided to the network

4) Example RIP(Routing Information Protocol) protocol uses classful addressing

5) Class A  :8 as (1 octet is network ID) , Class B :-16 , Class C : 24

6) Same Subnet mask is used in complete network

Net ID and Host ID

Classless Addressing

In this scheme, there are no classes, but the addresses are still granted in blocks.Address BlocksIn classless addressing, when an entity, small or large, needs to be connected to the Internet, it is granted a block (range) of addresses. The size of the block (the number of addresses) varies based on the nature and size of the entity. For example, a household may be given only two addresses; a large organization may be given thousands of addresses. An ISP, as the Internet service provider, may be given thousands or hundreds of thousands based on the number of customers it may serve. Restriction To simplify the handling of addresses, the Internet authorities impose three restrictions on classless address blocks:1. The addresses in a block must be contiguous, one after another.2. The number of addresses in a block must be a power of 2 (1, 2, 4, 8, ... ).3. The first address must be evenly divisible by the number of addresses.

1) It allows us to use variable length subnet mask so also known as VLSM (Variable Length Subnet Mask)

2) Different subnet mask used in same network.

3) In this there is no boundary on host id and network id 

4) Classless Addressing also known as CIDR(classless interdomain routing)

5) There is no default subnet mask in classless routing.

6) Example: BGP(Border Gateway Protocol),RIPv2

IPv6 AddressesTo create a much larger address space and relieve a projected future shortage of IP addresses, IPv6 was created. IPv6 addresses consist of 128 bits, instead of 32 bits, and include a scope field that identifies the type of application suitable for the address. IPv6 does not support broadcast addresses, but instead uses multicast addresses for broadcast. In addition, IPv6 defines a new type of address called anycast

Structure

Page 11: ashokpbrvits.files.wordpress.com · Web viewPackets are transmitted from node to node ,processed and forwarded Also known as store‐and‐forward switching Two connection types Connectionless:

An IPv6 address consists of 16 bytes (octets); it is 128 bits long. Hexadecimal Colon NotationTo make addresses more readable, IPv6 specifies hexadecimal colon notation. In this notation,128 bits is divided into eight sections, each 2 bytes in length. Two bytes in hexadecimal notation requires four hexadecimal digits. Therefore, the address consists of 32 hexadecimal digits, with every four digits separated by a colon.

Although the IP address, even in hexadecimal format, is very long, many of the digits are zeros. In this case, we can abbreviate the address. The leading zeros of a section (four digits between two colons) can be omitted. only the leading zeros can be dropped, not the trailing zeros. Using this form of abbreviation, 0074 can be written as 74, 000F as F, and 0000 as 0.

Address SpaceIPv6 has a much larger address space; 2128 addresses are available. The designers of IPv6 divided the address into several categories. A few leftmost bits, called the type prefix, in each address define its category. The type prefix is variable in length, but it is designed such that no code is identical to the first part of any other code.

unicast addressA unicast address defines a single computer. The packet sent to a unicast address must be delivered to that specific computer. IPv6 defines two types of unicast addresses:geographically based and provider-based. We discuss the second type here; the first type is left for future definition. The provider-based address is generally used by a normal host as a unicast address. The address format is shown in Figure.

Type identifier. This 3-bit field defines the address as a provider-base.d address

Registry identifier. This 5-bit field indicates the agency that has registered the address. Currently three registry centers have been defined. INTERNIC (code11000) is the center for North America; RIPNIC (code 01000) is the center for European registration; and APNIC (code 10100) is for Asian and Pacific countries.

Page 12: ashokpbrvits.files.wordpress.com · Web viewPackets are transmitted from node to node ,processed and forwarded Also known as store‐and‐forward switching Two connection types Connectionless:

Provider identifier. This variable-length field identifies the provider for Internet access (such as an ISP). A 16-bit length is recommended for this field.Subscriber identifier. When an organization subscribes to the Internet through a provider, it is assigned a subscriber identification. A 24-bit length is recommended for this field.Subnet identifier. Each subscriber can have many different sub networks, and each subnetwork can have an identifier. The subnet identifier defines a specific sub network under the territory of the subscriber. A 32-bit length is recommended for this field.Node identifier. The last field defines the identity of the node connected to a subnet A length of 48 bits is recommended for this field to make it compatible with the 48-bit link (physical) address used by Ethernet.

Multicast AddressesMulticast addresses are used to define a group of hosts instead ofjust one. A packet sent to a multicast address must be delivered to each member of the group. Figure 19.17 shows the format of a multicast address.

The second field is a flag that defines the group address as either permanent or transient. A permanent group address is defined by the Internet authorities and can be accessed at all times. A transient group address, on the other hand, is used only temporarily. Systems engaged in a teleconference, for example, can use a transient group address. The third field defines the scope of the group address. Many different scopes have been defined.

Anycast AddressesIPv6 also defines anycast addresses. An anycast address, like a multicast address, also defines a group of nodes. However, a packet destined for an anycast address is delivered to only one of the members of the anycast group, the nearest one (the one with the shortest route).

Reserved AddressesAnother category in the address space is the reserved address. These addresses start with eight 0s (type prefix is 00000000). A few subcategories are defined in this category, as shown in Figure.

Local AddressesThese addresses are used when an organization wants to use IPv6 protocol without beingconnected to the global Internet. In other words, they provide addressing for private networks.Two types of addresses are defined for this purpose, as shown in Figure. A link local address is used in an isolated subnet; a site local address is used in an isolated site with several subnets.

Page 13: ashokpbrvits.files.wordpress.com · Web viewPackets are transmitted from node to node ,processed and forwarded Also known as store‐and‐forward switching Two connection types Connectionless:

Connecting Devices

1. Repeater – A repeater operates at the physical layer. Its job is to regenerate the signal over the same network before the signal becomes too weak or corrupted so as to extend the length to which the signal can be transmitted over the same network. An important point to be noted about repeaters is that they do not amplify the signal. When the signal becomes weak, they copy the signal bit by bit and regenerate it at the original strength. It is a 2 port device.

2. Hub –  A hub is basically a multiport repeater. A hub connects multiple wires coming from different branches, for example, the connector in star topology which connects different stations. Hubs cannot filter data, so data packets are sent to all connected devices.  In other words, collision domain of all hosts connected through Hub remains one.  Also, they do not have intelligence to find out best path for data packets which leads to inefficiencies and wastage.

Types of Hub Active Hub :- These are the hubs which have their own power supply and can clean , boost and relay the signal along the network.

It serves both as a repeater as well as wiring center. These are used to extend maximum distance between nodes. Passive Hub :- These are the hubs which collect wiring from nodes and power supply from active hub. These hubs relay signals

onto the network without cleaning and boosting them and can’t be used to extend distance between nodes.

3. Bridge – A bridge operates at data link layer. A bridge is a repeater, with add on functionality of filtering content by reading the MAC addresses of source and destination. It is also used for interconnecting two LANs working on the same protocol. It has a single input and single output port, thus making it a 2 port device.Types of Bridges Transparent Bridges :- These are the bridge in which the stations are completely unaware of the

bridge’s existence i.e. whether or not a bridge is added or deleted from the network , reconfiguration ofthe stations is unnecessary. These bridges makes use of two processes i.e. bridge forwarding and bridge learning.

Source Routing Bridges :- In these bridges, routing operation is performed by source station and the frame specifies which route to follow. The hot can discover frame by sending a specical frame called discovery frame, which spreads through the entire network using all possible paths to destination.

4. Switch – A switch is a multi port bridge with a buffer and a design that can boost its efficiency(large number of  ports imply less traffic) and performance. Switch is data link layer device. Switch can perform error checking before forwarding data, that makes it very efficient as it does not forward packets that have errors and  forward good packets selectively to correct port only.  In other words, switch divides collision domain of hosts, but broadcast domain remains same.

5. Routers – A router is a device like a switch that routes data packets based on their IP addresses. Router is mainly a Network Layer device. Routers normally connect LANs and WANs together and have a dynamically updating routing table based on which they make decisions on routing the data packets. Router divide broadcast domains of hosts connected through it.

Page 14: ashokpbrvits.files.wordpress.com · Web viewPackets are transmitted from node to node ,processed and forwarded Also known as store‐and‐forward switching Two connection types Connectionless:

6. Gateway – A gateway, as the name suggests, is a passage to connect two networks together that may work upon different networking models. They basically works as the messenger agents that take data from one system, interpret it, and transfer it to another system. Gateways are also called protocol converters and can operate at any network layer. Gateways are generally more complex than switch or router.

7. Brouter – It is also known as bridging router is a device which combines features of both bridge and router. It can work either at data link layer or at network layer. Working as router, it is capable of routing packets across networks and working as bridge, it is capable of filtering local area network traffic.

VIRTUAL LANsA We can roughly define a virtual local area network (VLAN) as a local area network configured by software, not by physical wiring.Let us use an example to elaborate on this definition. Figure 15.15 shows a switched LAN in an engineering firm in which 10 stations are grouped into three LANs that are connected by a switch. The first four engineers work together as the first group, the next three engineers work together as the second group, and the last three engineers work together as the third group. The LAN is configured to allow this arrangement .But what would happen if the administrators needed to move two engineers from the first group to the third group, to speed up the project being done by the third group? The LAN configuration would need to be changed. The network technician must rewire. The problem is repeated if, in another week, the two engineers move back to their previous group. In a switched LAN, changes in the work group mean physical changes in the network configuration.

A switch connecting three LANs

Switch

Group 1 Group 2 Group 3

Figure 15.16 shows the same switched LAN divided into VLANs. The whole idea of VLAN technology is to divide a LAN into logical, instead of physical, segments. A LAN can be divided into several logical LANs called VLANs. Each VLAN is a work group in the organization. If a person moves from one group to another, there is no need to change the physical configuration. The group membership in VLANs is defined by software, not hardware. Any station can be logically moved to another VLAN. All mem• bers belonging to a VLAN can receive broadcast messages sent to that particular VLAN.

VLANI

VLAN2

VLAN3

Page 15: ashokpbrvits.files.wordpress.com · Web viewPackets are transmitted from node to node ,processed and forwarded Also known as store‐and‐forward switching Two connection types Connectionless:

1-

Switch A Switch B

Backbone switch

This means if a station moves from VLAN 1 to VLAN 2, it receives broadcast messages sent to VLAN 2, but no longer receives broadcast messages sent to VLAN 1.It is obvious that the problem in our previous example can easily be solved by using VLANs. Moving engineers from one group to another through software is easier than changing the configuration of the physical network.VLAN technology even allows the grouping of stations connected to different switches in a VLAN. Figure 15.17 shows a backbone local area network with two switches and three VLANs. Stations from switches A and B belong to each VLAN.

VLANI

VLAN2

VLAN3 Two switches in a backbone using VLAN software

This is a good configuration for a company with two separate buildings. Each building can have its own switched LAN connected by a backbone. People in the first building and people in the second building can be in the same work group even though they are connected to different physical LANs.From these three examples, we can define a VLAN characteristic:

VLANs group stations belonging to one or more physical LANs into broadcast domains. The stations in a VLAN communicate with one another as though they belonged to a physical segment

Membership

Vendors use different characteristics such as port numbers, MAC addresses, IP addresses, IP multicast addresses, or a combination of two or more of these.

Port Numbers

Some VLAN vendors use switch port numbers as a membership characteristic. For example, the administrator can define that stations connecting to ports 1, 2, 3, and 7 belong to VLAN 1; stations connecting to ports 4, 10, and 12 belong to VLAN 2; and so on.MAC Addresses

Some VLAN vendors use the 48-bit MAC address as a membership characteristic. For example, the administrator can stipulate that stations having MAC addresses E21342A12334 and F2A123BCD34 1 belong to VLAN 1.

IP Addresses

Some VLAN vendors use the 32-bit IP address (see Chapter 19) as a membership char• acteristic. For example, the administrator can stipulate that stations having IP addresses 181.34.23.67, 181.34.23.72, 181.34.23.98, and 181.34.23.112 belong to VLAN 1.

Multicast IP Addresses

Page 16: ashokpbrvits.files.wordpress.com · Web viewPackets are transmitted from node to node ,processed and forwarded Also known as store‐and‐forward switching Two connection types Connectionless:

Some VLAN vendors use the multicast IP address (see Chapter 19) as a membership characteristic. Multicasting at the IP layer is now translated to multicasting at the data link layer.

Combination

Recently, the software available from some vendors allows all these characteristics to be combined. The administrator can choose one or more characteristics when installing the software. In addition, the software can be reconfigured to change the settings.

Configuration

Stations are configured in one of three ways: manual, semiautomatic, and automatic.

Manual Configuration

In a manual configuration, the network administrator uses the VLAN software to manually assign the stations into different VLANs at setup. Later migration from one VLAN to another is also done manually. Note that this is not a physical configuration; it is a logical configuration. The term manually here means that the administrator types the port numbers, the IP addresses, or other characteristics, using the VLAN software.Automatic Configuration

In an automatic configuration, the stations are automatically connected or disconnected from a VLAN using criteria defined by the administrator. For example, the administrator can define the project number as the criterion for being a member of a group. When a user changes the project, he or she automatically migrates to a new VLAN.

Semiautomatic Configuration

A semiautomatic configuration is somewhere between a manual configuration and an automatic configuration. Usually, the initializing is done manually, with migrations done automatically.

Communication Between Switches

In a multiswitched backbone, each switch must know not only which station belongs to which VLAN, but also the membership of stations connected to other switches. For example, in Figure 15.17, switch A must know the membership status of stations con• nected to switch B, and switch B must know the same about switch A. Three methods have been devised for this purpose: table maintenance, frame tagging, and time-division multiplexing.

Table Maintenance

In this method, when a station sends a broadcast frame to its group members, the switch creates an entry in a table and records station membership. The switches send their tables to one another periodically for updating.

Frame Tagging

In this method, when a frame is traveling between switches, an extra header is added to the MAC frame to define the destination VLAN. The frame tag is used by the receiving switches to determine the VLANs to be receiving the broadcast message.

Time-Division Multiplexing (TDM)

In this method, the connection (trunk) between switches is divided into timeshared channels (see TDM in Chapter 6). For example, if the total number of VLANs in a backbone is five, each trunk is divided into five channels. The traffic destined for VLAN 1 travels in channell, the traffic destined for VLAN 2 travels in channel 2, and so on. The receiving switch determines the destination VLAN by checking the channel from which the frame arrived.

IEEE Standard

In 1996, the IEEE 802.1 subcommittee passed a standard called 802.1 Q that defines the format for frame tagging. The standard also defines the format to be used in multi• switched backbones and enables the use of multivendor equipment in VLANs. IEEE802.1 Q has opened the way for further standardization in other issues related to VLANs. Most vendors have already accepted the standard.

Advantages

Page 17: ashokpbrvits.files.wordpress.com · Web viewPackets are transmitted from node to node ,processed and forwarded Also known as store‐and‐forward switching Two connection types Connectionless:

There are several advantages to using VLANs.

Cost and Time Reduction

VLANs can reduce the migration cost of stations going from one group to another. Physical reconfiguration takes time and is costly. Instead of physically moving one sta• tion to another segment or even to another switch, it is much easier and quicker to move it by using software.

Creating Virtual Work Groups

VLANs can be used to create virtual work groups. For example, in a campus environ• ment, professors working on the same project can send broadcast messages to one another without the necessity of belonging to the same department. This can reduce traffic if the multicasting capability of IP was previously used.

Security

VLANs provide an extra measure of security. People belonging to the same group can send broadcast messages with the guaranteed assurance that users in other groups will not receive these messages.

Hardware Addressing versus IP Addressing

MAC Address Known as the Media Access Control Address, it is a unique identifier that is assigned to your network interfaces enabling communications through a physical network segment. This simply means that it’s an identifier for your hardware, in which case it can be referred to as your physical address or hardware address. It is absolutely unique and it will be assigned by the manufacturers of a said device. It simply is a label for your device, wherein it can be easily identified by your local area network or any network that may use your device’s address. Mac Addresses follow rules in which they are formed, with three numbering name spaces such as MAC 48, EUI-48, and EUI-64.

MAC-48: Format form is in six groups, and each group consists of two hexadecimal digits and is separated by hyphens. (01-02-03-04-

ab-a1)

EUI-48: Format form is in six groups, and each group consists of two hexadecimal digits but is separated by colons. (01:02:03:04:ab:a1)

EUI-64: Format form is in three groups, and each group consists of four hexadecimal digits and is separated by dots. (0102.0304.aba1)IP AddressIP Address Known as the Internet Protocol address, it is an identifier that’s labeled numerically for your computer network. It has two principal functions and those are your network interface identification and location addressing. So basically, it functions as your system’s label through network, and will be responsible for connecting you with your private or public network through network interface.

Two types of address assignment

Static IP address – it is an IP address manually assigned to a computer by an administrator/ISP (Internet service provider). IP address

does not change. 

Dynamic IP address – it is an IP address usually assigned dynamically on LANs and broadband networks by DHCP (Dynamic Host

Configuration Protocol). IP address changes constantly.

IP Addresses are usually displayed in notations such as (IPv4) 172.16.254.2 and (IPv6) 2001:ab5:0:1234:0:567:8:9. The difference is

due to an IPv4 consisting of 32 bits which limits the address space, and IPv6 consisting of 128 bits.

MAC address IP address

Numeric representation of a device that uses Ethernet (physical connection between devices and routers)

Numeric representation of a device that uses TCP/IP (logical connection between your devices and the internet)

Assigned by the device’s manufacturers Assigned by User/administrator, DHCP, or ISP

Page 18: ashokpbrvits.files.wordpress.com · Web viewPackets are transmitted from node to node ,processed and forwarded Also known as store‐and‐forward switching Two connection types Connectionless:

ChangeableUnchangeable (Static IP address) and Changeable (Dynamic IP Address)

Unique (unless changed by the user to mirror another device’s MAC address)

Unique (misconfiguration can sometimes lead to duplicate IP addresses)

Internet Protocol

The Internet's basic protocol called IP for Internet Protocol. The objective of starting this protocol is assigned to interconnect networks do not have the same frame-level protocols or package level. The internet acronym comes from inter-networking and corresponds to an interconnection fashion: each independent network must transport in the weft or in the data area of the packet an IP packet, as shown in Figure.

 There are two generations of IP packets, called IPv4 (IP version 4) and IPv6 (IP version 6). IPv4 has been dominant so far. The transition to IPv6 could accelerate due to its adoption in many Asian countries. The transition is however difficult and will last many years. 

• Internet Protocol (IP) of network layer contains addressing information and some control information that enables the packets to be routed.

• IP has two primary responsibilities:  

1. Providing connectionless, best effort delivery of datagrams through a internetwork. The term best effort delivery means that IP does not provides any error control or flow control. The term connectionless means that each datagram is handled independently, and each datagram can follow different route to the destination. This implies that datagrams sent by the same source to the same destination could arrive out of order.

2. Providing fragmentation and reassembly of datagrams to support data links with different maximum transmission unit (MTU) sizes.

IPv4 packet format

 Packets in the network layer are called datagrams.

A datagram is a variable length packet consisting of two parts: header and data.

• The header is 20 to 60 bytes in length and contains information essential to routing and delivery.

• The various fields in IP header are:

1. Version: It is a 4-bit field that specifies the version of IP currently being used. Two different versions of protocols are IPV4 (Internet Protocol Version 4) and IPV6 (Internet Protocol Version 6).

2. IP Header Length (IHL): This 4-bit field indicates the datagram header length in 32 bit word. The header length is not constant in IP. It may vary from 20 to 60 bytes. When there are no options, the header length is 20 bytes, and the value of this field is 5. When the option field is at its maximum size, the value of this field is 15.

Page 19: ashokpbrvits.files.wordpress.com · Web viewPackets are transmitted from node to node ,processed and forwarded Also known as store‐and‐forward switching Two connection types Connectionless:

                               

3. Services: This 8 hit field was previously called services type but is now called differentiated services.

The various bits in service type are:

• A 3-bit precedence field that defines the priority of datagram in issues such as congestion. This 3-bit subfield ranges from 0 (000 in binary) to 7 (111 in binary).

                                

• After 3-bit precedence there are four flag bits. These bits can be either 0 or 1 and only one of the bits can have value of 1 in each datagram.

The various flag bits are:

D : Minimize delay

T : Maximize throughout

R : Maximize reliability

C : Minimize Cost

The various bits in differentiated services are:

• The first 6 bits defined a codepoint and last two bits are not used. If the 3 rightmost bits are 0s, the 3 leftmost bits are interpreted the same as the precedence bits in the service type interpretation.

4. Total length: This 16 bit field specifies the total length of entire IP datagram including data and header in bytes. As there are 16 bits, the total length of IP datagram is limited to 65,535 (216 - 1) bytes.

5. Identification: This 16 bit field is used in fragmentation. A datagram when passing through different networks may be divided into fragments to match the network frame size. Therefore, this field contains an integer that identifies the current datagram. This field is used to help piece together datagram fragments.

6. Flags: Consists' of a 3 bit field of which the two low order bit DF, MF control fragmentation. DF stands for Don't Fragment. DF specifies whether the packet can be fragmented MF stands for more fragments. MF specifies whether the packet is the last fragment in a series of fragmented packets. The third or high order but is not used.

7. Fragment Offset: This 13 bit field indicates the position of the fragment's data relative to the beginning of the data in the original datagram, which allows the destination IP process to properly reconstruct the original datagram.

8. Time to Live: It is 8 bit field that maintain a counter that gradually decrements down to zero, at which point the datagram is discarded. This keeps the packet from looping endlessly.

Page 20: ashokpbrvits.files.wordpress.com · Web viewPackets are transmitted from node to node ,processed and forwarded Also known as store‐and‐forward switching Two connection types Connectionless:

9. Protocol: This 8 bit field indicates which upper layer protocol receives incoming packets after IP processing is complete.

10. Header Checksum: This 16 bit field contains a checksum that covers only the header and not the data.

11. Source IP address: These 32-bit field contains the IP address of source machine.

12. Destination IP address: This 32-bit field contains the IP address of destination machine.

13. Options: This field allows IP to support various options such as security, routing, timing management and alignment.

14. Data: It contains upper layer information.

IPv6 packet format

• Version:  The size of the Version field is 4 bits. The Version field shows the version of IP and is set to 6.

• Traffic Class: The size of Traffic Class field is 8 bits. Traffic Class field is similar to the IPv4 Type of Service (ToS) field. The Traffic Class field indicates the IPv6 packet’s class or priority.

• Flow Label: The size of Flow Label field is 20 bits. The Flow Label field provide additional support for real-time datagram delivery and quality of service features. The purpose of Flow Label field is to indicate that this packet belongs to a specific sequence of packets between a source and destination and can be used to prioritized delivery of packets for services like voice.

• Payload Length: The size of the Payload Length field is 16 bits. The Payload Length field shows the length of the IPv6 payload, including the extension headers and the upper layer protocol data

• Next Header: The size of the Next Header field is 8 bits. The Next Header field shows either the type of the first extension (if any extension header is available) or the protocol in the upper layer such as TCP, UDP, or ICMPv6.

• Hop Limit: The size of the Hop Limit field is 8 bits The Hop Limit field shows the maximum number of routers the IPv6 packet can travel. This Hop Limit field is similar to IPv4 Time to Live (TTL) field.

This field is typically used by distance vector routing protocols, like Routing Information Protocol (RIP) to  prevent layer 3 loops (routing loops).

• Source Address: The size of the Source Address field is 128 bits. The Source Address field shows the IPv6 address of the source of the packet.

• Destination Address: The size of the Destination Address field is 128 bits. The Destination Address field shows the IPv6 address of the destination of the packet.

Page 21: ashokpbrvits.files.wordpress.com · Web viewPackets are transmitted from node to node ,processed and forwarded Also known as store‐and‐forward switching Two connection types Connectionless:

Advantages of IPv6 over IPv4

a) Larger address spaceb) Better header formatc) New optionsd) Allowance for extensione) Support for resource allocationf) Support for more securityg) Support for mobility

IP Datagram

As we have mentioned earlier, IP is an unreliable and connectionless best-effort delivery service protocol. By best effort we mean that there is no error and flow control. However, IP performs error detection and discards a packet, if it is corrupted. To achieve reliability, it is necessary to combine it with a reliable protocol such as TCP. Packets in IP layer are called datagrams. The IP header provides information about various functions the IP performs. The IP header format is shown in Fig. . The 20 to 60 octets of header has a number of fields to provide:

• Source and destination IP addresses

• Non transparent fragmentation

Error checking Priority Security Source routing option Route Recording option Stream identification Time stamping

A brief description of each of the fields are given below:

VER (4 bits): Version of the IP protocol in use (typically4). HLEN (4 bits): Length of the header, expressed as the number of 32-bit words. Minimum size is 5, and

maximum15. Total Length (16 bits): Length in bytes of the datagram, including headers. Maximum datagram size is

(216) 65536bytes. Service Type (8 bits): Allows packet to be assigned a priority. Router can use this field to route packets. Not

universally used. Time to Live (8 bits): Prevents a packet from traveling forever in a loop. Senders sets a value, that is

decremented at each hop. If it reaches zero, packet is discarded. Protocol: Defines the higher level protocol that uses the service of the IP layer Source IP address (32 bits): Internet address of the sender. Destination IP address (32 bits): Internet address of the destination. Identification, Flags, Fragment Offset: Used for handling fragmentation.

Page 22: ashokpbrvits.files.wordpress.com · Web viewPackets are transmitted from node to node ,processed and forwarded Also known as store‐and‐forward switching Two connection types Connectionless:

Options (variable width): Can be used to provide more functionality to the IP datagram Header Checksum (16bits):

o Covers only the IP header.o Steps:

o Header treated as a sequence of 16-bitintegerso The integers are all added using ones complement arithmetico Ones complement of the final sum is taken as the checksumo Datagram is discarded in case of mismatch in checksum values

.

Page 23: ashokpbrvits.files.wordpress.com · Web viewPackets are transmitted from node to node ,processed and forwarded Also known as store‐and‐forward switching Two connection types Connectionless:

.

Page 24: ashokpbrvits.files.wordpress.com · Web viewPackets are transmitted from node to node ,processed and forwarded Also known as store‐and‐forward switching Two connection types Connectionless:
Page 25: ashokpbrvits.files.wordpress.com · Web viewPackets are transmitted from node to node ,processed and forwarded Also known as store‐and‐forward switching Two connection types Connectionless: