IP Networks - Q&A
L1-Review on Internet
a. Assuming no other traffic in the network, what is the throughput for the file transfer?
Throughput means the actual output rate (bits/s) of the system.
When we go through multiple links, the end to end throughput will be limited by the bottleneck link.
Since rate of first router R1 = 500 kbps, even other routers have higher data rate, the data rate of file transfter will still be capped in 500 kbps.
Therefore the throughput is 500 kbps
b. Suppose the file is 4 million bytes. Dividing the file size by the throughput, roughly how long will it take to transfer the file to Host B?
Therefore
seconds
c. Repeat (a) and (b), but now with R2 reduced to 100 kbps.
Now R2 is reduced to 100 kbps.
Although rate of first router R1 = 500 kbps, R2 has a lower data rate, and the data rate of file transfter will still be capped in 100 kbps.
Therefore the throughput is 100 kbps
Transfer time:
seconds
The transmission delay is the amount of time required for the router to push out the packet.
The propagation delay is the time it takes a bit to propagate from one router to the next.
a.
Propagation delay
b.
Transmission time
c.
End-to-End delay means from the time needed from 1 point to another point. (one end to another end)
End-to-End delay = Transmission time + Propagation delay = seconds
d. Suppose Host A begins to transmit the packet at time t = 0. At time t = , where is the last bit of the packet?
The last bit is just leaving Host A.
e. Suppose is greater than . At time t = , where is the first bit of the packet?
The first bit is in the link and has not reached Host B.
f. Suppose is lesser than . At time t = , where is the first bit of the packet?
The first bit has reached Host B.
g.
Distance:
a. Calculate the bandwidth-delay product.
Progagation delay
Bandwidth-delay product bits
b. Consider sending a file of 800,000 bits from Host A to Host B. Suppose the file is sent continuously as one large message. What is the maximum number of bits that will be in the link at any given time?
Only anytime, there will be 160,000 bits on the medium.
c. Provide an interpretation of the bandwidth-delay product.
The bandwidth-delay product of a link is the maximum number of bits that can be in the link.
d. What is the width (in meters) of a bit in the link? Is it longer than a football field?
meters per bit
so 1 bit is 125 meters long, which is longer than a football field
e. Derive a general expression for the width of a bit in terms of the propagation speed s, the transmission rate R, and the length of the link m.
Propagation time =
Bandwidth-delay product = bits
general expression =
With no option, the data size of a DHCP message is 236 bytes
DHCP Message = 236 bytes
UDP header = 8 bytes
IP header = 20 bytes
Ethernet header with preamble = 26 bytes
Total = 290 bytes
Efficiency = 236 / 290 = 0.8138 or 81%
L2-IP Protocols: NAT, ARP and ICMP
a)
Source MAC = 23:45:AB:4F:67:CD
Source IP = 125.45.23.12
Destination MAC = AA:BB:A2:4F:67:CD (6 bytes of 0s in request message)
Destination IP = 125.11.78.10
- Hardware Type: Ethernet→01
- Protocol Type: IPV4 →
- Hardware Length: Ethernet → 6 bytes
- Protocol Length: IPv4 → 4 bytes
- Operation: Request (1)
- Source hardware address: Source MAC address (6 bytes) = 0x2345AB4F | 0x67CD
- Source protocol address: Source IP address (4 bytes) = 125.45 | 23.12
- Destination hardware address: Destination MAC address (6 bytes of 0s in request message)
- Destination protocol address: Destination IP address (4 bytes) = 125.11.78.10
b)
Source MAC = AA:BB:A2:4F:67:CD
Source IP = 125.11.78.10
Destination MAC = 23:45:AB:4F:67:CD
Destination IP = 125.45.23.12
- Hardware Type: Ethernet→01
- Protocol Type: IPV4 →
- Hardware Length: Ethernet → 6 bytes
- Protocol Length: IPv4 → 4 bytes
- Operation: Reply (2)
- Source hardware address: Source MAC address (6 bytes) = 0xAABBA24F | 0x67CD
- Source protocol address: Source IP address (4 bytes) = 125.11 | 78.10
- Destination hardware address: Destination MAC address (6 bytes) = 0x2345 | 0xAB4F67CD
- Destination protocol address: Destination IP address (4 bytes) = 125.45.23.12
The answer is no in practice, but yes in theory. MAC address is statically assigned to each hardware. ARP mapping enables indirection from IP addresses to the hardware MAC addresses. This allows IP addresses to be dynamically reallocated when the hardware moves to the different network. So using MAC addresses as IP addresses would mean that we would have to use static IP addresses. Since the Internet routing takes advantage of address space hierarchy (use higher bits for network addresses and lower bits for host addresses), if we would have to use static IP addresses, the routing would be much less efficient. Therefore this design is practically not feasible.
Possible reasons:
- Request is lost
- The original message is lost in transit. The sender can re-send the message.
- Reply is lost
- The reply is lost in transit. The sender can re-send the message.
- Error occured or Router is down
- The original message was corrupted and discarded. The sender can re-send the message.
03 | 03 | 10 20 | 00 00 00 00
Type: 3
The type in this message is 3, which means it is a destination unreachable message.
Code : 3
The code in this message is 3, which means that the target port is unreachable. The purpose of this message is to inform the sender that the destination port is not available on the destination host at this time.
Round-Trip Time Calculation:
- sending time = receive timestamp − original timestamp
- receiving time = returned time − transmit timestamp
- round-trip time = sending time + receiving time
Therefore:
Original timestamp : (Given)
Receive timestamp : (Given)
Transmit timestamp : (Given)
Sending time = 13,562,000 – 13,560,000 = 2,000 milliseconds
Receiving time = 13,567,000 – 13,564,300 = 2,700 milliseconds
Round trip time = 2,000 + 2,700 = 4,700 milliseconds
L3-IP Routing, Forwarding and Switching
Address Aggregation is simply the reverse process in dividing large address into smaller address.
- Combine small network into larger network
- Look at IP of different subnetwork and find out the number of common bits
Simply find out the common number of bits in the network ID.
200.96.86.0 => 200.96.01010110.0
200.96.87.0 => 200.96.01010111.0
200.96.88.0 => 200.96.01011000.0
200.96.89.0 => 200.96.01011001.0
Common number of bits = 8+8+4 = 20
Mask = 11111111.11111111.11110000.00000000
Aggregated address: 200.96.80.0/20
From Interface eth1 of router R it can reach:
- 10.0.0.0/8
- 193.204.161.0/24 (Next hop is 10.0.0.1 => there is another router)
From Interface eth2 of router R it can reach:
- 11.0.0.0/8
- 132.44.0.0/16 (Next hop is 11.0.0.2 => there is another router)
Therefore:
or
a)
From Interface m0 of router R2 it can reach:
- Rest of the internet (Default gateway: 0.0.0.0)
From Interface m1 of router R2 it can reach:
- 111.0.0.0/8
- 170.14.0.0/16 (Router R1 => Next hop is 111.25.19.20)
- 145.80.0.0/16 (Router R1 => Next hop is 111.25.19.20)
- 192.16.7.0/24 (Router R3 => Next hop is 111.15.17.32)
Therefore:
Routing table of R2:
b)
From Interface m0 of router R3 it can reach:
- 192.16.7.0/24
From Interface m1 of router R3 it can reach:
- Rest of the internet (Default gateway: 0.0.0.0) (Router R2 => Next hop is 111.30.31.18)
- 111.0.0.0/8
- 145.80.0.0/16 (Router R1 => Next hop is 111.25.19.20)
- 170.14.0.0/16 (Router R1 => Next hop is 111.25.19.20)
Therefore:
Routing table of R3:
a) Represent the prefixes as a Trie
b) Collapse the Trie, and fill in what to match for each branch
Suppose the longest prefix is bits, we will start from bits
For Length 27, We put marker on: 16, 24, 26
(Only tables smaller than 27, because If in 28 you cannot find a match you go to 26)
For Length 31, We put marker on: 16, 24, 28, 30
L4 - Unicast Routing Protocols
Top header = 4 bytes
1 Entry = 20 bytes
N networks = N Enries
The general formula can be given as follows:
Number of bytes in the message = 4 + (20 × N)
N is the number of advertised networks. A RIP message that advertises a single network (N = 1) would be 24 bytes.
One periodic timer is needed, one for each router.
20 expiration timers are needed, one for each entry.
5 garbage collection timers are needed, one for each invalid route.
Given Router C is one hop apart (neighbour)
the modified table from C is:
Comparing to the old table, we get the following:
- Net1 is updated because new info is closer (C’s info has smaller hops)
- Net2 need not to update (Same next router)
- Net3 need not to update (C’s info has bigger hops)
- Net4 need not to update (C’s info has bigger hops)
Assume suddenly the link between B and C fails
From Destination Total cost Next Hop B A 6 C C A 5 D a)
When B publish to C about the how to reach A
Poison Reverse
Since B know about this route comes from C (the Next Hop is C), B replace the distance with infinity as a warning.
“Do not use this value; what I know about this route comes from you.”
Therefore Distance = inf
b)
When C publish to B about the how to reach A
Since C know about this route comes from D (the Next Hop is D), not B, this is a normal value and can be advertised.
“use this value; what I know about this route comes from D.”
Distance = 5
c)
After updating, B will have a shortest route:
B->C->D->E->A
L5 - Unicast Routing Protocols
a) router link
b) router link
c) network link
a) Hello
The hello message (type 1) is used by a router to introduce itself to neighboring routers and to introduce already-known neighboring routers to other neighbors.
b) Data description
The data description message (type 2) is sent in response to a hello message. A router sends its full LSDB to the newly joined router.
c) Link-state request
The link-state request message (type 3) is sent by a router that needs information about a specific LS.
d) Link-state update
The link-state update message (type 4) is sent by a router to other routers for building the LSDB. There are five different versions of this message to announce different link states.
e) Link state acknowledgement
The link-state acknowledge message (type 5) is sent by a router to announce the receiving of a link-state update message. This message is used to provide reliability for the main message used in OSFP.
It just share the information using eBGP externally, and intradomain routing protocols internally.
Router R1, using its OSPF forwarding table, knows how to forward a packet destined for N4. R1 announces this reachability to R5 using an eBGP session. R5 adds an entry to its RIP forwarding table that shows R1 as the next router for any packet destined for N4.
The following shows the initialization and updates:
The DR is elected by the highest priority and highest RID in the same broadcast network.
a) Network Link LSA
- N1 Connect to A B C and router A is the designated router
- Destinated IP Address = IP Address of Router A = 163.43.31.8
- Mask = 16 bits (Masked = 163.43.0.0) => Network mask for N1 = 255.255.0.0
b) Network Link LSA
- N3 Connect to D E F and router D is the designated router
- Destinated IP Address = IP Address of Router D = 98.121.53.12
- Mask = 8 bits (Masked = 98.0.0.0) => Network mask for N3 = 255.0.0.0
c) OSPF hello message
From Router C through 199.7.33.0
It is just a stub network, so C is the designated router = 199.7.33.26
From Router C through 163.43.0.0
Largest value become the designated router -> B is designated router
second largest as backup designated router -> A is the backup designated router
Router 3c is border router -> eBGP
Router 3a is regular router -> iBGP
Router 1c is border router -> eBGP
Router 1a is regular router -> iBGP
I1 because this interface begins the least cost path from 1d towards the gateway router 1c.
note 2c and 4a are not point-to-point connected.
I2. Both routes have equal AS-PATH length but I2 begins the path that has the closest NEXT-HOP router.
(I1) AS1 AS3 AS4 vs (I2) AS1 AS2 AS5 AS4
I1 begins the path that has the shortest AS-PATH.