Hi I have a new ubuntu server with 2 interfaces and i wrote a netpaln config for it like this:
network:
version: 2
renderer: networkd
ethernets:
ens160:
dhcp4: no
addresses:
- 192.168.1.2/24
routing-policy:
- from: 192.168.1.0/24
table: 160
routes:
- to: 0.0.0.0/0
via: 192.168.1.1
- to: 172.10.10.10
via: 192.168.1.1
on-link: true
metric: 100
table: 160
nameservers:
addresses:
- 8.8.8.8
- 4.2.2.4
accept-ra: no
ens192:
dhcp4: no
addresses:
- 172.31.99.2/24
routing-policy:
- from: 172.31.99.0/24
table: 192
routes:
# - to: 0.0.0.0/0
# via: 172.31.99.1
- to: 172.22.22.22
via: 172.31.99.1
on-link: true
metric: 100
table: 192
accept-ra: no
I have 2 questions:
- If I uncomment the default gateway for ens192 I get this warnings :
** (generate:2260): WARNING **: 20:34:27.603: 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 ens192 but also in ens160
** (process:2258): WARNING **: 20:34:28.411: 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 ens192 but also in ens160
** (process:2258): WARNING **: 20:34:28.427: 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 ens192 but also in ens160
** (process:2258): WARNING **: 20:34:28.970: 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 ens192 but also in ens160
** (process:2258): WARNING **: 20:34:28.971: 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 ens192 but also in ens160
why this happens?
and second question:
if I want to ping the destinations on routing table 160 or 192 no packet is transfered:
ping 172.20.20.20
4 packets transmitted, 0 received, 100% packet loss
ping 172.20.20.20 -I ens192
4 packets transmitted, 0 received, 100% packet loss
what is the solution?
thanks for your attention.