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
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 /]#
Use the ceph health command to view the health of the cluster.
[ceph: root@clienta /]# ceph health
HEALTH_OKView 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 /]#
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 /]#exitexit [admin@clienta ~]$cat osd-cluster-network.conf[osd] cluster network = 172.25.249.0/24
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.
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
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_network172.25.249.0/24
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_network172.25.250.0/24 [ceph: root@clienta /]#exitexit [admin@clienta ~]$
You must restart the cluster for this setting to take effect. Omit that step for this exercise, to save time.
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@servercadmin@serverc's password:redhat[admin@serverc ~]$sudo -i[root@serverc ~]#firewall-cmd --zone=public --add-service=ceph-monsuccess [root@serverc ~]#firewall-cmd --zone=public --add-service=ceph-mon --permanentsuccess [root@serverc ~]#
Configure a firewall rule to secure the OSD services on serverc.
[root@serverc ~]#firewall-cmd --zone=public --add-service=cephsuccess [root@serverc ~]#firewall-cmd --zone=public --add-service=ceph --permanentsuccess [root@serverc ~]#
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 eth13: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP>mtu 8942qdisc 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
Return to workstation as the student user.
[root@serverc ~]#exit[admin@serverc ~]$exit[admin@clienta ~]$exit[student@workstation ~]$
This concludes the guided exercise.