diff --git "a/20 \351\273\204\345\205\264\347\205\214/20260509 \345\244\232\350\207\202\344\272\222\351\200\232.md" "b/20 \351\273\204\345\205\264\347\205\214/20260509 \345\244\232\350\207\202\344\272\222\351\200\232.md" new file mode 100644 index 0000000000000000000000000000000000000000..987e1afdd1ac2c373ea76f5c15adcff08f38e14f --- /dev/null +++ "b/20 \351\273\204\345\205\264\347\205\214/20260509 \345\244\232\350\207\202\344\272\222\351\200\232.md" @@ -0,0 +1,472 @@ +``` +Router0 +Router>en +Router#conf t +Enter configuration commands, one per line. End with CNTL/Z. +Router(config)#int f0/0 +Router(config-if)#no shu +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)#ip ad +Router(config-if)#ip address 192.168.1.254 255.255.255.0 +Router(config-if)#ex +Router(config)#int s2/0 +Router(config-if)#no sh +Router(config-if)#no shutdown + +%LINK-5-CHANGED: Interface Serial2/0, changed state to down +Router(config-if)#ip ad +Router(config-if)#ip address 10.254.10.1 255.255.255.0 +Router(config-if)#cl +Router(config-if)#clock r +Router(config-if)#clock rate 64000 +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)#ip rou +Router(config)#ip route 192.168.2.0 255.255.255.0 10.254.10.2 +Router(config)# + + + + + + + + +Router con0 is now available + + + + + + +Press RETURN to get started. + + + + + + + + + + + + + +Router> +Router> +Router>en +Router#conf t +Enter configuration commands, one per line. End with CNTL/Z. +Router(config)#int f0/0 +Router(config-if)#ip ad +Router(config-if)#ip address 192.168.2.254 255.255.255.0 +Router(config-if)#ip ad +Router(config-if)#ip address 192.168.3.254 255.255.255.0 +Router(config-if)#ip ad +Router(config-if)#ip address 20.20.10.2 255.255.255.0 +Router(config-if)# +Router(config-if)# +Router(config-if)#ip ad +Router(config-if)#ip address 192.168.1.254 255.255.255.0 +Router(config-if)#ex +Router(config)#ip rou +Router(config)#ip route 192.168.3.0 255.255.255.0 20.20.10.2 +Router(config)# + + + + + + + + +Router con0 is now available + + + + + + +Press RETURN to get started. + + + + + + + + + + + + + +Router> +Router>en +Router#conf t +Enter configuration commands, one per line. End with CNTL/Z. +Router(config)#ip ro +Router(config)#ip route 192.168.2.0 255.255.255.0 20.20.10.1 +Router(config)#ip r +Router(config)#ip route +``` + +``` +Router1 +Router(config-if)#no shu +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)#ip ad +Router(config-if)#ip address 192.168.2.254 255.255.255.0 +Router(config-if)#ex +Router(config)#int s2/0 +Router(config-if)#no shu +Router(config-if)#no shutdown + +Router(config-if)# +%LINK-5-CHANGED: Interface Serial2/0, changed state to up + +Router(config-if)#ip +%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial2/0, changed state to up + +% Incomplete command. +Router(config-if)#ip ad +Router(config-if)#ip address 10.254.10 + ^ +% Invalid input detected at '^' marker. + +Router(config-if)#ip ad +Router(config-if)#ip address 10.254.10.2 255.255.255.0 +Router(config-if)#ex +Router(config)#int s3/0 +Router(config-if)#no shu +Router(config-if)#no shutdown + +%LINK-5-CHANGED: Interface Serial3/0, changed state to down +Router(config-if)#no shu +Router(config-if)#no shutdown +Router(config-if)# +Router(config-if)# +Router(config-if)#ex +Router(config)#inr + ^ +% Invalid input detected at '^' marker. + +Router(config)#t +% Incomplete command. +Router(config)#int s3/0 +Router(config-if)#no shu +Router(config-if)#no shutdown +Router(config-if)# +Router(config-if)# +Router(config-if)# +Router(config-if)#ex +Router(config)#ex +Router# +%SYS-5-CONFIG_I: Configured from console by console +ex + + + + + + + + + +Router con0 is now available + + + + + + +Press RETURN to get started. + + + + + + + + + + + + + +Router> +Router> +Router>en +Router>enable +Router#conf t +Enter configuration commands, one per line. End with CNTL/Z. +Router(config)#ip ro +Router(config)#ip route 192.168.1.0 255.255.255.0 10.254.10.1 +Router(config)# +%LINK-5-CHANGED: Interface Serial3/0, changed state to up + +%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial3/0, changed state to up + +Router(config)# +Router(config)#int s3/0 +Router(config-if)#ip ro +Router(config-if)#ip rou +Router(config-if)#ip route +Router(config-if)#ip route + ^ +% Invalid input detected at '^' marker. + +Router(config-if)#ip rou +Router(config-if)#ex +Router(config)#ex +Router# +%SYS-5-CONFIG_I: Configured from console by console +ex + + + + + + + + + +Router con0 is now available + + + + + + +Press RETURN to get started. + + + + + + + + + + + + + +Router> +Router> +Router>en +Router#conf t +Enter configuration commands, one per line. End with CNTL/Z. +Router(config)#int s3/0 +Router(config-if)#ex +Router(config)#ip rou +Router(config)#ip route 192.168.3.0 255.255.255.0 20.20.10.2 +Router(config)# + + + + + + + + +Router con0 is now available + + + + + + +Press RETURN to get started. + + + + + + + + + + + + + +Router> +Router>en +Router#conf t +Enter configuration commands, one per line. End with CNTL/Z. +Router(config)#int f0/0 +Router(config-if)#ip ad +Router(config-if)#ex +Router(config)#int s3/0 +Router(config-if)#ip ad +Router(config-if)#ip address 20.20.10.1 255.255.255.0 +Router(config-if)#ex +Router(config)#ip r +Router(config)#ip route 192.168.1.0 255.255.255.0 10.254.10.1 +Router(config)#ip r +Router(config)#ip route 192.168.3.0 255.255.255.0 20.20.10.2 +Router(config)# + + + + + + + + +Router con0 is now available + + + + + + +Press RETURN to get started. + + + + + + + + + + + + +``` + +``` +Router2 +outer> +Router>en +Router#] +Translating "]"...domain server (255.255.255.255) +% Unknown command or computer name, or unable to find computer address + +Router#con f +% Ambiguous command: "con f" +Router#cont f + ^ +% Invalid input detected at '^' marker. + +Router#conf t +Enter configuration commands, one per line. End with CNTL/Z. +Router(config)#int s3/0 +Router(config-if)#no shu +Router(config-if)#no shutdown + +Router(config-if)# +%LINK-5-CHANGED: Interface Serial3/0, changed state to up + +Router(config-if)# +%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial3/0, changed state to up + +Router(config-if)#ex +Router(config)#int f0/0 +Router(config-if)#no shu +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)#ip ad +Router(config-if)#ip address 192.168.3.254 255.255.255.0 +Router(config-if)#ex +Router(config)#int s3/0 +Router(config-if)#ip ad +Router(config-if)#ip address 20.20.10.2 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)#ex +Router(config)#ip r +Router(config)#ip route 192.168.2.0 255.255.255.0 20.20.10.1 +Router(config)# + + + + + + + + +Router con0 is now available + + + + + + +Press RETURN to get started. + + + + + + + + + + + + + +Router> +Router>en +Router#conf t +Enter configuration commands, one per line. End with CNTL/Z. +Router(config)#ip rou +Router(config)#ip route 192.168.1.0 255.255.255.0 10.254.10.1 +Router(config)# + + + + + + + + +Router con0 is now available + + + + + + +Press RETURN to get started. + + + + + + + + + + + + +``` + diff --git "a/20 \351\273\204\345\205\264\347\205\214/20260513 \345\212\250\346\200\201\350\267\257\347\224\261 .md" "b/20 \351\273\204\345\205\264\347\205\214/20260513 \345\212\250\346\200\201\350\267\257\347\224\261 .md" new file mode 100644 index 0000000000000000000000000000000000000000..d428e8f6b0eaf5f70e6da5ee91f95d8b37a3764b --- /dev/null +++ "b/20 \351\273\204\345\205\264\347\205\214/20260513 \345\212\250\346\200\201\350\267\257\347\224\261 .md" @@ -0,0 +1,209 @@ +第一台路由器连接笔记本电脑的线上设置ip + +``` +Router(config)#int g0/2 +Router(config-if)#no shut + +Router(config-if)# +%LINK-5-CHANGED: Interface GigabitEthernet0/2, changed state to up + +%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/2, changed state to up + +Router(config-if)#ip add 192.168.100.254 255.255.255.0 +Router(config-if)#exit +``` + +第一台交换机上的操作 + +``` +Switch(config)#vlan 40 +Switch(config-vlan)#vlan 50 +Switch(config-vlan)#exit +Switch(config)#int f0/2 +Switch(config-if)#sw mo acc +Switch(config-if)#sw acc vlan 40 +Switch(config-if)#int f 0/3 +Switch(config-if)#sw mo acc +Switch(config-if)#sw acc vlan 50 +Switch(config-if)#int f0/1 +Switch(config-if)#sw mo tr + +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 +``` + +第一个路由器上的操作 + +``` +Router(config-if)#int g0/0.2 +Router(config-subif)# +%LINK-5-CHANGED: Interface GigabitEthernet0/0.2, changed state to up + +%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/0.2, changed state to up + +Router(config-subif)#en do 40 +Router(config-subif)#ip add 192.168.40.254 +% Incomplete command. +Router(config-subif)#ip add 192.168.40.254 255.255.255.0 +Router(config-subif)#exit +Router(config)#int g0/0.3 +Router(config-subif)# +%LINK-5-CHANGED: Interface GigabitEthernet0/0.3, changed state to up + +%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/0.3, changed state to up + +Router(config-subif)#en do 50 +Router(config-subif)#ip add 192.168.50.254 255.255.255.0 +``` + +第一个路由器第三个口的操作 + +``` +Router(config)#int g0/1 +Router(config-if)#ip add 192.168.10.1 255.255.255.0 +Router(config-if)#no shut + +Router(config-if)# +%LINK-5-CHANGED: Interface GigabitEthernet0/1, changed state to up + +%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/1, changed state to up +``` + +第二个交换机设置vlan + +``` +Switch(config)#vlan 60 +Switch(config-vlan)#vlan 70 +Switch(config-vlan)#exit +Switch(config)#int f0/2 +Switch(config-if)#sw mo acc +Switch(config-if)#sw acc vlan 60 +Switch(config-if)#int f0/3 +Switch(config-if)#sw mo acc +Switch(config-if)#sw acc vlan 70 +Switch(config-if)#int f0/1 +Switch(config-if)#sw mo tr + +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)#vlan 60 +Switch(config-vlan)#vlan 70 +Switch(config-vlan)#exit +Switch(config)#int f0/1 +Switch(config-if)#sw tr en do +Switch(config-if)#sw mo tr +Switch(config-if)#exit +Switch(config)#ip routing +Switch(config)#int vlan 60 +Switch(config-if)# +%LINK-5-CHANGED: Interface Vlan60, changed state to up + +%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan60, changed state to up + +Switch(config-if)#ip add 192.168.60.254 255.255.255.0 +Switch(config-if)#exit +Switch(config)#int vlan 70 +Switch(config-if)# +%LINK-5-CHANGED: Interface Vlan70, changed state to up + +%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan70, changed state to up + +Switch(config-if)#ip add 192.168.70.254 255.255.255.0 +``` + +多层交换机左边的线设ip + +``` +Switch(config)#int f0/2 +Switch(config-if)#no sw +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 + +Switch(config-if)#ip add 192.168.10.2 255.255.255.0 +``` + +多层交换机右边的线设ip + +``` +Switch(config-if)#int f0/3 +Switch(config-if)#no shut +Switch(config-if)#no sw +Switch(config-if)#ip add 192.168.20.1 255.255.255.0 +``` + +给第三台路由器设置ip并打开 + +``` +Router(config)#int g0/0 +Router(config-if)#ip add 192.168.20.2 255.255.255.0 +Router(config-if)#no shut + +Router(config-if)# +%LINK-5-CHANGED: Interface GigabitEthernet0/0, changed state to up + +%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/0, changed state to up +``` + +给第三台交换机trunk + +``` +Switch(config)#int f0/1 +Switch(config-if)#sw mo tr +``` + +第三台路由器下面的线的操作 + +``` +Router(config-if)#inter g0/1 +Router(config-if)#ip add 192.168.30.254 255.255.255.0 +Router(config-if)#no shut + +Router(config-if)# +%LINK-5-CHANGED: Interface GigabitEthernet0/1, changed state to up + +%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/1, changed state to up +``` + +ospf协议 + +``` +Router(config)#router ospf 1 +Router(config-router)#net 192.168.100.0 0.0.0.255 ar +Router(config-router)#net 192.168.100.0 0.0.0.255 area 0 +Router(config-router)#net 192.168.40.0 0.0.0.255 ar 0 +Router(config-router)#net 192.168.50.0 0.0.0.255 ar 0 +Router(config-router)#net 192.168.10.1 0.0.0.255 ar 0 + + +Switch(config)#rou os 1 +Switch(config-router)#net 192.168.10.2 0.0.0.255 ar 0 +01:07:13: %OSPF-5-ADJCHG: Process 1, Nbr 192.168.100.254 on FastEthernet0/2 from LOADING to FULL, Loading Done +Switch(config-router)#net 192.168.60.0 0.0.0.255 ar 0 +Switch(config-router)#net 192.168.70.0 0.0.0.255 ar 0 +Switch(config-router)#net 192.168.20.1 0.0.0.255 ar 0 + + +Router(config)#router os 1 +Router(config-router)#net 192.168.20.2 0.0.0.255 ar 0 +Router(config-router)# +01:09:39: %OSPF-5-ADJCHG: Process 1, Nbr 192.168.70.254 on GigabitEthernet0/0 from LOADING to FULL, Loading Done + +Router(config-router)#net 192.168.30.0 0.0.0.255 ar 0 +``` + +![image-20260513121453972](https://gitee.com/ding-junhaooye/picture/raw/master/pic/upgit_20260513_1778645694.png) + +![image-20260513121511270](https://gitee.com/ding-junhaooye/picture/raw/master/pic/upgit_20260513_1778645711.png) + +![image-20260513121518646](https://gitee.com/ding-junhaooye/picture/raw/master/pic/upgit_20260513_1778645718.png)