天天看点

Solaris 10 基础网络配置整理

solaris 基础网络配置命令记录如下:

1. 配置ssh允许root登录

vi /etc/sshd/sshd_config 

permitrootlogin yes

重启ssh服务

svcadm restart ssh

2. 网络配置

1) 配置ip地址及主机名

# vi /etc/hosts 

#

::1     localhost       

127.0.0.1       localhost       

192.168.50.200  vmtest  loghost

2)配置主机名

# cat /etc/nodename 

vmtest

3) 配置子网掩码

# cat /etc/netmasks 

192.168.50.0    255.255.255.0

4) 配置网关

# cat /etc/defaultrouter 

192.168.50.2

5) 配置dns解

# mv nsswitch.conf nsswitch.bak

# mv nsswitch.dns nsswitch.conf

配置dns

# cat /etc/resolv.conf

nameserver 202.100.192.68

3. solaris ping命令 

64 bytes from 115.239.210.27: icmp_seq=0. time=122. ms

64 bytes from 115.239.210.27: icmp_seq=1. time=87.9 ms

64 bytes from 115.239.210.27: icmp_seq=2. time=97.2 ms

ctrl+c 取消

继续阅读