动态IP:
我的网卡是realtek公司的产品,solaris10识别为rtls0
获得动态ip命令是
# ifconfig rtls0 dhcp
如果再生成下面两个文件,下次启动时就自动获得IP
# touch /etc/hostname.rtls0
# touch /etc/dhcp.rtls0
查看当前dhcp状态
# ifconfig rtls0 dhcp status
如果是SuSE10.0或者是AS4命令是
# dhcpcd
如果是red hat 9命令是
# dhclient
如果要想下次启动时就自动获得IP,SuSE可以通过yast(yet another setup tool)或者yast2来设置
red hat或fedora可以通过setup命令
静态IP:
ip 10.37.17.136
netmask 255.255.255.0
broadcast 10.37.17.255
router 10.37.17.1
nameserver 202.112.112.100
0. /etc/inet目录下文件权限大都是444,因此chmod 644 filename
1. 修改/etc/inet/hosts
10.37.17.136 msh loghost
2. 修改/etc/inet/ipnodes
10.37.17.136 msh loghost
3. 修改/etc/inet/netmasks
10.37.17.0 255.255.255.0
4. 修改/etc/defaultrouter
10.37.17.1
5. cp /etc/msswitch.dns /etc/msswitch.conf
6. 修改/etc/resolv.conf
nameserver 202.112.112.100
如果要设置临时IP,方法如下:
# ifconfig rtls0 10.37.17.136/24
# route add default 10.37.17.1
# domainname 202.112.112.100
我的网卡是realtek公司的产品,solaris10识别为rtls0
获得动态ip命令是
# ifconfig rtls0 dhcp
如果再生成下面两个文件,下次启动时就自动获得IP
# touch /etc/hostname.rtls0
# touch /etc/dhcp.rtls0
查看当前dhcp状态
# ifconfig rtls0 dhcp status
如果是SuSE10.0或者是AS4命令是
# dhcpcd
如果是red hat 9命令是
# dhclient
如果要想下次启动时就自动获得IP,SuSE可以通过yast(yet another setup tool)或者yast2来设置
red hat或fedora可以通过setup命令
静态IP:
ip 10.37.17.136
netmask 255.255.255.0
broadcast 10.37.17.255
router 10.37.17.1
nameserver 202.112.112.100
0. /etc/inet目录下文件权限大都是444,因此chmod 644 filename
1. 修改/etc/inet/hosts
10.37.17.136 msh loghost
2. 修改/etc/inet/ipnodes
10.37.17.136 msh loghost
3. 修改/etc/inet/netmasks
10.37.17.0 255.255.255.0
4. 修改/etc/defaultrouter
10.37.17.1
5. cp /etc/msswitch.dns /etc/msswitch.conf
6. 修改/etc/resolv.conf
nameserver 202.112.112.100
如果要设置临时IP,方法如下:
# ifconfig rtls0 10.37.17.136/24
# route add default 10.37.17.1
# domainname 202.112.112.100