A Unix router with a single Nic configured in Solaris

Source: Internet
Author: User


In Solaris, a Unix router with a single Nic is generally considered to be connected to multiple networks, so it should correspond to each network with a NIC and an IP address. However, in practice, an Intranet may not be enough to maintain the Internet IP address, and the workstation often has integrated a NIC on its own motherboard. How can we use existing resources to set up routers? However, a single Nic workstation can be configured with a TCP/IP router. On the SUN Workstation With the Solaris2.x operating system, you can configure it as follows. Www.2cto.com 1. Configure the vro interface ---- 1. Create the/etc/hostname. interface file ---- each connected network should have a hostname. interface file, where interface is the NIC code name. The interfaces for multiple NICs should be different, but the interfaces for these files are the same for a single Nic router. How can we differentiate these files? You can create hostname. interface: n
File, using n as the difference to virtualize multiple NICs. When the computer starts, it will detect the number of such files. If multiple hostname. interface files are found, they are considered as routers; otherwise, they are considered as hosts. For example, if a SUN Workstation is connected to the Internet and Intranet, two files can be created: hostname. le0 and hostname. le0: 2.
---- 2. allocate a host name for the interface-each of the above hostnames. in the interface file, add the host name. You must note that different network interfaces correspond to each host. add the Host Name and IP address to/etc/inet/hosts in the format of IPaddresshostname 202.114.209.37sun1 180.114.20.1sun2.
---- Note that the IP address is the IP address of the network adapter that corresponds to multiple networks. 202.114.209.37 is the valid IP address of the host on the Internet, while 180.114.20.1 is the address assigned by the host on the Intranet, IP addresses on the intranet do not have to worry about conflicts with IP addresses with duplicate names on the Internet, because higher-level network access will regard them as illegal and refuse to provide services.
---- 4. modify the/etc/inet/netmasks file-if the vro is connected to a subnet, modify/etc/inet/netmasks and enter the subnet network number (such as 129.9.0.0) and Shield number (such as 255.255.255.0 ). Ii. routing protocol selection ---- static or dynamic routing protocols such as route information protocol (RIP) and ICMP route finding protocol (RDISC) can be used ).
---- When dynamic routing protocol is used, you can leave the/etc/defaultrouter file blank. The router automatically communicates with RIP and RDISC. These protocols track the router and broadcast route information so that the router can work in local file mode. This ensures that the router can work as usual after the configuration of the network server fails. ---- If you select static protocols, you only need to enter the default router name in the/etc/defaultrouter file, so that when the Unix router cannot find the path finding route, the IP packet is sent to the default router. In this example, if misrouter is used as the default router, you also need to add its IP address: 202.114.209.19 and machine name: misrouter in/etc/inet/hosts. 3. restart the computer-when the computer is started, the system will call the ifconfig command to configure interfaces for multiple connected networks and detect multiple hostnames. the interface file exists, so the computer considers itself as a router.
---- A single Nic router is configured. Computers on all intranets can use internal IP addresses to communicate with each other without being limited by assigned IP addresses, communication with the Internet is performed through a single Nic's Unix router. It can be seen that although it is a single Nic, It has multiple IP addresses. In essence, it uses the virtual interface file hostname. interface: n to "Impersonate" multiple NICs.

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.