You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pages/cloud/dedicated/configuring-an-ip-block-in-a-vrack/guide.en-gb.md
+40-12
Original file line number
Diff line number
Diff line change
@@ -146,38 +146,66 @@ And we define the IP settings:
146
146
```sh
147
147
# Created by cloud-init on instance boot automatically, do not edit.
148
148
#
149
-
BOOTPROTO=static
150
149
DEVICE=eth1
150
+
BOOTPROTO=static
151
151
ONBOOT=yes
152
-
TYPE=Ethernet
153
152
USERCTL=no
154
-
DEFROUTE=no
153
+
IPV6INIT=no
154
+
PEERDNS=yes
155
+
TYPE=Ethernet
156
+
NETMASK=255.255.255.240
155
157
IPADDR=46.105.135.97
156
-
PREFIX=28
158
+
ARP=yes
157
159
```
158
160
159
161
### Create a new IP routing table
160
162
161
163
Next, we need to create a new IP route for the [vRack](https://www.ovh.co.uk/solutions/vrack/){.external}. We'll be adding a new traffic rule by amending the file, as shown below:
162
164
163
165
```sh
164
-
sudo ip rule add from 46.105.135.97 lookup 1000
166
+
/etc/iproute2/rt_tables
167
+
168
+
#
169
+
# reserved values
170
+
#
171
+
255 local
172
+
254 main
173
+
253 default
174
+
0 unspec
175
+
#
176
+
# local
177
+
#
178
+
#1 inr.ruhep
179
+
1 vrack
180
+
```
181
+
182
+
Next, create the file needed to apply the new rules:
183
+
```sh
184
+
nano /etc/sysconfig/network-scripts/rule-eth1
165
185
```
186
+
187
+
And paste the following content (please remember to replace our variables with your own values):
188
+
166
189
```sh
167
-
ip rule
168
-
0: from all lookup local
169
-
32765: from 46.105.135.97 lookup 1000
170
-
32766: from all lookup main
171
-
32767: from all lookup default
190
+
ip rule add from 46.105.135.96/28 table vrack
191
+
ip rule add to 46.105.135.96/28 table vrack
172
192
```
173
193
174
194
### Amend the network configuration file
175
195
176
196
Finally, we need to amend the network configuration file to account for the new traffic rule and route the [vRack](https://www.ovh.co.uk/solutions/vrack/){.external} traffic through the network gateway address of **46.105.135.110**.
177
197
198
+
We can achieve it by editing the following file in order to add persistent and static routes:
199
+
200
+
```sh
201
+
nano /etc/sysconfig/network-scripts/route-eth1
202
+
```
203
+
204
+
Paste the following content (please remember to replace our variables with your own values):
205
+
178
206
```sh
179
-
ip route add 46.105.135.96/28 dev eth1 table vrack
180
-
ip route add default via 46.105.135.110 dev eth1 table vrack
207
+
46.105.135.96/28 dev eth1 table vrack
208
+
default via 46.105.135.110 dev eth1 table vrack
181
209
```
182
210
183
211
Now reboot your server to apply the changes or alternatively enable simply the new network interface:
0 commit comments