Solaris Basic Network Management Training

Source: Internet
Author: User
Tags nameserver nslookup nslookup command
Solaris basic network management training-Linux Enterprise Application-Linux server application information. For details, refer to the following section. Chapter 1 network address and mask
1./etc/hostname. interface

The Interface is the model of the NIC, including le and hme. Le is a 10-Gigabit Nic, and hme is a 10-Gigabit Nic. Followed by a number. The first 10 MB Nic is le0, the second is le1, the second is hme0, and the second is hme1.
The file content is the name of this Nic, such as Sunrise and Sunny.
# More/etc/hostname. le0
Sunrise
# More/etc/hostname. hme0
Sunny

2./etc/hosts file

System name and IP address ing
Work with/etc/hostname. interface to configure the NIC address of the Local Machine
# More/etc/hosts
127.0.0.1 localhost loghost
172.16.255.1 Sunrise
172.18.255.1 Sunny

The system name is not the machine name, and the machine name is unique. To change the machine name, run the command hostname.
With/etc/hostname. interface and/etc/hosts files, the system will know how to configure the NIC. For example, the first MB Nic is named Sunny and its corresponding address is 172.18.255.1.

3./etc/netmasks File

Associate the IP address of the network with the IP address and divide the subnet.
If it is a standard CIDR block, you do not need to configure

Standard CIDR Block:
Network A: 0-127 (127 for local address) mask: 255 .. 0.0.0
Network B: 128-191 mask: 255.255.0.0
Class C Network: 192-223 mask: 255.255.255.0
Class D network: 224-254 (for multi-access broadcast)

To configure a Class B address: 172.16.255.1 mask: 255.255.255.0, enter 172.16.255.0 255.255.255.0 in the/etc/netmasks file.

4. ifconfig command

Detect Network port status
# Ifconfig-
Configure the network port address
# Ifconfig le0 172.16.255.1 netmask 255.255.255.0
Configure the network port status
# Ifconfig le0 up/down
Configure whether the network port is available
# Ifconfig le0 plumb/unplumb

5. ping Command

Detect Network Status
Test network speed

Chapter 2 Network Services

1./etc/services file

Port Number of the network service protocol
Network protocol service type

# Cat/etc/inet/services
Ftp-data 20/tcp
Ftp 21/tcp
Telnet 23/tcp
Smtp 25/tcp mail
Sunrpc 111/udp rpcbind
Sun RPC 111/tcp rpcbind
...

Each TCP/IP application layer service, such as FTP or Telnet, has a port number on the transport layer. The/etc/services file contains the static port numbers corresponding to each identifiable service protocol. The application should identify itself to the transport provider and remote peer entity using the unique allocated port number.
Each item in the file is composed of the service name, the relevant port number, and the transmission protocol provider. Some services can run on both TCP and UDP. This service is listed twice.

2./etc/inetd. conf file


# Cat/etc/inet/inetd. conf
Ftp stream tcp nowait root/usr/sbin/in. ftpd in. ftpd
Telnet stream tcp nowait root/usr/sbin/in. telnetd in. telnetd
Login stream tcp nowait root/usr/sbin/in. rlogind in. rlogind
Talk dgram udp wait root/usr/sbin/in. talkd in. talkd
...

UNIX does not let every service daemon wait for a request on its own port. Instead, it sends a task that represents the request of each service daemon to a service process named inetd. In this way, the usage of system resources can be greatly reduced. A super service process calls the daemon process of the service only when a service request is found. The/etc/inetd. conf configuration file allows inetd to determine which services will wait for service requests at startup. If the daemon of a service is not included in the inetd. conf file, the request is discarded when inetd receives the request from the service.
File field:
Service_name is the identifier of the service listed in the file/etc/services.
Socket_type indicates the type of the data transmission service used.
Proto identifies the name of the transport protocol. Is UPD and TCP
Flags can be set to "Waiting" and "not waiting ". If it is set to "Waiting", when inetd resumes other requests on the listening port, it must wait for the server protocol to release the connection to the network. "Not waiting" enables inetd to immediately listen to other requests. Most TCP Protocols adopt the "not waiting for" method, while UDP adopts the "Waiting" method.
User indicates the user name that calls the service.
Server_pathname indicates the complete path name of the service program that inetd must call when responding to the relevant service request.
Args This domain includes the command line parameters used by the Service Program. Start with the program name and follow the parameters set by the user.

Chapter 3 routing and gateway

1./etc/defaulrouter File

Configure the Default Gateway
Prevent unnecessary routing Processes
Applicable to the scenario where only one vro leads to another CIDR block.
A single route occupies a small number of route table resources.

This file stores the default route information. This file is not found during system installation and is created by the user. The file content is the default route address.
# Cat/etc/defaultrouter
172.16.255.254

Advantages:
Only one route entry occupies less resources.

2./etc/gateways File

Route table File
Net gateway metric
Dest. net destination CIDR Block
IP address of the next hop router of the router
Count hops

3. route command

Route add | delete [host | net] destination [gateway]
Add a route
# Route add net 128.50.3.0 192.168.1.1 1
Delete a route
# Route delete net 128.50.2.0 192.168.12.2

4. view the route table

# Netstat-r
Routing Table:
Destination Gateway Flags Ref Use Interface
-----------------------------------------
Localhost UH 0 2272 lo0
202.96.0.0 192.168.12.1 U 3 562 le0
10.103.0.0 192.168.12.2 U 3 562 le0
#
Destination target network or host
Host for Gateway data packet forwarding
The status of the Flags route. This parameter has the following options:
U port is active (up)
H. The target is a host, not a network segment.

Ref number of Route entries owned by the same network interface address
The number of packages that Use this route. For localhost, this number indicates the number of packets received.
Network Interface of the Interface route

Chapter 4 DNS Client settings

1./etc/resolv. conf file

Record the DNS server address and domain name
Keywords:
Domainname
Nameserver
# More/etc/resolv. conf
Nameserver 172.16.20.3
Domainname sunrise.com.cn

2./etc/nsswitch. conf file

Records information such as the search sequence of the host name.
# More/etc/nsswitch. conf
#
#/Etc/nsswitch. dns:
#
# An example file that cocould be copied over to/etc/nsswitch. conf; it uses
# DNS for hosts lookups, otherwise it does not use any other naming service.
#
# "Hosts:" and "services:" in this file are used only if
#/Etc/netconfig file has a "-" for nametoaddr_libs of "inet" transports.

Passwd: files
Group: files
# You must also set up the/etc/resolv. conf file for DNS name
# Server lookup. See resolv. conf (4 ).
Hosts: files dns
Ipnodes: files
...
...

Configure the hosts record of this file to hosts: files dns

3. nslookup command

Used to query DNS servers
Used to verify client settings
Used to download a DNS database

# Nslookup
Default Server: ns.zjhzptt.net.cn
Address: 202.96.96.68

> Www.sun.com
Server: ns.zjhzptt.net.cn
Address: 202.96.96.68

Non-authoritative answer:
Name: www.sun.com
Address: 192.18.97.241

>
At startup, nslookup targets local servers by default. The response contains the name and address of the target server.
> Yes, which means you can start sending name service inquiries or configuration.

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.