Now we're going to take a look at persisting our network connections and get
an idea of how they are stored on our different systems.
Working with openSUSE, we have the Wicked network manager. Wicked, I don't know
where they got the name. But we can go through and take a look at the status of
our network service, and that should actually be linked through to Wicked when
we're working with servers. We can go and use the wicked command, and we can go
through and look at all of our network interfaces, or we can look at a
particular network interface.
If we want to bring a network interface down, then we can do so, and then,
of course, we can bring it back up with the ifup command.
Now we're going to see this a little bit more from the command line.
But again, the idea of having this within the slides gives you something
that you can keep and read back at a later date, so make sure you download
the slides through your Pluralsight subscription. But we're going to move
directly out to our command line now.
So working on our openSUSE system, we can investigate a
little bit more about being wicked.
So here, we go diving out to the wonderful world of openSUSE, a system where you
can see that I've already gained administrative privileges.
I'm running as root. And we're going to take an investigation of our networking.
If I start off using the tools that we already know,
we can see then I've got those transient or the transient address that I
assigned to eth1. Now by transient, we mean it's not going to stay. If I
reboot the machine or bring the interface down, we're going to lose that.
Now investigating our systemctl and status, we can go through and take a
look at our network service.
This is actually a pretend service, if you like,
just linked through to whatever the network manager is. And we
can see that we're using the wicked.service.
This is normal for a server. On a desktop system, the network service will
be linked through to the network manager, which would allow us to have
different configuration needs for the different styles of networks we might
be connecting to, home, office, cafe, those sorts of things.
But yet, we're using Wicked, and we can use then our wicked commands to gain a
little bit more information about our network configuration.
If I use wicked show all, it's looking at all of our interfaces.
So we see our loopback interface, eth0, and eth1. For the moment,
concentrating on eth1, we can see then that it's currently up.
It's an Ethernet card.
We see the hardware address. That's the MAC address
or the logical link layer address.
But take a look at the configuration.
Wicked supports different configuration back ends, but by default, it's
using the standard etc sysconfig network scripts.
So we've got an ifcfg file for eth1. We also see both IP addresses. One
has been statically assigned, but then we have the transient address where
it doesn't really know where it got it from.
But I'm going to go through and just pull out the file name.
Let's take a look at what's in this file.
So if I use the cat command, and we can cat out then our
file name. When we take a look at this,
we can see the IP address that's been statically assigned, but
obviously, our configuration doesn't include the transiently assigned
IP address that we added in from the command line.
I'd have to add in extra lines for an IP address 2 and a netmask 2 so we
can have multiple IP addresses within this file. But I didn't need it to
be static, and we want to demonstrate the transient nature. Dropping back
to our wicked command, we can go through and use the subcommand ifdown to
bring an interface down.
We'll bring down eth1. And we saw before the show command. We can use show
all, but I can also use show and then eth1, and we can see much less
information now because the interface itself is not up.
If I look at my IP link,
we can see if I just do the ordinary ip link show, that we see
eth0, eth1, as well as our loopback device.
However, if I add to this a little bit,
so if I use the ip l for IP link, and then as we go through, I can
use the ls for listing, but I only want to list the up interfaces.
And we can see now that I'm able to see the loopback interface and
eth0, but as eth1 is not up,
it doesn't show. And honestly, I won't have any IP addresses associated with it.
Now going back, I can then go through and do, well, you've
guessed it, an ifup for eth1. So we should be back up and
running now with all of the interfaces up.
But if I go through and look at the ip ‑4 a s, when we take a
look at eth1, then we now just have the one IP address assigned
to it because we hadn't added to our back end configuration the
storage of the 172 address.
So hopefully this gives you a good insight into what's
happening in the back end of our openSUSE system and a little bit of fun with the wicked command.