座机 发表于 2018-7-15 10:16:56

Cisco设备;静态路由;DHCP的基础配置

  静态路由配置:

  配置思路以及步骤:
  1、配置主机 PC-1 的 IP地址与网关IP地址;

  2、配置路由器 R1 的 互联端口 IP 地址;

  3、配置主机 PC-2 的 IP地址与网关IP地址;

  4、配置路由器 R2 的 互联端口 IP 地址;

  5、在 R1 配置去往 192.168.20.0 /24的路由;
  R1(config)# ip route 192.168.20.0 255.255.255.0 192.168.12.2
  6、在 R2 配置去往 192.168.10.0 /24的路由;
  R2(config)# ip route 192.168.10.0 255.255.255.0 192.168.12.1
  7、验证与 测试 :
  路由条目验证,
  R1#show ip route //查看 R1 的路由表;

  R2#show ip route //查看 R2 的路由表;

  PC-1与PC-2之间进行互相 ping 通测试;
  PC-1> ping 192.168.20.1
  PC-2> ping 192.168.10.1

  实验结果 :终端主机互相Ping通;
  -----------------------------------------------------------------------------------------------
  DHCP配置实验:
  Router 作为 DHCP 服务器:

  1、配置 Router 地址:
  Router(config)#hostname GateWay
  GateWay(config)#interface gi0/0
  GateWay(config-if)# no shutdown
  GateWay(config-if)# ip address 192.168.1.1 255.255.255.0



  4、配置 DHCP 客户端 :
  点击 - ”DHCP“ ;

  5、验证命令:
  在服务器端的验证命令:
  GateWay# show ip dhcp binding

  GateWay# show running-config
  在客户端的验证:
  运行--> cmd ---> ipconfig /all

  ---------------------------------------------------------
  Switch 作为 DHCP 服务器:
  1、配置交换机的IP地址;
  Switch(config)# interface vlan 1
  Switch(config-if)# no shutdown
  Switch(config-if)# ip address 192.168.1.250 255.255.255.0

  2、启动 DHCP 服务 :
  Switch(config)# service dhcp
  3、配置 DHCP 的排除地址:
  Switch(config)# ip dhcp excluded-address 192.168.1.1192.168.1.99
  4、配置 DHCP 地址池 :
  Switch(config)# ip dhcp pool CCNP
  Switch(dhcp-config)# network 192.168.1.0 255.255.255.0
  Switch(dhcp-config)# default-router 192.168.1.1
  Switch(dhcp-config)# dns-server8.8.6.6

  5、配置 DHCP 客户端 ;
  6、验证:
  Switch#show ip interface brief// 查看交换机接口IP地址配置;
  Switch#show running-config   //查看 DHCP 的相关配置命令;
  Switch#show ip dhcp binding //查看DHCP服务器分配成功的IP地址
  在 PC 上 :
  ipconfig /all   // 在 PC 的命令行中查看自动获取的IP地址

页: [1]
查看完整版本: Cisco设备;静态路由;DHCP的基础配置