Solaris 10网络配置

本文详细介绍如何在Solaris操作系统中进行网络配置,包括查看网卡信息、禁用及启用网卡、设置IP地址和子网掩码等步骤,并提供配置文件示例。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Solaris学习之网络配置

在虚拟机上安装好Solaris操作系统后,首先要进行网络配置,让系统能连上互联网。

1、首先查看网卡名称命令:#dladm show-link(后面配置需要用到网卡名称)

     eg:

      e1000g0         type: non-vlan  mtu: 1500       device: e1000g0

      e1000g1         type: non-vlan  mtu: 1500       device: e1000g

2、查看系统网卡使用情况:#ifconfig -a

3、禁用网卡:#ifconfig e1000g0 unplumb

4、启用网卡:#ifconfig e1000g0 plumb

5、添加ip和子网掩码:ifconfig e1000g0 inet 10.1.3.23 netmask 255.255.255.0

6、以下进行文件配置

     (1)、/etc/defaultrouter添加默认路由,注:defaultrouter文件需要自己建

               bash-3.00# more defaultrouter

                   10.1.3.254

                    bash-3.00#

       (2)、/etc/hostname.e1000g0为网卡添加主机名,注:和下面nodename文件里的主机名一致

                   bash-3.00# more hostname.e1000g0

                   solaris

                   bash-3.00#

       (3)、/etc/nodename主机名

                  bash-3.00# more nodename

                  solaris

                  bash-3.00#

        (4)、/etc/hosts

                 bash-3.00# more hosts

                 #

                 # Internet host table

                 #

                 ::1     localhost      

                 127.0.0.1       localhost      

                 10.1.3.23       solaris  loghost

                  bash-3.00#
         (5)、/etc/resolv.conf设置域名和dns,最多可以添加三个

                 bash-3.00# more resolv.conf

                 domain china.com

                 nameserver 10.1.10.1

                 bash-3.00#

       (6)、/etc/nsswitch.conf更改,在hosts file 后面添加dns

                 hostsfile dns

          (7)、/etc/netmasks加入网段和掩码

                10.1.3.0        255.255.255.0

    若以上配置成功,重启计算机,vmsolaris系统可以上网

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值