Bookmark this page

Guided Exercise: Configuring Cluster Networking

In this exercise, you view and modify the network configuration.

Outcomes

You should be able to configure public and cluster network settings and secure the cluster with firewall rules.

As the student user on the workstation machine, use the lab command to prepare your system for this exercise.

[student@workstation ~]$ lab start configure-network

This command confirms that the required hosts for this exercise are accessible.

Procedure 3.3. Instructions

  1. Log in to clienta as the admin user and use sudo to run the cephadm shell.

    [student@workstation ~]$ ssh admin@clienta
    [admin@clienta ~]$ sudo cephadm shell
    [ceph: root@clienta /]#
  2. Use the ceph health command to view the health of the cluster.

    [ceph: root@clienta /]# ceph health
    HEALTH_OK
  3. View the configured public_network setting for the OSD and MON services.

    [ceph: root@clienta /]# ceph config get osd public_network
    
    [ceph: root@clienta /]# ceph config get mon public_network
    
    [ceph: root@clienta /]#
  4. Exit the cephadm shell. Create the osd-cluster-network.conf file and add a public_network setting with the IPv4 network address value of 172.25.250.0/24 in the [osd] section.

    [ceph: root@clienta /]# exit
    exit
    [admin@clienta ~]$ cat osd-cluster-network.conf
    [osd]
      cluster network = 172.25.249.0/24
  5. Use the cephadm shell with the --mount option to mount the osd-cluster-network.conf file in the default location (/mnt). Use the ceph config assimilate-conf command with the public-network.conf file to apply the configuration. Verify that cluster-network is defined for the service.

    1. Use the cephadm shell with the --mount option to mount the osd-cluster-network.conf file and verify the integrity of the file.

      [admin@clienta ~]$ sudo cephadm shell --mount osd-cluster-network.conf
      [ceph: root@clienta /]# cat /mnt/osd-cluster-network.conf
      [osd]
        public network = 172.25.250.0/24
    2. Use the ceph config assimilate-conf command with the osd-cluster-network.conf file to apply the configuration Verify that cluster_network is defined for the service.

      [ceph: root@clienta /]# ceph config assimilate-conf \
      -i /mnt/osd-cluster-network.conf
      [ceph: root@clienta /]# ceph config get osd cluster_network
      172.25.249.0/24
  6. Use the ceph config command to set the public_network setting to 172.25.250.0/24 for the MON services. Verify that the service has the new setting. Exit the cephadm shell.

    [ceph: root@clienta /]# ceph config set mon public_network 172.25.250.0/24
    [ceph: root@clienta /]# ceph config get mon public_network
    172.25.250.0/24
    [ceph: root@clienta /]# exit
    exit
    [admin@clienta ~]$

    Note

    You must restart the cluster for this setting to take effect. Omit that step for this exercise, to save time.

  7. Log in to serverc as the admin user and switch to the root user. Configure a firewall rule to secure the MON service on serverc.

    [admin@clienta ~]$ ssh admin@serverc
    admin@serverc's password: redhat
    [admin@serverc ~]$ sudo -i
    [root@serverc ~]# firewall-cmd --zone=public --add-service=ceph-mon
    success
    [root@serverc ~]# firewall-cmd --zone=public --add-service=ceph-mon --permanent
    success
    [root@serverc ~]#
  8. Configure a firewall rule to secure the OSD services on serverc.

    [root@serverc ~]# firewall-cmd --zone=public --add-service=ceph
    success
    [root@serverc ~]# firewall-cmd --zone=public --add-service=ceph --permanent
    success
    [root@serverc ~]#
  9. Increase the MTU for the cluster network interface to support jumbo frames.

    [root@serverc ~]# nmcli conn modify 'Wired connection 2' 802-3-ethernet.mtu 9000
    [root@serverc ~]# nmcli conn down 'Wired connection 2'
    Connection 'Wired connection 2' successfully deactivated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/10)
    [root@serverc ~]# nmcli conn up 'Wired connection 2'
    Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/11)
    [root@serverc ~]# ip link show eth1
    3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 8942 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
        link/ether 52:54:00:01:fa:0c brd ff:ff:ff:ff:ff:ff
  10. Return to workstation as the student user.

    [root@serverc ~]# exit
    [admin@serverc ~]$ exit
    [admin@clienta ~]$ exit
    [student@workstation ~]$

Finish

On the workstation machine, use the lab command to complete this exercise. This is important to ensure that resources from previous exercises do not impact upcoming exercises.

[student@workstation ~]$ lab finish configure-network

This concludes the guided exercise.

Revision: cl260-5.0-29d2128