diff --git "a/30 \351\203\255\347\264\253\346\272\252/20260514DHCP\343\200\201DNS.md" "b/30 \351\203\255\347\264\253\346\272\252/20260514DHCP\343\200\201DNS.md" new file mode 100644 index 0000000000000000000000000000000000000000..e4fa700f3a8d215cc8767fca57c17026cf95f8e7 --- /dev/null +++ "b/30 \351\203\255\347\264\253\346\272\252/20260514DHCP\343\200\201DNS.md" @@ -0,0 +1,116 @@ +```` +Router>enable +Router#conf t +Enter configuration commands, one per line. End with CNTL/Z. +Router(config)#interface f0/0 +Router(config-if)#ip address 192.168.3.1 255.255.255.0 +Router(config-if)#no shut + +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)#exit +Router(config)#interface serial0/0/0 +Router(config-if)#ip address 10.0.0.2 255.255.255.0 +Router(config-if)#no shut + +%LINK-5-CHANGED: Interface Serial0/0/0, changed state to down +Router(config-if)# +Router(config-if)#ip route 192.168.1.0 255.255.255.0 10.0.0.1 +Router(config)#ip route 192.168.1.0 255.255.255.0 10.0.0.1 +Router(config)#ip route 192.168.2.0 255.255.255.0 10.0.0.1 +Router(config)#end +Router# +%SYS-5-CONFIG_I: Configured from console by console + +Router# +```` + +``` +Router>enable +Router#interface f0/0 + ^ +% Invalid input detected at '^' marker. + +Router#conf t +Enter configuration commands, one per line. End with CNTL/Z. +Router(config)#interface f0/0 +Router(config-if)#ip add 192.168.1.1 255.255.255.0 +Router(config-if)#no shut + +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)#interface f0/1 +Router(config-if)#ip add 192.168.2.1 255.255.255.0 +Router(config-if)#no shut + +Router(config-if)# +%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up + +%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up + +Router(config-if)#interface serial0/0/0 +Router(config-if)#ip address 10.0.0.1 255.255.255.0 +Router(config-if)#no shut + +Router(config-if)# +%LINK-5-CHANGED: Interface Serial0/0/0, changed state to up + +Router(config-if)#exit +Router(config)#ip route +%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0/0, changed sta +Router(config)#ip route 192.168.3.0 255.255.255.0 10.0.0.2 +Router(config)#service dhcp +Router(config)#ip dhcp cc + ^ +% Invalid input detected at '^' marker. + +Router(config)#ip dhcp pool cc +Router(dhcp-config)#network 192.168.1.0 255.255.255.0 +Router(dhcp-config)#default-router 192.168.1.1 +Router(dhcp-config)#exit +Router(config)#service dhcp +Router(config)#ip dhcp pool dd +Router(dhcp-config)#network 192.168.2.0 255.255.255.0 +Router(dhcp-config)#default-router 192.168.2.1 +Router(dhcp-config)#exit +Router(config)#inter fa0/0 +Router(config-if)#ip helper-address 192.168.3.2 +Router(config-if)#exit +Router(config)#inter fa0/1 +Router(config-if)#ip helper-address 192.168.3.2 +Router(config-if)#exit +Router(config)#exit +Router# +%SYS-5-CONFIG_I: Configured from console by console + +Router# +``` + +``` + +Packet Tracer PC Command Line 1.0 +C:\>ping 192.168.2.2 + +Pinging 192.168.2.2 with 32 bytes of data: + +Request timed out. +Reply from 192.168.2.2: bytes=32 time<1ms TTL=127 +Reply from 192.168.2.2: bytes=32 time=1ms TTL=127 +Reply from 192.168.2.2: bytes=32 time=1ms TTL=127 + +Ping statistics for 192.168.2.2: + Packets: Sent = 4, Received = 3, Lost = 1 (25% loss), +Approximate round trip times in milli-seconds: + Minimum = 0ms, Maximum = 1ms, Average = 0ms + +C:\> +C:\> +``` + +![image-20260519171205746](C:\Users\Administrator\AppData\Roaming\Typora\typora-user-images\image-20260519171205746.png)