当前位置:网站首页>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):


边栏推荐
- MySQL table field quantity limit and row size limit
- Classic examples of C language switch case statement conversion date format
- VIM common commands
- Redis common commands
- MySQL client to server character set conversion
- 黑馬程序員-接口測試-四天學習接口測試-第四天-Postman讀取外部數據文件,讀取數據文件數據,iHRM項目實戰,員工管理模塊,添加員工,批量運行測試用例,生成測試報告,
- Xilinx FPGA one way clock input two PLLs
- Small farmers also have big goals in the test, and the latest big bat interview summary (constantly updating...)
- An article teaches you the basic use of kubernetes
- Intelligent OCR identification of express documents helps the logistics industry to upgrade Digitalization
猜你喜欢

Classic example of C language - find the minimum number of banknotes

Analysis of the advantages of the LAAS scheme of elephant swap led to strong performance of ETOKEN

Introduction to several scenarios involving programming operation of Excel in SAP implementation project

Pbootcms database conversion tutorial (SQLite to MySQL detailed tutorial)

MariaDB database upgrade version

Printf function - conversion description

AVX instruction set accelerated matrix multiplication

Solve the error: uncaught (in promise) navigationduplicated: avoided redundant navigation to current location:“

Classic example of C language - commodity inspection code

Selection method of geometric objects in Creo 9.0
随机推荐
Tutorial on the principle and application of database system (046) -- MySQL query (VIII): group by
Tutorial on the principle and application of database system (049) -- MySQL query (XI): sub query
Bean validation usage article ----05
【电赛训练】非接触物体尺寸形态测量 2020年电赛G题
Table custom table encapsulation
NOTICE: PHP message: PHP Warning: PHP Startup: Unable to load dynamic library ‘*****‘
Easy gene | target gene DNA methylation sequencing (target BS)
通信模块整理(二)HC-05
C language book recommendation
The most basic code interpretation of C language
《天幕红尘》笔记与思考(五)强势文化与弱势文化
如何在自动化测试中使用MitmProxy获取数据返回?
MySQL exercise: all employees reporting to the CEO
Selection method of geometric objects in Creo 9.0
Coloring old photos - deoldify get started quickly
js的相关知识
《天幕红尘》笔记与思考(六)因缺而需
Blockbuster | certik: Web3.0 industry safety report release in the second quarter of 2022 (PDF download link attached)
Tutorial on principles and applications of database system (045) -- MySQL query (VII): aggregate function
mysql 分支语句case报错