bonding用的是最简单的负载均衡模式,交换机不需要做配置。

https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Installation_Guide/s1-kickstart2-options.html

https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Deployment_Guide/sec-Establishing_a_Bond_Connection.html

pxe

default menu.c32
prompt 0
timeout 100 LABEL centos6
MENU DEFAULT
MENU LABEL 78:2b:cb:69:10:f3
KERNEL centos6/vmlinuz
APPEND initrd=centos6/initrd.img ks=http://install.localhost/kickstart/78:2b:cb:69:10:f3 ksdevice=bond0 bond=bond0:em1,em2:mode=balance-rr,miimon=100 ramdisk_size=102400 console=ttyS1,115200

kickstart

text
keyboard us
timezone Asia/Shanghai
lang en_US.UTF-8
skipx
auth --enableshadow --passalgo=sha512
rootpw --iscrypted $6$MySalt$UbCo5cq7IIOY1nl3phZbW14BsBocTV8ds/UA1nJkfjpdG0D8a7X1dbrh1lkCFw.TVfl3sjswVcuXNAgCrJKcZ. zerombr
bootloader --location=mbr --driveorder=sda part swap --fstype='swap' --ondisk=sda --size=8000
part / --fstype='ext4' --ondisk=sda --size=50000
part /opt --fstype='ext4' --ondisk=sda --size=1 --grow network --bootproto=static --device=bond0 --bondslaves=em1,em2 --bondopts=mode=balance-rr,miimon=100 --onboot=yes --ip=192.168.48.122 --netmask=255.255.255.0 --gateway=192.168.48.1 --nameserver=192.168.48.116 #network --bootproto=dhcp --device=bond0 --bondslaves=em1,em2 --bondopts=mode=balance-rr,miimon=100 --onboot=yes #mode必须使用文字模式,数字模式禁用。network使用dhcp方式时,好象分配不到ip或者dns,导致下载install.img错误。 install
url --url='http://install.local/centos6'
logging level=info firewall --disabled
selinux --disabled
services --disabled=NetworkManager,ip6tables,iptables,postfix,cpuspeed
services --enabled=network
firstboot --disabled
reboot %packages
@base
@core
%end %pre
clearpart --drives=sda --all
/usr/sbin/parted -s /dev/sda mklabel gpt
%end %post
cat > /etc/sysconfig/network-scripts/ifcfg-bond0 << _EOF_
DEVICE=bond0
IPADDR=10.150.1.213
NETMASK=255.255.255.0
ONBOOT=yes
BOOTPROTO=none
USERCTL=no
BONDING_OPTS="mode=balance-rr miimon=100"
_EOF_ cat > /etc/sysconfig/network-scripts/ifcfg-em1 << _EOF_
DEVICE=em1
ONBOOT=yes
BOOTPROTO=none
USERCTL=no
MASTER=bond0
SLAVE=yes
_EOF_ cat > /etc/sysconfig/network-scripts/ifcfg-em2 << _EOF_
DEVICE=em2
ONBOOT=yes
BOOTPROTO=none
USERCTL=no
MASTER=bond0
SLAVE=yes
_EOF_ %end
down vote
accepted
Network bonding : Modes of bonding Modes 0, 1, and 2 are by far the most commonly used among them. Mode 0 (balance-rr) This mode transmits packets in a sequential order from the first available slave through the last. If two real interfaces are slaves in the bond and two packets arrive destined out of the bonded interface the first will be transmitted on the first slave and the second frame will be transmitted on the second slave. The third packet will be sent on the first and so on. This provides load balancing and fault tolerance. Mode 1 (active-backup) This mode places one of the interfaces into a backup state and will only make it active if the link is lost by the active interface. Only one slave in the bond is active at an instance of time. A different slave becomes active only when the active slave fails. This mode provides fault tolerance. Mode 2 (balance-xor) Transmits based on XOR formula. (Source MAC address is XOR’d with destination MAC address) modula slave count. This selects the same slave for each destination MAC address and provides load balancing and fault tolerance. Mode 3 (broadcast) This mode transmits everything on all slave interfaces. This mode is least used (only for specific purpose) and provides only fault tolerance. Mode 4 (802.3ad) This mode is known as Dynamic Link Aggregation mode. It creates aggregation groups that share the same speed and duplex settings. This mode requires a switch that supports IEEE 802.3ad Dynamic link.
Mode 5 (balance-tlb) This is called as Adaptive transmit load balancing. The outgoing traffic is distributed according to the current load and queue on each slave interface. Incoming traffic is received by the current slave. Mode 6 (balance-alb) This is Adaptive load balancing mode. This includes balance-tlb + receive load balancing (rlb) for IPV4 traffic. The receive load balancing is achieved by ARP negotiation. The bonding driver intercepts the ARP Replies sent by the server on their way out and overwrites the src hw address with the unique hw address of one of the slaves in the bond such that different clients use different hw addresses for the server.

balance-rr这类不依赖交换机配置的类型,可以直接使用Kickstart安装。公司有台服务器做的802.3ad绑定,在pxe引导时,卡在dhcp那里,最后dhcp失败。最后我的解决方法是:

1. 解决交换机内网部分的bonding
2. 生成不含bonding的Kickstart,仅配置内网ip
3. 系统安装完成后,登录内网Ip,配置公网部分的bonding
4. 恢复交换机内网部分的bonding
5. 登录公网Ip,配置内网部分的bonding

kickstart bonding安装的更多相关文章

  1. KickStart 无人值守安装系统

    一.简介 1.1 什么是PXE PXE(Pre-boot Execution Environment,预启动执行环境)是由Intel公司开发的最新技术,工作于Client/Server的网络模式,支持 ...

  2. [转]CentOS 6.4下PXE+Kickstart无人值守安装操作系统

    一.简介 1.1 什么是PXE PXE(Pre-boot Execution Environment,预启动执行环境)是由Intel公司开发的最新技术,工作于Client/Server的网络模式,支持 ...

  3. 烂泥:kickstart无人值守安装CentOS6.5

    本文由秀依林枫提供友情赞助,首发于烂泥行天下. 在本次实验进行之前,首先我们要把公司的网络环境进行介绍. 注意这个网络拓扑图,也是生产环境的一个实例.同时服务器192.168.1.214已关闭ipta ...

  4. CentOS6 PXE+Kickstart无人值守安装

    一.简介 1.1 什么是PXE PXE(Pre-boot Execution Environment,预启动执行环境)是由Intel公司开发的最新技术,工作于Client/Server的网络模式,支持 ...

  5. CentOS 6.4下PXE+Kickstart无人值守安装操作系统 转

    一.简介 1.1 什么是PXE PXE(Pre-boot Execution Environment,预启动执行环境)是由Intel公司开发的最新技术,工作于Client/Server的网络模式,支持 ...

  6. RHEL7下PXE+NFS+Kickstart无人值守安装操作系统

    RHEL7下PXE+NFS+Kickstart无人值守安装操作系统 1.配置yum源 vim /etc/yum.repos.d/development.repo [development] name= ...

  7. RHEL7下PXE+Apache+Kickstart无人值守安装操作系统

    RHEL7下PXE+Apache+Kickstart无人值守安装操作系统 1.配置yum源 vim /etc/yum.repos.d/development.repo [development] na ...

  8. RHEL7下PXE+FTP+Kickstart无人值守安装操作系统

    1.配置yum源 vim /etc/yum.repos.d/development.repo [development] name=yum server baseurl=file:///mnt ena ...

  9. CentOS 6.6下PXE+Kickstart无人值守安装操作系统

    一.简介 1.1 什么是PXE PXE(Pre-boot Execution Environment,预启动执行环境)是由Intel公司开发的最新技术,工作于Client/Server的网络模式,支持 ...

随机推荐

  1. cf 645F Cowslip Collections 组合数学 + 简单数论

    http://codeforces.com/contest/645/problem/F F. Cowslip Collections time limit per test 8 seconds mem ...

  2. Imread函数不好使的替用方法

    Mat img = imread("pp.jpg"); || IplImage*iplImg = cvLoadImage("pp.jpg");//由于imrea ...

  3. php命名空间学习

    在一个命名空间中,当 PHP 遇到一个非限定的类.函数或常量名称时,它使用不同的优先策略来解析该名称. 1.类名称总是解析到当前命名空间中的名称.因此在访问系统内部或不包含在命名空间中的类名称时,必须 ...

  4. python(8) 自己制造异常让程序退出,把print的内容写入到文件

    异常 也可以自己输出异常原因: raise Exception("404 404 404") import math import time #print 到文件的代码****** ...

  5. JavaScript: bind apply call

    var foo = function(age,sex){ console.log(this.name,age,sex); }; //call将改变函数运行的context foo.call({name ...

  6. CentOS 6.5 网络配置(转载)

    From:http://blog.csdn.net/leave00608/article/details/19814063 1.配置网卡IP地址 vim /etc/sysconfig/network- ...

  7. Undefined symbols for architecture x86_64 解决之道

    目前临时的解决办法是 1.把1.选中Targets—>Build Settings—>Architectures. 把build active architectures only 改为 ...

  8. Number of Islands

    Given a 2d grid map of '1's (land) and '0's (water), count the number of islands. An island is surro ...

  9. 【在线】Actionbar Style Generator:ActionBar风格生成器

    这个ActionBar风格生成器可以让你轻松地创建一个简洁.有吸引力且无漏洞的自定义actionbar.它会生成所有9种必须的patch assets以及相关XML的drawables和styles文 ...

  10. php mssql 中文各种乱码

    1 查询输出时乱码  (SELECT ) 因为MSSQL 数据库一般都是 GBK 编码,所以在php页面中加入 header('Content-Type:text/html; charset=GBK' ...