Advertisement
Guest User

Untitled

a guest
Mar 3rd, 2017
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.90 KB | None | 0 0
  1. ##Teaming##
  2.  
  3. **Host System:**
  4.  
  5.  
  6. # virt-manager
  7. create 3 NIC using in H/W (eth0, eth1, eth2)
  8.  
  9.  
  10. # virsh start cetnos7 --console
  11. Login to guest os
  12. Username:
  13. Password:
  14.  
  15. # yum install -y teamd
  16.  
  17. change ifcfg files
  18.  
  19.  
  20. # cd /etc/sysconfig/network-scripts/
  21. # vi ifcfg-team0
  22. ```text
  23. DEVICE=team0
  24. DEVICETYPE=Team
  25. ONBOOT=yes
  26. BOOTPROTO=none
  27. IPADDR=172.25.25.3
  28. PREFIX=24
  29. TEAM_CONFIG='{"runner": {"name": "activebackup"}, "link_watch": {"name": "ethtool"}}'
  30. ```
  31. Teaming Modes:
  32.  
  33. - activebackup
  34. - broadcast
  35. - roundrobin
  36. - loadbalance
  37.  
  38. This configuration is for master
  39. Now we have to create slaves
  40. and need to connect those slaves to master
  41.  
  42. # ifconfig -a
  43. to check number of availabe interfaces
  44. <pre>
  45.  
  46. eth0: flags=4163 UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
  47. inet 192.168.122.72 netmask 255.255.255.0 broadcast 192.168.122.255
  48. inet6 fe80::5054:ff:fed3:a4da prefixlen 64 scopeid 0x20<link>
  49. ether 52:54:00:d3:a4:da txqueuelen 1000 (Ethernet)
  50. RX packets 336 bytes 31053 (30.3 KiB)
  51. RX errors 0 dropped 7 overruns 0 frame 0
  52. TX packets 176 bytes 17284 (16.8 KiB)
  53. TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
  54.  
  55. eth1: flags=4098 BROADCAST,MULTICAST> mtu 1500
  56. ether 52:54:00:6a:87:c5 txqueuelen 1000 (Ethernet)
  57. RX packets 0 bytes 0 (0.0 B)
  58. RX errors 0 dropped 0 overruns 0 frame 0
  59. TX packets 0 bytes 0 (0.0 B)
  60. TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
  61.  
  62. eth2: flags=4098 BROADCAST,MULTICAST> mtu 1500
  63. ether 52:54:00:44:7e:92 txqueuelen 1000 (Ethernet)
  64. RX packets 0 bytes 0 (0.0 B)
  65. RX errors 0 dropped 0 overruns 0 frame 0
  66. TX packets 0 bytes 0 (0.0 B)
  67. TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
  68.  
  69. lo: flags=73 UP,LOOPBACK,RUNNING> mtu 65536
  70. inet 127.0.0.1 netmask 255.0.0.0
  71. inet6 ::1 prefixlen 128 scopeid 0x10<host>
  72. loop txqueuelen 1 (Local Loopback)
  73. RX packets 6 bytes 416 (416.0 B)
  74. RX errors 0 dropped 0 overruns 0 frame 0
  75. TX packets 6 bytes 416 (416.0 B)
  76. TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
  77.  
  78. </pre>
  79.  
  80. **Two slaves ports**
  81.  
  82. # vi ifcfg-slave1
  83.  
  84.  
  85. ```text
  86. DEVICE=eth1
  87. HWADDR=52:54:00:6a:87:c5
  88. DEVICETYPE=TeamPort
  89. ONBOOT=yes
  90. TEAM_MASTER=team0
  91. ```
  92. DEVICE = one of the NIC
  93. HWADDR= MAC addresss of the interface
  94.  
  95. # vi ifcfg-slave2
  96.  
  97.  
  98. ```text
  99. DEVICE=eth2
  100. HWADDR=52:54:00:44:7e:92
  101. DEVICETYPE=TeamPort
  102. ONBOOT=yes
  103. TEAM_MASTER=team0
  104. ```
  105.  
  106. # ifup team0
  107. # ip link show
  108.  
  109. <pre>
  110. 1: lo: LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT qlen 1
  111. link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
  112. 2: eth0: BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT qlen 1000
  113. link/ether 52:54:00:d3:a4:da brd ff:ff:ff:ff:ff:ff
  114. 3: eth1: BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master team0 state UP mode DEFAULT qlen 1000
  115. link/ether 52:54:00:6a:87:c5 brd ff:ff:ff:ff:ff:ff
  116. 4: eth2: BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master team0 state UP mode DEFAULT qlen 1000
  117. link/ether 52:54:00:6a:87:c5 brd ff:ff:ff:ff:ff:ff
  118. 5: team0: BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT qlen 1000
  119. link/ether 52:54:00:6a:87:c5 brd ff:ff:ff:ff:ff:ff
  120.  
  121. </pre>
  122.  
  123. # ping 172.25.25.3
  124.  
  125.  
  126. # teamdctl team0 state
  127.  
  128. <pre>
  129. setup:
  130. runner: activebackup
  131. ports:
  132. eth2
  133. link watches:
  134. link summary: up
  135. instance[link_watch_0]:
  136. name: ethtool
  137. link: up
  138. down count: 0
  139. eth1
  140. link watches:
  141. link summary: up
  142. instance[link_watch_0]:
  143. name: ethtool
  144. link: up
  145. down count: 0
  146. runner:
  147. active port: eth1
  148.  
  149. </pre>
  150.  
  151.  
  152.  
  153. **Problems I faced in teaming:**
  154.  
  155. - I usually do teaming using nmcli but i was geting an Error ""NetworkManager plugin for 'team' unavailable". I googled about it and found it's a bug.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement