The experiment of single-arm routing to realize inter-VLAN communication

Source: Internet
Author: User
Tags config

Experimental requirements

VLAN 10 Network Segment 192.168.10.0

PC0 192.168.10.2

VLAN 20 Network Segment 192.168.20.0

PC1 192.168.20.2

Experiment 1 using routers to achieve one-arm routing

Topology

s switch Configuration

Switch (config) #vlan 10

Switch (Config-vlan) #int F0/1

Switch (config-if) #switchport mode access

Switch (config-if) #switchport Access VLAN 10

Switch (config-if) #no shutdown

Switch (config) #vlan 20

Switch (Config-vlan) #int F0/2

Switch (config-if) #switchport mode access

Switch (config-if) #switchport Access VLAN 20

Switch (config-if) #no shutdown

Switch (config) #int f0/24

Switch (config-if) #switchport mode trunk

Switch (config-if) #no shutdown

R router Configuration

Router (config) #int f0/0

Router (config-if) #no shutdown

Router (config-if) #int f0/0.1

Router (config-subif) #encapsulation dot1q 10

Router (config-subif) #ip address 192.168.10.1 255.255.255.0

Router (config-subif) #no shutdown

Router (config-subif) #int f0/0.2

Router (config-subif) #encapsulation dot1q 20

Router (config-subif) #ip address 192.168.20.1 255.255.255.0

Router (config-subif) #no shutdown

Test

Set the PC0 IP to 192.168.10.2

Gateway: 192.168.10.1

PC1 IP is set to 192.168.20.2

Gateway: 192.168.20.1

Use PC1 ping pc0

Back to the column page: http://www.bianceng.cnhttp://www.bianceng.cn/Network/lyjs/

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.