Now you can tell the client where to send packets for the service: via the neighbour that holds that address.
ip route add adds a route. A single address is written with the /32 prefix, a subnet of one host:
The same sudo ip -n lab-client takes the command into the client's namespace. If the line already exists, ip prints RTNETLINK answers: File exists and leaves the table as it is.
A way to the service
In lab-client, add a route to the single address 198.51.100.20 via the neighbour 192.0.2.1 and check that the service answers ping. Do not change addresses and do not add a default route.
Goals · 0 of 2
- Add a route to 198.51.100.20 via the neighbour not done yet
- Get 198.51.100.20 to answer ping not done yet