summaryrefslogtreecommitdiff
path: root/assignments/2/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'assignments/2/README.md')
-rw-r--r--assignments/2/README.md13
1 files changed, 8 insertions, 5 deletions
diff --git a/assignments/2/README.md b/assignments/2/README.md
index 36b810f..482d88a 100644
--- a/assignments/2/README.md
+++ b/assignments/2/README.md
@@ -342,7 +342,8 @@ class RoutingTable
end
def route_to(ip)
- @routes.fetch(@routes.keys.find { |route| route.include?(ip) }, @default)
+ destination = @routes.fetch(@routes.keys.find { |route| route.include?(ip) }, @default)
+ "#{ip} => #{destination}"
end
end
@@ -363,11 +364,13 @@ puts table.route_to(c)
puts table.route_to(d)
```
+Result:
+
```bash
-Interface 1
-Router 3
-Router 2
-Router 3
+135.46.61.10 => Interface 1
+135.46.53.16 => Router 3
+192.53.40.6 => Router 2
+192.53.56.7 => Router 3
```
## 2.4 TCP Congestion Control (20%)