关于netmask, /etc/netmasks 和 ifconfig -a 不一样
碰到下面的问题,请哪位帮帮忙,先谢谢了。Solaris10 x86 和 Solaris8 sparc 混合的环境, Server 是 Solairs10的,Clients 是两种都有。
所有的设置都一样:
IP range: 10.19.239.xxx
/etc/netmasks 10.19.239.0 255.255.240.0
/etc/defaultrouter 10.19.224.1
在Server上:
# ifconfig -a
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
e1000g0: flags=201000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4,CoS> mtu 1500 index 2
inet 10.19.239.211 netmask ff000000 broadcast 10.255.255.255
ether 0:15:17:e3:4b:10
在Client上:
# ifconfig -a
lo0: flags=1000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4> mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
bge0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
inet 10.19.239.205 netmask ffffff00 broadcast 10.19.239.255
ether 0:14:4f:f:ff:db
Server上的netmask变成了255.0.0.0 broadcast 10.255.255.255, 而在Clients上却成了255.255.255.0 broadcast 10.19.239.255,
Server可以和其他subnet通话, Clients不可以,我只好用ifconfig命令:
ifconfig bge0 down
ifconfig beg0 netmask 255.0.0.0 broadcast 10.255.255.255
ifconfig bge0 up
请问这是什么原因呢? 我怎么解决? 谢谢。 if your netmask is 255.255.255.240, then your network 10.19.239.0 is invalid (239 is out of the range. it should be between 0-224). That is why the netmask in /etc/netmasks is not taken. 谢谢Brian,
我在安装机器的时候用的netmasks 255.255.240.0, 10.19.239.0是自动生成的,因为系统都是在10.19.239 subnet。
IP 和 netmask 都是客户提供给我的, 我需要修改netmask么? 谢谢 When you install your machine, you need to give an IP address (or DHCP, which is not your case). Machine will never be able to 自动生成 a network based on netmask only. Tell your 客户 10.19.239.0 network and 255.255.240.0 netmask is a wrong match. If 客户 insists to use 239 network, you can make your netmask 255.255.0.0. However, this will broadcast packets to all class B network. From the default gateway 10.19.224.1, it looks like the network was intended to be 10.19.224.0. 学习一下。:em27: Hi Brian, 谢谢。
系统没有用DHCP, 都有static IP, Server 10.19.239.211, Clients from 10.19.239.204 ~ 10.19.239.208, sys-unconfig时加netmask 255.255.240.0, defaultrouter 10.19.224.1
/etc/netmasks, /etc/defaultrouter 设置完全一样,但“ifconfig -a" 的结果不一样:
netmask ff000000 broadcast 10.255.255.255
netmask ffffff00 broadcast 10.19.239.255
我曾经看到过这样一句话, If the entry in /etc/defaultrouter is outside the subnet it will ignore the /etc/netmasks file and set a mask which allows it to talk to the router.
如果是这样,router 10.19.224.1, 那么ifconfig应该显示netmask ffff0000, 这样算对么?
其实我是一周前才把老的sparc server 和 其中 2 个sparc clients upgrade 到 新的 x86 Solaris10 的, 在这之前也是用的以上设置,工作却是正常的,我在想是不是应该在 /etc/rc2.d 下加一个Sxxxxxx把ifconfig down....ifconfig up 加进去。
客户的IT dept 是 out-sourcing, 和health department有合同,很难打交道,头痛的。
如果您能给我们讲一下如何计算IP 和 netmask 的关系,那就最好了, 谢谢。 本帖最后由 yiguihuo 于 2011-10-26 14:48 编辑
看了你的问题我就不明白了,你这配置简直是随心所欲想怎么设就怎么设呀,你要根据你网络的环境设置呀,给你服务器分配的交换机端口是什么样你就要相应怎么设置,不然交换机端口配置是10.0.0.0的子网,你非要给服务器用个10.19.224.0的子网,上面又没有路由可不根其他子网不能通信
你的设置
应用:10.19.239.x
子网掩码:255.255.240.0/20
子网地址:10.19.224.0
地址范围:10.19.224.1-10.19.239.254
如果服务器接交换机端口是10.19.224.0/20子网,并且上面有路由
server 10.19.239.211 netmasks 10.19.239.0 255.255.240.0
clients 10.19.239.205 netmasks 10.19.239.0 255.255.240.0
如果就是10.0.0.0的子网那就直接255.255.255.0 make a simple change to your /etc/netmasksfile as follow and restart your network or reboot your machine should work
10.19.224.0 255.255.240.0 建议楼主看看CCNA的知识 谢谢楼上的,
IP, netmask, 和defaultrouter 都是客户提供的,是另外一家IT公司做的,我们肯定是不能改的。
Hi Brian,如果我把/etc/netmasks 从 10.19.239.0 255.255.240.0 改成 10.19.224.0255.255.240.0, 而Server和所有的Clients都在10.19.239 subnet下,会不会造成Clients都不能和Server talk, 不能正常起来呢?
谢谢。
页:
[1]
2