Now i have to add a network interface inside my Vmware setting for ubuntu server machine
A network interface with ens37 name has been added to this machine ( same thing to do for centos machine)
Netplan is responsible for network configuration in my machine:
sudo vim /etc/netplan/00-installer-config.yaml
# This is the network config written by 'subiquity'
network:
ethernets:
ens33:
addresses:
- 192.168.1.5/24
nameservers:
addresses:
- 8.8.8.8
search: []
routes:
- to: default
via: 192.168.1.1
ens37:
addresses:
- 172.16.1.100/24
nameservers:
addresses:
- 192.168.1.9
search: []
version: 2
As you can see, i have added a network interface configuration for ens37
Note: I didn’t add a route to the gateway because this will issue a conflict between this interfaces Instead I am planning to use my ubuntu server as a router too and let the forwarding from ens37 to ens33 so any client that takes address from this interface will reach the internet via my home router (not ubuntu server = 192.168.1.1)
And you can see that i have put the default route for these clients to be the same interface that gives dhcp which is ens37=172.16.1.100
Client Side:
[k8s@k8s-manager ~]$ nmcli device status
DEVICE TYPE STATE CONNECTION
ens33 ethernet connected ens33
lo loopback connected (externally) lo
ens36 ethernet disconnected --
i am planning to use ens36 so i have to add it
nmcli connection add con-name ens36 ifname ens36 type ethernet
and VOILAA, ens36 will take ip address automatically since dhcp use broadcast