静态路由下一跳方法实现四个路由器之间的全网可达

 

1.先配置好每个路由器名称以及永不超时,只演示r1(r2,r3,r4同理)

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys r1	
[r1]user-interface console 0
[r1-ui-console0]idle-timeout 0 0

2.给每个路由每个接口配上ip并配上环回接口,养成每一操作后看配置表,路由表的好习惯。r2,r3,r4只展示配置表

[r1]interface g0/0/0
[r1-GigabitEthernet0/0/0]ip ad 12.1.1.1 24 	
[r1-GigabitEthernet0/0/0]int g0/0/1
[r1-GigabitEthernet0/0/1]ip ad 14.1.1.2 24
[r1-GigabitEthernet0/0/1]int l0
[r1-LoopBack0]ip ad 1.1.1.1 24
[r1-LoopBack0]dis ip int br
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 4
The number of interface that is DOWN in Physical is 1
The number of interface that is UP in Protocol is 4
The number of interface that is DOWN in Protocol is 1

Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              12.1.1.1/24          up         up        
GigabitEthernet0/0/1              14.1.1.2/24          up         up        
GigabitEthernet0/0/2              unassigned           down       down      
LoopBack0                         1.1.1.1/24           up         up(s)     
NULL0                             unassigned           up         up(s) 
[r2]dis ip int br
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 4
The number of interface that is DOWN in Physical is 1
The number of interface that is UP in Protocol is 4
The number of interface that is DOWN in Protocol is 1

Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              23.1.1.1/24          up         up        
GigabitEthernet0/0/1              12.1.1.2/24          up         up        
GigabitEthernet0/0/2              unassigned           down       down      
LoopBack1                         2.2.2.2/24           up         up(s)     
NULL0                             unassigned           up         up(s) 


[r3]dis ip int br
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 4
The number of interface that is DOWN in Physical is 1
The number of interface that is UP in Protocol is 4
The number of interface that is DOWN in Protocol is 1

Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              34.1.1.1/24          up         up        
GigabitEthernet0/0/1              23.1.1.2/24          up         up        
GigabitEthernet0/0/2              unassigned           down       down      
LoopBack2                         3.3.3.3/24           up         up(s)     
NULL0                             unassigned           up         up(s)     


[r4]dis ip int br
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 4
The number of interface that is DOWN in Physical is 1
The number of interface that is UP in Protocol is 4
The number of interface that is DOWN in Protocol is 1

Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              14.1.1.1/24          up         up        
GigabitEthernet0/0/1              34.1.1.2/24          up         up        
GigabitEthernet0/0/2              unassigned           down       down      
LoopBack3                         4.4.4.4/24           up         up(s)     
NULL0

3.开始配置静态路由。对于r1分析得出除了自身连接的三个网段,还需要和其余五个网段配置。

到达2.2.2.0/24 网段

[r1]ip route-static 2.2.2.0 24 12.1.1.2
[r1]ping 2.2.2.2
  PING 2.2.2.2: 56  data bytes, press CTRL_C to break
    Reply from 2.2.2.2: bytes=56 Sequence=1 ttl=255 time=230 ms
    Reply from 2.2.2.2: bytes=56 Sequence=2 ttl=255 time=30 ms
    Reply from 2.2.2.2: bytes=56 Sequence=3 ttl=255 time=40 ms
    Reply from 2.2.2.2: bytes=56 Sequence=4 ttl=255 time=20 ms
    Reply from 2.2.2.2: bytes=56 Sequence=5 ttl=255 time=20 ms

  --- 2.2.2.2 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 20/68/230 ms

到达23.1.1.0/24网段(此处需要注意的是,r1有了到目标23.1.1.0/24的路由后,但是数据的通信是双向的所以r3需要配置一条数据能够回来到达目标为12.1.1.1的路由,仔细观察目标和源的出接口ip)

[r1]ip route-static 23.1.1.0 24 12.1.1.2
[r1]ping 23.1.1.1
  PING 23.1.1.1: 56  data bytes, press CTRL_C to break
    Reply from 23.1.1.1: bytes=56 Sequence=1 ttl=255 time=20 ms
    Reply from 23.1.1.1: bytes=56 Sequence=2 ttl=255 time=20 ms
    Reply from 23.1.1.1: bytes=56 Sequence=3 ttl=255 time=20 ms
    Reply from 23.1.1.1: bytes=56 Sequence=4 ttl=255 time=30 ms
    Reply from 23.1.1.1: bytes=56 Sequence=5 ttl=255 time=20 ms

  --- 23.1.1.1 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值