Planning & Design
The task of this one day lab was to see why 2 computers, directly connected to eachother through ethernet, were unable to ping each other.
Focusing mainly on the bottom 3 OSI layers: Physical, Datalink, and Network, each of these could of caused the computers to be unable to ping:
Physical:
The wires bad, the NIC isn't working, or another hardware issue
Datalink:
IP is unable to be resolved into a MAC address.
Network:
device is not getting an IP, or the IP's of the two devices are in different ranges even though they are on the same network.
The failure points expected were mostly related to layers 2 and 3, being:
Datalink not being able to resolve the mac address from an IP, or similar issues with IP resolution. This is kind of similar to how DNS servers sometimes don't work where IPs do
Network is probably the most likely of all, if the IP it assigns is self assigned then the other computer will not be able to resolve it, and therefore fail.
Technical Development
Getting IPs
Heres my partner's IP, being 10.12.25.170. This also shows that he has a working mac address (state UP), being 1a:63:23:39:a4:2c.
Checking my own IP, I got 10.12.26.30. the ethernet was also confirmed as working as it shows state UP, and I have a mac address of 46:d0:1e:a2:d4:12
Ping Attempt
When attempting to ping my partner, it failed. It failed with the error "Destination Host Unreachable", which indicates that it was unable to find the host name (mac address) of the IP. This indicates that the issue in connection is with layer 2, as the ARP (Address Resolution Protocol) is not functioning.
IP comparison
The two IPs got earlier were 10.12.26.30 for myself, and 10.12.25.170 for my partner. While these IPs are not identical, they do share the same range, which should be a positive sign that should mean that they are able to connect to each other. Additionally, the ping failure above also suggests that it is not an issue with the network layer, but rather the datalink, as Destination Host Unreachable is representative of finding a mac address failure. Another issue that could be IP related is a common issue, being deciding on Shared vs Bridged mode. for this, bridged mode was used to be a more similar network, and using it gave us similar IP ranges, but also it is notoriously slow and spotty even in the best cases, which could of lead to the bridged failure.
Ping Failure Explanation
Seen from the ping above, it failed 12 times, all due to "Destination Host Unreachable." This suggests that it is an issue in finding the destination host's mac address, lending to the theory that it is an issue in layer 2.
Testing & Evaluation
The outcome of this lab was a success at failure. The issues were not with physical, as IP a shows (state UP), highly likely that the Datalink layer was the issue, with it being unable to resolve to a MAC address, and the Network layer could also be causing issues as the VM is a virtual network running connected to a real network. In the reflection section, the fixes are described.
Reflection
1. Why communication failed
Communication failed due to a mixture of issues with the VM's configuration, specifically its mac address, and the VM running a virtual bridged network that causes a mixture of issues with any communication.
2. Which OSI layer(s) caused the failure
Mac addresses are undoubtedly always related to layer 2, while the network layer has to do with IPs, which also were assigned by the router but failed to resolve to anything.
3. Why UTM host-only mode prevents communication
UTM prevents communication for safety reasons. If a VM can send data out of its "cage", that entirely defeats the purpose of using a VM as an isolated computer to test out software.
4. What configuration change could fix it
UTM probably has a setting to allow for data to be sent on the LAN (local network) from the VM. Additionally, changing the mac address on my partners computer could of also fixed it, as he used the mac address that every VM had at one point if it wasn't the new version of Ubuntu or they changed it manually.
5. How routers/switches prevent this in real networks
In real networks, with real computers, every device will have a unique MAC address. This would fix the issues with multiple computers having identical MACs, which could of been one of the reasons the ping failed. Also, by using a router on a real network, it will dynamically assign the IP of any connected devices and store the associated hostname, meaning that the "Destination Host Unreachable" error would be solved