日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

Solaris配置多个IP

發布時間:2024/1/1 编程问答 29 豆豆
生活随笔 收集整理的這篇文章主要介紹了 Solaris配置多个IP 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
//查看網卡為 net0 root@solaris:~# ifconfig -a lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1inet 127.0.0.1 netmask ff000000 net0: flags=100001000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4,PHYSRUNNING> mtu 1500 index 2inet 172.25.15.202 netmask ffffff00 broadcast 172.25.15.255ether ee:14:60:95:94:9a lo0: flags=2002000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv6,VIRTUAL> mtu 8252 index 1inet6 ::1/128 net0: flags=120002000840<RUNNING,MULTICAST,IPv6,PHYSRUNNING> mtu 1500 index 2inet6 ::/0 ether ee:14:60:95:94:9a //創建文件,并將要添加的IP配置進去 root@solaris:~# touch /etc/hostname.net0:1 root@solaris:~# cat /etc/hostname.net0:1 172.25.15.207 //編輯/etc/hosts文件,將IP和對應的描述編輯進去 root@solaris:~# vi /etc/hosts root@solaris:~# cat /etc/hosts # # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # Internet host table # ::1 solaris localhost 127.0.0.1 solaris localhost loghost 172.25.15.207 new_ip//激活網卡 root@solaris:~# ifconfig net0:1 plumb root@solaris:~# ifconfig net0:1 172.25.15.207 netmask 255.255.255.0 up//再次查看IP信息,已經配置成功,然后驗證是否能ping通此IP root@solaris:~# ifconfig -a lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1inet 127.0.0.1 netmask ff000000 net0: flags=100001000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4,PHYSRUNNING> mtu 1500 index 2inet 172.25.15.202 netmask ffffff00 broadcast 172.25.15.255ether ee:14:60:95:94:9a net0:1: flags=100001000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4,PHYSRUNNING> mtu 1500 index 2inet 172.25.15.207 netmask ffffff00 broadcast 172.25.15.255 lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1inet 127.0.0.1 netmask ff000000 net0: flags=100001000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4,PHYSRUNNING> mtu 1500 index 2inet 172.25.15.202 netmask ffffff00 broadcast 172.25.15.255ether ee:14:60:95:94:9a net0:1: flags=100001000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4,PHYSRUNNING> mtu 1500 index 2inet 172.25.15.209 netmask ffffff00 broadcast 172.25.15.255

如果要配置多個IP,每新增一個IP就要創建一個/etc/hostname.net0:x 文件,x為數字編號;然后把IP和對應的描述添加進/etc/hosts,然后激活網卡。

總結

以上是生活随笔為你收集整理的Solaris配置多个IP的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。