Skip to content

Commit 4cd47bd

Browse files
committed
fix: use default MAC in the network-setup.md
Use default MAC for our rootfs in the network-setup.md Signed-off-by: Egor Lazarchuk <[email protected]>
1 parent 2321e76 commit 4cd47bd

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

docs/network-setup.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,22 @@ sudo iptables-save > iptables.rules.old
5151
Before starting the guest, configure the network interface using Firecracker's
5252
API:
5353

54+
**Note:** If you use the rootfs from the
55+
[getting started guide](getting-started.md), you need to use a specific `MAC`
56+
address like `06:00:AC:10:00:02`. In this `MAC` address, the last 4 bytes
57+
(`AC:10:00:02`) will represent the IP address of the guest. In the default case,
58+
it is `172.16.0.2`. Otherwise, you can skip the `guest_mac` field for network
59+
configuration. This way, the guest will generate a random MAC address on
60+
startup.
61+
5462
```bash
5563
curl --unix-socket /tmp/firecracker.socket -i \
5664
-X PUT 'http://localhost/network-interfaces/eth0' \
5765
-H 'Accept: application/json' \
5866
-H 'Content-Type: application/json' \
5967
-d '{
6068
"iface_id": "eth0",
61-
"guest_mac": "AA:FC:00:00:00:01",
69+
"guest_mac": "06:00:AC:10:00:02",
6270
"host_dev_name": "tap0"
6371
}'
6472
```
@@ -70,14 +78,14 @@ configuration file like this:
7078
"network-interfaces": [
7179
{
7280
"iface_id": "eth0",
73-
"guest_mac": "AA:FC:00:00:00:01",
81+
"guest_mac": "06:00:AC:10:00:02",
7482
"host_dev_name": "tap0"
7583
}
7684
],
7785
```
7886

7987
Alternatively, if you are using firectl, add
80-
--tap-device=tap0/AA:FC:00:00:00:01\` to your command line.
88+
--tap-device=tap0/06:00:AC:10:00:02\` to your command line.
8189

8290
## In The Guest
8391

0 commit comments

Comments
 (0)