CNmodule 4
CNmodule 4
COMPUTER NETWORKS
Module 4
IP (Internet Protocol)
• Network layer protocol
• Datagram oriented protocol
• Packets in IP layer are called datagrams. A datagram has 2 parts – header & data
IP Header Structure :-
✓ MF stands for More Fragments. • Extra info, support various options , such as
security
• The important
1. Make sure that the design works.
principles used for the
2. Keep the design simple.
network layer design 3. Make clear choices.
in the network are as 4. Exploit modularity.
follows 5. Expect heterogeneity.
• At the network layer, the Internet can be viewed as a collection of sub networks or Autonomous
Systems (AS) that are interconnected.
• There is no real structure, but several major backbones exist.
• These are constructed from high-bandwidth lines and fast routers.
• Attached to the backbones are regional (midlevel) networks
• The glue that holds the whole Internet together is the network layer protocol, IP (Internet Protocol).
• The job of the network layer is to provide a best-efforts way to transport datagram from source to
destination
1) Error-reporting messages
❑ Redirection
• When a router/host send a packet to another network, then it should know ip address of next router.
The router must have a routing table to find address of next router & table has to be updated
constantly. For such updating ,ICMP sends a redirection message back to its host
2) Query Message
• ICMP can diagnose some network problems. This is accomplished through the query messages
ARP OPERATION
Problem of RARP
BOOTP UDP IP
• The client may unknown about IP address, but it need to send IP datagram.
• The client simply uses all 0’s as the source address and all 1’s as the destination address.
• One of the advantage of BOOTP over RARP is that the client and server are application layer
processes.
• As in other application-layer processes, a client can be in one network and the server in another,
separated by
several other networks. However, there is one problem that must be solved.
In client and server on different network:
• The BOOTP request is broadcast because the client does not know the IP address of the server.
• A broadcast IP datagram cannot pass through any router.
• To solve the problem, there is a need for an intermediary.
• One of the hosts can be used as a relay. The host in this case is called a relay agent.
• The relay agent knows the unicast address of a BOOTP server.
• When it receives this type of packet, it encapsulates the message in a unicast datagram and
sends the request to the BOOTP server
• BOOTP server know the message comes from a relay agent because one of the field in the
request message define the IP address of relay agent.
• • The relay agent, after receiving replysentittoBOOTPclient.
• When a DHCP client sends a request to a DHCP server, the server first checks its static database.
• If an entry with the requested physical address exists in the static database, the permanent IP
address of the client is returned.
• On the other hand, if the entry does not exist in the static database, the server selects an IP address
from the available pool, assigns the address to the client, and adds the entry to the dynamic
database.
• The dynamic aspect of DHCP is needed when a host moves from network to network or is connected and
disconnected from a network .
• DHCP provides temporary IP addresses for a limited time.
• The addresses assigned from the pool are temporary addresses.
• The DHCP server issues a lease for a specific time. When the lease expires, the client must either
stop using the IP address or renew the lease.
• The server has the option to agree or disagree with the renewal.
• If the server disagrees, the client stops using the address
• one of the necessary, but not sufficient protocols that is involved in multicasting.
• IGMP is not a multicasting routing protocol; it is a protocol that manages group membership.
• In any network, there are one or more multicast routers that distribute multicast packets to hosts or other
routers
• The IGMP protocol gives the multicast routers information about the membership status of hosts (routers)
connected
to the network
• IGMP is a group management protocol.
• It helps a multicast router create and update a list of loyal members related to each router interface
• IGMP is a companion to the IP protocol
• IGMP is defined in RFC 1112
Here router R is the distributing router. There are two other multicast routers (R1 and R2) that, depending
on the group list maintained by router R, could be the recipients of router R in this network. Routers RI and
R2 may be distributors for some of these groups in other networks, but not on this network.
IGMP Operation
❑ Joining a Group
• A host or a router can join a group. A host maintains a list of processes that have membership in agroup.
• When a process wants to join a new group, it sends its request to the host
• The host adds the name of the process and the name of the requested group to its list.
• If this is the first entry for this particular group, the host sends a membership report message.
• If this is not the first entry, there is no need to send the membership report since the host is already
a member of the group; it already receives multicast packets for this group.
• The protocol requires that the membership report be sent twice, one after the other within a few
moments. In this way, if the first one is lost or damaged, the second one replaces it
❑ Monitoring Membership
• Consider the situation in which there is only one host interested in a group, but the host is shut down
or removed from the system. The multicast router will never receive a leave report. How is this
handled?
• The multicast router is responsible for monitoring all the hosts or routers in a LAN to see if they want
to continue
their membership in a group.
• The router periodically (by default, after every 125 s) sends a general query message.
• In this message, the group address field is set to 0.0.0.0. This means the query for membership
continuation is for all
groups in which a host is involved, not just one
• The general query message does not define a particular group.
• The router expects an answer for each group in its group list; even new groups may respond.
• The query message has a maximum response time of 10 s (the value of the field is actually 100, but
this is in tenths of a second).
• query message must be sent by only one router (normally called the query router), also to prevent
unnecessary traffic
❍ OPEN:
• Opens communications between peers
• first message sent by each side after a TCP connection is established
• Authenticates sender
❍ UPDATE:
•provide routing updates to other BGP systems
• Advertises new path (or withdraws old)
❍ KEEP ALIVE:
• keep BGP connections, ensures neighbours are still alive or active, keep the sessions from expiring
❍ NOTIFICATION:
• notification message is sent when an error condition is detected
• used to Close a connection
• This new version follows the same strategy and purposes of version 4.
• ICMPv4 has been modified to make it more suitable for IPv6.
• In addition, some protocols that were independent in version 4 are now part of Internetworking Control
Message Protocol
(ICMPv6).
1. "Destination Unreachable" :
• message is generated by the source host or a router when an IPv6 datagram packet cannot be delivered
2. "Packet Too Big" :
• If a router receives a datagram that is larger than the maximum transmission unit (MTU) size of the
network through which the datagram should pass, two things happen. First, the router discards the
datagram and then an ICMP error packet-a packet-too-big message-is sent to the source.
• MTU (Maximum Transmission Unit) is the size of the largest protocol data unit that is supported over the
link.
3. "Time Exceeded" :
• Similar to the Time-to-Live field value in IPv4 datagram header, IPv6 header includes a Hop Limit field.
• The Hop Limit field value in IPv6 header is used to prevent routing loops.
• Hop Limit field in IPv6 datagram header is decremented by each router that forwards the packet.
• When the Hop Limit field value in IPv6 header reaches zero, the router discards the IPv6 datagram
packet and
returns a "Time Exceeded" ICMPv6 error message to the source host.
IPv4 addresses
Notations
There are 2 notations to show an IPv4 address:
• binary notation
• dotted-decimal notation.
Limitations of IPv4
• Most obvious limitation is its address field. IP address relies on network layer addresses to identify end
points on
networks, and each networked device has a unique address
• Uses a 32 bit addressing scheme, which gives 4 billion possible addresses.
• Complex host & router configuration
• Non hierarchical addressing
• Difficulty in re-numbering addresses
• Large routing table
• 4 bit field
• Indicates version of IP
• It is always 6 for IPv6
✓ Traffic Class :
• 8 bit field
• indicates class or priority of IPv6
packet
• Routers use the value in the flow label field to route the datagram.
• Provide special handling for a particular flow of data
✓ Payload Length :
• It is a 16-bit field
• 8 bit field
• Indicates type of extension header(if present) immediately following the IPv6 base header.
• Whereas In some cases it indicates the protocols contained within upper-layer packet, such as TCP, UDP.
✓ Hop Limit :
• This field is same as TTL (Time To Live) in IPv4 packets.
• It indicates the maximum number of intermediate nodes IPv6 packet is allowed to travel.
• Its value gets decremented by one, by each node that forwards the packet and packet is discarded if
value
decrements to 0.
✓ Source Address :
• 128-bit IPv6 address of the original source of the packet.
✓ Destination Address :
• 128-bit IPv6 address of the final destination
❖ Extension header
• Give more functionality to IP datagram
• Six kinds of extension headers are defined at present
• Unicast address : A unicast address defines a single computer. The packet sent to a unicast address must be
delivered to that specific computer
• Multicast address: Multicast addresses are used to define a group of hosts instead of just one. A packet sent
to a multicast address must be delivered to each member of thegroup
• Anycast address: 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)
IPv4 IPv6
32 bit address space 128 bit address space
Address Representation in decimal In hexadecimal
232possible ways to represent address 2128ways
Packet flow identification : not available Available and uses flow label field in the header
Checksum Field :Available Not available
Has 5 different classes of IP address Does Not contain classes of IP address
End-to-end connection integrity: achievable
Unachievable
Security features: Security is dependent on IPsec is inbuilt in the IPv6 protocol
application
DHCP or manual configuration Does not require DHCP or manual configuration
Header includes options All optional data moved to IPv6 extension headers
Not Provide Encryption and Authentication
Neethu M
Provide Encryption and Authentication
1 – 127
128-191
192-223
224-239
240-255