Difference between revisions of "XCAT Set up network bonding bond0"

From Define Wiki
Jump to navigation Jump to search
 
Line 19: Line 19:
 
# If adding to the provisioning setup (node has not been installed)
 
# If adding to the provisioning setup (node has not been installed)
 
# -s makes eth0 static as well as the other nics added above  
 
# -s makes eth0 static as well as the other nics added above  
chdef stu-gpu1 -p postscripts="confignetwork -s"
+
chdef stu-gpu1 -p postscripts="confignetwork -s"
 +
 
 +
# if you typo above and need to remove a script use the -m (minus) flag instead of -p (plus)
  
 
# If adding to an already deployed node
 
# If adding to an already deployed node

Latest revision as of 23:38, 23 February 2021

# check the existing networks
(region1)[root@stu-dpy1 ~]$ lsdef -t network 
192_168_0_0-255_255_255_0  (network)
192_168_1_0-255_255_255_0  (network)


# Add a new network 
chdef -t network net_bond1_vlan202 net=192.168.2.0 mask=255.255.255.0


# below assumes the node name is stu-gpu1 (repeat for all nodes - add to add_node script) 
chdef stu-gpu1 nictypes.enp24s0f0=ethernet nictypes.enp24s0f1=ethernet
chdef stu-gpu1 nictypes.bond1=bond nicdevices.bond1="enp24s0f0|enp24s0f1"
chdef stu-gpu1 nicnetworks.bond1=net_bond1_vlan202
chdef stu-gpu1 nicips.bond1=192.168.2.31


# If adding to the provisioning setup (node has not been installed)
# -s makes eth0 static as well as the other nics added above 
chdef stu-gpu1 -p postscripts="confignetwork -s"  

# if you typo above and need to remove a script use the -m (minus) flag instead of -p (plus)

# If adding to an already deployed node
updatenode stu-gpu1 -P confignetwork

# if you changed the nics and removed some configuration, this will remove any nics not defined
updatenode stu-gpu1 -P "confignetwork -r" 

# make a mistake, remove an attribute setting the value to ""
[root@spg-dpy1 scratch]# lsdef spg-hcb2-n1 | grep nicips
    nicips.bond1.212=192.168.12.12
    nicips.bond1.1810=10.10.4.12
    nicips.bond1.104=10.10.4.12
[root@spg-dpy1 scratch]# chdef -o spg-hcb2-n1  nicips.bond1.104=""
1 object definitions have been created or modified.
[root@spg-dpy1 scratch]# lsdef spg-hcb2-n1 | grep nicips
    nicips.bond1.212=192.168.12.12
    nicips.bond1.1810=10.10.4.12

From an Existing Installation

[root@node001 ~]# lsdef -o node002
Object name: node002
    arch=x86_64
    bmc=192.168.100.102
    bmcpassword=AWHZGVQPQC
    bmcusername=ADMIN
    currchain=boot
    currstate=boot
    groups=controllers,all
    ip=192.168.100.2
    mac=3C:EC:EF:11:B8:3A
    mgt=ipmi
    netboot=xnba
    nicdevices.bond0.201=bond0
    nicdevices.bond0=enp59s0f0|enp94s0f1
    nicdevices.bond1=enp59s0f1|enp94s0f0
    nicdevices.bond0.200=bond0
    nicextraparams.bond0=BONDING_OPTS=lacp_rate=1;miimon=100;mode=4
    nicextraparams.bond1=BONDING_OPTS=lacp_rate=1;miimon=100;mode=4
    nichostnamesuffixes.bond0.201=-pubapi
    nichostnamesuffixes.bond0.200=-intapi
    nicips.bond0.201=197.243.57.2
    nicips.bond0.200=172.16.200.2
    nicnetworks.bond0.201=publicAPI
    nicnetworks.bond0.200=internalAPI
    nictypes.enp94s0f0=ethernet
    nictypes.bond0=bond
    nictypes.bond1=bond
    nictypes.enp59s0f1=ethernet
    nictypes.bond0.200=vlan
    nictypes.bond0.201=vlan
    nictypes.enp94s0f1=ethernet
    nictypes.enp59s0f0=ethernet
    os=centos7.8
    postbootscripts=otherpkgs
    postscripts=syslog,remoteshell,syncfiles,confignetwork
    profile=compute
    provmethod=centos7.8-x86_64-install-compute
    serialport=0
    serialspeed=115200
    status=booted
    statustime=10-05-2020 14:52:28
    updatestatus=synced
    updatestatustime=11-18-2020 16:12:15
[root@node001 ~]# lsdef -t networks
Error: [node001]: 
Type 'networks' is not a valid xCAT object type.
[root@node001 ~]# lsdef -t network
172_28_0_0-255_255_0_0  (network)
192_168_100_0-255_255_255_0  (network)
internalAPI  (network)
publicAPI  (network)

Commands used

  mkdef -t network -o publicAPI net=197.243.57.0 mask=255.255.255.0 gateway=197.243.57.1
  chdef node002 nictypes.bond0.201=vlan nicdevices.bond0.201=bond0 nicips.bond0.201=197.243.57.2 nicnetworks.bond0.201=publicAPI nichostnamesuffixes.bond0.201=-pubapi
  chdef node003 nictypes.bond0.201=vlan nicdevices.bond0.201=bond0 nicips.bond0.201=197.243.57.3 nicnetworks.bond0.201=publicAPI nichostnamesuffixes.bond0.201=-pubapi
  chdef node004 nictypes.bond0.201=vlan nicdevices.bond0.201=bond0 nicips.bond0.201=197.243.57.4 nicnetworks.bond0.201=publicAPI nichostnamesuffixes.bond0.201=-pubapi