当前位置:网站首页>VLAN division, automatic allocation of IP to all hosts through DHCP, and communication accessible throughout the network
VLAN division, automatic allocation of IP to all hosts through DHCP, and communication accessible throughout the network
2022-07-24 00:55:00 【.98℃】
Catalog
4.1. Switch configuration (vlan Division and setting trunk link ):
4.2. Router r1 and r2 Configuration of ( Interface ip,DHCP, Static routing )
1. requirement
- In each switch, create vlan2 and vlan3, And put it in the figure pc1、pc3、pc5 Divided into corresponding switches vlan2 in 、 take pc2、pc4、pc6 Divided into corresponding switches vlan3 in .
- adopt DHCP Protocols are automatically assigned to computers ip Address .
- It is required that data traffic can pass through the whole network .
2. Topology

3. analysis :
- According to the topology, the router is divided into three broadcast domains , Therefore, it is divided into 192.168.1.0/24;2.0/24;3.0/24 Three network segments of .
- Because it is divided into two under the broadcast domain vlan, So divide the original network segment equally .
- Both routers need to be turned on DHCP.
- Network wide accessibility , You need to implement different vlan Interaction , And the setting of static route .
4. To configure :
4.1. Switch configuration (vlan Division and setting trunk link ):
- Switch 1 Configuration of ( The other three are similar )
[sw1]vlan 2
[sw1-vlan2]q
[sw1]vlan 3
[sw1]int e0/0/1
[sw1-Ethernet0/0/1]port link-type access
[sw1-Ethernet0/0/1]port def vlan 2
[sw1]int e0/0/2
[sw1-Ethernet0/0/2]port link-type access
[sw1-Ethernet0/0/2]port d vlan 3
[sw1]int g0/0/1
[sw1-GigabitEthernet0/0/1]port link-type trunk
[sw1-GigabitEthernet0/0/1]port trunk allow-pass vlan 2 to 3
4.2. Router r1 and r2 Configuration of ( Interface ip,DHCP, Static routing )
[r1]int g0/0/1.1
[r1-GigabitEthernet0/0/1.1]ip add 192.168.1.1 25
[r1-GigabitEthernet0/0/1.1]dot1q termination vid 2
[r1-GigabitEthernet0/0/1.1]arp broadcast enable
[r1]int g0/0/1.2
[r1-GigabitEthernet0/0/1.2]ip add 192.168.1.129 25
[r1-GigabitEthernet0/0/1.2]dot1q termination vid 3
[r1-GigabitEthernet0/0/1.2]arp broadcast en
[r1]int g0/0/0
[r1-GigabitEthernet0/0/0]ip add 192.168.3.1 24
[r1]dhcp en
[r1]ip pool p1
[r1-ip-pool-p1]network 192.168.1.0 mask 25
[r1-ip-pool-p1]gateway-list 192.168.1.1
[r1-ip-pool-p1]dns-list 114.114.114.114 8.8.8.8
[r1]dhcp en
[r1]ip pool p2
[r1-ip-pool-p2]network 192.168.1.128 mask 25
[r1-ip-pool-p2]gateway-list 192.168.1.129
[r1-ip-pool-p2]dns-list 114.114.114.114 8.8.8.8
[r1]int g0/0/1.1
[r1-GigabitEthernet0/0/1.1]dhcp select global
[r1]int g0/0/1.2
[r1-GigabitEthernet0/0/1.2]dhcp select global
[r1]ip route-static 192.168.2.0 24 192.168.3.2[r2]int g0/0/0
[r2-GigabitEthernet0/0/0]ip add 192.168.3.2 24
[r2-]int g0/0/1.1
[r2-GigabitEthernet0/0/1.1]ip add 192.168.2.1 25
[r2-GigabitEthernet0/0/1.1]dot1q termination vid 2
[r2-GigabitEthernet0/0/1.1]arp broadcast en
[r2]int g0/0/1.2
[r2-GigabitEthernet0/0/1.2]ip add 192.168.2.129 25
[r2-GigabitEthernet0/0/1.2]dot1q termination vid 3
[r2-GigabitEthernet0/0/1.2]arp broadcast en
[r2]dhcp en
[r2]ip pool p3
[r2-ip-pool-p3]network 192.168.2.0 mask 25
[r2-ip-pool-p3]gateway-list 192.168.2.1
[r2-ip-pool-p3]dns-list 114.114.114.114 8.8.8.8
[r2]dhcp en
[r2]ip pool p4
[r2-ip-pool-p4]network 192.168.2.128 mask 25
[r2-ip-pool-p4]gateway-list 192.168.2.129
[r2-ip-pool-p4]dns-list 114.114.114.114 8.8.8.8
[r2]int g0/0/1.1
[r2-GigabitEthernet0/0/1.1]dhcp select global
[r2]int g0/0/1.2
[r2-GigabitEthernet0/0/1.2]dhcp select global
[r2]ip route-static 192.168.1.0 24 192.168.3.15. verification :
- DHCP Automatic partition IP result :



- Achieve communication (pc5->pc1,pc3->pc6):


边栏推荐
- 创建自签名证书, 对exe文件进行数字签名
- Semaphore
- AVX instruction set accelerated matrix multiplication
- ES6 combines multiple class methods
- [QNX Hypervisor 2.2用户手册]9.1 配置变量
- Classic example of C language - commodity inspection code
- Image processing: Generation 3 × Window of 3
- Tutorial on principles and applications of database system (052) -- data integrity of MySQL (XIV): crosstab query (row column conversion)
- Dataframe.groupby learning materials
- The postman test interface has 404 or 500 errors when the URL is configured correctly
猜你喜欢

First knowledge of C language functions

Create a self signed certificate to digitally sign exe files

Pbootcms database conversion tutorial (SQLite to MySQL detailed tutorial)

Testers who have been employed for 3 months are facing employment confirmation. Leaders: 1 year of work experience is packaged into 5 years, and the probation period is eliminated

【LeetCode第 83 场双周赛】

Flutter | the easiest way to add header and footer to listview
![[STM32] basic knowledge of serial communication](/img/0f/7cc59fea9b1edf721c9d06b419896a.png)
[STM32] basic knowledge of serial communication

Classic example of C language - loan balance

How to speed up matrix multiplication -- optimizing GEMM (CPU single thread)

MySQL client to server character set conversion
随机推荐
Testers who have been employed for 3 months are facing employment confirmation. Leaders: 1 year of work experience is packaged into 5 years, and the probation period is eliminated
Easy gene | target gene DNA methylation sequencing (target BS)
Coloring old photos - deoldify get started quickly
Create a self signed certificate to digitally sign exe files
AWS Article 3 how to publish message to IOT mqtt in go language
Implementation of singleton mode and prevention of reflection and serialization
Bean Validation使用篇----05
CA digital certificate
Comparison of image preprocessing between pytorch opencv pil
Tutorial on the principle and application of database system (048) -- MySQL query (x): self connection query
MySQL exercise: all employees reporting to the CEO
AVX instruction set accelerated matrix multiplication
Flutter | firstwhere error reporting
Tutorial on principles and applications of database system (051) -- MySQL query (XIII): using queries in DML statements
Classic example of C language - convert the input two digits into English
How can dbcontext support the migration of different databases in efcore advanced SaaS system
What is the function of the select... For UPDATE statement? Can you lock tables or rows?
暑假第四周总结
【LeetCode第 83 场双周赛】
js的相关知识