1、R1enR1#conf tEnter configuration commands, one per line. End with CNTL/Z.R1(config)#int f0/0R1(config-if)#ip add 12.1.1.1 255.255.255.0R1(config-if)#no shR1(config-if)#*Mar 1 00:01:10.847: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up*Mar 1 00:01:11.847: %LINEPROTO-5-UPDOWN: Line pr
2、otocol on Interface FastEthernet0/0, changed state to upR1(config-if)#exitR1(config)#service dhcpR1(config)#ip dhcp excluded-address 23.1.1.1 23.1.1.100R1(config)#ip dhcp pool 205R1(dhcp-config)#network 23.1.1.0 255.255.255.0R1(dhcp-config)#default-router 23.1.1.1R1(dhcp-config)#dns-server 8.8.8.8R1
3、(dhcp-config)#dns-server 202.102.224.68R1#conf tEnter configuration commands, one per line. End with CNTL/Z.R1(config)#ip dhcp excluded-address 24.1.1.1 24.1.1.100R1(config)#ip dhcp pool 207R1(dhcp-config)#network 24.1.1.0 255.255.255.0R1(dhcp-config)#default-router 24.1.1.1R1(dhcp-config)#dns-serve
4、r 8.8.8.8R1(dhcp-config)#dns-server 202.102.224.68R1(dhcp-config)#R1#conf tEnter configuration commands, one per line. End with CNTL/Z.R1(config)#ip routeR1(config)#ip route 23.1.1.0 255.255.255.0 12.1.1.2R1(config)#ip route 24.1.1.0 255.255.255.0 12.1.1.2R1(config)#ZR1#*Mar 1 00:10:05.699: %SYS-5-C
5、ONFIG_I: Configured from console by consoleR2enR2#conf tEnter configuration commands, one per line. End with CNTL/Z.R2(config)#int f0/0R2(config-if)#ip add 12.1.1.2 255.255.255.0R2(config-if)#no shR2(config-if)#*Mar 1 00:12:40.483: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up*Mar 1
6、 00:12:41.483: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to upR2(config-if)#int f1/0R2(config-if)#ip add 23.1.1.1 255.255.255.0R2(config-if)#no shR2(config-if)#int f*Mar 1 00:13:04.163: %LINK-3-UPDOWN: Interface FastEthernet1/0, changed state to up*Mar 1 00:13:05
7、.163: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet1/0, changed state to upR2(config-if)#int f2/0R2(config-if)#ip add 24.1.1.1 255.255.255.0R2(config-if)#no shR2(config-if)#*Mar 1 00:13:26.587: %LINK-3-UPDOWN: Interface FastEthernet2/0, changed state to up*Mar 1 00:13:27.587: %LINEPRO
8、TO-5-UPDOWN: Line protocol on Interface FastEthernet2/0, changed state to upR2(config-if)#int f1/0R2(config-if)#ip helper-address 12.1.1.1R2(config-if)#int f2/0R2(config-if)#ip helper-address 12.1.1.1R2(config-if)#ZR2#*Mar 1 00:14:15.723: %SYS-5-CONFIG_I: Configured from console by consoleR2#R3enR3#
9、conf tEnter configuration commands, one per line. End with CNTL/Z.R3(config)#int f0/0R3(config-if)#no shR3(config-if)#ip add*Mar 1 00:16:51.827: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up*Mar 1 00:16:52.827: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed
10、 state to upR3(config-if)#ip address dhcpR3(config-if)#*Mar 1 00:17:18.483: %DHCP-6-ADDRESS_ASSIGN: Interface FastEthernet0/0 assigned DHCP address 23.1.1.101, mask 255.255.255.0, hostname R3R3(config-if)#R4enR4#conf tEnter configuration commands, one per line. End with CNTL/Z.R4(config)#int f0/0R4(config-if)#no shR4(config-if)#ip address dhcpR4(config-if)#*Mar 1 00:25:59.555: %DHCP-6-ADDRESS_ASSIGN: Interface FastEthernet0/0 assigned DHCP address 24.1.1.101, mask 255.255.255.0, hostname R2