Assignment
Date: 9/10/2003
Due Day:
9/17/2003
Related Material: Section
5.6.0-5.6.3, and http://cs.uccs.edu/~cs522/intro/pcnetsetup/pcnetsetup.htm
Description:
Exercise 1. Classless Address Notation
Question 5.43. A router has the
following (CIDR) entries in its routing table:
Address/mask Next hop
135.46.56.0/22 Interface
0
135.46.60.0/22 Interface 1
192.53.40.0/23 Router 1
default Router
2
For each of the following IP addresses, what does the router do if a packet
with that address arrives?
(a) 135.46.63.10 (b) 135.46.57.14 (c) 135.46.52.2 (d) 192.53.40.7 (e)
192.53.56.7
Ans: (a) 135.46.63.10
Taking the first 22 bits of 135.46.63.10 as network address, we have 135.46.60.0.
The bit pattern of 135.46.63.10 is 10000111.00101110.00111111.00001010
When we perform the bit and operation with 22 leading bit 1s and 10 bit
0s, it is equivalent of making the last 10 bit zero. We get the following
network address bit pattern: 10000111.00101110.00111100.00000000. The
first two bytes are not changed. The 3rd type changes from 63 to 60 while
the 4th byte become zero.
Match with network address in the routing table. The 2rd row matches.
The router will forward the packet to Interface 1.
(b) 135.46.57.14
Taking the first 22 bits of the above IP address as network address, we
have 135.45.56.0. It matches the network address of the first row. The
packet will be forwarded to Interface 0.
(c)
135.46.52.2
Taking the first 22 bits of the above IP address as network address, we
have 135.45.52.0. It dose not matche the network addresses of the first
three rows. The packet will be forwarded to default gateway which is Router
2.
(d) 192.53.40.7
Taking the first 23 bits of the above IP address as network address, we
have 192.53.40.0. It matches the network address of the third row. The
packet will be forwarded to Router 1.
(e) 192.53.56.7
Taking the first 23 bits of the above IP address as network address, we
have 192.53.56.0. It does not matche the network addresses of the first
three rows. The packet will be forwarded to default gateway which is Router
2.
Question 5.51. lPv6 uses 16-byte
addresses. If a block of 1 million addresses is allocated every picosecond,
how long will the addresses last?
Ans: With 16 bytes, there are 2^128 or ~3.4E38 addresses.
(3.4E38/(1000000))*1E-12~=3.4E20 seconds~=1E13 years.
From the first entry of the routing table, we have destination IP address 128.198.160.0 and genmask (or called netmask) 255.255.224.0 that identifies the subnet which blanca is in.
---
128.198.1.250 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 2997ms
rtt min/avg/max/mdev = 0.144/0.300/0.764/0.268 ms
sanluis.uccs.edu>
/sbin/arp -a
math.uccs.edu (128.198.168.202) at 00:06:5B:F6:E4:CC [ether] on eth0
lincoln.eas.uccs.edu (128.198.160.64) at 00:06:5B:0F:1A:19 [ether] on
eth0
evans.eas.uccs.edu (128.198.160.66) at 00:06:5B:0F:17:10 [ether] on eth0
sunshine.uccs.edu (128.198.162.68) at 00:06:5B:F6:E4:CC [ether] on eth0
? (128.198.160.1) at 00:00:0C:07:AC:01 [ether] on
eth0
chow.uccs.edu (128.198.161.110) at 00:00:39:B4:86:E0 [ether] on eth0
Non-authoritative
answer:
Name: blanca.uccs.edu
Address: 128.198.162.60
Therefore the source IP address is 128.198.162.60.
The destination IP address is 128.198.160.64.
The source mac address can be found using /sbin/ifconfig
blanca.uccs.edu> /sbin/ifconfig
eth0 Link encap:Ethernet HWaddr 00:B0:D0:D1:13:5C
inet addr:128.198.162.60 Bcast:128.198.191.255 Mask:255.255.224.0
Therefore the source MAC address is 00:B0:D0:D1:13:5C
The destination MAC address can be found with /sbin/arp -a command:
blanca.uccs.edu> /sbin/arp -a 128.198.160.64
lincoln.eas.uccs.edu (128.198.160.64) at 00:06:5B:0F:1A:19 [ether] on
eth0
Therefore the destination MAC address is 00:06:5B:0F:1A:19.