Build a router using Solaris
Build a router using SolarisWhen we debug the user system in the Organization, the network address of the organization is generally different from the network address of the user.
If there is no vro, the two networks cannot communicate with each other, which will have a great impact on the work. Hard Routers are expensive.
Configuration is necessary because Solaris can easily be set as a software router without additional costs.
1. edit the file/etc/hosts and add another network segment address to the workstation:
# Vi/etc/hosts
127.0.0.1localhost
192.9.200.1serverloghost; Host Name and address of this example
192.9.201.1 anoserver; another corresponding name and address
2. edit the file/etc/nerworks and add the addresses of the two networks:
# Vi/etc/networks
Loc 192.9.200; website
ANo 192.9.201; another Web Site
3. Create a new file/etc/gateways. This file can be run as long as there is no content, so that Solaris can run at startup.
Router service process.
# Cat/dev/null>/etc/gateways
4. query the name of the primary ENI:
# Ifconfig-A; list all network interfaces in the system
Loo: Flags = 849 <up, loopback, RUN-NONG, multicast> MTU 8232
Inet 127.0.0.1 netmask
Ff000000
Hneo: Flags = 863 <up, broadcast, NO-TRAILRS, runnnhg, multicast> mtu1500
Inet 192.2.200.1 netmask ffffff00 Broadcast
192.2.200.255
Ether 8: 0: 20: 1: 2: 3
Hme is the M Nic name configured on the workstation. If you use a 10 m Nic, the name is le.
5. Create the/etc/hostname. hme0: 1 file and enter another host name in/etc/josts
When Solaris is started, a logical interface is created on the physical interface hme0.
6. Restart the workstation after completing the preceding steps.
7. effect:
When the workstation is started, you can see the worker display of "machine is a router. Indicates that the local machine has become
The router sends a rip package to the network. You can view the rip package with the interface query command:
# Ifcofig-A; list all network interfaces in the system
Lo0: Flags = 849 <up, loopback, runnng, multicast> mtu8133
Inet 127.0.0. 1 etmask ff00000
Hne0: Flags = 863 <up, broadcast, notrailers, RUN-NING, multicast> MTU 1500
Inet 192.9.200.1 netmask FFFF00 Broadcast
192.9.200.255
Hne0: 1: Flags = 8d0 <up, broadcast, notraulers, rumnnng, multicast> MTU 1500
Inet 192.9.201.1 netmask FFFF00 Broadcast
192.9.201.255
The above indicates that a logical interface on hme0 has been started, and the address is 192.9.201.1.
On other UNIX machines, the workstation is automatically added to the routing table based on the rip package, on the PC (for example
For example, Win95), you only need to set the TCP/IPM Network Gateway to the IP address of the workstation in the control panel (Use
The IP address of the same network.
Article Input: CSH responsible editor: CSH
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.