简单介绍静态路由

静态路由(tatic routing),一种路由的方式,路由项(routing entry)由手动配置,而非动态决定。与动态路由不同,静态路由是固定的,不会改变,即使网络状况已经改变或是重新被组态。一般来说,静态路由是由网络管理员逐项加入路由表。

优点

使用静态路由的另一个好处是网络安全保密性高。动态路由因为需要路由器之间频繁地交换各自的路由表,而对路由表的分析可以揭示网络的拓扑结构和网络地址等信息。因此,网络出于安全方面的考虑也可以采用静态路由。不占用网络带宽,因为静态路由不会产生更新流量。

缺点

大型和复杂的网络环境通常不宜采用静态路由。一方面,网络管理员难以全面地了解整个网络的拓扑结构;另一方面,当网络的拓扑结构和链路状态发生变化时,路由器中的静态路由信息需要大范围地调整,这一工作的难度和复杂程度非常高。当网络发生变化或网络发生故障时,不能重选路由,很可能使路由失败。

简单介绍静态路由_第1张图片

SW1

The device is running!

undo terminal monitor
Info: Current terminal monitor is off.
sys
Enter system view, return user view with Ctrl+Z.
[Huawei]vlan bat 10 to 40                             
Info: This operation may take a few seconds. Please wait for a moment...done.
[Huawei]int e0/0/1	
[Huawei-Ethernet0/0/1]port link-type access              
[Huawei-Ethernet0/0/1]port default vlan 10            
[Huawei-Ethernet0/0/1]int e0/0/2
[Huawei-Ethernet0/0/2]port link-type access
[Huawei-Ethernet0/0/2]port default vlan 20
[Huawei-Ethernet0/0/2]int g0/0/1	
[Huawei-GigabitEthernet0/0/1]port link-type trunk       
[Huawei-GigabitEthernet0/0/1]port trunk all vlan all  

SW2

The device is running!

undo terminal monitor
Info: Current terminal monitor is off.
sys
Enter system view, return user view with Ctrl+Z.
[Huawei]vlan bat 10 to 40
Info: This operation may take a few seconds. Please wait for a moment...done.
[Huawei]int e0/0/1
[Huawei-Ethernet0/0/1]port link-type access
[Huawei-Ethernet0/0/1]port default vlan 30
[Huawei-Ethernet0/0/1]int e0/0/2
[Huawei-Ethernet0/0/2]port link-type access
[Huawei-Ethernet0/0/2]port default vlan 40
[Huawei-Ethernet0/0/2]int g0/0/1
[Huawei-GigabitEthernet0/0/1]port link-type trunk
[Huawei-GigabitEthernet0/0/1]port trunk all vlan all

R1

The device is running!

undo terminal monitor
Info: Current terminal monitor is off.
sys
Enter system view, return user view with Ctrl+Z.
[Huawei]int g0/0/0
[Huawei-GigabitEthernet0/0/0]undo shutdown
Info: Interface GigabitEthernet0/0/0 is not shutdown.
[Huawei-GigabitEthernet0/0/0]int g0/0/0.1	            
[Huawei-GigabitEthernet0/0/0.1]vlan-type d 10 d         
[Huawei-GigabitEthernet0/0/0.1]ip add 192.168.10.1 24   
[Huawei-GigabitEthernet0/0/0.1]int g0/0/0.2
[Huawei-GigabitEthernet0/0/0.2]vlan-type d 20 d
[Huawei-GigabitEthernet0/0/0.2]ip add 192.168.20.1 24
[Huawei-GigabitEthernet0/0/0.2]q
[Huawei]int g0/0/1
[Huawei-GigabitEthernet0/0/1]ip add 10.1.1.2 24
[Huawei-GigabitEthernet0/0/1]q	
[Huawei]ip route-static 192.168.30.0 24 10.1.1.3       
[Huawei]ip route-static 192.168.40.0 24 10.1.1.3

R2

The device is running!

undo terminal monitor
Info: Current terminal monitor is off.
sys
Enter system view, return user view with Ctrl+Z.
[Huawei]int g0/0/0
[Huawei-GigabitEthernet0/0/0]undo shutdown
Info: Interface GigabitEthernet0/0/0 is not shutdown.
[Huawei-GigabitEthernet0/0/0]int g0/0/0.1
[Huawei-GigabitEthernet0/0/0.1]vlan-type d 30 d
[Huawei-GigabitEthernet0/0/0.1]ip add 192.168.30.1 24
[Huawei-GigabitEthernet0/0/0.1]int g0/0/0.2
[Huawei-GigabitEthernet0/0/0.2]vlan-type d 40 d
[Huawei-GigabitEthernet0/0/0.2]ip add 192.168.40.1 24
[Huawei-GigabitEthernet0/0/0.2]q
[Huawei]int g0/0/1
[Huawei-GigabitEthernet0/0/1]ip add 10.1.1.3 24
[Huawei-GigabitEthernet0/0/1]q	
[Huawei]ip route-static 192.168.10.0 24 10.1.1.2
[Huawei]ip route-static 192.168.20.0 24 10.1.1.2

 

你可能感兴趣的:(计算机网络,路由器,网络)