tutorials
tutorials copied to clipboard
The tenth host's ip address, mac address and how to write the command
The first nine hosts can ping each other, but h10 cannot.I think it's the h10 commands error, but don't know how to fix it.thanks for your help.Here is the code in the h10 commands.
"h10": {"ip": "10.0.10.10/24", "mac": "08:00:00:00:0a:aa", "commands":["route add default gw 10.0.a.a0 dev eth0", "arp -i eth0 -s 10.0.a.a0 08:00:00:00:0a:00"]}
I believe there was a similar issue with 10 or more switches before, and the root cause ended up being some Python regular expressions that only matched against the pattern s\d with a single decimal digit, rather than s\d+ that matched multiple digits. There might be a similarly limited pattern h\d somewhere in the Python code that is causing the problem you are experiencing.
Ah, I was misremembering the root cause of the problem with 10 or more switches. Here is the commit that fixed that limitation: https://github.com/p4lang/tutorials/commit/d9fdc0f446a458061453ea19694a454f3ba7360e
There might be a similar problem in processing host name strings somewhere.
With the latest version of p4c, behavioral-model, etc. and this repo, I edited the tutorials/exercises/basic/pod-topo/topology.json file to replace all occurrences of "h4" with "h10", and then ran the basic exercise. I could ping to h10 from other hosts, and ping other hosts from h10.
It would help to have complete details about exactly which version of the tutorials repo you are running with, public links to any files you are using when you experienced the problem, and the steps you took to reproduce the problem.
Thanks for your help