5/27/2012

設定 SuSE Linux Enterprise Server bonding 介面

 

xxooxp:/etc/sysconfig/network # mkdir ~/worktmp
xxooxp:/etc/sysconfig/network #
xxooxp:/etc/sysconfig/network # mv ifcfg-eth0 ifcfg-eth1 ~/worktmp/.
xxooxp:/etc/sysconfig/network #

xxooxp:/etc/sysconfig/network # ls /proc/net/bonding/
xxooxp:/etc/sysconfig/network # cat <<EOF > /etc/sysconfig/network/ifcfg-bond0
> BONDING_MASTER='yes'
> BONDING_MODULE_OPTS='mode=active-backup miimon=100'
> BOOTPROTO='static'
> BROADCAST=''
> ETHTOOL_OPTIONS=''
> IPADDR='192.168.75.11/24'
> MTU=''
> NAME=''
> NETWORK=''
> REMOTE_IPADDR=''
> STARTMODE='auto'
> USERCONTROL='no'
> BONDING_SLAVE0='eth0'
> BONDING_SLAVE1='eth1'
> EOF
xxooxp:/etc/sysconfig/network # service network restart
xxooxp:/etc/sysconfig/network #
xxooxp:/etc/sysconfig/network # ip addr show bond0
xxooxp:/etc/sysconfig/network #
xxooxp:/etc/sysconfig/network # ls /proc/net/bonding
xxooxp:/etc/sysconfig/network # cat /proc/net/bonding/bond0



 

5/26/2012

SLES Disable IPv6

 

直接編輯 /etc/modprobe.d/50-ipv6.conf 這個檔案就可以.

停用 IPv6

[root@rh6 ~]# cat /etc/modprobe.d/50-ipv6.conf
install ipv6 /bin/true

 

啟用IPv6

[root@rh6 ~]# cat /etc/modprobe.d/50-ipv6.conf
#install ipv6 /bin/true


RHEL 5, 6 Disable IPv6

 

  1. 檢查IPv6目前是否有載入了.

    [root@rh6 ~]# lsmod | egrep 'ipv6'
    [root@rh6 ~]# ip addr show | egrep 'inet6'


  2. 編輯 conf 檔..有3個方法達成同樣的效果. (no-ipv6.conf 檔要自己建立)

    方法1:
    [root@rh6 ~]# cat /etc/modprobe.d/no-ipv6.conf
    alias net-pf-10 off
    alias ipv6 off

    方法2:
    [root@rh6 ~]# cat /etc/modprobe.d/no-ipv6.conf
    install ipv6 /bin/true

    方法3:
    [root@rh6 ~]# cat /etc/modprobe.d/no-ipv6.conf
    options ipv6 disable=1

  3. 編輯 /etc/sysconfig/network

    [root@rh6 ~]# cat /etc/sysconfig/network
    NETWORKING=yes
    HOSTNAME=xxooxp.blogspot.com
    GATEWAY=172.16.1.254
    NETWORKING_IPV6=off

  4. 關閉 ip6tables

    [root@rh6 ~]# service ip6tables stop
    [root@rh6 ~]# chkconfig ip6tables off

  5. 重新開機,讓設定生效.

    [root@rh6 ~]# shutdown –r now

  6. 確認重開機後,ipv6 就不會載入了.

    [root@rh6 ~]# lsmod | egrep 'ipv6'
    [root@rh6 ~]# ip addr show | egrep 'inet6'