d3804a15 Com Networks 4

12
Home Work-4 CAP306: Computer Networks SUBMITTED TO: - SUBMITTED BY:- Lect. Jasleen SURENDRA MCA 3 nd SEM ROLL NO- D3804A15 REGD NO- 10806601

Transcript of d3804a15 Com Networks 4

Page 1: d3804a15 Com Networks 4

Home Work-4CAP306: Computer Networks

SUBMITTED TO: - SUBMITTED BY:- Lect. Jasleen SURENDRA MCA 3nd SEM ROLL NO- D3804A15

REGD NO- 10806601

Declaration: I declare that this assignment is my individual work. I have not copied from any other student’s work or from any other source except where due acknowledgment is made explicitly in the text, nor has any part been written for me by another person.

Student’s Signature Surendra

Page 2: d3804a15 Com Networks 4

Evaluator’s comments: _____________________________________________________________________ Marks obtained: ___________ out of ______________________

Page 3: d3804a15 Com Networks 4

PART A

Q1. An ISP is granted a block of addresses starting with 120.60.4.0/22. The ISP wants to distribute these blocks to 100 organizations with each organization receiving just eight addresses. Design the sub blocks and give the slash notation for each sub block. Find out how many addresses are still available after the allocations.

ANS: The site has 232−22 = 210 = 1024 from 120.60.4.0/22 to 120.60.7.255/22 addresses. One solution would be to divide this block into 128 8-address. The ISP can assign the first 100 sub-blocks to the current customers and keep the remaining 28 sub-blocks. Of course, this does not mean the future customer have to use 8-address sub blocks. The remaining addresses can later be divided into different-size sub-blocks (as long as the three restrictions mentioned in this chapter are followed). Each sub-block has 8 addresses. The mask for each sub-block is /29 (32 − log28). Note that the mask has changed from /22 (for the whole block) to /29 for each sub block because we have 128 sub-blocks (27 = 128).

Sub-blocks:1st subnet: 120.60.4.0/29 to 120.60.4.7/29 ... ... ...32nd subnet: 120.60.4.248/29 to 120.60.4.255/29 ... ... ...64th subnet: 120.60.5.248/29 to 120.60.5.255/29... ... ...99th subnet: 120.60.7.16/29 to 120.60.7.23/29100th subnet: 120.60.7.24/29 to 120.60.7.31/29

Q2. An address space uses the three symbols 0, 1, and 2 to represent addresses. If each address is made of 10 symbols, how many addresses are available in this system?

ANSWER:

It is convenient to introduce symbols to facilitate comparisons. Traditionally, {a} , {b} ,and {c} are associated with the counting symbol ‘1’, and {a, b} , {a, c} , and {b, c} are associated with ‘2’. In this example there is a concept of ‘three’. Within a given context it is assumed that this very concept is fixed and it is referred to as the ‘base’ of the counting. If the symbol 0 is used for the count all three symbols 0, 1, 2 have been introduced, and thus the concept behind the base matches the number of symbols. The fundamental notational problem concerns the counting symbols for the selection {a, b, c}. If each address is made of 10 symbols then no. of address available in the system are as follows.

3^10 = 59,049.

Page 4: d3804a15 Com Networks 4

Q3.In a block of addresses, we know the IP address of one host is 25.34.12.56/16. What are the first address (network address) and the last address (limited broadcast address) in this block? ``ANS: IP address is 25.34.12.56/16

 So

Network Address ->25.34.0.0

Broadcast Address ->25.34.255.255

Subnet Mask->255.255.0.0

a. Network address: 25.34.0.0 (Set to 0's the host bits, which are the last two octets: 00000000 00000000 >> 0.0)

b. Broadcast address: 25.34.255.255 (Set to 1's the host bits, which are the last two octets: 11111111 11111111 >> 255.255)

Q4. A site with 200 subnets has the class B address of 132.45.0.0. The site recently migrated to IPv6 with the subscriber prefix 581E:1456:2314: : ABCD/80. Design the subnets and define the subnet addresses, using a subnet identifier of 32 bits.ANS: A site with 200 subnets has the class B address of 132.45.0.0. The site recently migrated to IPv6 with the subscriber prefix 581E:1456:2314:: ABCD/80 using a subnet identifier of 32 bits.

The node identifier is 0000:0000:1211 is assuming a 32-bit subnet identifier, the subnet address is 581E:1456:2314: ABCD: 000 where ABC: 0000 is the subnet identifier.

Q5.Calculate the checksum for the following ICMP packet: Type: Echo Request Identifier: 123 Sequence number: 25 Message: Hello

ANS:We randomly chose the identifies to be 1 and the sequence number to be 9. The message is divided into 16 bit (2bytes) words. The words are added together and sum is complemented now the sender can put this value in the checksum field.

122 and 24 01111010 0001100025 00000000 00[011001

Page 5: d3804a15 Com Networks 4

123 00000000 01111011H & E 01001000 01000101L & L 01001100 01001100O 00000000 01001111Sum 110001110 110001011Complement 001110001 001110100 (Checksum)

PART B

Q1.A host with IPv4 address 114.45.7.9 receives an IGMP query. When it checks its group table, it finds no entries. What action should the host take? Should it send any messages?

ANS:

IGMP is used by IP hosts and adjacent multicast routers to establish multicast group memberships. A host receives query with 114.45.7.9. The IGMP is a communications protocol used to manage the membership of Internet Protocol multicast groups.

In IGMP Membership Queries are sent by multicast routers to determine which multicast addresses are of interest to systems attached to its network. Routers periodically send General Queries to refresh the group membership state for all systems on its network. Group-Specific Queries are used to determine the reception state for a particular multicast address. Group-and-Source-Specific Queries allow the router to determine if any systems desire reception of messages sent to a multicast group from a source address specified in a list of unicast addresses

Page 6: d3804a15 Com Networks 4

If a host with IPv4 address 114.45.7.9 receives an IGMP query and after a checks its group table, it finds no entries, it will just ignore the message and reply with the bits that report that no data had received by the destination. The multicast forwarding table is the table used by IP to forward IP multicast traffic. Each entry records a specific host group and the source of the traffic. The Type column is set to Active for the entry if packets for the host group are being forwarded and set to Negative if the traffic is seen on the network but the router is not forwarding because no hosts have registered for this group.

Q2. How many multicast addresses can be supported by the IPv4 protocol? What is the size of address space lost when we transform a multicast IPv4 address to an Ethernet multicast address?ANS:

Ethernet layer acts as an imperfect filter and the IP layer will have to decide whether to accept the datagram’s the data-link layer passed to it. The IP layer acts as a definitive perfect filter. Both Ethernet and FDDI frames have a 48 bit destination address field. In order to avoid a kind of multicast ARP to map multicast IP addresses to Ethernet/FDDI ones, the IANA reserved a range of addresses for multicast: every Ethernet/FDDI frame with its destination in the range 01-00-5e-00-00-00 to 01-00-5e-ff-ff-ff (hex) contains data for a multicast group. The prefix 01-00-5e identifies the frame as multicast; the next bit is always 0 and so only 23 bits are left to the multicast address. As IP multicast groups are 28 bits long, the mapping can not be one-to-one. Only the 23 least significant bits of the IP multicast group are placed in the frame. The remaining 5 high-order bits are ignored, resulting in 32 different multicast groups being mapped to the same Ethernet/FDDI address.

Multiple LANs connected by a backbone to handle a total load higher than the capacity of a single LAN.

Page 7: d3804a15 Com Networks 4

Q3.A router using DVMRP receives a packet with source address 10.14.17.2 from interface 2. If the router forwards the packet, what are the contents of the entry related to this address in the unicast routing table?

ANS:DVMR stands for Distance Vector Multicast Routing Protocol. It is an interior gateway

protocol. It Functions within an Autonomous System (AS) but not between Asps. And Can only route multicast datagram’s. Routers need additional protocol(s) for non-multicast routing, but DVMRP could be extended to unicast.

Basis for the internet’s multicast backbone (MBONE)

8 bits 8 bits 16 bits

Type(0X 13) Code(0X 1) Checksum

Reserved Capabilities minor version Major versionGeneration ID

Neighbour IP1

……………..

Neighbours IP N

Page 8: d3804a15 Com Networks 4

DVMRP Report Packet are used to find neighbours to route traffic back to sender through. It Uses hop count as the metric. Also contains a list of source networks and metrics.

8 bits 8 bits 16 bits

Type(0X 13) Code(0X 1) Checksum

Reserved Capabilities minor version Major version

Mask 1 (Oct 2) Mask 1 (Oct 3) Mask 1 (Oct 4) Src Net 11

Src Net 11 Metric 11 Src Net 12

Src Net 12 Metric 12 ----------

---------------- ----------------------- Mask 2 (Oct 2)

Mask 2 (Oct 3) Mask 2 (Oct 4) Src Net 21

Src Net 21 Metric 21 ----------------------

Q4. Show a routing table for a host that is connected to a LAN without being connected to the Internet.

ANS:

Routers are connected in the networks bia internet connection. Routers carry traffic from one network/subnet to another. Routers maintain a routing table to decide how to route the IP packets. Each routing entry consists of the destination address, subnet mask and "route to" field. When a message needs to be routed to an IP address, the following steps are followed:

1. The destination IP address is masked with the subnet mask and then compared with the destination field for all entries in the routing table.

2. When we compare with more than one entry the entry with the longest subnet mask will be selected. E.g. , a packet destined for 128.8.1.2 reaching Host A would match the entries corresponding to 128.8.1.2 and 128.8.0. The entry corresponding to 128.8.1.2 will be selected, as it has a longer subnet mask.

Page 9: d3804a15 Com Networks 4
Page 10: d3804a15 Com Networks 4

Q5.A host has the address 581E: 1456:2314:ABCD:: 1211. If the node identification is 48 bits, find the address of the subnet to which the host is attached.

ANS:

The node identifier is 0000.0000.1211. Assuming a 48-bit subnet identifier, the subnet address is 581E:1456:2314: ABCD: 0000 where ABCD: 0000 is the subnet identifier

Q6.A multicast address for a group is 231.24.60.9. What is its 48-bit Ethernet addressfor a LAN using TCPIIP?

ANS: The multicast address range is 224.0.0.0 to 239.255.255.255 and forms the Class D range which is made up of the high order bits 1110 followed by the 28 bit multicast group ID. There is no Sub-Netting with these Class D addresses. Multicast Address in IPv4 are those that start with the 1110 Pattern.