欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

H3C 静态路由ECMP实验

程序员文章站 2022-04-09 19:40:54
...

静态路由ECMP实验

拓扑图

H3C 静态路由ECMP实验
H3C 静态路由ECMP实验

PCA

192.168.0.2
255.255.255.0
192.168.0.1

H3C 静态路由ECMP实验
在RA,RB都设置路由后,pc A Ping pc B


<H3C>ping 192.168.2.2
Ping 192.168.2.2 (192.168.2.2): 56 data bytes, press CTRL_C to break
56 bytes from 192.168.2.2: icmp_seq=0 ttl=253 time=4.000 ms
56 bytes from 192.168.2.2: icmp_seq=1 ttl=253 time=1.000 ms
56 bytes from 192.168.2.2: icmp_seq=2 ttl=253 time=1.000 ms
56 bytes from 192.168.2.2: icmp_seq=3 ttl=253 time=2.000 ms
56 bytes from 192.168.2.2: icmp_seq=4 ttl=253 time=2.000 ms

--- Ping statistics for 192.168.2.2 ---
5 packet(s) transmitted, 5 packet(s) received, 0.0% packet loss
round-trip min/avg/max/std-dev = 1.000/2.000/4.000/1.095 ms
<H3C>%Mar 18 12:04:06:389 2020 H3C PING/6/PING_STATISTICS: Ping statistics for 192.168.2.2: 5 packet(s) transmitted, 5 packet(s) received, 0.0% packet loss, round-trip min/avg/max/std-dev = 1.000/2.000/4.000/1.095 ms.


PCB

192.168.2.2
255.255.255.0
192.168.2.1

H3C 静态路由ECMP实验

RA

设置端口ip

[H3C]int g0/0
[H3C-GigabitEthernet0/0]ip add
[H3C-GigabitEthernet0/0]ip address 192.168.0.1 255.255.255.0
[H3C-GigabitEthernet0/0]no shutdown
[H3C-GigabitEthernet0/0]
[H3C-GigabitEthernet0/0]exit
[H3C]int g0/1
[H3C-GigabitEthernet0/1]ip add 192.168.1.1 255.255.255.252
[H3C-GigabitEthernet0/1]no shutdown
[H3C-GigabitEthernet0/1]exit
[H3C]int Serial 1/0
[H3C-Serial1/0]ip address 192.168.1.5 255.255.255.252
[H3C-Serial1/0]no shutdown
[H3C-Serial1/0]exit

设置路由

[H3C]ip route-static 192.168.2.0 255.255.255.0 192.168.1.2
[H3C]ip route-static 192.168.2.0 255.255.255.0 192.168.1.6
[H3C]ip route-static 192.168.2.0 255.255.255.0 192.168.1.2
[H3C]ip route-static 192.168.2.0 255.255.255.0 192.168.1.6

dis ip routing-table

[H3C]dis ip routing-table
Destinations : 22       Routes : 23
Destination/Mask   Proto   Pre Cost        NextHop         Interface
0.0.0.0/32         Direct  0   0           127.0.0.1       InLoop0
127.0.0.0/8        Direct  0   0           127.0.0.1       InLoop0
127.0.0.0/32       Direct  0   0           127.0.0.1       InLoop0
127.0.0.1/32       Direct  0   0           127.0.0.1       InLoop0
127.255.255.255/32 Direct  0   0           127.0.0.1       InLoop0
182.168.1.6/32     Direct  0   0           182.168.1.6     Ser1/0
192.168.0.0/24     Direct  0   0           192.168.0.1     GE0/0
192.168.0.0/32     Direct  0   0           192.168.0.1     GE0/0
192.168.0.1/32     Direct  0   0           127.0.0.1       InLoop0
192.168.0.255/32   Direct  0   0           192.168.0.1     GE0/0
192.168.1.0/30     Direct  0   0           192.168.1.1     GE0/1
192.168.1.0/32     Direct  0   0           192.168.1.1     GE0/1
192.168.1.1/32     Direct  0   0           127.0.0.1       InLoop0
192.168.1.3/32     Direct  0   0           192.168.1.1     GE0/1
192.168.1.4/30     Direct  0   0           192.168.1.5     Ser1/0
192.168.1.4/32     Direct  0   0           192.168.1.5     Ser1/0
192.168.1.5/32     Direct  0   0           127.0.0.1       InLoop0
192.168.1.7/32     Direct  0   0           192.168.1.5     Ser1/0
192.168.2.0/24     Static  60  0           192.168.1.2     GE0/1
                                           192.168.1.6     Ser1/0
224.0.0.0/4        Direct  0   0           0.0.0.0         NULL0
224.0.0.0/24       Direct  0   0           0.0.0.0         NULL0
255.255.255.255/32 Direct  0   0           127.0.0.1       InLoop0

查看转发

在pca ping pcb的时候,在ra查看转发

[H3C]dis ip fast-forwarding cache
Total number of fast-forwarding entries: 2
SIP             SPort DIP             DPort Pro Input_If    Output_If   Flg
192.168.0.2     182   192.168.2.2     2048  1   GE0/0       GE0/1       1
192.168.2.2     182   192.168.0.2     0     1   GE0/1       GE0/0       1
[H3C]

关闭g0/1端口

[H3C]int g0/1
[H3C-GigabitEthernet0/1]shu
[H3C-GigabitEthernet0/1]shutdown
[H3C-GigabitEthernet0/1]%Mar 18 12:10:21:832 2020 H3C IFNET/3/PHY_UPDOWN: Physical state on the interface GigabitEthernet0/1 changed to down.
%Mar 18 12:10:21:832 2020 H3C IFNET/5/LINK_UPDOWN: Line protocol state on the interface GigabitEthernet0/1 changed to down.

关闭后还是可以ping的通的。
H3C 静态路由ECMP实验
H3C 静态路由ECMP实验

RB

设置端口ip

[H3C]
[H3C]int g0/0
[H3C-GigabitEthernet0/0]ip add 192.168.2.1 255.255.255.0
[H3C-GigabitEthernet0/0]no hsu
[H3C-GigabitEthernet0/0]no shu
[H3C-GigabitEthernet0/0]no shutdown
[H3C-GigabitEthernet0/0]exit
[H3C]int g0/1
[H3C-GigabitEthernet0/1]ip add
[H3C-GigabitEthernet0/1]ip address 192.168.1.2 255.255.255.252
[H3C-GigabitEthernet0/1]no shu
[H3C-GigabitEthernet0/1]no shutdown
[H3C-GigabitEthernet0/1]exit
[H3C]int s1/0
[H3C-Serial1/0]ip add
[H3C-Serial1/0]ip address 182.168.1.6 255.255.255.252
[H3C-Serial1/0]no shu
[H3C-Serial1/0]no shutdown
[H3C-Serial1/0]exit

设置路由

[H3C]ip route-static 192.168.0.0 255.255.255.0 192.168.1.1
[H3C]ip route-static 192.168.0.0  255.255.255.0 192.168.1.5

dis ip routing-table

[H3C]dis ip routing-table

Destinations : 18       Routes : 18

Destination/Mask   Proto   Pre Cost        NextHop         Interface
0.0.0.0/32         Direct  0   0           127.0.0.1       InLoop0
127.0.0.0/8        Direct  0   0           127.0.0.1       InLoop0
127.0.0.0/32       Direct  0   0           127.0.0.1       InLoop0
127.0.0.1/32       Direct  0   0           127.0.0.1       InLoop0
127.255.255.255/32 Direct  0   0           127.0.0.1       InLoop0
182.168.1.4/30     Direct  0   0           182.168.1.6     Ser1/0
182.168.1.4/32     Direct  0   0           182.168.1.6     Ser1/0
182.168.1.6/32     Direct  0   0           127.0.0.1       InLoop0
182.168.1.7/32     Direct  0   0           182.168.1.6     Ser1/0
192.168.0.0/24     Static  60  0           192.168.1.5     Ser1/0
192.168.1.5/32     Direct  0   0           192.168.1.5     Ser1/0
192.168.2.0/24     Direct  0   0           192.168.2.1     GE0/0
192.168.2.0/32     Direct  0   0           192.168.2.1     GE0/0
192.168.2.1/32     Direct  0   0           127.0.0.1       InLoop0
192.168.2.255/32   Direct  0   0           192.168.2.1     GE0/0
224.0.0.0/4        Direct  0   0           0.0.0.0         NULL0
224.0.0.0/24       Direct  0   0           0.0.0.0         NULL0
255.255.255.255/32 Direct  0   0           127.0.0.1       InLoop0
[H3C]
相关标签: H3C