Hi All,
Currently, confignics cannot resolve the relationships among physical
nics/bond/vlan/bridge. We want to add new functions to realize how to
configuring physical nics/bond/vlan/bridge. The following contents contain:
1. Main functions and usage scenarios will be covered in "configuring
physical nics/bond/vlan/bridge" functions.
2. Two options for user interfaces. We tend to use option 1 user interface,
but we give another option 2.
Welcome you to give more comments about the 2 user interfaces, or give
another better user interface.
We can make it more smarter.
Main functions and usage scenarios will be covered in "configuring physical
nics/bond/vlan/bridge"
1. Disable network manager, enable network service
2. Configure physical nic ethx like from DHCP to static ip
3. Configure network interface configure file to configure bond,vlan and
bridge (linux bridge or ovs bridge); For easier understanding, we assume
there are physical nics eth1, eth2, eth3, eth4 which can be configured in
different scenarios as bond/vlan or bridge, there are several main usage
scenarios in "configuring ethx/bond/vlan/bridge" as following:
a. configure bond using multiple physical nics ethx....We will not cover
bond different types of nics. we will cover bonding physical nics directly,
for example, configure bond0 using eth1 and eth2;
bond0----eth1,eth2
b. configure vlans for physical nics, for example, configure 2 vlans for
eth1, vlan ids are 1 and 2, vlan names are eth1.1 and eth1.2;
eth1---eth1.1,eth1.2
c. create bridge (linux or ovs) for physical nics ethx... directly, for
example, eth1---br1, eth2---br2
d. configure vlans for physical nics, create bridge for every vlan, for
example,
eth1---eth1.1---br11
eth1---eth1.2---br12
eth2---eth2.1---br21
eth2---eth2.2---br22
e. configure bond first, then create bridge, for example,
eth1,eth2,eth3---bond0---br0
f. configure bond with different physical nics ethx..., then configure
vlans using these bonds, create bridge using these vlans, for example,
bonding eth1 and eth2 to create bond0, make vlan bond0.1 and bond0.2;
bonding eth3 and eth4 to create bond1, make vlan bond1.11 and bond1.12,
create br11 using bond1.11, create br12 using bond1.12
eth1,eth2---bond0---bond0.1,bond0.2
bond0.1---br01
bond0.2---br02
eth3,eth4---bond1---bond1.11,bond1.12
bond1.11---br11
bond1.12---br12
User interface:
Here gives an example for easier understanding user interface.
Usage scenario example:
Physical nics are eth1 and eth2; bonding eth1 and eth2 as bond1; from
bond1, make 2 vlans: vlan1 and vlan2; make bridge br1 using vlan1, make
bridge br2 using vlan2, br1 ip is 10.0.0.1, br2 ip is 20.0.0.1.
Reuse the nics table
If reusing the nics table, old confignics and other functions that call
nics table will not be affected. We can use chdef command to add nics
attributes for compute node cn1.
In nics table, there are nicips, nictypes and nicextraparams attributes
that can be used in this function. Currently, nicips contain nics ips, for
example, <nic1>!<ip1>|<ip2>,<nic2>!<ip1>|<ip2>,.... . nictypes contain each
nic type, for example, <nic1>!<type1>,<nic2>!<type2>; nicextraparams
contain comma-separated list of extra parameters that will be used for each
NIC configuration, for example, eth0!MTU=1500,ib0!MTU=65520
CONNECTED_MODE=yes.
Here, user interfaces for nictypes and nicextraparams do not need to be
changed, we can use them in this function directly, so we will not consider
them here. We just consider the interface to resolve relationships among
physical nics/bond/vlan/bridge;
Currently, we use mkdef/chdef to add nicips for compute node, for example,
chdef cn1 nicips.eth1="10.0.0.1" , then node will have attribute in cn1
node definition as: nicips.eth1=10.0.0.1
We can use chdef/mkdef to add relationships attributes for node
definition, then save these relationships in nics table.
User interface Option 1:
Adding nicdevice into nics table to remember nics relationships; reuse
nicips column directly.
Using chdef command to add relationships :
chdef cn1 nicips.br1=10.0.0.1 nicips.br2=20.0.0.1 nicdevice.br1=vlan1
nicdevice.br2=vlan2 nicdevice.vlan1=bond1 nicdevice.vlan2=bond1
nicdevice.bond1=eth1|eth2
After executing above chdef command, we can get data from nics table as
following:
nicips column:
br1!10.0.0.1,br2!20.0.0.1
nicdevice column ( nics table use "!" and "|" to separate value ) :
br1!vlan1,vlan2!bond1,bond1!eth1|eth2,br2!vlan2,vlan1!bond1
User interface Option 2:
To resolving nics relationships, we can add nics relationships append
nicips value, we can write nics relationship in order like"port1|
port2@bond1
@vlan1", we use "@" to separate different types of nics; we use "|" to
separate the same type of nics, "|" can also separate the different ips for one
nic;We can use chdef command to modify node definition:
chdef cn1 nicips.br1=10.0.0.1!eth1|eth2@vlan1@bond1
nicips.br2=20.0.0.1!eth1|eth2@vlan2@bond1
a. After executing above chdef command, nicips value in nics table:
br1!10.0.0.1!eth1|eth2@vlan1@bond1, br2!20.0.0.1!eth1|
eth2@vlan2@bond1
b. If we have another nics, they do not have any relation with above
nics:
br1!10.0.0.1!eth1|eth2@vlan1@bond1, br2!20.0.0.1!eth1|
eth2@vlan2@bond1, ib0!30.0.0.1
c. If we just configure one type of nics, all nics have no relationship,
it is current nics table format:
eth1!10.0.0.1|50.1.1.1,ib0!30.0.0.1
Comparason option 1 and option 2:
|-------+------------------------------+---------------------------------|
| |user interface option1 |user interface option2 |
|-------+------------------------------+---------------------------------|
|advanta|Easy to understand,store ips | the chdef command is short |
|ge |and devices relationships into| |
| |2 columns; | |
| |The minimum change to the | |
| |chdef command | |
| |The minimum change to the nics| |
| |table | |
|-------+------------------------------+---------------------------------|
|disadva|the chdef command is long for |More changes to the chdef command|
|ntage |user |More chnages for nics table |
|-------+------------------------------+---------------------------------|
------------------------------------------------------------------------------
_______________________________________________
xCAT-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xcat-user