华为路由器配置端口IP地址、掩码、网关、DNS及配置默认路由的命令及实例:

  1. 配置端口IP地址、掩码、网关: interface GigabitEthernet 0/0/1 ip address 192.168.1.1 255.255.255.0 undo shutdown quit

  2. 配置DNS: ip dns server address 8.8.8.8

  3. 配置默认路由: ip route-static 0.0.0.0 0.0.0.0 192.168.1.254

说明:

  • GigabitEthernet 0/0/1为需要配置的端口号;
  • IP地址为192.168.1.1,掩码为255.255.255.0;
  • 网关为192.168.1.254;
  • DNS地址为8.8.8.8;
  • 默认路由为0.0.0.0/0,下一跳为192.168.1.254。

原文地址: http://www.cveoy.top/t/topic/fqf0 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录