zoukankan      html  css  js  c++  java
  • Solaris 网络 配置

    1. ifconfig -a查看接口的名字

    -bash-3.00# ifconfig -a

    lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1

            inet 127.0.0.1 netmask ff000000

    pcn0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2

            inet 10.85.10.78 netmask ffffff00 broadcast 10.85.10.255

            ether 0:c:29:36:9a:82


    打开网络接口文件查看接口的名称
    -bash-3.00# more /etc/hostname.pcn0

    david


    2. 修改host文件,使ip地址和接口一一对应
    -bash-3.00# more /etc/hosts

    ::1     localhost

    127.0.0.1       localhost

    10.85.10.78     david   loghost

     


    3. 修改netmask
    more/etc/netmsks
    #more netmasks
    10.85.10.0 255.255.255.0


    4. 修改默认网关
    -bash-3.00# more /etc/defaultrouter

    10.85.10.165

     


    5. 修改dns客户端
    -bash-3.00# more resolv.conf

    domain mysf

    nameserver 218.104.78.2


    6. 修改 /etc/nsswitch.conf 12

    -bash-3.00# more /etc/nsswitch.conf

    # You must also set up the /etc/resolv.conf file for DNS name

    # server lookup.  See resolv.conf(4).

    hosts: files dns

     

    hosts:file改为hosts:filedns ,注意中间有空格.


    7. 然后重启网络

    -bash-3.00# ifconfig pcn0 down

    -bash-3.00# ifconfig pcn0 up

     

    道森Oracle,国内最早、最大的网络语音培训机构,我们提供专业、优质的Oracle技术培训和服务! 我们的官方网站:http://www.daosenoracle.com 官方淘宝店:http://daosenpx.taobao.com/
  • 相关阅读:
    UVA——A Spy in the Metro(线性dp)
    IDEA运行jsp文件变成源码详细解决方案
    CF1105C Ayoub and Lost Array(dp+矩阵快速幂优化)
    牛客练习赛75——A广义肥波
    void * 指针和const 指针
    详解getchar()函数与缓冲区
    深入了解scanf() getchar()和gets()等函数之间的区别
    字符串和指针注意
    指针
    数组和字符串的小结
  • 原文地址:https://www.cnblogs.com/tianlesoftware/p/3610219.html
Copyright © 2011-2022 走看看