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. NeHe OpenGL教程 第三十五课:播放AVI

    转自[翻译]NeHe OpenGL 教程 前言 声明,此 NeHe OpenGL教程系列文章由51博客yarin翻译(2010-08-19),本博客为转载并稍加整理与修改.对NeHe的OpenGL管线 ...

  2. c++学习-字符串

    字符数组和 string类型比较的区别 #include<iostream> #include<string> using namespace std; class area{ ...

  3. 安装java开发环境jdk,安装JDK

    JDK可以理解为翻译官,它将Java高级语言翻译为二进制执行. JDK可以编译文件,编译后的文件扩展名为.class. 只要能支持JDK的地方,JAVA就可以运行,这就是JAVA跨平台的性质. 我的是 ...

  4. iOS字符串加密至MD5&及获取文件MD5

    iOS 字符串加密至MD5 #import <CommonCrypto/CommonDigest.h> + (NSString *) md5:(NSString *)str { const ...

  5. Python中作Q-Q图(quantile-quantile Plot)

    Q-Q图主要可以用来回答这些问题: 两组数据是否来自同一分布 PS:当然也可以用KS检验,利用python中scipy.stats.ks_2samp函数可以获得差值KS statistic和P值从而实 ...

  6. Linux文件夹文件创建、删除

    Linux删除文件夹命令 linux删除目录很简单,很多人还是习惯用rmdir,不过一旦目录非空,就陷入深深的苦恼之中,现在使用rm -rf命令即可.直接rm就可以了,不过要加两个参数-rf 即:rm ...

  7. MYSQL C API : mysql_init()

    MYSQL * mysql_init(MYSQL *mysql); // 初始化一个MYSQL 连接的实例对象 void mysql_close(MYSQL *sock); // 释放一个MYSQL ...

  8. Java中this关键字在构造方法中的使用

    1. Java中this关键字代表对象本身.用this关键字可以在类的内部调用属性和方法,这样代码的可读性比较高,因为它明确的指出了这个属性或方法的来源. 2. 同时在构造函数中也可以使用this关键 ...

  9. sql执行返回值存储

    List<Map> list = SqlRunner.queryMapList(sql); if(list != null && !list.isEmpty()){ Has ...

  10. DELPHI下的SOCK编程(转)

    DELPHI下的SOCK编程      本文是写给公司新来的程序员的,算是一点培训的教材.本文不会涉及太多的编程细节,只是简单讲解在DELPHI下进行Winsock编程最好了解的知识. 题外话:我认为 ...