diff --git "a/35 \346\254\247\351\230\263\346\265\251\345\244\251/20260509 \351\235\231\346\200\201\350\267\257\347\224\261\345\231\250\350\277\236\351\200\232.md" "b/35 \346\254\247\351\230\263\346\265\251\345\244\251/20260509 \351\235\231\346\200\201\350\267\257\347\224\261\345\231\250\350\277\236\351\200\232.md" new file mode 100644 index 0000000000000000000000000000000000000000..92ac37c95ca721c3d1dd175321695218e5731920 --- /dev/null +++ "b/35 \346\254\247\351\230\263\346\265\251\345\244\251/20260509 \351\235\231\346\200\201\350\267\257\347\224\261\345\231\250\350\277\236\351\200\232.md" @@ -0,0 +1,71 @@ +``` +Router0 基本配置 +Router#conf t +Enter configuration commands, one per line. End with CNTL/Z. +Router(config)#int f0/0 +Router(config-if)#ip address 192.168.3.254 255.255.255.0 +Router(config-if)#no sh + +Router(config-if)# +%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up + +%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up + + +Router1 基本配置 +连接Se2/0 +Router>en +Router#conf t +Enter configuration commands, one per line. End with CNTL/Z. +Router(config)#int +Router(config)#int +Router(config)#interface se +Router(config)#interface serial 2/0 +Router(config-if)#ip address 10.254.10.1 255.255.255.0 +Router(config-if)#cl +Router(config-if)#clock ra +Router(config-if)#clock rate 64000 +This command applies only to DCE interfaces +Router(config-if)#no sh +Router(config-if)#no shutdown + +Router(config-if)# +%LINK-5-CHANGED: Interface Serial2/0, changed state to up + +Router(config-if)# +%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial2/0, changed state to up + + +连接Se3/0 +Router#conf t +Enter configuration commands, one per line. End with CNTL/Z. +Router(config)#int +Router(config)#interface se +Router(config)#interface serial 3/0 +Router(config-if)#ip address 20.20.10.1 255.255.255.0 +Router(config-if)#cl +Router(config-if)#clock ra +Router(config-if)#clock rate 64000 +This command applies only to DCE interfaces +Router(config-if)#no sh +Router(config-if)#no shutdown + +Router(config-if)# +%LINK-5-CHANGED: Interface Serial3/0, changed state to up + +%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial3/0, changed state to up +``` + +``` +Router2 基本配置 +Router(config)#int f0/0 +Router(config-if)#ip address 192.168.3.254 255.255.255.0 +Router(config-if)#no sh + +Router(config-if)# +%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up + +%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up +``` + +![静态路由器](https://gitee.com/ouyang-haotian921/picture/raw/master/pic/upgit_20260509_1778336764.PNG) diff --git "a/35 \346\254\247\351\230\263\346\265\251\345\244\251/20260512 \345\212\250\346\200\201\350\267\257\347\224\261\345\231\250\350\277\236\351\200\232.md" "b/35 \346\254\247\351\230\263\346\265\251\345\244\251/20260512 \345\212\250\346\200\201\350\267\257\347\224\261\345\231\250\350\277\236\351\200\232.md" new file mode 100644 index 0000000000000000000000000000000000000000..a91a29adcc05689e65fc1393a342e98e45057a07 --- /dev/null +++ "b/35 \346\254\247\351\230\263\346\265\251\345\244\251/20260512 \345\212\250\346\200\201\350\267\257\347\224\261\345\231\250\350\277\236\351\200\232.md" @@ -0,0 +1,227 @@ +``` +交换机: +Switch>en +Switch#conf t +Enter configuration commands, one per line. End with CNTL/Z. +Switch(config)#vlan 10 +Switch(config-vlan)#name vlan 10 + ^ +% Invalid input detected at '^' marker. + +Switch(config-vlan)#vlan 20 +Switch(config-vlan)#ex +Switch(config)#inter range f0/1,fa0/3 +Switch(config-if-range)#switchport access vlan 10 +Switch(config-if-range)#ex +Switch(config)#int +Switch(config)#interface f0/2 +Switch(config-if)#switchport access vlan 20 +Switch(config-if)#ex +Switch(config)#ip routing +Switch(config)#interface vlan 10 +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 address 192.168.1.1 255.255.255.0 +Switch(config-if)#ex +Switch(config)#interface vlan 20 +Switch(config-if)# +%LINK-5-CHANGED: Interface Vlan20, changed state to up + +%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan20, changed state to up + +Switch(config-if)#ip address 192.168.3.1 255.255.255.0 +Switch(config-if)#ex +Switch(config)#router rip +Switch(config-router)#version 2 +Switch(config-router)#network 192.168.1.0 +Switch(config-router)#network 192.168.3.0 +Switch(config-router)#end +Switch# +%SYS-5-CONFIG_I: Configured from console by console + +Switch#show r +Switch#show running-config +Building configuration... + +Current configuration : 1466 bytes +! +version 12.2(37)SE1 +no service timestamps log datetime msec +no service timestamps debug datetime msec +no service password-encryption +! +hostname Switch +! +! +ip routing +! +! + +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 +C 192.168.3.0/24 is directly connected, Vlan20 +``` + +``` +路由器0: +Router>en +Router#conf t +Enter configuration commands, one per line. End with CNTL/Z. +Router(config)#int f0/0 +Router(config-if)#ip address 192.168.3.2 255.255.255.0 +Router(config-if)#no sh +Router(config-if)#no shutdown + +Router(config-if)# +%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up + +%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up + +Router(config-if)#ex +Router(config)#int se +Router(config)#int serial 2/0 +Router(config-if)#ip address 192.168.4.1 255.255.255.0 +Router(config-if)#clock rate 64000 +Router(config-if)#no sh +Router(config-if)#no shutdown +%LINK-5-CHANGED: Interface Serial2/0, changed state to up + +%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial2/0, changed state to up + +Router(config-if)#ex + +Router(config)#router rip +Router(config-router)#version 2 +Router(config-router)#network 192.168.3.0 +Router(config-router)#network 192.168.4.0 +Router(config-router)#end +Router# +%SYS-5-CONFIG_I: Configured from console by console + +Router#show r +Router#show running-config +Building configuration... + +Current configuration : 796 bytes +! +version 12.2 +no service timestamps log datetime msec +no service timestamps debug datetime msec +no service password-encryption +! +hostname Router +! +! +! +! +ip cef +no ipv6 cef +! + +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.3.0/24 is directly connected, FastEthernet0/0 +C 192.168.4.0/24 is directly connected, Serial2/0 +``` + +``` +路由器1: +Router>en +Router#conf t +Enter configuration commands, one per line. End with CNTL/Z. +Router(config)#int f0/0 +Router(config-if)#ip address 192.168.2.1 255.255.255.0 +Router(config-if)#no sh +Router(config-if)#no shutdown + +Router(config-if)# +%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up + +%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up + +Router(config-if)#ex +Router(config)#int se +Router(config)#int serial 2/0 +Router(config-if)#ip address 192.168.4.1 255.255.255.0 +Router(config-if)#clock rate 64000 +This command applies only to DCE interfaces +Router(config-if)#no sh +Router(config-if)#no shutdown + +Router(config-if)# +%LINK-5-CHANGED: Interface Serial2/0, changed state to up + +%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial2/0, changed state to up +Router(config-if)#ex +Router(config)#router rip +Router(config-router)#version 2 +Router(config-router)#network 192.168.2.0 +Router(config-router)#network 192.168.4.0 +Router(config-router)#end +Router# +%SYS-5-CONFIG_I: Configured from console by console + +Router#show r +Router#show running-config +Building configuration... + +Current configuration : 778 bytes +! +version 12.2 +no service timestamps log datetime msec +no service timestamps debug datetime msec +no service password-encryption +! +hostname Router +! +! +! +ip cef +no ipv6 cef +! +! + +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.2.0/24 is directly connected, FastEthernet0/0 +C 192.168.4.0/24 is directly connected, Serial2/0 +``` + +![通路](https://gitee.com/ouyang-haotian921/picture/raw/master/pic/upgit_20260512_1778590571.PNG) + + + +![pc1](https://gitee.com/ouyang-haotian921/picture/raw/master/pic/upgit_20260512_1778590588.PNG) + +![pc2](https://gitee.com/ouyang-haotian921/picture/raw/master/pic/upgit_20260512_1778590594.PNG)