默认路由
Tip:默认路由一般指出口网关设备的出口路由。实现所有网段流量都走一条路由。
实验模拟:公司内部pc 通过出口网关 访问运营商内部 baidu服务
isp网关配置:
<Huawei>sy
Enter system view, return user view with Ctrl+Z.
[Huawei]sys ispGateway
[ispGateway]int g0/0/0
[ispGateway-GigabitEthernet0/0/0]ip add 12.1.1.254 24
[ispGateway]ip route-static 192.168.1.0 24 12.1.1.2
//回程路由
[ispGateway]int g0/0/1
[ispGateway-GigabitEthernet0/0/1]ip add 172.16.1.1 24
公司出口网关配置
`sy
Enter system view, return user view with Ctrl+Z.
[Huawei]sys offGateway
[offGateway]int g0/0/0
[offGateway-GigabitEthernet0/0/0]ip add 12.1.1.2 24
`[offGateway-GigabitEthernet0/0/0]int g0/0/1
[offGateway-GigabitEthernet0/0/1]ip add 192.168.1.1 24
[offGateway-GigabitEthernet0/0/1]q [offGateway]ip route-static 0.0.0.0 0.0.0.0 12.1.1.254
//默认路由