Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to connect subnet with virtual router

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

How to use virtual router to connect subnet, many novices are not very clear about this, in order to help you solve this problem, the following editor will explain for you in detail, people with this need can come to learn, I hope you can gain something.

Neutron Routing services provide the ability to interconnect across subnet.

For example, we set up an experimental environment earlier:

Cirros-vm1 172.16.100.3 vlan100

Cirros-vm3 172.16.101.3 vlan101

The two instance must use router to communicate. It can be a physical router or a virtual router.

The virtual router implementation of Neutron is discussed in detail below.

Configure L3 agent

Neutron's routing service is provided by L3 agent.

L3 agent needs to be properly configured to work, and the configuration file is / etc/neutron/l3_agent.ini, located at the control node or network node.

Devstack has helped us configure the default properties, which can be used in most cases without modification.

External_network_bridge specifies the bridge to connect to the public network. The default is br-ex.

Interface_driver is the most important option, and if mechanism driver is open vswitch, then:

Interface_driver = neutron.agent.linux.interface.OVSInterfaceDriver

If you choose linux bridge, then:

Interface_driver = neutron.agent.linux.interface.BridgeInterfaceDriver

L3 agent runs on control or network nodes.

Next, you will create a virtual router "router_100_101" to get through vlan100 and vlan101.

Create router

Go to the operation menu Project-> Network-> Routers.

Click the Create Router button.

Router is named "router_100_101". Click the "Create Router" button to confirm.

Router_100_101 created successfully.

Next you need to connect vlan100 and vlan101 to router_100_101.

Click the "router_100_101" link to go to the router configuration page, and click the "Add Interface" button in the "Interfaces" tab.

Select the subnet_172_16_100_0 of vlan100 and click "Add Interface" to confirm.

Add the subnet_172_16_101_0 for vlan101 in the same way.

When you are done, you can see that router_100_101 has two interface, and its IP happens to be the Gateway IP 172.16.100.1 and 172.16.101.1 of subnet.

At this point, we can foresee:

1. Router_100_101 has connected subnet_172_16_100_0 and subnet_172_16_101_0.

2. The Gateway IP of two subnet has been set up on router_100_101.

3. Cirros-vm1 and cirros-vm3 should be able to communicate.

Pass the PING test.

As expected, cirros-vm1 and cirros-vm3 were able to communicate.

Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report