Using Solaris to build a routerBuild a router using SolarisWhen we debug the user system in our unit, the network address of the unit is generally not on the same network as the user's network address.
On the segment, if there is no router, the two networks cannot communicate with each other, which will have a great impact on work. Hard routers are not expensive
It is necessary to match it, because SOLARIS can be easily set up as a software router without additional expenses.
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 anserver; another corresponding name and address
2. Edit the file /etc/nerworks and add the addresses of the two networks:
#vi /etc/networks
192.9.200;The website address
ano 192.9.201; The URL of another website
3. Create a new file /etc/gateways. As long as the file exists and has no content, it can make SOLARIS lucky at startup.
Route the router service process.
#cat/dev/null>/etc/gateways
4. Query the name of the main network card:
#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 100M network card name assigned to the workstation. If you are using a 10M network card, it is called le.
5. Create a new file /etc/hostname.hme0:1, fill in another host name in /etc/josts to make
When SOLARIS starts, a logical interface is established on the physical interface hme0.
6. After setting up the above steps, restart the workstation
7. Effect:
During the workstation startup, you can see the pop display of "machine is a router." Indicates that this machine has become a
The router will send RIP packets to the network, and can be seen using the interface query command:
#ifcofig-a ; List all network interfaces in the system
lo0:flags=849<UP,LOOPBACK,RUNNNG,MULTICAST> mtu8232
inet 127.0.0 .1etmask 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, with the address 192.9.201.1.
On other UNIX machines, the workstation will be automatically added to the routing table according to the RIP packet and on the PC (Example
For example, WIN95, just set the gateway of the TCP/IPM network to the address of the workstation in the control panel (using this
The address of the same network) of the machine can communicate with the machine on another network.
Article entry: csh Editor in charge: csh
On the segment, if there is no router, the two networks cannot communicate with each other, which will have a great impact on work. Hard routers are not expensive
It is necessary to match it, because SOLARIS can be easily set up as a software router without additional expenses.
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 anserver; another corresponding name and address
2. Edit the file /etc/nerworks and add the addresses of the two networks:
#vi /etc/networks
192.9.200;The website address
ano 192.9.201; The URL of another website
3. Create a new file /etc/gateways. As long as the file exists and has no content, it can make SOLARIS lucky at startup.
Route the router service process.
#cat/dev/null>/etc/gateways
4. Query the name of the main network card:
#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 100M network card name assigned to the workstation. If you are using a 10M network card, it is called le.
5. Create a new file /etc/hostname.hme0:1, fill in another host name in /etc/josts to make
When SOLARIS starts, a logical interface is established on the physical interface hme0.
6. After setting up the above steps, restart the workstation
7. Effect:
During the workstation startup, you can see the pop display of "machine is a router." Indicates that this machine has become a
The router will send RIP packets to the network, and can be seen using the interface query command:
#ifcofig-a ; List all network interfaces in the system
lo0:flags=849<UP,LOOPBACK,RUNNNG,MULTICAST> mtu8232
inet 127.0.0 .1etmask 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, with the address 192.9.201.1.
On other UNIX machines, the workstation will be automatically added to the routing table according to the RIP packet and on the PC (Example
For example, WIN95, just set the gateway of the TCP/IPM network to the address of the workstation in the control panel (using this
The address of the same network) of the machine can communicate with the machine on another network.
Article entry: csh Editor in charge: csh