22.04이전 버전은 다음 글 방법 활용
->
*해당 설정은 ubuntu 22.04.6에서 진행되었습니다.
Ubuntu 22.04 버전부터 netplan 구문이 변경되었다.
Gateway 설정시에, 기존 gateway4에서 routes 구문으로 변경되었다.
--------------------------------------------------------------------------------------------
routes
- to: default
via: [[gateway address]]
--------------------------------------------------------------------------------------------
>>vim /etc/netplan/*.yalm
해당 내용 작성 후 :wq
>> netplan apply
적용 완료.
--------------------------------------------------------------------------------------------
*다중 네트워크 인터페이스 설정시에는 routes를 한번만 선언해주면 된다.
routes를 두번 선언할 때,
다음 에러 문구를 마주한다.
** (generate:21181): WARNING **: 05:58:02.471: Problem encountered while validating default route consistency.Please set up multiple routing tables and use `routing-policy` instead.
Error: Conflicting default route declarations for IPv4 (table: main, metric: default), first declared in eno2 but also in eno1
** (process:21179): WARNING **: 05:58:02.740: Problem encountered while validating default route consistency.Please set up multiple routing tables and use `routing-policy` instead.
Error: Conflicting default route declarations for IPv4 (table: main, metric: default), first declared in eno2 but also in eno1
** (process:21179): WARNING **: 05:58:02.748: Problem encountered while validating default route consistency.Please set up multiple routing tables and use `routing-policy` instead.
Error: Conflicting default route declarations for IPv4 (table: main, metric: default), first declared in eno2 but also in eno1
** (process:21179): WARNING **: 05:58:03.119: Problem encountered while validating default route consistency.Please set up multiple routing tables and use `routing-policy` instead.
Error: Conflicting default route declarations for IPv4 (table: main, metric: default), first declared in eno2 but also in eno1
** (process:21179): WARNING **: 05:58:03.119: Problem encountered while validating default route consistency.Please set up multiple routing tables and use `routing-policy` instead.
Error: Conflicting default route declarations for IPv4 (table: main, metric: default), first declared in eno2 but also in eno1
--------------------------------------------------------------------------------------------
root@user:~# cat /etc/netplan/00-installer-config.yaml
# This is the network config written by 'subiquity'
network:
ethernets:
eno1:
dhcp4: no
addresses:
- 192.168.10.200/24
nameservers:
addresses:
- 8.8.8.8
routes:
- to: default
via: 192.168.10.1
eno2:
dhcp4: no
addresses:
- 192.168.10.201/24
nameservers:
addresses:
- 8.8.8.8
root@user:~# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eno1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether
altname enp229s0f0
inet 192.168.10.200/24 brd 192.168.10.255 scope global eno1
valid_lft forever preferred_lft forever
inet6 fe80::7ec2:55ff:fe29:f338/64 scope link
valid_lft forever preferred_lft forever
3: eno2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether
altname enp229s0f1
inet 192.168.10.201/24 brd 192.168.10.255 scope global eno2
valid_lft forever preferred_lft forever
inet6 fe80::7ec2:55ff:fe29:f339/64 scope link
valid_lft forever preferred_lft forever
4: usb0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether
+Ubuntu 23.04 : netplan apply시 발생한 에러문구
https://ccclog.tistory.com/104
'Linux > Ubuntu' 카테고리의 다른 글
Ubuntu 22.04 : pciutils-dev 설치. (0) | 2024.01.21 |
---|---|
Ubuntu 22.04: bonding 설정 +Bonding이란?, Bonding의 종류 (1) | 2023.10.19 |
UBUNTU: apt-get 명령어 모음 (0) | 2023.09.12 |
Ubuntu 23.04 : netplan apply시 발생한 에러문구 (1) | 2023.09.11 |
Ubuntu 20.04.6 Netplan static, dhcp 설정. (0) | 2023.09.08 |