Note that the network management software differs by distro: RHEL uses NetworkManager (see Eric's answer below), SUSE uses wicked, and Ubuntu uses netplan - and beware: Some distros changed their tools over time: E.g. Ubuntu was formerly using NetworkManager at some point if I recall correctly. Each distro has a different user interface - so please consult your distro's manual, they usually have a good description of such tasks. Also, I'd recommend to setup a secondary interface and use that to perform the changes. With z/VM, it's really easy to setup a temporary IUCV connection between two guests (see small snippet below, needs to be performed on both sides - haven't tested it recently, but something along those lines).

$ modprobe netiucv
# Setup connection to guestB (peer)
$ echo guestB>/sys/bus/iucv/drivers/netiucv/connection
# Configure device
$ ip addr add 192.168.2.1/16 dev iucv0
$ ip link set up dev iucv0
$ ip addr show iucv0
6: iucv0: <POINTOPOINT,NOARP,UP,LOWER_UP> mtu 9216 qdisc fq_codel state UNKNOWN group default qlen 50
    link/slip
    inet 192.168.3.1/16 scope global iucv0
       valid_lft forever preferred_lft forever

Ciao,
Stefan



On 6/30/22 06:00, Eric Chevalier wrote:
This is something I've done occasionally in our z/VM guests. All through
an ssh session, no less! (Note that our Linux guests are running RHEL8.)

In my case, I have a network connection called "enccw0.0.f804". I use
the "nmtui" command to make any changes to the connection definition.
Then I'll issue the command:

    nmcli conn down enccw0.0.f804 ; nmcli conn up enccw0.0.f804

The first nmcli command turns off the connection. The second nmcli
brings the connection back up, picking up the changes I made with nmtui.
Of course this will drop your connection to the original IP address,
forcing you to re-establish an ssh connection to the new IP address. You
have to stack the two nmcli commands as shown. Obviously, if you just
use the first nmcli command you'll never be able to re-establish your
ssh session.

As a "back door": if I were to issue the first nmcli command without
stacking the second, I could still get on to the Linux system by logging
on to the guest using a 3270 session. Granted, Linux doesn't support
3270 sessions very well (at least not ours). Full screen applications
like vim don't work very well on a 3270 session. But most command-line
commands that read from stdin and write to stdout/stderr do work. So
through my 3270 session I could issue the "nmcli conn up" command to
re-enable ssh sessions.

On 6/29/2022 10:15 PM, Peter wrote:
Hello

When an existing redhat Linux guest on zVM requires a IP change. What are
files that I need to change to reflect with new IP address?

For an existing Linux, how do I view it's console from a 3270 emulator ?
Cause as of due to the IP change the Linux guest is not connectable via SSH.

Could someone please guide me ?

Regards
Peter

--
Eric Chevalier
Phoenix Software International
e...@phoenixsoftware.com
Voice: (918) 491-6144 x410
  Cell: (918) 629-6393
   Fax: (918) 494-2701


--------------------------------------------------------------------------------
This e-mail message, including any attachments, appended messages and the
information contained therein, is for the sole use of the intended
recipient(s). If you are not an intended recipient or have otherwise
received this email message in error, any use, dissemination, distribution,
review, storage or copying of this e-mail message and the information
contained therein is strictly prohibited. If you are not an intended
recipient, please contact the sender by reply e-mail and destroy all copies
of this email message and do not otherwise utilize or retain this email
message or any or all of the information contained therein. Although this
email message and any attachments or appended messages are believed to be
free of any virus or other defect that might affect any computer system into
which it is received and opened, it is the responsibility of the recipient
to ensure that it is virus free and no responsibility is accepted by the
sender for any loss or damage arising in any way from its opening or use.

----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit
http://www2.marist.edu/htbin/wlvindex?LINUX-390


--

Mit freundlichen Grüßen / Kind regards

Stefan Raspl


Linux on Z
-------------------------------------------------------------------------------------------------------------------------------------------
IBM Deutschland
Schoenaicher Str. 220
71032 Boeblingen
Phone: +49-7031-16-2177
E-Mail: stefan.ra...@de.ibm.com
-------------------------------------------------------------------------------------------------------------------------------------------
IBM Deutschland Research & Development GmbH / Vorsitzender des Aufsichtsrats: Gregor Pillen
Geschäftsführung: David Faller
Sitz der Gesellschaft: Böblingen / Registergericht: Amtsgericht Stuttgart, HRB 243294

----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit
http://www2.marist.edu/htbin/wlvindex?LINUX-390

Reply via email to