Skip to content

Commit e367ae0

Browse files
committed
fix(gen): update
1 parent e02d31a commit e367ae0

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

pages/instances/reference-content/identify-devices.mdx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ KERNEL=="sd*", ENV{ID_VENDOR}=="SCW", SYMLINK+="disk/scw/$env{ID_SERIAL_SHORT}"
8080
```
8181

8282
This rule will create a symlink `/dev/disk/scw/volume-<uuid>` (where `uuid` is the ID of the volume) for each volume:
83+
8384
```bash
84-
```sh
8585
root@test-instance:~# ls -l /dev/disk/scw/
8686
total 0
8787
lrwxrwxrwx 1 root root 9 Mar 7 16:18 volume-a5fb1cc7-70d3-457f-b4e0-a757997a4b33 -> ../../sda
@@ -97,27 +97,27 @@ VPC Private Networks to which the Instance is connected will appear as virtio PC
9797

9898
As all PCI devices, they can be listed with the `lspci` command:
9999

100-
```sh
100+
```bash
101101

102102
root@test-instance:~# lspci -d '::0200'
103103
00:02.0 Ethernet controller: Red Hat, Inc. Virtio network device
104104
00:05.0 Ethernet controller: Red Hat, Inc. Virtio network device
105-
```bash
105+
00:06.0 Ethernet controller: Red Hat, Inc. Virtio network device
106106
```
107107

108108
The filter selects the Network controller device class/Ethernet controller device subclass. Three PCI devices are visible, which correspond to the public network device, and two VPC Private Network devices.
109109
By itself, the output of this command is not enough to distinguish between public and private networks, and can not distinguish between multiple private networks either: this simply confirms their existence in the PCI hierarchy of the Instance.
110110

111111
More interestingly, network interfaces can be listed generically using the `ip link show` command:
112112

113-
```sh
113+
```bash
114114
root@test-instance:~# ip link show
115115
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
116116
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
117117
2: ens2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
118118
link/ether de:00:00:e1:7e:f2 brd ff:ff:ff:ff:ff:ff
119119
altname enp0s2
120-
```bash
120+
3: ens5: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
121121
link/ether 02:00:00:b7:c8:a5 brd ff:ff:ff:ff:ff:ff
122122
altname enp0s5
123123
4: ens6: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
@@ -130,8 +130,8 @@ Here, four interfaces are listed, one of which (`lo`) is the virtual loopback in
130130
A simple and effective way to distinguish the public network interface from the VPC Private Network interfaces is the MAC address prefix. VPC Private Network interfaces always have a MAC address starting with `02:00:00`.
131131

132132
Using the JSON output mode of the `ip` command and filtering with the `jq` JSON parser, we can thus list VPC Private Network interfaces:
133+
133134
```bash
134-
```sh
135135
root@test-instance:~# ip -j link | jq -r '.[] | select(.address | test("02:00:00:.*")) | .ifname'
136136
ens5
137137
ens6
@@ -140,7 +140,7 @@ ens6
140140
Using the MAC address of the interfaces, it is also possible to distinguish between the different VPC Private Network interfaces. The MAC address of each interface is available through the API.
141141
For example, querying `/instances/v1/<zone>/servers/<uuid>/private_nics`, where `<zone>` is the zone of the server and `<uuid>` is the ID of the Instance gives:
142142

143-
```sh
143+
```bash
144144
{
145145
"private_nics": [
146146
{
@@ -151,7 +151,7 @@ For example, querying `/instances/v1/<zone>/servers/<uuid>/private_nics`, where
151151
"state": "available",
152152
"creation_date": "2024-03-13T14:42:55.822512+00:00",
153153
"modification_date": "2024-03-13T14:42:57.401901+00:00",
154-
```bash
154+
"zone": "fr-par-1",
155155
"tags": []
156156
},
157157
{
@@ -160,7 +160,7 @@ For example, querying `/instances/v1/<zone>/servers/<uuid>/private_nics`, where
160160
"server_id": "02f28852-b7b3-4cfc-9682-c7d14a044f29",
161161
"mac_address": "02:00:00:c1:72:51",
162162
"state": "available",
163-
```bash
163+
"creation_date": "2024-03-13T15:24:07.686223+00:00",
164164
"modification_date": "2024-03-13T15:24:08.647484+00:00",
165165
"zone": "fr-par-1",
166166
"tags": []

0 commit comments

Comments
 (0)