当前位置:网站首页>The most detailed network counting experiment in history (2) -- rip experiment of layer 3 switch
The most detailed network counting experiment in history (2) -- rip experiment of layer 3 switch
2022-04-23 19:19:00 【It's quite bald, Qi Qi】
This blog continues to explain layer 3 switches and dynamic routing in computer networks RIP Protocol experiments .
First, let's introduce the layer 3 switch , What we did before vlan The experiment uses a two-layer switch , Its function is to pc Connect the machine . On this basis, the layer 3 switch adds the function of connecting different LANs similar to routers , In LAN internal network, three-layer switch can be used to replace router , However, the interconnection between LAN and public network can not completely replace the work of router . What we used before vlan, When given a network number , In fact, it can represent a local area network .
Say again RIP agreement , Actually RIP The protocol is the algorithm that the router automatically configures the routing table . The static routing table we configured before requires us to manually enter , When multiple routers are connected, it will be very cumbersome , And when the connection is disconnected due to a problem with the line or equipment , The routing table can be adjusted dynamically , send pc Normal communication .
After talking about the principle , Let's start with the basics of the configuration experiment ip.
Layer 3 switch configuration :
Switch>en
Switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#vlan 10
Switch(config-vlan)#name v10
Switch(config-vlan)#exit
Switch(config)#vlan 50
Switch(config-vlan)#name v50
Switch(config-vlan)#exit
Switch(config)#int f0/5
Switch(config-if)#switchport access vlan 50 ## take f0/5 Port join vlan50
Switch(config-if)#exit
Switch(config)#int f0/1
Switch(config-if)#switchport access vlan 10
Switch(config-if)#exit
Switch(config)#
Router Router0 Set up :
Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#int f 1/0
Router(config-if)#ip addr 192.168.1.1 255.255.255.0 ## Set the port ip And mask
Router(config-if)#no sh ##no shutdown Abbreviation , Open port
Router(config-if)#
%LINK-5-CHANGED: Interface FastEthernet1/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet1/0, changed state to up
Router(config-if)#exit
Router(config)#int se 2/0
Router(config-if)#ip addr 192.168.2.1 255.255.255.0
Router(config-if)#no sh
%LINK-5-CHANGED: Interface Serial2/0, changed state to down
Router(config-if)#exit
Router(config)#
The rest Router1 Also set as above , It's just a show here .
After configuring the above, let's start with the... In the layer 3 switch vlan No. configuration ip.
Switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#int vlan 10 ## Enter into vlan 10 And configure ip
Switch(config-if)#
%LINK-5-CHANGED: Interface Vlan10, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan10, changed state to up
Switch(config-if)#ip addr 192.168.1.2 255.255.255.0 ## You can find that it is actually related to the port of the router ip equally , Its function is to interface vlan 10 The router address is 192.168.1.2 The interface of
Switch(config-if)#no sh
Switch(config-if)#exit
Switch(config)#int vlan 50
Switch(config-if)#
%LINK-5-CHANGED: Interface Vlan50, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan50, changed state to up
Switch(config-if)#ip addr 192.168.5.1 255.255.255.0
Switch(config-if)#no sh
Switch(config-if)#exit
Switch(config)#ip routing ## This step is very important , Is equivalent to vlan in ip Update the information and put it in the table
Switch(config)#
We can check the success through the command .
Switch#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
Gateway of last resort is not set
C 192.168.1.0/24 is directly connected, Vlan10 ## These two lines indicate success
C 192.168.5.0/24 is directly connected, Vlan50
Switch#
End of configuration vlan Of ip after , We can divide different LANs and communicate through three-tier switches , Next, turn on the layer 3 switch and router RIP agreement .
The network number of each network segment :
First, turn on the protocol of the layer 3 switch :
Switch#en
Switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#router rip ## Configuration command
Switch(config-router)#network 192.168.1.0 ## Declare the direct network segment of this machine
Switch(config-router)#network 192.168.5.0
Switch(config-router)#exit
Switch(config)#
Next, the router Router 0 Open agreement :
Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#router rip
Router(config-router)#network 192.168.1.0
Router(config-router)#network 192.168.2.0
Router(config-router)#exit
Router(config)#
Router Router 1 similar , There's no show here . When we're done, let's look at the routing table .
Three layer switch :
Switch#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
Gateway of last resort is not set
C 192.168.1.0/24 is directly connected, Vlan10
R 192.168.2.0/24 [120/1] via 192.168.1.1, 00:00:18, Vlan10 ## Yes R These two items indicate success
R 192.168.3.0/24 [120/2] via 192.168.1.1, 00:00:18, Vlan10
C 192.168.5.0/24 is directly connected, Vlan50
Switch#
Router 0 Routing table :
Router#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
Gateway of last resort is not set
C 192.168.1.0/24 is directly connected, FastEthernet1/0
C 192.168.2.0/24 is directly connected, Serial2/0
R 192.168.3.0/24 [120/1] via 192.168.2.2, 00:00:18, Serial2/0
R 192.168.5.0/24 [120/1] via 192.168.1.2, 00:00:16, FastEthernet1/0
Router#
And then pc See if you can ping through .
ping The experiment proved our success , If you do real machine experiments , I'm still saying , Remember to turn off the firewall !
版权声明
本文为[It's quite bald, Qi Qi]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204210600172028.html
边栏推荐
- OpenHarmony开源开发者成长计划,寻找改变世界的开源新生力!
- arcgis js api dojoConfig配置
- Thoughts on the optimization of examination papers in the examination system
- Openlayers 5.0 reload the map when the map container size changes
- Esp01s with Arduino development environment
- js 计算时间差
- js获取本机ip地址
- Use of fluent custom fonts and pictures
- Common processing of point cloud dataset
- The fifth bullet of MySQL learning -- detailed explanation of transaction and its operation characteristics
猜你喜欢
命令-sudo
2022.04.23(LC_714_买卖股票的最佳时机含手续费)
Introduction to micro build low code zero Foundation (lesson 3)
MySQL学习第五弹——事务及其操作特性详解
White screen processing method of fulter startup page
Network protocol: SCTP flow control transmission protocol
Android Development: the client obtains the latest value in the database in real time and displays it on the interface
Installation, use and problem summary of binlog2sql tool
网络协议之:sctp流控制传输协议
JVM的类加载过程
随机推荐
Parsing headless jsonarray arrays
js上传文件时控制文件类型和大小
Openharmony open source developer growth plan, looking for new open source forces that change the world!
Openlayers 5.0 thermal diagram
Installation, use and problem summary of binlog2sql tool
OpenHarmony开源开发者成长计划,寻找改变世界的开源新生力!
Raspberry pie 18b20 temperature
js 计算时间差
Use of fluent custom fonts and pictures
First experience of using fluent canvas
SSDB Foundation
Some ideas about time-consuming needs assessment
[report] Microsoft: application of deep learning methods in speech enhancement
Regular expressions for judging positive integers
Oracle配置st_geometry
FTP, SSH Remote Access and control
数据分析学习目录
Openlayers 5.0 reload the map when the map container size changes
openlayers 5.0 离散聚合点
Openlayers 5.0 loading ArcGIS Server slice service