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?

 Throughput = Transfer Size (bits)  Transfer time (s) = Data Volume (bits)  Required time (s) \text { Throughput }=\frac{\text { Transfer Size (bits) }}{\text { Transfer time (s) }}=\frac{\text { Data Volume (bits) }}{\text { Required time (s) }}

Therefore  Transfer time (s) = Transfer Size (bits)  Throughput \text { Transfer time (s) }=\frac{\text { Transfer Size (bits) }}{\text { Throughput }}

4×106×8500×103b/s=64\frac{4\times 10^6 \times 8}{500 \times 10^3 b/s} = 64 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:

4×106×8100×103b/s=320\frac{4\times 10^6 \times 8}{100 \times 10^3 b/s} = 320 seconds

img

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 Time = Distance (m) Propagation Speed (m/s) \text { Propagation Time }=\frac{\text { Distance }(\mathrm{m})}{\text { Propagation Speed (m/s) }}​

Propagation delay dprop=m meterss meters/secd_{prop} = \frac{m\text{ meters}}{s\text{ meters/sec}}

b.

 Transmission time = Data size (bits)  Data Rate(bps) \text { Transmission time }=\frac{\text { Data size (bits) }}{\text { Data Rate(bps) }}

Transmission time dtrans=L bitsR bpsd_{trans} = \frac{L\text{ bits}}{R \text{ bps}}

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 = (L/R)+(m/s)(L/R)+(m/s) seconds

d. Suppose Host A begins to transmit the packet at time t = 0. At time t = dtransd_{trans}, where is the last bit of the packet?

The last bit is just leaving Host A.

e. Suppose dpropd_{prop} is greater than dtransd_{trans}. At time t = dtransd_{trans}, where is the first bit of the packet?

The first bit is in the link and has not reached Host B.

f. Suppose dpropd_{prop} is lesser than dtransd_{trans}. At time t = dtransd_{trans}, where is the first bit of the packet?

The first bit has reached Host B.

g.

Distance:

m=LRs=12056×103(2.5×108)=536 kmm=\frac{L}{R} s=\frac{120}{56 \times 10^{3}}\left(2.5 \times 10^{8}\right)=536 \mathrm{~km}

img

a. Calculate the bandwidth-delay product.

Progagation delay dprop=20000×1032.5×108=0.16sd_{prop} = \frac{20000 \times 10^3}{2.5 \times 10^8} = 0.16 s

Bandwidth-delay product R×dprop=2×106bps×0.16s=160000R \times d_{prop} = 2\times 10^6bps \times 0.16s = 160000 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?

width of a bit=length of linkbandwidth-delay product\text{width of a bit} = \frac{\text{length of link} }{\text{bandwidth-delay product}}

20000×103160000=125\frac{20000\times 10^3}{160000} = 125 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 = m/sm/s

Bandwidth-delay product = ms×R\frac{m}{s}\times R bits

general expression = length of linkbandwidth-delay product=mms×R=s/R\frac{\text{length of link} }{\text{bandwidth-delay product}} = \frac{m}{\frac{m}{s}\times R} = s/R

img

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

img

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 → (0800)16(0800)_{16}
  • 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 → (0800)16(0800)_{16}
  • 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

img

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.

img

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.

img

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.

img

Round-Trip Time Calculation:

  • sending time = receive timestamporiginal timestamp
  • receiving time = returned timetransmit timestamp
  • round-trip time = sending time + receiving time

Therefore:

Original timestamp : (3×3600+46×60+7)×1000=13,560,000(3 \times 3600 + 46 \times 60 + 7)\times 1000 = 13,560,000 (Given)

Receive timestamp : 13,562,00013,562,000 (Given)

Transmit timestamp : 13,564,30013,564,300 (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

img

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

img

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

img

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:

img

a) Represent the prefixes as a Trie

b) Collapse the Trie, and fill in what to match for each branch

img

Suppose the longest prefix is nn bits, we will start from n2\frac{n}{2} bits

img

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

img

img

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.

img

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.

img

Given Router C is one hop apart (neighbour)

the modified table from C is:

img

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)
img

img

Assume suddenly the link between B and C fails

img img

img

img

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

img

a) router link

b) router link

c) network link

img

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.

img

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.

img

The following shows the initialization and updates:

img

img

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

img

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

img

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

img

img

img

Router 3c is border router -> eBGP

img

Router 3a is regular router -> iBGP

img

Router 1c is border router -> eBGP

img

Router 1a is regular router -> iBGP

img

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.

img

I2. Both routes have equal AS-PATH length but I2 begins the path that has the closest NEXT-HOP router.

img

(I1) AS1 AS3 AS4 vs (I2) AS1 AS2 AS5 AS4

I1 begins the path that has the shortest AS-PATH.