Solaris Modify IP Address

Source: Internet
Author: User
Tags nameserver

Solaris 10 modifying NIC IP address
Modified before IP bash-3.00# ifconfig-a lo0:flags=2001000849<up,loopback,running,multicast,ipv4,virtual> MTU 8232 index 1 inet 127.0.0.1 netmask ff000000 e1000g0:flags=1000843<up,broadcast,running,multicast,ipv4> MTU in Dex 2 inet 192.168.1.119 netmask ffffff00 broadcast 192.168.1.255 ether 0:c:29:11:af:6c
1, modify/etc/hosts file bash-3.00# VI hosts "hosts" [Read only] 5 lines, Characters # # # Internet Host Table # 127 .0.0.1 localhost 192.168.1.118 orca loghost
2, modify/etc/hostname.pcn0 change the IP address of the network card for example: 192.168.180.80
    3, modifying/etc/inet/ipnodes   bash-3.00# pwd   /etc/inet    bash-3.00# vi ipnodes     "Ipnodes"  [Read only]  6 lines, 91 characters    #   # internet host  table   #   ::1     localhost    127.0.0.1       localhost   192.168.1.118    Orca  loghost 
   4, modify/etc/netmasks   bash-3.00# pwd   /etc    bash-3.00# vi netmasks       ---Due to the modified IP and previously the same network segment, So the files here can not be modified     "Netmasks"  [read only] 15 lines, 382 characters     #   # 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.   #   # both the network-number and  the netmasks are specified in   #  "Decimal dot"  notation, e.g:   #    #                128.32.0.0 255.255.255.0   #   192.168.1.0      255.255.255.0
5, modify/etc/defaultrouter bash-3.00# pwd/etc bash-3.00# VI defaultrouter---because this modified IP and previously the same network segment, so the file here can not need to modify "Def Aultrouter "1 line, characters 192.168.1.254
6. Restart Init 6



Solaris 10 modified IP address (online search for more reliable)
2, the permanent change of IP address needs to modify the following several files/etc/hosts add machine name and IP address for example: 192.168.180.80 solaris/etc/(Hosts networks netmasks) changed 3 File three files are initially read-only, so add Modify permissions
/etc/hostname.pcn0 Change the IP address of the NIC, for example: 192.168.180.80
/etc/defaultrouter Join the Gateway for example: 192.168.180.1
/etc/resolv.conf join a DNS server for example: nameserver 202.96.128.68 nameserver 202.106.196.115
Modify the file/etc/nsswitch.conf find this line hosts:files modified to hosts:files DNS that domain name can not be found in/etc/hosts, will go to DNS resolution.
Reboot after the change is complete.
Change the network card/Add a network card, the system does not automatically start the interface service, you need to manually create the network Port service: #ifconfig pcn0 Plumb can create a network port service for the interface Pcn0 accordingly, with the ifconfig with Unplumb parameters can stop the service and shut down the network
If you just have a more hostname, you only need to modify the following files:/etc/hosts/etc/nodename/etc/hostname., for example:/etc/hostname.igb0


Solaris Modify IP Address

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.