Access hosts of different network segments at the same time

Source: Internet
Author: User

Access hosts of different network segments at the same time

There are two CIDR blocks,
CIDR Block 1: 192.168.1.0/255.255.255.0. Gateway: 192.168.1.1 can be used on the Internet.
CIDR Block:. 19.139.0/255.255.255.0.0. Gateway: 20.19.139.250 can be used with the website of the higher authorities.

Two network topologies:
Topology 1:
One host and two NICs are connected to different networks.



Nic configuration: Note: If you want to access the Internet, you need to configure the gateway.

After configuring this, you can access CIDR Block 1 and access the internet.

Nic 2 configuration: do not need to configure the default gateway. Otherwise, you cannot access the Internet. The reason is that two default gateways are configured for the two NICs, and the default gateway configured later will overwrite the default gateway. The IP package follows the gateway configured in the second step. The Internet cannot be accessed.

In this case, you can ping the host in the same network segment and the gateway 201719.139.250. But cannot access the host of the superior Website: 201719.1.1
Add route:
Route add route 19.0.0 mask route 255.0.0 255.19.139.250
OK. Now you can access 201719.1.1 :)

Topology 2: one network card of a host is connected to two networks with different network segments through a switch.




One Nic is configured with multiple IP addresses.
Add route:
Route add 192.168.1.0 mask 255.255.255.0 192.168.1.1
Route add route 19.0.0 mask 255 .. route 0.0 255.19.139.250

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.