Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Example Analysis of solaris10 Network configuration

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly shows you the "sample Analysis of solaris10 Network configuration", which is easy to understand and clear. I hope it can help you solve your doubts. Let me lead you to study and learn the article "sample Analysis of solaris10 Network configuration".

First, the method of modifying the file can be used to set up the network permanently, and the file needs to be restarted after modification.

1. Find out the name of each network: find the entry corresponding to network in the path_to_inst file in the / etc directory

Can use the command: cat / etc/path_to_inst | grep network

The name of the corresponding network card is usually eri hme bge ce, followed by the instance number of the network card, such as the first gigabit network card bge0.

Example: # cat / etc/path_to_inst | grep network

"/ pci@8,700000/network@5,1" 0 "eri"

2. Configure the network card ip: set up under the / etc directory to hostname. The file named by the network card name. Then modify the file and add the corresponding ip so that there is no need to modify the / etc/hosts file.

If there is a gigabit network card bge0: # touch hostname.bge0 # vi hostname.bge0 writes to ip:192.168.0.1

3. Configure the subnet mask: modify the / etc/inet/netmasks file to add the network card ip and its netmask at the end of the file, such as 192.168.0.1 255.255.255.0

4. Configure the default gateway: create a new defaultrouter file in the / etc directory and modify the file to the gateway address. Such as: 192.168.0.254

5. Configure to use dns: create a new resolv.conf file under the / etc directory, and modify the nameserver dnsIP address such as: nameserver 202.97.224.68. You can configure up to 3 dns addresses.

6. Copy / etc/nsswitch.dns to nsswitch.conf or modify the nsswitch.conf file directly, and add dns at the end of hosts and nodes entry in the file. The purpose of this file is to tell the host to use the local hosts file first and then query the dns server when resolving the domain name.

6. If the network card uses dhcp to obtain the network configuration, it is necessary to establish dhcp in the / etc directory. The file with the name of the network card. Such as: dhcp.bge0

Second, adopt the command mode in the system.

1. Use the ifconfig-a command to check the network connection. Whether the network card is enabled, and whether the status is up

2. Load the network card: ifconfig bge0 plumb

3. Enable the network card: ifconfig bge0 up

4. Configure ip and netmask: ifconfig bge0 192.168.0.1 netmask 255.255.255.0

5. Configure the gateway: route add default 192.168.254

6. Configure dhcp: # ifconfig bge0 dhcp start/stop enable / stop dhcp # ifconfig bge0 dhcp status View dhcp status # ifconfig bge0 dhcp release release dhcp configuration

Third, use the sys-unconfig command to reconfigure in the system. This requires re-setting hostname, language, and other information.

Modify the hostname of the system: modify the following four files: / etc/nodename / etc/hostname. Nic name / etc/inet/hosts

/ etc/inet/ipnodes

5. A single network card is bound to multiple IP

1) if the name of the system Nic is / etc/hostname.bge0, add another file, / etc/hostname.bge0:1, and the file content is test

2) add a line to the / etc/hosts file, "192.168.0.1 test", assuming that the new ip is 192.168.0.1 hostname test

3) add a line to the / etc/netsmasks file to record "192.168.0.0 255.255. 255.0"

4) it will take effect as soon as it is resumed. Similarly, add more ip.

The above is all the contents of the article "sample Analysis of solaris10 Network configuration". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report