20201007 Introduction DHCP
Last updated
Last updated
conf t
hostname R1
do writ
int s1/0
ip addr 12.1.1.1 255.255.255.252
no shut
clock rate 64000
conf t
hostname R2
do writ
int s1/0
ip addr 12.1.1.2 255.255.255.252
no shut
clock rate 64000
do sh ip int brief
exit
int lo 0
ip addr 1.1.1.1 255.255.255.255
int lo 0
do sh ip int brief
int lo 0
ip addr 2.2.2.2 255.255.255.255
no shut
do sh ip int brief
exit
do sh ip ro
do sh ip ro 12.1.1.2
ip route 2.2.2.0 255.255.255.0 ?
ip route 2.2.2.0 255.255.255.0 s1/0 12.1.1.2
do sh ip ro
do sh ip ro 2.2.2.2
do ping 2.2.2.2
do ping 2.2.2.2 source 1.1.1.1
do sh ip ro 12.1.1.1
ip route 1.1.1.0 255.255.255.0 ?
ip route 1.1.1.0 255.255.255.0 s1/0 12.1.1.1
do sh ip ro
do sh ip ro 1.1.1.1
do ping 1.1.1.1
do ping 1.1.1.1 source 2.2.2.2
hostname R3
do writ
int e0/0
ip addr 192.168.1.1 255.255.255.0
no shut
exit
int lo 0
ip addr 3.3.3.3 255.255.255.255
no shut
do sh ip int brief
exit
ip route 4.4.4.0 255.255.255.0 192.168.1.2
do sh ip ro
do sh ip ro 4.4.4.4
do ping 4.4.4.4
hostname R4
do writ
int e0/0
ip addr 192.168.1.2 255.255.255.0
no shut
exit
int lo 0
ip addr 4.4.4.4 255.255.255.255
no shut
do sh ip int brief
exit
ip route 5.5.5.0 255.255.255.0 192.168.1.3
do sh ip ro
do sh ip ro 5.5.5.5
do ping 5.5.5.5
hostname R5
do wirt
int e0/0
ip addr 192.168.1.3 255.255.255.0
no shut
exit
int lo 0
ip addr 5.5.5.5 255.255.255.255
no shut
do sh ip int brief
exit
ip route 3.3.3.0 255.255.255.0 192.168.1.1
do sh ip ro
do sh ip ro 3.3.3.3
do ping 3.3.3.3
hostname R1
do writ
int e0/0
ip addr 12.1.1.1 255.255.255.0
no shut
int e0/1
ip addr 192.168.1.1 255.255.255.0
no shut
exit
ip dhcp pool DHCP
network 192.168.1.0 /24
default-router 192.168.1.1
dns-server 8.8.8.8
ip route 23.1.1.0 255.255.255.0 e0/0 12.1.1.2
ip route 192.168.2.0 255.255.255.0 e0/0 12.1.1.2
hostname R3
do writ
int e0/0
ip addr 23.1.1.3 255.255.255.0
no shut
int e0/1
ip addr 192.168.2.1 255.255.255.0
no shut
exit
ip dhcp pool DHCP2
network 192.168.2.0 /24
default-router 192.168.2.1
dns-server 8.8.8.8
ip route 192.168.1.0 255.255.255.0 e0/0 23.1.1.2
hostname R2
do writ
int e0/0
ip addr 12.1.1.2 255.255.255.0
no shut
int e0/1
ip addr 23.1.1.2 255.255.255.0
no shut
ip route 192.168.1.0 255.255.255.0 e0/0 12.1.1.1
ip route 192.168.2.0 255.255.255.0 e0/0 23.1.1.3
ip route 192.168.2.0 255.255.255.0 e0/1 23.1.1.3
ip dhcp
sh ip
ping 192.168.2.1
hostname R1
do writ
int e0/0
ip addr 12.1.1.1 255.255.255.0
no shut
ip route 0.0.0.0 0.0.0.0 e0/0 12.1.1.2
do sh ip ro
do ping 3.3.3.3
do sh ip static ro
hostname R2
do writ
int e0/0
ip addr 12.1.1.2 255.255.255.0
no shut
int lo 0
ip addr 2.2.2.2 255.255.255.255
int lo 1
ip addr 3.3.3.3 255.255.255.255