routing table configuration and multiple network adapters using both intranet and extranet

Source: Internet
Author: User

CMD command: Route

subcommand 1:route Print View routing table

Child command 2:route add static route

subcommand 3:route Delete static routes

View

Use subcommand 1 results as shown below

(Note: Red box for dynamic routing [by System management, no need for manual management], green box for static route [can be added or deleted by artificial freedom])

You can see that the routing table consists of the following parts: Network address, network mask, gateway address, metric, here we are mainly concerned about the network address and gateway address, refers to the local access to the target IP use of the gateway (that is, the network card), so we need to configure the XXX address using the XXX gateway can achieve our purpose.

For example: 192.168.1.0 => 192.168.1.1, 0.0.0.0 =>192.168.0.1

The above example refers to the use of a gateway-192.168.1.1 NIC when accessing a 192.168.1.x network, using a gateway-192.168.0.1 NIC when accessing other networks (x.x.x.x). It is worth noting that 0 represents any number, so 0.0.0.0 represents any IP. The subnet mask is a regional molecular network, that is, the IP phase is different when the subnet mask is not the same.

Add to

Using Command 2

Route Add-p Network Address mask Subnet Mask gateway address

You can add a route that you add to your path in a permanent route (also known as a static route)

Use the command effect chart as follows:

Delete

Using Command 3

Rotue Delete network Address

You can delete a route

In general, the system will automatically add a static route to all the network address to a gateway (local connection), so we can only connect the LAN network, so we need to use this command to remove the default route.

Practice

1. First use the ipconfig command to view all connected IP and gateway information

From the above figure we can find that my local connection gateway for 192.168.1.1 (intranet), wireless network connection gateway for 192.168.163.254 (extranet)

2. Then we start to operate the route

The above 3 commands are: Delete default route, add external network by, add intranet route

3. Add complete, test the connection situation

Ping Baidu (External network) and the intranet of a machine, ping results connected, done!

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.