我在slaris8下好像驱动安装上了,因为在./kernel/drv下有afe和afe.conf这两个文件,请问我如何设置IP?
paradise 回复于:2003-07-22 12:08:35 |
一、配置路由器接口
----1.创建/etc/hostname.interface文件 ----对应每个连接的网络均应有一个hostname.interface文件,其中interface为网卡的代号名。对多网卡的情况interface 应不相同,但对单网卡路由器而言,这些文件的interface是相同的。怎么区别这些文件呢?可以创建hostname.interface:n 文件,用n作区别来虚拟多个网卡。计算机启动时将检测此类文件的个数,如果找到多个hostname.interface文件则认为是路 由器,否则认为是主机。例如一台SUN工作站连接了Inte.net网和内部网,则可对应创建两个文件分为hostname.le0和 hostname.le0:2。 ----2.为接口分配主机名 ----在以上的每个hostname.interface文件中,加入主机名,必须注意对应不同的网络接口,即同一主机须用不同的主机名以 区别不同的IP地址。对于上例,用vi命令编辑两文件分别填入sun1和sun2,实际上是一台主机。 ----3.在/etc/inet/hosts中加入主机名和IP地址,格式为: IPaddresshostname 202.114.209.37 sun1 180.114.20.1 sun2 ----注意IP地址是网卡连接的对应多个网络的不同的IP地址,其中202.114.209.37是主机在Internet上的合法地址,而 180.114.20.1则是内部网上自己分配的地址,内部网上的IP地址不必担心与Internet上重名的IP地址发生冲突,因为上级网 关将视其非法并拒绝给予服务。 ----4.修改/etc/inet/netmasks文件 ----如果路由器与子网相连,还应修改/etc/inet/netmasks并填入本地网号(如129.9.0.0)与屏蔽号(如255.255.255.0)。 二、路由协议选择 ----可采用静态路由协议或动态路由协议如路由信息协议(RIP)和ICMP寻径协议(RDISC)。 ----选用动态路由协议,则可将/etc/defaultrouter文件置为空。路由器将自动与RIP和RDISC交谈,这些协议跟踪路由器并 广播路由信息,让路由器在本地文件模式下工作。这将保证在网络服务器的配置失效后,路由器可以照常工作。 ----若选择静态协议,只需在/etc/defaultrouter文件中填入缺省路由器名,这样当Unix路由器找不到寻径路由时便将IP包发 往缺省路由器。如本例用misrouter作缺省路由器,还需在/etc/inet/hosts中加入其IP地址:202.114.209.19和机器名: misrouter。 三、重新启动计算机 ----计算机启动时,系统内部将调用ifconfig命令对所连接的多个网络进行接口配置,并检测到有多个hostname.interface文 件存在,于是计算机认为自己作路由器。 ----一个单网卡的路由器便配成了,所有的内部网上计算机可以用内部IP地址通信,不受所分配的有限IP地址限制,而与 Internet的通信则通过单网卡的Unix路由器进行。可见它虽是单网卡,却有多个IP地址,实质是利用虚拟接口文件 hostname.interface:n来“冒充”多网卡。 在Solaris x86上如何修改IP地址? (UNIX) 首先应当参看sys-unconfig的介绍,该命令是机器设置的反过程,使机器的重新启动后 可以再次进行设置。同样也可以通过修改下列文件达到这样的目的。 /etc/hostname.le0 网卡le的IP地址 /etc/hosts 网络中主机名的IP地址的对应表 /etc/nsswitch.conf 域名解析的方法及顺序 /etc/resolv.conf DNS Server的地址及域名 /etc/defaultrouter 设置缺省的网关地址 /etc/inet/hosts 网络中主机名的IP地址的对应表 /etc/inet/netmasks 设置网络号及网络掩码 /etc/inet/networks 设置网络名 Solaris如何网卡IP地址? http://www.fanqiang.com (2001-05-12 15:54:00) ? ifconfig ifconfig用于配置网卡地址,改动后立即生效,但并不保存配置,下次启动后失效。 # ifconfig -a lo0: flags=849 mtu 8232 inet 127.0.0.1 netmask ff000000 hme0: flags=863 mtu 1500 inet 172.16.255.2 netmask ffff0000 broadcast 172.16.255.255 ether 8:0:20:ee:11:51 #ifconfig hme0 172.16.3.3 netmask 255.255.255.0 #ifconfig –a lo0: flags=849 mtu 8232 inet 127.0.0.1 netmask ff000000 hme0: flags=863 mtu 1500 inet 172.16.3.3 netmask ffffff00 broadcast 172.16.3.255 ether 8:0:20:ee:11:51 ? /etc/hosts 想要永久更改配置,则要更改配置文件,以网卡hme0为例: #more /etc/hostname.hme0 Sunland #more /etc/hosts 127.0.0.1 localhost 172.16.255.2 Sunland loghost #vi /etc/hosts #more /etc/hosts 127.0.0.1 localhost 172.16.3.3 Sunland loghost #more /etc/netmasks # # The netmasks file associates Internet Protocol (IP) address # masks with IP network numbers. # # network-number netmask # # The term network-number refers to a number obtained from the Internet Network # Information Center. Currently this number is restricted to being a class # A, B, or C network number. In the future we should be able to support # arbitrary network numbers per the Classless Internet Domain Routing # guidelines. # # Both the network-number and the netmasks are specified in # "decimal dot" notation, e.g: # # 128.32.0.0 255.255.255.0 #vi /etc/netmasks #more /etc/netmasks # # The netmasks file associates Internet Protocol (IP) address # masks with IP network numbers. # # network-number netmask # # The term network-number refers to a number obtained from the Internet Network # Information Center. Currently this number is restricted to being a class # A, B, or C network number. In the future we should be able to support # arbitrary network numbers per the Classless Internet Domain Routing # guidelines. # # Both the network-number and the netmasks are specified in # "decimal dot" notation, e.g: # # 128.32.0.0 255.255.255.0 172.16.3.0 255.255.255.0 #reboot |
guoxiaolei 回复于:2003-07-22 15:16:48 |
谢谢,成功了! |
robig 回复于:2003-08-22 22:14:12 |
哪里找的驱动啊,Dlink的网站说530tx不支持solaris,只有530tx+可以 |
延伸阅读
文章来源于领测软件测试网 https://www.ltesting.net/