实验要求:
1、使用静态路由
2、4台PC自动获取IP
3、全网可达
具体操作如下
R1:
//基本配置
# (config)hostname R1
# (config)no ip domain-lookup
//R1的0/0接口设置
#interface FastEthernet0/0
#no shutdown
#ip address 192.168.1.1 255.255.255.0
//R1的0/1接口设置
#interface FastEthernet0/1
#no shutdown
#ip address 192.168.3.1 255.255.255.0
//添加静态路由
#(config)ip route 192.168.2.0 255.255.255.0 192.168.3.2
//DHCP设置
#(config)ip dhcp pool v1
#(dhcp-config)network 192.168.1.0 255.255.255.0
#(dhcp-config)default-router 192.168.1.1
#(dhcp-config)dns-server 8.8.8.8
R2:
//基本配置
# (config)hostname R2
# (config)no ip domain-lookup
//R1的0/0接口设置
#interface FastEthernet0/0
#no shutdown
#ip address 192.168.1.1 255.255.255.0
//R1的0/1接口设置
#interface FastEthernet0/1
#no shutdown
#ip address 192.168.3.1 255.255.255.0
//添加静态路由
#(config)ip route 192.168.1.0 255.255.255.0 192.168.3.1
//DHCP设置
#(config)ip dhcp pool v2
#(dhcp-config)network 192.168.2.0 255.255.255.0
#(dhcp-config)default-router 192.168.2.1
#(dhcp-config)dns-server 8.8.8.8
调试检测