简体   繁体   中英

How to permanenty save sub interface IP (logic/virual interface) on solaris

I am using Solaris 10. I want to add sub interface (including ip and mask) and save it to keep it when server reboot (Ex: Bge0:1, Bge0:2...)

General, I am use NetConf to add sub interface and assign iP for it, but it is too long for add multiple Interfaces.

Is there other way to do it like creating a file and runing it. Thanks.

Add in /etc files like hostname.bge0:1 and so on with appropriate information

yourhostname netmask + broadcast + up 

Also you need to add in /etc/hosts pairs for those hostnames

<your IP> yourhostname 

Then plumb the interface

ifconfig bge0:1 plumb

and then up it

ifconfig bge0:1 `cat /etc/hostname.bge0:1`

Do not forget to add appropriate netmask record in /etc/netmasks

<your IP network> <your IP network netmask>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM