静态路由实验 +http+dns_华为静态路由配置实验

本试验主要实验静态路由的三个主要特性

1、单向性

仅为数据提供沿着下一跳的方向进行路由,不提供反向路由。如果要使源节点域目标网络进行双向通信,必须同时配置回程静态路由

2、接力性

如果某条静态路由中间经过的跳数大于1(路由要经过3个或以上路由节点),则必须在除最后一个路由器外的其他路由器上依次配置到达相同目的节点或目的网络的静态路由。(路由器各端口上直连的各个网络都是直连互通的,因此之间默认是直连路由,因而无需另外配置路由。)

3、迭代性

理论上来说,静态路由的下一跳可以是路径中其他路由器中的任意一个接口,只要能保证路由到达下一跳就行了。

2fbc73394f62fab936f885c68a6d74de.png

具体配置:

dis cu

[V200R003C00]

#

sysname r6

#

interface GigabitEthernet0/0/1

ip address 10.1.3.254 255.255.255.0

#

ip route-static 10.1.1.0 255.255.255.0 10.1.2.254

ip route-static 10.1.2.0 255.255.255.0 10.1.3.1

ip route-static 172.16.1.0 255.255.255.0 10.1.3.1

ip route-static 172.16.2.0 255.255.255.0 10.1.3.1

ip route-static 192.168.0.0 255.255.0.0 10.1.2.254 #此处聚合性静态路由 以及迭代性示例

#

return

------------------

dis cu

[V200R003C00]

#

sysname r4

#

interface GigabitEthernet0/0/0

ip address 172.16.1.254 255.255.255.0

#

interface GigabitEthernet0/0/1

ip address 10.1.3.1 255.255.255.0

#

interface GigabitEthernet0/0/2

ip address 10.1.2.254 255.255.255.0

#

ip route-static 10.1.1.0 255.255.255.0 10.1.2.1

ip route-static 172.16.2.0 255.255.255.0 172.16.1.1

ip route-static 172.16.10.0 255.255.255.0 172.16.1.1

ip route-static 192.168.0.0 255.

#

return

------------------

dis cu

#

sysname s1

#

vlan batch 2 10 100

#

interface Vlanif2

ip address 172.16.2.254 255.255.255.0

#

interface Vlanif10

ip address 172.16.10.254 255.255.255.0

#

interface Vlanif100

ip address 172.16.1.1 255.255.255.0

#

interface GigabitEthernet0/0/2

port link-type access

port default vlan 2

#

interface GigabitEthernet0/0/23

port link-type access

port default vlan 10

#

interface GigabitEthernet0/0/24

port link-type trunk

port trunk pvid vlan 100

port trunk allow-pass vlan 2 to 4094

#

ip route-static 0.0.0.0 0.0.0.0 172.16.1.254

ip route-static 10.1.2.0 255.255.255.0 172.16.1.254

ip route-static 10.1.3.0 255.255.255.0 172.16.1.254

#

return

--------------------------

dis cu

[V200R003C00]

#

sysname r5

#

interface GigabitEthernet0/0/1

ip address 10.1.1.254 255.255.255.0

#

interface GigabitEthernet0/0/2

ip address 10.1.2.1 255.255.255.0

#

ip route-static 10.1.3.0 255.255.255.0 10.1.2.254

ip route-static 172.16.0.0 255.255.0.0 10.1.2.254

ip route-static 192.168.0.0 255.255.0.0 10.1.1.1

#

return

------------------

dis cu

[V200R003C00]

#

sysname r3

#

interface GigabitEthernet0/0/0

ip address 192.168.1.254 255.255.255.0

#

interface GigabitEthernet0/0/1

ip address 10.1.1.1 255.255.255.0

#

ip route-static 10.1.2.0 255.255.255.0 10.1.1.254

ip route-static 10.1.3.0 255.255.255.0 10.1.1.254

ip route-static 172.16.2.0 255.255.255.0 10.1.1.254

ip route-static 172.16.10.0 255.255.255.0 10.1.1.254

ip route-static 192.168.2.0 255.255.255.0 192.168.1.1

#

return

--------------------

dis cu

#

sysname s3

#

vlan batch 20 100

#

interface Vlanif20

ip address 192.168.2.254 255.255.255.0

#

interface Vlanif100

ip address 192.168.1.1 255.255.255.0

#

interface GigabitEthernet0/0/24

port link-type trunk

port trunk pvid vlan 100

port trunk allow-pass vlan 2 to 4094

#

ip route-static 0.0.0.0 0.0.0.0 192.168.1.254

ip route-static 10.1.1.0 255.255.255.0 192.168.1.254

ip route-static 172.16.0.0 255.255.0.0 10.1.1.1

#

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值