File tree Expand file tree Collapse file tree 1 file changed +41
-29
lines changed Expand file tree Collapse file tree 1 file changed +41
-29
lines changed Original file line number Diff line number Diff line change @@ -457,35 +457,47 @@ sudo nano /etc/netplan/50-cloud-init.yaml
457
457
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
458
458
# network: {config: disabled}
459
459
network:
460
- version: 2
461
- ethernets:
462
- eth0:
463
- dhcp4: true
464
- match:
465
- macaddress: bc:25:12:26:27:7d
466
- set-name: eth0
467
- routes:
468
- - to: 0.0.0.0/0
469
- via: 192.168.60.1
470
- metric: 100
471
- dhcp4-overrides:
472
- use-dns: false # Disable DNS from DHCP
473
- nameservers:
474
- addresses: [192.168.60.10, 192.168.60.22] # DNS servers for eth0
475
-
476
- eth1:
477
- dhcp4: true
478
- match:
479
- macaddress: bc:27:21:b1:4b:37
480
- set-name: eth1
481
- routes:
482
- - to: 0.0.0.0/0
483
- via: 192.168.20.1
484
- metric: 101
485
- dhcp4-overrides:
486
- use-dns: false # Disable DNS from DHCP
487
- nameservers:
488
- addresses: [192.168.60.10, 192.168.60.22] # DNS servers for eth1
460
+ version: 2
461
+ ethernets:
462
+ eth0:
463
+ addresses:
464
+ - 192.168.60.55/24
465
+ match:
466
+ macaddress: bc:24:11:f1:2a:e7
467
+ nameservers:
468
+ addresses:
469
+ - 192.168.60.10
470
+ - 192.168.60.22
471
+ routes:
472
+ - to: default
473
+ via: 192.168.60.1
474
+ set-name: eth0
475
+ eth1:
476
+ addresses:
477
+ - 192.168.20.65/24
478
+ match:
479
+ macaddress: bc:29:71:9a:01:29
480
+ nameservers:
481
+ addresses:
482
+ - 192.168.60.10
483
+ - 192.168.60.22
484
+ routes:
485
+ - to: 192.168.20.0/24
486
+ via: 192.168.20.1
487
+ set-name: eth1
488
+ eth2:
489
+ addresses:
490
+ - 192.168.40.52/24
491
+ match:
492
+ macaddress: bc:24:11:3d:c9:f7
493
+ nameservers:
494
+ addresses:
495
+ - 192.168.60.10
496
+ - 192.168.60.22
497
+ routes:
498
+ - to: 192.168.40.0/24
499
+ via: 192.168.40.1
500
+ set-name: eth2
489
501
` ` `
490
502
491
503
If you know of a better way to do this, please let me know in the comments.
You can’t perform that action at this time.
0 commit comments