0

I'll try to be as clear as possible... I have tree computer, my desktop witch have a two nic, one 1gb witch is connected to the router in dhcp to the net (192.168.1.X), one dual 10gb nic connected to the media server and one connected to the backup server. The two last one are directly connected to the servers (10.0.0.X)

I'm am trying to make it work with netplan for several days without success. I'm in need of help to configure netplan file.

Thanks

1 Answer 1

0

The Below config should get you going with the basic setup that you have outlined.

Replace the macaddress with the mac addresses of the interfaces that you want on dhcp and the one you want on static. the server on eth1 below needs to be given the ip 10.0.0.2/30 and the server on eth2 needs to be assigned 10.0.0.6/30.

network:
    version: 2
    renderer: networkd
    ethernets:
        eth0:
          match:
            macaddress: 00:00:00:00:00:00 <-- replace with the mac address of your network interface.
          set-name: eth0
          dhcp4: true
        eth1:
          match:
            macaddress: 00:00:00:00:00:00 <-- replace with the mac address of your network interface.
          set-name: eth1
          addresses:
            - 10.0.0.1/30
         eth2:
          match:
            macaddress: 00:00:00:00:00:00 <-- replace with the mac address of your network interface.
          set-name: eth2
          addresses:
            - 10.0.0.5/30

Note: This will allow your PC to connect to the internet and to each server. You will have to enable ip forwarding if you want the servers to have external access through your PC, and you may have to enable NAT (masquerade) for them to access the internet, unless you are able to config the routes for the /30 subnets in the router.

4
  • Sorry for the delay. Thank you for your answer it kind of work, i was able to assigned them ip address but for an unknown reason i cannot ping them ???
    – hijack
    Commented Jun 21 at 20:00
  • Hi maybe a detail that will put you on track of the problem. When I disconnect the 1Gb cable from my computer and only leave the two 10Gb and try to ping the server nothing work like the 10.0.0.0 interfaces were routed to the 192.168.0.0 0 interface.
    – hijack
    Commented Jun 22 at 0:03
  • Problem solve, i modify the servers addresses from 10.0.0.x/30 to 10.0.0.x/24 and everything working fine. Thank you very much!
    – hijack
    Commented Jun 22 at 18:53
  • Just know with a /24 address (I am assuming you have allocated this address to both interfaces? Then you will be sending broadcast and other traffic to both interfaces, rather then the data for eth1 and the data for eth2 going to each interface. If you want it to have a /24, I suggest you do a bridge of the two interfaces, give it one address, and set it up that way Commented Jun 23 at 7:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .