assn-3

.docx

School

University of Victoria *

*We aren’t endorsed by this school

Course

363

Subject

Computer Science

Date

Apr 25, 2024

Type

docx

Pages

3

Uploaded by seratonin

Report
ECE 363 Assignment 3 Spring 2023 1. Consider IP address X: 193.101.50.44/26 (a) Which of the IP addresses below is on the same network as X: IP address On the same network as X (Yes or No)? 193.101.50.1 0 Yes 193.100.50.1 1 No 193.101.50.6 5 No To find out if any of the IP addresses belong to the same network as X, we need to look at their network prefixes. The /26 prefix means that the subnet mask is 255.255.255.192 when written in the usual format. By performing a logical AND operation between the subnet mask and the IP addresses, we can isolate their network parts. Then, we can compare this network part with the network part for X to see if any of them share the same network. 193.101.50.44 (X): 11000001 01100101 00110010 00101100 && 255.255.255.192: 11111111 11111111 11111111 11000000 ______________________________________________ = 11000001 01100101 00110010 00000000 193.101.50.10: 11000001 01100101 00110010 00001010 && 255.255.255.192: 11111111 11111111 11111111 11000000 ______________________________________________ = 11000001 01100101 00110010 00000000 193.100.50.11: 11000001 01100100 00110010 00001011 && 255.255.255.192: 11111111 11111111 11111111 11000000 ______________________________________________ = 11000001 01100100 00110010 00000000 193.101.50.65: 11000001 01100101 00110010 01000001 && 255.255.255.192: 11111111 11111111 11111111 11000000 ______________________________________________ = 11000001 01100101 00110010 01000000 Comparing the network prefixes, we can see that 193.101.50.10 is the only IP on the same network as X. (b) With subnet mask 255.255.255.192, what is the maximum number of hosts on the subnet? A subnet mask that corresponds to /26 indicates that there are 6 bits reserved for host addresses. This means there are 64 possible addresses for hosts. However, two addresses—the one with all zeros (the network address) and the one with all ones (the broadcast address)—cannot be assigned to
ECE 363 Assignment 3 Spring 2023 individual hosts. Therefore, the maximum number of hosts that can be assigned is 64 minus 2, which equals 62. 2. An IP packet has the following information in its header arrives at a WLAN: ... length ID fragflag offset ... 5000 x 0 0 Since the maximum transmission unit (MTU) of the WLAN is 2308 bytes, the packet will be fragmented into how many packets? What will be the length, ID, fragflag and offset values in their IP headers? Looking at the packet provided, we can see that the total size of the IP packet header and data is 5000 bytes. The IP header typically takes up 20 bytes for IPv4. For each fragment, except the last one, there will also be an additional 20 bytes for the IP header. The rest of the space is used for the actual data payload. Data payload size per fragment = MTU - IP header size = 2308 - 20 = 2288 bytes. Number of fragments required = Total length / Data payload size per fragment = 5000 / 2288 = 2.19 Because fragments cannot be divided into smaller parts, we require three fragments to encompass the entire packet. The initial two fragments will contain 2308 bytes each (comprising the IP header and data payload), while the final fragment will consist of the remaining 424 bytes, comprising only the data payload. The ID field assists the receiving host in recognizing which packet a newly received fragment belongs to. Consequently, all fragments belonging to the same packet will share the same ID value. The fragflag is necessary to determine when all fragments of a packet have been received. Hence, all fragments except the final one have this bit set to 1. The offset value indicates where a particular fragment starts within the current packet. These values increase in chunks of 8 bytes. So, the offset for the initial fragment is 0. For the second fragment, it's calculated as 2288 divided by 8, which equals 286. Likewise, for the third fragment, it's calculated as 4576 divided by 8, resulting in 572. Here's how the three data segments look visually: ... length ID fragflag offset ... 2308 x 1 0 ... length ID fragflag offset ... 2308 x 1 286
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help