H3C的静态路由配置(h3c静态路由配置)

网友投稿 381 2022-09-25


H3C的静态路由配置(h3c静态路由配置)

配置R1的路由

#Oct 11 20:08:28:820 2017 RT1 SHELL/4/LOGIN:

Trap 1.3.6.1.4.1.25506.2.2.1.1.3.0.1: login from Console

%Oct 11 20:08:28:820 2017 RT1 SHELL/5/SHELL_LOGIN: Console logged in from con0.

sys

system-view

System View: return to User View with Ctrl+Z.

[RT1]int

[RT1]interface g

[RT1]interface GigabitEthernet 0/0/0

[RT1-GigabitEthernet0/0/0]ip add

[RT1-GigabitEthernet0/0/0]ip address 192.168.1.1 24

[RT1-GigabitEthernet0/0/0]int g0/0/1

[RT1-GigabitEthernet0/0/1]ip add

[RT1-GigabitEthernet0/0/1]ip address 192.168.2.1 24

[RT1-GigabitEthernet0/0/1]dis

[RT1-GigabitEthernet0/0/1]display ip int br

[RT1-GigabitEthernet0/0/1]display ip int brief

*down: administratively down

(s): spoofing

Interface Physical Protocol IP Address Description

GigabitEthernet0/0/0 up up 192.168.1.1 GigabitEt...

GigabitEthernet0/0/1 up up 192.168.2.1 GigabitEt...

GigabitEthernet0/0/2 down down unassigned GigabitEt...

GigabitEthernet0/0/3 down down unassigned GigabitEt...

Serial0/1/0 down down unassigned Serial0/1...

Serial0/1/1 down down unassigned Serial0/1...

Serial0/1/2 down down unassigned Serial0/1...

Serial0/1/3 down down unassigned Serial0/1...

[RT1-GigabitEthernet0/0/1]display ip routing-table

Routing Tables: Public

Destinations : 6 Routes : 6

Destination/Mask Proto Pre Cost NextHop Interface

127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0

127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0

192.168.1.0/24 Direct 0 0 192.168.1.1 GE0/0/0

192.168.1.1/32 Direct 0 0 127.0.0.1 InLoop0

192.168.2.0/24 Direct 0 0 192.168.2.1 GE0/0/1

192.168.2.1/32 Direct 0 0 127.0.0.1 InLoop0

[RT1-GigabitEthernet0/0/1]

[RT1-GigabitEthernet0/0/1]quit

[RT1]ip route

[RT1]ip route-

[RT1]ip route-static 192.168.3.0 24 192.168.2.2

[RT1]ip route

[RT1]ip route-s

[RT1]ip route-static 192.168.4.0 24 192.168.3.2

[RT1]dis

[RT1]display ip route

[RT1]display ip routes

[RT1]display ip route-

[RT1]display ip route-

[RT1]display ip route-s

[RT1]display ip route-t

[RT1]display ip rout

[RT1]display ip routing-table

Routing Tables: Public

Destinations : 8 Routes : 8

Destination/Mask Proto Pre Cost NextHop Interface

127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0

127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0

192.168.1.0/24 Direct 0 0 192.168.1.1 GE0/0/0

192.168.1.1/32 Direct 0 0 127.0.0.1 InLoop0

192.168.2.0/24 Direct 0 0 192.168.2.1 GE0/0/1

192.168.2.1/32 Direct 0 0 127.0.0.1 InLoop0

192.168.3.0/24 Static 60 0 192.168.2.2 GE0/0/1

192.168.4.0/24 Static 60 0 192.168.3.2 GE0/0/1

配置R2的路由

#Oct 11 20:18:52:357 2017 RT2 SHELL/4/LOGIN:

Trap 1.3.6.1.4.1.25506.2.2.1.1.3.0.1: login from Console

%Oct 11 20:18:52:357 2017 RT2 SHELL/5/SHELL_LOGIN: Console logged in from con0.

sys

system-view

System View: return to User View with Ctrl+Z.

[RT2]int

[RT2]interface g

[RT2]interface GigabitEthernet 0/0/0

[RT2-GigabitEthernet0/0/0]ip add

[RT2-GigabitEthernet0/0/0]ip address 192.168.2.2 24

[RT2-GigabitEthernet0/0/0]undo sh

Interface GigabitEthernet0/0/0 is not shut down

[RT2-GigabitEthernet0/0/0]int

[RT2-GigabitEthernet0/0/0]int g

[RT2-GigabitEthernet0/0/0]int g0/0/1

[RT2-GigabitEthernet0/0/1]ip add

[RT2-GigabitEthernet0/0/1]ip address 192.168.3.1 24

[RT2-GigabitEthernet0/0/1]undo sh

Interface GigabitEthernet0/0/1 is not shut down

[RT2-GigabitEthernet0/0/1]dis

[RT2-GigabitEthernet0/0/1]display ip int br

[RT2-GigabitEthernet0/0/1]display ip int brief

*down: administratively down

(s): spoofing

Interface Physical Protocol IP Address Description

GigabitEthernet0/0/0 up up 192.168.2.2 GigabitEt...

GigabitEthernet0/0/1 up up 192.168.3.1 GigabitEt...

GigabitEthernet0/0/2 down down unassigned GigabitEt...

GigabitEthernet0/0/3 down down unassigned GigabitEt...

Serial0/1/0 down down unassigned Serial0/1...

Serial0/1/1 down down unassigned Serial0/1...

Serial0/1/2 down down unassigned Serial0/1...

Serial0/1/3 down down unassigned Serial0/1...

[RT2-GigabitEthernet0/0/1]dis

[RT2-GigabitEthernet0/0/1]display ip route

[RT2-GigabitEthernet0/0/1]display ip rout

[RT2-GigabitEthernet0/0/1]display ip routing-table

Routing Tables: Public

Destinations : 6 Routes : 6

Destination/Mask Proto Pre Cost NextHop Interface

127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0

127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0

192.168.2.0/24 Direct 0 0 192.168.2.2 GE0/0/0

192.168.2.2/32 Direct 0 0 127.0.0.1 InLoop0

192.168.3.0/24 Direct 0 0 192.168.3.1 GE0/0/1

192.168.3.1/32 Direct 0 0 127.0.0.1 InLoop0

[RT2-GigabitEthernet0/0/1]

[RT2-GigabitEthernet0/0/1]quit

[RT2]ip rout

[RT2]ip route-s

[RT2]ip route-static 192.168.1.0 24 192.168.2.1

[RT2]ip route

[RT2]ip route-s

[RT2]ip route-static 192.168.4.0 24 192.168.3.2

[RT2]dis

[RT2]display ip

[RT2]display ip r

[RT2]display ip routing-table

Routing Tables: Public

Destinations : 8 Routes : 8

Destination/Mask Proto Pre Cost NextHop Interface

127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0

127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0

192.168.1.0/24 Static 60 0 192.168.2.1 GE0/0/0

192.168.2.0/24 Direct 0 0 192.168.2.2 GE0/0/0

192.168.2.2/32 Direct 0 0 127.0.0.1 InLoop0

192.168.3.0/24 Direct 0 0 192.168.3.1 GE0/0/1

192.168.3.1/32 Direct 0 0 127.0.0.1 InLoop0

192.168.4.0/24 Static 60 0 192.168.3.2 GE0/0/1

配置R3的路由

sys

system-view

System View: return to User View with Ctrl+Z.

[RT3]int

[RT3]interface g

[RT3]interface GigabitEthernet 0/0/0

[RT3-GigabitEthernet0/0/0]ip add

[RT3-GigabitEthernet0/0/0]ip address 192.168.3.2 24

[RT3-GigabitEthernet0/0/0]int

[RT3-GigabitEthernet0/0/0]int g0/0/1

[RT3-GigabitEthernet0/0/1]ip add

[RT3-GigabitEthernet0/0/1]ip address 192.168.4.1 24

[RT3-GigabitEthernet0/0/1]undo sh

Interface GigabitEthernet0/0/1 is not shut down

[RT3-GigabitEthernet0/0/1]dis

[RT3-GigabitEthernet0/0/1]display ip route

[RT3-GigabitEthernet0/0/1]display ip int br

[RT3-GigabitEthernet0/0/1]display ip int brief

*down: administratively down

(s): spoofing

Interface Physical Protocol IP Address Description

GigabitEthernet0/0/0 up up 192.168.3.2 GigabitEt...

GigabitEthernet0/0/1 up up 192.168.4.1 GigabitEt...

GigabitEthernet0/0/2 down down unassigned GigabitEt...

GigabitEthernet0/0/3 down down unassigned GigabitEt...

Serial0/1/0 down down unassigned Serial0/1...

Serial0/1/1 down down unassigned Serial0/1...

Serial0/1/2 down down unassigned Serial0/1...

Serial0/1/3 down down unassigned Serial0/1...

[RT3-GigabitEthernet0/0/1]dis

[RT3-GigabitEthernet0/0/1]display ip route

[RT3-GigabitEthernet0/0/1]display ip rout

[RT3-GigabitEthernet0/0/1]display ip routing-table

Routing Tables: Public

Destinations : 6 Routes : 6

Destination/Mask Proto Pre Cost NextHop Interface

127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0

127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0

192.168.3.0/24 Direct 0 0 192.168.3.2 GE0/0/0

192.168.3.2/32 Direct 0 0 127.0.0.1 InLoop0

192.168.4.0/24 Direct 0 0 192.168.4.1 GE0/0/1

192.168.4.1/32 Direct 0 0 127.0.0.1 InLoop0

[RT3-GigabitEthernet0/0/1]quit

[RT3]ip route

[RT3]ip route-s

[RT3]ip route-static 192.168.2.0 24 192.168.3.1

[RT3]ip route

[RT3]ip route-s

[RT3]ip route-static 192.168.1.0 24 192.168.2.1

[RT3]dis

[RT3]display ip rout

[RT3]display ip routing-table

Routing Tables: Public

Destinations : 8 Routes : 8

Destination/Mask Proto Pre Cost NextHop Interface

127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0

127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0

192.168.1.0/24 Static 60 0 192.168.2.1 GE0/0/0

192.168.2.0/24 Static 60 0 192.168.3.1 GE0/0/0

192.168.3.0/24 Direct 0 0 192.168.3.2 GE0/0/0

192.168.3.2/32 Direct 0 0 127.0.0.1 InLoop0

192.168.4.0/24 Direct 0 0 192.168.4.1 GE0/0/1

192.168.4.1/32 Direct 0 0 127.0.0.1 InLoop0

测试两台PC机的连通


版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:VRRP原理与配置 华为、华三交换机,路由器(vrrp模式)
下一篇:基于@AllArgsConstructor与@Value共用的问题解决
相关文章

 发表评论

暂时没有评论,来抢沙发吧~