newbie to centos 7

Issues related to configuring your network
Post Reply
alexs_67
Posts: 13
Joined: 2015/08/16 10:34:55

newbie to centos 7

Post by alexs_67 » 2015/08/16 10:37:49

hi

trying to setup a new team interface aka centos 7 style, using nmcli

Code: Select all

 ip li
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: enp1s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN mode DEFAULT qlen 1000
    link/ether 00:01:c0:19:38:b8 brd ff:ff:ff:ff:ff:ff
3: enp2s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN mode DEFAULT qlen 1000
    link/ether 00:01:c0:19:38:b7 brd ff:ff:ff:ff:ff:ff
4: enp3s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN mode DEFAULT qlen 1000
    link/ether 00:01:c0:19:38:b6 brd ff:ff:ff:ff:ff:ff
5: enp4s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT qlen 1000
    link/ether 00:01:c0:18:ae:33 brd ff:ff:ff:ff:ff:ff
6: wlp0s16u1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT qlen 1000
    link/ether 7c:dd:90:84:a6:3b brd ff:ff:ff:ff:ff:ff
7: team0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT
    link/ether 72:98:7e:f6:f2:a6 brd ff:ff:ff:ff:ff:ff

thought I would create my team with a script

Code: Select all

#!/bin/bash

NMCLI='/bin/nmcli'



#$NMCLI connection delete team0 >/dev/null 2>&1
$NMCLI connection delete team0-port1 >/dev/null 2>&1
$NMCLI connection delete team0-port2 >/dev/null 2>&1

#$NMCLI connection add type team ifname team0 con-name team0


$NMCLI connection add type team-slave con-name team0-port1 ifname enp1s0 master team0
$NMCLI connection add type team-slave con-name team0-port2 ifname enp2s0 master team0

$NMCLI connection up team0-port1
$NMCLI connection up team0-port2


$NMCLI connection show


but

Code: Select all

Connection 'team0-port1' (36a7361c-72f6-4862-abe1-ed0bd2099d33) successfully added.
Connection 'team0-port2' (c7edede0-9195-4f55-9ee1-5a58db596b68) successfully added.
Error: Connection activation failed: Connection 'team0-port1' is not available on the device enp1s0 at this time.
Error: Connection activation failed: Connection 'team0-port2' is not available on the device enp2s0 at this time.
NAME         UUID                                  TYPE            DEVICE
team0-port2  c7edede0-9195-4f55-9ee1-5a58db596b68  802-3-ethernet  --
team0        61cf8f08-f554-4de5-8250-a47258651347  team            team0
team0-port1  36a7361c-72f6-4862-abe1-ed0bd2099d33  802-3-ethernet  --
enp4s0       bc1087eb-2f72-4973-8ff3-63f752b98d01  802-3-ethernet  enp4s0
enp3s0       bebaf798-1a64-47b6-a97b-8a04326d0e0e  802-3-ethernet  --


alexs_67
Posts: 13
Joined: 2015/08/16 10:34:55

Re: newbie to centos 7

Post by alexs_67 » 2015/08/17 01:43:36

Worked out my issue

I had nothing connected to the eth ports. So network manager wouldn't bring up the slave ports ....

The fun of learning nmcli and nmtui and systemd ....

Is there anyway to configure the ports so they are on waiting, take a while after a cable is plugged in for the interface to come up.

Can I remove it from network manager (I hated it before)
and just use ONBOOT=yes to have it come up at boot time ?

scottro
Forum Moderator
Posts: 2556
Joined: 2007/09/03 21:18:09
Location: NYC
Contact:

Re: newbie to centos 7

Post by scottro » 2015/08/17 09:51:38

Yeah, some of the first things I do with a Fedora install is remove NetworkManager and change the naming system of interfaces back to the old style.

Remove network manager, set the network service to start--actually, it might do that automatically, I'm not sure. Put NM_CONTROLLED=no in /etc/sysconfig/network-scripts/ifcfg-whatever.

As for the network service if you do systemctl enable network.service, I think it then gives a message that systemd doesn't handle that old stuff, so it's passing it off to chkconfig, but I might be wrong on that one.
New users should check the FAQ and Read Me First pages

aks
Posts: 3073
Joined: 2014/09/20 11:22:14

Re: newbie to centos 7

Post by aks » 2015/08/17 20:22:35

<Thinking out loud>

Hmm, an event based system. Whereby when link is established the system "jumps" in on it and makes a team, or makes a single link (for whichever member of the team/bond is up at the moment).
I kind of feel that is possible, but can not think about it now, have many other things going on.

Perhaps inotify (filesystem events) may be a clue, in that when the state of /dev/<interface>/<file> changes let me know?
Just a suggestion....

Post Reply