@@ -51,14 +51,22 @@ sudo iptables-save > iptables.rules.old
51
51
Before starting the guest, configure the network interface using Firecracker's
52
52
API:
53
53
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
+
54
62
``` bash
55
63
curl --unix-socket /tmp/firecracker.socket -i \
56
64
-X PUT ' http://localhost/network-interfaces/eth0' \
57
65
-H ' Accept: application/json' \
58
66
-H ' Content-Type: application/json' \
59
67
-d ' {
60
68
"iface_id": "eth0",
61
- "guest_mac": "AA:FC: 00:00: 00:01 ",
69
+ "guest_mac": "06: 00:AC:10: 00:02 ",
62
70
"host_dev_name": "tap0"
63
71
}'
64
72
```
@@ -70,14 +78,14 @@ configuration file like this:
70
78
"network-interfaces" : [
71
79
{
72
80
"iface_id" : " eth0" ,
73
- "guest_mac" : " AA:FC: 00:00: 00:01 " ,
81
+ "guest_mac" : " 06: 00:AC:10: 00:02 " ,
74
82
"host_dev_name" : " tap0"
75
83
}
76
84
],
77
85
```
78
86
79
87
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.
81
89
82
90
## In The Guest
83
91
0 commit comments