How to configure the server's intranet IP and MTU

Published: 2019-12-19

 How to configure the server's internal IP and MTU 1

Edit the network interface configuration file. Note that the MTU must be 1450 in all cases; otherwise, communication may be abnormal.

  1. CentOS:  /etc/sysconfig/network-scripts/ifcfg-eth1
    The configuration is as follows:
    image.png
    Modify IPADDR and NETMASK, then restart network interface eth1 for the configuration to take effect.

  2. Ubuntu 18: /etc/netplan/50-cloud-init.yaml
    The configuration is as follows:
    image.png
    Modify the IP address and mask in the addresses of eth1, then run netplan apply for the configuration to take effect.

  3. Debian: /etc/network/interfaces
    The configuration is as follows:
    image.png
    Modify the address and netmask of eth1, then restart network interface eth1 for the changes to take effect.

  4. Windows system

    Start->Run->CMD: netsh interface ipv4 set subinterface "Enter the internal NIC name here" mtu=1450 store=persistent

    The NIC name is shown in the following figure: e.g., "Ethernet 3"

    image.png