网卡设置

网卡设置vi /etc/sysconfig/network-script/ifcfg-eth0

DEVICE=eth0

BOOTPROTO=static

BR0ADCAST=

IPADDR=

NETMASK=

NETWORK=

ONBOOT=

GATEWAY=

USERCTL=yes|no是否允许普通用户控制网卡

PEERDNS=yes|no是否在bootproto为dhcp时候,允许的dhcp的dns

rhel5利用别名控制网卡

        /etc/modprobe.conf

        alias eth0 plnet32

rhel6控制网卡

        /etc/udev/rules.d

        70-presstent-net.runle5

网络服务:

rhel5:/etc/init.d/network

rhel6:/etc/init.d networkmanager该版本不成熟


路由:

        /etc/sysconfig/network-scripts/route-ethX

        添加格式1:

                        dest            via        nethop

        192.168.10.1/24         via                  10.10.0.1

        添加格式2:

        ADDRESS0=

        NETMASK0=

        GATEWAY0=

        第二行记录

        ADDRESS1=

        NETMASK1=

        GATEWAY1=

DNS服务器指定:

        /etc/resolv.conf

        nameserver ip1

        nameserver ip2

        nameserver ip3

ip命令:

        ip link网络接口,网卡属性

        ip addr:协议地址

        ip route:路由

ip link show 看网卡信息,ifconfig -a

ip -s link show统计信息

ip link set eth1 down |up|status

ip addr add|del|show|flush

ip addr add adress dev name 

ip addr add 10.10.1.1 dev eth1


你可能感兴趣的:(用户,alias,网卡,网络服务)