From bd455447eb39b1a2db2c836c67329effee91706d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E6=99=93=E7=81=BF?= <2447149492@qq.com> Date: Fri, 10 May 2024 05:18:23 +0000 Subject: [PATCH 1/2] =?UTF-8?q?=E9=99=88=E6=99=93=E7=81=BF=E7=9A=84?= =?UTF-8?q?=E4=BD=9C=E4=B8=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 陈晓灿 <2447149492@qq.com> --- ...02\344\272\244\346\215\242\346\234\272.md" | 99 +++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 "21 \351\231\210\346\231\223\347\201\277/20240510 \344\270\211\345\261\202\344\272\244\346\215\242\346\234\272.md" diff --git "a/21 \351\231\210\346\231\223\347\201\277/20240510 \344\270\211\345\261\202\344\272\244\346\215\242\346\234\272.md" "b/21 \351\231\210\346\231\223\347\201\277/20240510 \344\270\211\345\261\202\344\272\244\346\215\242\346\234\272.md" new file mode 100644 index 0000000..88e3a3b --- /dev/null +++ "b/21 \351\231\210\346\231\223\347\201\277/20240510 \344\270\211\345\261\202\344\272\244\346\215\242\346\234\272.md" @@ -0,0 +1,99 @@ +Switch>enable +Switch# +Switch#configure terminal +Enter configuration commands, one per line. End with CNTL/Z. +Switch(config)#interface FastEthernet0/1 +Switch(config-if)#sw +Switch(config-if)#switchport m +Switch(config-if)#switchport mode a +Switch(config-if)#switchport mode access +Switch(config-if)#sw +Switch(config-if)#switchport a +Switch(config-if)#switchport access +Switch(config-if)#switchport access vlan 10 +% Access VLAN does not exist. Creating vlan 10 +Switch(config-if)#interface FastEthernet0/2 +Switch(config-if)#switchport access vlan 20 +% Access VLAN does not exist. Creating vlan 20 +Switch(config-if)#interface FastEthernet0/3 +Switch(config-if)#switchport t +Switch(config-if)#switchport trunk +Switch(config-if)#switchport trunk e +Switch(config-if)#switchport trunk encapsulation +Switch(config-if)#switchport trunk encapsulation dot1q +Switch(config-if)#switchport mode trunk +Switch(config-if)# +%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to down +%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to up +ex +Switch(config)#ip routing +Switch(config)#int f0/1 +Switch(config-if)#ip add +Switch(config-if)#no sw +Switch(config-if)#no switchport +Switch(config-if)#no switchport +Switch(config-if)# +%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to down +%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up +Switch(config-if)#ip adddd +Switch(config-if)#ip add +Switch(config-if)#ip address 192.168.10.254 255.255.255.0 +Switch(config-if)#int f0/2 +Switch(config-if)#no switchport +Switch(config-if)# +%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to down +%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to up +no switchport +Switch(config-if)#ip address 192.168.00.254 255.255.255.0 +Switch(config-if)#int f0/3 +Switch(config-if)#no switchport +Switch(config-if)# +%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to down +%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to up + +Switch(config-if)#ip address 192.168.70.1 255.255.255.0 +Switch(config-if)#int f0/2 +Switch(config-if)#ip address 192.168.20.254 255.255.255.0 +// 宣告各自的网段 +Switch(config-if)#route rip +Switch(config-router)#v 2 +Switch(config-router)#net +Switch(config-router)#net 192.168.10.0 +Switch(config-router)#net 192.168.20.0 +Switch(config-router)#net 192.168.70.0 +Switch(config-router)#ex +Switch(config)#do show route ip + +路由器的配置 + +Router>en +Router#conf t +Enter configuration commands, one per line. End with CNTL/Z. +Router(config)#int f0/1 +Router(config-if)#ip addd +Router(config-if)#ip add +Router(config-if)#ip address 192.168.80.2 255.255.255.0 +Router(config-if)#int f0/0.1 +Router(config-subif)# +%LINK-5-CHANGED: Interface FastEthernet0/0.1, changed state to up +%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0.1, changed state to up +Router(config-subif)#en +Router(config-subif)#encapsulation +Router(config-subif)#encapsulation dot1Q 50 +Router(config-subif)#ip ad +Router(config-subif)#ip address 192.168.50.254 255.255.255.0 +Router(config-subif)#int f0/0.2 +Router(config-subif)# +%LINK-5-CHANGED: Interface FastEthernet0/0.2, changed state to up +%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0.2, changed state to up + +Router(config-subif)#encapsulation dot1Q 60 +Router(config-subif)#ip address 192.168.60.254 255.255.255.0 +Router(config-subif)#ex +Router(config)#route rip +Router(config-router)#v 2 +Router(config-router)#net +Router(config-router)#network 192.168.60.0 +Router(config-router)#network 192.168.50.0 +Router(config-router)#network 192.168.80.0 +Router(config-router)#do show ip route \ No newline at end of file -- Gitee From f30a60e2d14ce8aa905b09732a3c13aea22b2828 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E6=99=93=E7=81=BF?= <2447149492@qq.com> Date: Sun, 12 May 2024 15:33:56 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=E9=99=88=E6=99=93=E7=81=BF=E7=9A=84?= =?UTF-8?q?=E4=BD=9C=E4=B8=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 陈晓灿 <2447149492@qq.com> --- ...42\346\234\272\345\210\222\345\210\206.md" | 99 +++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 "21 \351\231\210\346\231\223\347\201\277/20240512 \344\270\211\345\261\202\344\272\244\346\215\242\346\234\272\345\210\222\345\210\206.md" diff --git "a/21 \351\231\210\346\231\223\347\201\277/20240512 \344\270\211\345\261\202\344\272\244\346\215\242\346\234\272\345\210\222\345\210\206.md" "b/21 \351\231\210\346\231\223\347\201\277/20240512 \344\270\211\345\261\202\344\272\244\346\215\242\346\234\272\345\210\222\345\210\206.md" new file mode 100644 index 0000000..88e3a3b --- /dev/null +++ "b/21 \351\231\210\346\231\223\347\201\277/20240512 \344\270\211\345\261\202\344\272\244\346\215\242\346\234\272\345\210\222\345\210\206.md" @@ -0,0 +1,99 @@ +Switch>enable +Switch# +Switch#configure terminal +Enter configuration commands, one per line. End with CNTL/Z. +Switch(config)#interface FastEthernet0/1 +Switch(config-if)#sw +Switch(config-if)#switchport m +Switch(config-if)#switchport mode a +Switch(config-if)#switchport mode access +Switch(config-if)#sw +Switch(config-if)#switchport a +Switch(config-if)#switchport access +Switch(config-if)#switchport access vlan 10 +% Access VLAN does not exist. Creating vlan 10 +Switch(config-if)#interface FastEthernet0/2 +Switch(config-if)#switchport access vlan 20 +% Access VLAN does not exist. Creating vlan 20 +Switch(config-if)#interface FastEthernet0/3 +Switch(config-if)#switchport t +Switch(config-if)#switchport trunk +Switch(config-if)#switchport trunk e +Switch(config-if)#switchport trunk encapsulation +Switch(config-if)#switchport trunk encapsulation dot1q +Switch(config-if)#switchport mode trunk +Switch(config-if)# +%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to down +%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to up +ex +Switch(config)#ip routing +Switch(config)#int f0/1 +Switch(config-if)#ip add +Switch(config-if)#no sw +Switch(config-if)#no switchport +Switch(config-if)#no switchport +Switch(config-if)# +%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to down +%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up +Switch(config-if)#ip adddd +Switch(config-if)#ip add +Switch(config-if)#ip address 192.168.10.254 255.255.255.0 +Switch(config-if)#int f0/2 +Switch(config-if)#no switchport +Switch(config-if)# +%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to down +%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to up +no switchport +Switch(config-if)#ip address 192.168.00.254 255.255.255.0 +Switch(config-if)#int f0/3 +Switch(config-if)#no switchport +Switch(config-if)# +%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to down +%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to up + +Switch(config-if)#ip address 192.168.70.1 255.255.255.0 +Switch(config-if)#int f0/2 +Switch(config-if)#ip address 192.168.20.254 255.255.255.0 +// 宣告各自的网段 +Switch(config-if)#route rip +Switch(config-router)#v 2 +Switch(config-router)#net +Switch(config-router)#net 192.168.10.0 +Switch(config-router)#net 192.168.20.0 +Switch(config-router)#net 192.168.70.0 +Switch(config-router)#ex +Switch(config)#do show route ip + +路由器的配置 + +Router>en +Router#conf t +Enter configuration commands, one per line. End with CNTL/Z. +Router(config)#int f0/1 +Router(config-if)#ip addd +Router(config-if)#ip add +Router(config-if)#ip address 192.168.80.2 255.255.255.0 +Router(config-if)#int f0/0.1 +Router(config-subif)# +%LINK-5-CHANGED: Interface FastEthernet0/0.1, changed state to up +%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0.1, changed state to up +Router(config-subif)#en +Router(config-subif)#encapsulation +Router(config-subif)#encapsulation dot1Q 50 +Router(config-subif)#ip ad +Router(config-subif)#ip address 192.168.50.254 255.255.255.0 +Router(config-subif)#int f0/0.2 +Router(config-subif)# +%LINK-5-CHANGED: Interface FastEthernet0/0.2, changed state to up +%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0.2, changed state to up + +Router(config-subif)#encapsulation dot1Q 60 +Router(config-subif)#ip address 192.168.60.254 255.255.255.0 +Router(config-subif)#ex +Router(config)#route rip +Router(config-router)#v 2 +Router(config-router)#net +Router(config-router)#network 192.168.60.0 +Router(config-router)#network 192.168.50.0 +Router(config-router)#network 192.168.80.0 +Router(config-router)#do show ip route \ No newline at end of file -- Gitee