静态路由的原理:
要了解静态路由的原理,首先我们要知道什么是路由
路由就是源主机向目的主机发送数据包经过路径转发的服务
静态路是由管理员手工配置。
静态路由不能自动适应网络拓扑结构的变化。当网络发生故障或者拓扑发生变化后,必须由网络管理员手工修改配置 。
实验
1拓扑结构

静态路由原理及实验


2需求:使图中的主机通过管理员设置的静态路由能进行互通
3配置步骤
SwitchA:
system-view
vlan 300
vlan 500
quit
interface vlan 300
ip address 1.1.2.3 24
quit
interface vlan 500
ip address 1.1.4.1 30
quit
interface GigabitEthernet 1/0/1
port access vlan 300
quit
interface GigabitEthernet 1/0/11
port access vlan 500
quit
ip route-static 0.0.0.0 0.0.0.0 1.1.4.2

SwitchB:
system-view
vlan 500
vlan 600
vlan 100
quit
interface vlan 500
ip address 1.1.4.2 30
quit
interface vlan 600
ip address 1.1.5.5 30
quit
quitinterface vlan 100
ip address 1.1.6.1 24
quit
interface GigabitEthernet 1/0/11
port access vlan 500
quit
interface GigabitEthernet 1/0/16
port access vlan 600
quit
interface GigabitEthernet 1/0/1
port access vlan 100
quit
ip route-static 1.1.2.0 255.255.255.0 1.1.4.1
ip route-static 1.1.3.0 255.255.255.0 1.1.5.6

SwitchC:
system-view
vlan 600
vlan 900
quit
interface vlan 600
ip address 1.1.5.6 30
quit
interface vlan 900
ip address 1.1.3.1 24
quit
interface GigabitEthernet 1/0/16
port access vlan 600
quit
interface GigabitEthernet 1/0/1
port access vlan 900
quit
ip route-static 0.0.0.0 0.0.0.0 1.1.5.5

测试结果

静态路由原理及实验


静态路由原理及实验

静态路由原理及实验