Vro created in Linux for instance Parsing

Source: Internet
Author: User
Article Title: instance parsing a router built using the Linux operating system. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

Network structure. The computer of the Linux router is identified as A. It is connected to three network segments, 192.168.1.0/24, 10.0.0.0/8, and 172.16.0.0/16.

Computer A must have three NICs connected to the three network segments.

Hypothesis:

Eth0 is connected to 172.16.0.0,

Eth1 is connected to 10.0.0.0,

Eth2 is connected to 192.168.1.0.

First, configure eth0. assign the address 172.16.1.1 to this network interface and run the following command:

# Ifconfig eth0 172.16.1.1 netmask 255.255.0.0

To make the address disappear after the computer is no longer restarted, edit the/etc/sysconfig/network-scripts/ifcfg-eth0 file to the following format:

DEVICE = eth0

ONBOOT = yes

BROADCAST = 172.16.0000255

NETWORK = 172.16.0.0

NETMASK = 255.255.0.0

IPADDR = 172.16.1.1

Add a static route:

# Route add-net 172.16.0.0 netmask 255.255.0.0

In this way, a static route is added to the system:

# Route Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface

172.16.0.0*255.255.0.0 U 0 0 0 eth0

Next, configure eth1, and connect eth1 to the 10.0.0.0 network segment. The address assigned to it is 10.254.254.254. Use the ifconfig command to configure parameters for it:

# Ifconfig eth1 10.254.254.254 netmask 255.0.0.0

[1] [2] Next page

Related Article

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.