34
Module - 5 Other wireless Networks: WIMAX, Cellular Telephony, Satellite networks, Network layer Protocols : Internet Protocol, ICMPv4,Mobile IP, Next generation IP: IPv6 addressing, The IPv6 Protocol, The ICMPv6 Protocol and Transition from IPv4 to IPv6.

Module - 5 - SECAB

  • Upload
    others

  • View
    6

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Module - 5 - SECAB

Module - 5Other wireless Networks: WIMAX, Cellular Telephony, Satellite networks, Network layer Protocols : Internet Protocol, ICMPv4,Mobile IP, Next generation IP: IPv6 addressing, The IPv6 Protocol, The ICMPv6 Protocol and Transition from IPv4 to IPv6.

Page 2: Module - 5 - SECAB

1) Explain with respect to IPv4, classful addressing & classless addressing.

2) Draw IPv4 header format and explain.3) Explain with respect to IPv4 a) Fragmentation b) Options4) Explain with respect to IPv4 a) Subnett addressing b) CIDR

(classless Interdomain Routing)5) Explain IPv6 header format (Next generation IP)with its extension

header.6) Compare between IPv4 and IPv67) Explain briefly advantages of IPv6 , and IPv6 addressing

(unicast,multicast and Anycast)8)Explain in detail transition from IPv4 to IPv6.9) Write a note on ICMPv6.10) Write a note on NAT(Network Address Translation)

Page 3: Module - 5 - SECAB

IPv4• IP corresponds to the network layer in OSI reference model and provides

connectionless best effort delivery service to the transport layer. An Internet protocol has fixed length of 32 bits.

• IPv4 addresses are unique . Two devices on the internet can never have same address at the same time.

• This consists of network ID(NID) and host ID(HID). • HID identifies the network-connection to the host rather than the actual

host. • NID identifies the network to which the host is connected. All the hosts

connected to the same network, have the same NID.

Page 4: Module - 5 - SECAB

• 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.• IPv4 uses 32 bit addresses which means that the address space is 2^32.• IP addresses are usually written in dotted decimal notation .The address

is broken into four bytes(each of 8 bits) with each byte being represented by a decimal number and separated by a dot.

• For example, an IP address of 10000000 10000111 01000100 00000101 is written as 128.135.68.5

• For example the address 193.32.216.9 in binary notation is11000001 00100000 11011000 00001001

• An IP address is the numeric identifier assigned to each machine on an IP network. IP address is a software address, not a hardware address, which is hard-coded in the m/c or NIC

Page 5: Module - 5 - SECAB

• There are three methods for depicting IP address1) Dotted decimal notation 131.57.30.572) Binary as 10000010.00111001.00011110.00111000.• The 32 bit IP address is structured or hierarchial address.IP address

131.57.30.57, the 131.57 is network address and 30.57 is node address.Classful addressing• IP address structure is divided into five address classes, Class A,B,C,D,E• Class A address have 7 bits for NID & 24 bits for HID allowing about

16,000 networks and about 64,000 hosts per network.• Class B has 14 bits for network IDs and 16 bits for host IDs, allowing

about 16,000 networks and about 64,000 hosts per network.• Class C has 21 bits for network IDs and 8 bits for host IDs, allowing

about 2 million networks and 254 hosts per network.• Class D addresses is used for multicast services that allow host to send

information to a group of hosts simultaneously.• Class E addresses are reserved for experiments.

Page 6: Module - 5 - SECAB

IP addresses

Fig: Five classes of IP addresses

Page 7: Module - 5 - SECAB

Classless addressing• In classless addressing variable length blocks are assigned that belong to

no class.• In this entire address space is divided into blocks of different size.• In classless addressing when an entity , small or large needs to be

connected to the internet it is granted as block of addresses.• Restriction• To simplify the handling of addresses , the internet authorities impose

three restriction on classless address blocks.1) The addresses in a block must be contiguous, one after the other.2) The number of addresses in a block must be power of 2.3) The first address must be evenly divisible by the number of addresses• IPv4 is the delivery mechanism used by the TCP/IP protocol.It is

unreliable and connectionless protocol.

Page 8: Module - 5 - SECAB
Page 9: Module - 5 - SECAB

INTERNET PROTOCOL IP Packet(datagram)

Page 10: Module - 5 - SECAB

• 1) Version: This indicates version number used by the packet. Current version is 4 ,version 6 is used for IPv6. It is of 4bits

• 2) Internet-Header-Length(IHL): This specifies length of header.It is needed because the length of header is variable. Without options field, IHL=5.

• 3) Type of Service: This specifies priority of packet based on delay, throughput, reliability & cost requirements. 3 bits are assigned for priority levels and 4 bits for the specific requirement(i.e. delay, throughput, reliability & cost).

• 4) Total length: This is 16 bit field specifies number of bytes in the packet (including header and data). Maximum length=65535 bytes.

• 5) Identification, flags and fragment offset: These are used for fragmentation and reassembly.

• 6) Time-to-live(TTL): This indicates amount of time(in seconds), the packet is allowed to remain in the network. If TTL becomes 0 before packet reaches destination, router discards packet and sends an error message back to the source.

Page 11: Module - 5 - SECAB

• 7) Protocol: This specifies upper-layer protocol that is to receive the packet at the destination-host. Examples of protocols include TCP(protocol=6) and UDP(protocol=17).

• 8) Header checksum: This is used to verify integrity of header only. If the verification process fails, packet is discarded.

• 9) Source IP address and destination IP address: These contain the addresses of source and destination hosts. These two fields remains unchanged during the time IPv4 datagram travels from source host to destination host.

• 10) Options: This is of variable length. This allows the packet to request special features such as security level, route to be taken by packet and timestamp at each router.

• 11)Padding: This is used to make the header a multiple of 32-bit words.

Page 12: Module - 5 - SECAB

Fragmentation• Fragmentation means the division of a packet into smaller units to

accommodate a protocols MTU(maximum Transmission Unit)• For example, MTU for Ethernet=1500 bytes and MTU for

FDDI=4352 bytes.• When IP wants send a packet that is larger than MTU of physical-

network, IP breaks packet into smaller fragments.• Each fragment is sent independently to the destination. • Destination IP is responsible for reassembling the fragments into

the original packet. • To reassemble the fragments, the destination will wait until it has

received all the fragments belonging to the same packet.• If one or more fragments are lost in the network, the destination

abandons the reassembly process and discards the rest of the fragments.

Page 13: Module - 5 - SECAB

• Three fields in the IP header• Identification: It is used to identify which packet a particular fragment

belongs to .To guarantee uniqueness , the IPv4 protocol uses counter to label the datagrams ,it is initialized to positive number.All fragments have same identification number ,same as original datagram,it helps in reassembling the datagram.

• Flags:The flag has three bits• 1)Unused bit• 2)don’t fragment bit(DF)-DF bit is set to 1,it router not to fragment the

packet• 3)More fragment bit(MF)-if there are more fragment MF bit is set to

1,otherwise 0. Fragment offset: It identifies location of the fragment in the packet.Drawbacks: 1) Total overhead increases because each fragment must have a header. 2) Performance penalty: If one of the fragments is lost,

→ packet cannot be reassembled at the destination & → rest of the fragments have to be discarded. This process wastes

transmission bandwidth.

Page 14: Module - 5 - SECAB

options• The header of the IPv4 datagram is made up of two parts: A fixed part

and variable part.• No operation: It is 1 byte option used as a filler between option.• End of option:It is 1 byte option used for padding at the end of option.• Record route: It is used to record the Internet routers that handle the

datagram. It can list upto 9 routers addresses. It is used for debugging and management purpose.

• Strict source route: It is used by source to predetermine a route for the datagram as it travels through Internet.

• Loose source route: It is similar to strict source route,but it is less rigid.• Timestamp: It is used to record the time of datagram processing by a

router.

Page 15: Module - 5 - SECAB

Subnet addressing

• To allow a single network address to span multiple physical networks is called subnet addressing .

• The basic idea of subnetting is to add another hierarchical level called the “subnet”.

• To find subnet number, the router need to store an additional quantity called subnet mask , which consist binary mask for every bit position address except in the host field where binary 0’s are used.

• Eg: IP address 150.100.12.176For this subnet mask is

11111111 11111111 11111111 10000000 which corresponds to255.255.255.128 in dotted decimal notation.

• The router can determine subnet number by performing binary AND operation between subnet mask and IP address.

Page 16: Module - 5 - SECAB

IP address: 10010110 01100100 00001100 10110000Subnet mask: 11111111 11111111 11111111 10000000Subnet number: 10010110 01100100 00001100 10000000

150.100.12.128

OrigianlAddressSubnettedaddress

1 0 Net ID Subnet ID Host ID

1 0 Net ID Host ID

Page 17: Module - 5 - SECAB

Classless Interdomain Routing(CIDR)• An arbitrary prefix length is used to indicate the network number

known as CIDR.• CIDR is a mechanism introduced to slow the growth of routing

tables on routers across the internet and slow down the wastage of IP addresses by allocating a subnet of class A,B,C network to ISPs and organizations.

• Using a CIDR notation, a prefix 205.100.0.0 of length 22 is written as 205.100.0.0/22. The /22 notation indicates that the network mask is 22 bits or 255.255.252.0.

• For example, instead of having four entries for a contiguous set of Class C addresses(e.g. 205.100.0.0, 205.100.1.0, 205.100.2.0 & 205.100.3.0), CIDR allows a single routing entry 205.100.0.0/22, which includes all IP addresses from 205.100.0.0 205.100.3.255.

Page 18: Module - 5 - SECAB

IPv6IPv4 has some deficiencies that make it unsuitable for the fast growing internet.•Despite all short term solutions such as subnetting ,CIDR and NAT address is still long term problem in Internet.•The Internet must accommodate real time audio and video transmission. That is not provided by IPv4.•Internet must accommodate encryption and authentication of data for some applications. That is not been provided by IPv4.To overcome these deficiencies IPv6 was proposed, which also called next generation IPv6.Advantages of IPv6 over IPv41)Longer address space:-IPv6 address space is 128 bits long.2)Better header format:-IPv6 uses new header format in which options are separated from base header and inserted.3)New options:-IPv6 has new options to allow for additional functionalities.

Page 19: Module - 5 - SECAB

4)Allowance for extension:-IPv6 is designed to allow the extension of the protocol if required by new technologies and applications.5)Support for resource allocation:-IPv6 type of service field has been removed, but a mechanism flow label has been added6)Support for more security:-The encryption and authentication option in IPv6 provide confidentiality and integrity of the packet.IPv6 addresses•The structure consist of 16 bytes i.e 128 bits long.•To make addresses more readable ,IPv6 specifies hexadecimal colon notation. In this notation 128 bits is divided into eight sections.

•FDEC:0074:0000:0000:0000:B0FF:0000:FFF0

•FDEC:74:0:0:0:B0FF:0:FFF0

•FDEC:74::B0FF:0:FFF0

Page 20: Module - 5 - SECAB

IPv6 allows three types of addresses1)Unicast 2) Multicast 3) Anycast1) Unicast Addresses•A 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.2) Multicast addresses•Multicast addresses are used to define a group of hosts instead of just one.Packet sent to a multicast address must be delivered to each member of group.3) Anycast addresses•Like multicast addresses , anycast addresses defines group of nodes•However packet destined for an anycast addresses is delivered to omly one of the members of the anycast group, the nearest one(shortest route).

Page 21: Module - 5 - SECAB
Page 22: Module - 5 - SECAB

Packet format of IPv6

Page 23: Module - 5 - SECAB

1)Version:This specifies version number of protocol. For IPv6,version=6. 2) Traffic class: This specifies priority of packet. This is used to support differential service .3) Flow label: This is used to identify QoS requested by packet. A flow is defined as "a sequence of packets sent from a particular source to a particular destination for which the source desires special handling by the intervening routers.4) Payload length: This indicates length of data (excluding header). Maximum length=65535 bytes. 5) Next header:This identifies type of extension header that follows the basic header. 6) Hop limit:This specifies number of hops the packet can travel before being dropped by a router.7) Source address & destination address: These identify source host and destination host respectively.

Page 24: Module - 5 - SECAB

Extension headers• The length of base header is fixed at 40 bytes.There are six types of

extension header.

Page 25: Module - 5 - SECAB

Hop-by-Hop option• It is used when source needs to pass information to all routers

visited by datagram.• There are three options• Pad1->It is 1 byte long and designed for alignment purposes.• PadNIt is same as Pad1 except 2 or more bytes is needed for

alignment.• Jumbo payloadIt is used to define payload longer than 65535

bytes.Source routing• It combines the concept of strict source route and loose source route

of option IPv4.Fragmentation• Fragmenatation is same as IPv4, here original source can

fragment.A source must use path MTU discovery technique to find smallest MTU supported by network

Page 26: Module - 5 - SECAB

Authentication:It has dual purpose:It validates message sender and ensures integrity of data

Encrypted security payload: It provides confidentiality and guards against eavesdropping.

Destination option:It is used when source needs to pass information to destination only

Page 27: Module - 5 - SECAB

IPV4 IPv6

Addresses are 32 bits in length(4 bytes) Addresses are 128 bits in length(16bytes)

Ipsec is optional and should be supported externally

IPSec support is not optional

Headers does not identify packet flow or QOS handling by routers

Headers contain flow label field identify packet flow or QOS handling by routers

Both routers and sending host fragment packet

sending host fragment packet, routers does not support packet fragmentation

Header include checksum Header does not include checksum

Header include options Optional data is supported as extension header

Configured either manually or through DHCP

Does not require manual configuration or DHCP

Page 28: Module - 5 - SECAB

Transition from IPv4 to IPv6

Transition strategies

Dual stack Tunneling Header translation

Page 29: Module - 5 - SECAB

Dual stack• It is recommended that all hosts, before migrating completely to version 6

have a dual stack of protocols.• In other words a station must run IPv4 and IPv6 simultaneously until all

internet uses IPv6.• To determine which version to use when sending packet to a destination,

source queries to DNS.• If DNS return IPV4 address,the source hosts sends IPv4 packet.• If DNS return IPv6 address, the source hosts sends IPv6 packet

Page 30: Module - 5 - SECAB

• Tunneling• It is a strategy used when two computers using IPv6 want to

communicate with each other and the packet must pass through a region that uses IPv4.

• To pass through this region , the packet must have IPv4 address.• So IPv6 packet is encapsulated in IPv4 packet when it enters the region ,

and leaves capsules when it exits region.• It seems as if the IPv6 packet goes through tunnel at one end and

emerges at other end.

Page 31: Module - 5 - SECAB

• Header Translation• It is necessary when majority of the Internet has moved to IPv6 , but

still some systems uses IPv4.• The sender wants to use IPV6, but receiver does not understand

IPv6.• Tunnelling does not work here, so header format must be changed

totally through header translation.• It uses mapped address to translate IPv6 address to IPv4 address

Page 32: Module - 5 - SECAB

ICMPv6(Internet Control Message protocol)• Another protocol that has been modified in version 6 of TCP/IP protocol

suite is ICMPv6

• Refer text book for diagram

• The ARP and IGMP protocols in version 4 are combined in ICMPv6.• RARP protocol is dropped from suite because it is rarely used.

Page 33: Module - 5 - SECAB

Error reporting • One of the main responsibilities of ICMP is to report errors.• Five types of error are handled1)Destination unreachable: When router cannot route a datagram or

host cannot deliver a datagram, the datagram is discarded and the router or the hosts sends a destination unreachable message back to the source host that initiated the datagram.

2)Packet too big: If router receives a datagram that is larger than MTU, two things can happen: first router discards the datagram and then ICMP error packet – a packet too big message is sent to the source.

3)Time exceeded:When datagram is discarded a time exceeded message must be sent by the router to the original source.Secondtime exceeded message is also generated when not all fragments that make up a message arrive at the destination host within a certain time limit.

4)Parameter problem:If a router or the destination host discovers an ambiguous or missing value in any field of the datagram, it discard the datagram and sends parameter problem message back to source

Page 34: Module - 5 - SECAB

5) Redirection:To update the routing table of the host , it sends redirection message to the host

Query• In addition to error reporting , ICMP can diagnose some network

problems.This accomplished through query message.• Four different groups of message is been defined• Echo request and echo reply messages are designed for diagnostic

purpose.It is used to determine whether two systems can communicate with each other,it is used at IP level.

• Router solicitation and advertisement:A host can broadcast a router solicitation message .The router or routers receive solicitation message broadcast their routing information using router advertisement message .A router can also periodically send router advertisement message even if no host has solicited.

• Neighbor solicitation and advertisiment:ARP is eliminated and its duties are included in ICMPv6

• Group membership:IGMP is eliminated and its duties are included in ICMPv6