免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 4433 | 回复: 9
打印 上一主题 下一主题

Solaris网络管理(原创) [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2003-10-30 11:14 |只看该作者 |倒序浏览
一、路由和网关
1)通过文件增加
文件:/etc/gateways
格式:<dest. net>; <gateway>; <netmasks>; metric <count>;
描述:添加路由表记录
     dest. net                目标网段
     gateway                下一跳路由器的地址
     count                跳数

2)route命令
命令格式:route add|delete [host|net] destination [gateway
举例:
Add a route
        #route add  -net 10.50.3.0 10.168.1.1 1
Delete a route
        #route delete -net  10.50.2.0 10.168.1.2
3)缺省路由
文件:/etc/defaultrouter
描述:防止不必要的路由进程
适用于只有一个路由器通向其它网段
单一路由占用较小的路由表资源
4)查看路由
举例:
# netstat -r
Routing Table:
Destination        Gateway                Flags        Ref        Use        Interface
-----------                ----------                -----        ---        ---        ---------
localhost                localhost                UH        0        2272        lo0
202.96.0.0                192.168.12.1        U        3        562        le0
10.103.0.0                192.168.12.2        U        3        562        le0

                二、网络地址和掩码
1)文件:/etc/hostname.interface
接口描述:
网卡型号
十兆网卡:le
百兆网卡:hme
2)文件:/etc/hosts
功能描述:
系统名与IP地址的映射
与/etc/hostname.interface 协同工作,配置本机网卡地址
举例:
# more /etc/hosts
127.0.0.1        localhost        loghost
10.12.255.1        xiaojg
10.13.255.1        xiaojg
3)文件:/etc/netmasks
功能描述:
将网络的IP地址与网络地址联系一起,划分子网
如果是标准网段,则不需要配置
4)命令:ifconfig
举例:
检测网络端口状态
        #ifconfig -a
配置网络端口地址
        #ifconfig le0 10.16.25.1 netmask 255.255.255.0
配置网络端口状态
        #ifconfig le0 up/down
配置网络端口是否可用
        #ifconfig le0 plumb/unplumb
5)文件:/etc/services
功能描述:
网络服务协议的端口号
网络协议的服务类型
举例:
#more /etc/inet/services
ftp-data        20/tcp
ftp        21/tcp
telnet        23/tcp
smtp        25/tcp        mail
sunrpc        111/udp        rpcbind
sunrpc        111/tcp        rpcbind
6)文件:/etc/inetd.conf
功能:管理系统的各种服务
格式:
<service_name>;  <socket_type>;  <proto>;  <flags>;  <user>;  <server_pathname>;  <args>;
举例:
# cat /etc/inet/inetd.conf
ftp        stream        tcp        nowait        root        /usr/sbin/in.ftpd        in.ftpd
telnet        stream        tcp        nowait        root        /usr/sbin/in.telnetd        in.telnetd
login        stream        tcp        nowait        root        /usr/sbin/in.rlogind        in.rlogind
talk        dgram        udp        wait        root        /usr/sbin/in.talkd        in.talkd

论坛徽章:
0
2 [报告]
发表于 2003-10-30 11:29 |只看该作者

Solaris网络管理(原创)

good,3q~~

论坛徽章:
1
2016科比退役纪念章
日期:2016-05-26 15:48:47
3 [报告]
发表于 2003-10-30 11:32 |只看该作者

Solaris网络管理(原创)

虽说很简单,但是还是化了心思整理的。支持原创,顶一个!!

论坛徽章:
0
4 [报告]
发表于 2003-10-30 11:32 |只看该作者

Solaris网络管理(原创)

怎么没有DNS部分的内容?

论坛徽章:
0
5 [报告]
发表于 2003-10-30 11:55 |只看该作者

Solaris网络管理(原创)

相应斑竹的号召,增加DNS的内容
               三、DNS
1)DNS客户端的配置
文件:etc/resolv.conf
举例:
# more /etc/resolv.conf
nameserver        192.16.25.3
domainname        xiaojg.com.cn
文件:/etc/nsswitch.conf
举例:# more /etc/nsswitch.conf
#
# /etc/nsswitch.dns:
#
# An example file that could be copied over to /etc/nsswitch.conf; it uses
# DNS for hosts lookups, otherwise it does not use any other naming service.
#
# "hosts:" and "services:" in this file are used only if the
# /etc/netconfig file has a "-" for nametoaddr_libs of "inet" transports.

passwd:     xiaojg
group:      xiaojg
# You must also set up the /etc/resolv.conf file for DNS name
# server lookup.  See resolv.conf(4).
hosts:      xiaojg dns
ipnodes:    xiaojg

命令:nslookup
描述:
用于查询DNS服务器
用于验证客户端的设置
用于下载DNS数据库
举例:
# nslookup
Default Server:  ns.zjhzptt.net.cn
Address:  202.96.96.68

>; www.sun.com
Server:  ns.shptt.net.cn
Address:  202.96.96.68

Non-authoritative answer:
Name:    www.sun.com
Address:  192.18.97.241

论坛徽章:
0
6 [报告]
发表于 2003-10-30 12:57 |只看该作者

Solaris网络管理(原创)

DNS服务器的配置也加上嘛,顶一下。

论坛徽章:
1
处女座
日期:2013-08-19 15:17:06
7 [报告]
发表于 2003-10-30 12:57 |只看该作者

Solaris网络管理(原创)

原帖由 "youzhipiao" 发表:
相应斑竹的号召,增加DNS的内容
               三、DNS
1)DNS客户端的配置
文件:etc/resolv.conf
举例:
# more /etc/resolv.conf
nameserver        192.16.25.3
domainname        xiaojg.com.cn
文件:/etc/nsswitch..........

"用于下载DNS数据库 "
请教nslookup是如何下载的?

论坛徽章:
0
8 [报告]
发表于 2003-11-04 12:20 |只看该作者

Solaris网络管理(原创)

论坛徽章:
0
9 [报告]
发表于 2012-03-29 14:27 |只看该作者
楼主好人啊 用上了

论坛徽章:
20
CU大牛徽章
日期:2013-04-17 11:48:26羊年新春福章
日期:2015-03-10 22:39:202015年中国系统架构师大会
日期:2015-06-29 16:11:282015亚冠之平阳省
日期:2015-07-31 09:19:042015七夕节徽章
日期:2015-08-21 11:06:17IT运维版块每日发帖之星
日期:2015-09-30 06:20:002015亚冠之柏太阳神
日期:2015-10-19 20:29:5915-16赛季CBA联赛之天津
日期:2016-11-29 14:03:4315-16赛季CBA联赛之北控
日期:2016-12-24 20:51:492015年辞旧岁徽章
日期:2015-03-03 16:54:15双鱼座
日期:2015-01-12 20:58:532014年中国系统架构师大会
日期:2014-10-14 15:59:00
10 [报告]
发表于 2012-09-18 20:40 |只看该作者
虽然不学solaris 但也要顶一下
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP