歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Unix知識 >> 關於Unix >> solaris學習日記三基本網絡路由命令

solaris學習日記三基本網絡路由命令

日期:2017/2/28 11:20:31   编辑:關於Unix


配置網卡地址及子接口地址:
ifconfig hme0 192.168.0.1 netmask 255.255.255.0 up #hme0視網卡接口而定
ifconfig hme0:1 plumb
然後再用ifconfig hem0:1給它配上IP地址,如:
ifconfig hme0:1 192.168.1.1 netmask 255.255.255.0 up
路由查看:
netstat -rn
修改路由表:
route add net 192.168.11.0 192.168.11.254 1
route add default 192.168.11.254 1
增加靜態路由:
vi /etc/defaultrouter
192.168.11.254 1
重新關閉/啟動tcp/ip協議進程:
sh /etc/init.d/inetinit stop
sh /etc/init.d/inetinit start
Copyright © Linux教程網 All Rights Reserved