静态路由实验

配置网络以实现全网IP地址分配,使用R7作为DHCP服务器,确保R6与R7之间的主备链路,并通过路由策略实现负载均衡。同时,进行了IP地址的ping测试以验证网络可达性。
摘要由CSDN通过智能技术生成

 需求分析

1.全网用192.168.1.0/24进行IP地址分配

2.R7作为DHCP服务器为PC分配Ip地址

3.路由上均具备2个环回地址

4.R6与R7之间正常走1000M,备份走100M

5.全网尽量负载均衡

6.减少路由表数量,并避免环路产生

7.全网可达

配置

(1)r1

[r1]inter	
[r1]interface g	
[r1]interface GigabitEthernet 0/0/1
[r1-GigabitEthernet0/0/1]ip address 192.168.1.1 30
[r1-GigabitEthernet0/0/0]ip address 192.168.1.1 30
[r1-GigabitEthernet0/0/0]
May  3 2023 14:38:38-08:00 r1 %%01IFNET/4/LINK_STATE(l)[3]:The line protocol IP 
on the interface GigabitEthernet0/0/0 has entered the UP state. 
[r1-GigabitEthernet0/0/0]q
[r1]int	
[r1]interface l	
[r1]interface LoopBack 0
[r1-LoopBack0]ip address 192.168.1.33 28
[r1-LoopBack0]q
[r1]inter	
[r1]interface l	
[r1]interface LoopBack 1
[r1-LoopBack1]ip address 192.168.1.49 28
[r1-LoopBack1]q
[r1]

  Please check whether system data has been changed, and save data in time

  Configuration console time out, please press any key to log on

<r1>sys
Enter system view, return user view with Ctrl+Z.
[r1]ip rou	
[r1]ip route-	
[r1]ip route-static 192.168.1.64 27 192.168.1.2
[r1]rou	
[r1]route-	
[r1]route-policy-change
[r1]route-policy
[r1]route-policy-change
[r1]route-policy
[r1]ip route-static 192.168.1.96 27 192.168.1.6
[r1]ip rou	
[r1]ip route-	
[r1]ip route-static 192.168.1.8 30 192.168.1.2
[r1]ip rou	
[r1]ip route-	
[r1]ip route-static 192.168.1.12 30 192.168.1.6
[r1]ip rou	
[r1]ip route
[r1]ip route-static 0.0.0.0 0 192.168.1.2
[r1]ip route	
[r1]ip route-	
[r1]ip route-static 0.0.0.0 0 192.168.1.6

(2)r2

[r2]int g 0/0/0
[r2-GigabitEthernet0/0/0]ip address 192.168.1.2 30
May  3 2023 14:46:54-08:00 r2 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface GigabitEthernet0/0/0 has entered the UP state. 
[r2-GigabitEthernet0/0/0]q
[r2]int g 0/0/1
[r2-GigabitEthernet0/0/1]ip address 192.168.1.9 30
May  3 2023 14:48:06-08:00 r2 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP 
on the interface GigabitEthernet0/0/1 has entered the UP state. 
[r2-GigabitEthernet0/0/1]q
[r2]int	
[r2]interface l	
[r2]interface LoopBack 0
[r2-LoopBack0]ip address 192.168.1.65 28
[r2-LoopBack0]q
[r2]int	
[r2]interface l	
[r2]interface LoopBack 1
[r2-LoopBack1]ip address 192.168.1.81 28
[r2-LoopBack1]q
[r2]

  Please check whether system data has been changed, and save data in time

  Configuration console time out, please press any key to log on

<r2>sys
Enter system view, return user view with Ctrl+Z.
[r2]ip rout	
[r2]ip route
[r2]ip route-static 192.168.1.32 27 192.168.1.1
[r2]ip rou	
[r2]ip route
[r2]ip route-static 192.168.1.4 30 192.168.1.1
[r2]ip rou	
[r2]ip route
[r2]ip route-static 192.168.1.96 27 192.168.1.1
[r2]ip route-static 192.168.1.96 27 192.168.1.10
[r2]ip	
[r2]ip rou	
[r2]ip route-static 0.0.0.0 0 192.168.1.10
[r2]

(3)r3

[r3]int g 0/0/0
[r3-GigabitEthernet0/0/0]ip address 192.168.1.6
                                                ^
Error:Incomplete command found at '^' position.
[r3-GigabitEthernet0/0/0]ip address 192.168.1.6 30
May  3 2023 14:57:22-08:00 r3 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface GigabitEthernet0/0/0 has entered the UP state. 
[r3-GigabitEthernet0/0/0]q
[r3]int g 0/0/1
[r3-GigabitEthernet0/0/1]ip address 192.168.1.13 30
May  3 2023 14:59:04-08:00 r3 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP 
on the interface GigabitEthernet0/0/1 has entered the UP state. 
[r3-GigabitEthernet0/0/1]q
[r3]int	
[r3]interface l	
[r3]interface LoopBack 0
[r3-LoopBack0]ip address 192.168.1.97 28
[r3-LoopBack0]q
[r3]int	
[r3]interface l	
[r3]interface LoopBack 1
[r3-LoopBack1]ip adress 192.168.1.113 28
                 ^
Error: Unrecognized command found at '^' position.
[r3-LoopBack1]ip address 192.168.1.113 28
[r3-LoopBack1]q
[r3]

  Please check whether system data has been changed, and save data in time

  Configuration console time out, please press any key to log on

<r3>sys
Enter system view, return user view with Ctrl+Z.
[r3]ip rou	
[r3]ip route
[r3]ip route-static 192.168.1.32 27 192.168.1.5
[r3]ip rou	
[r3]ip route
[r3]ip route-static 193.168.1.0 30 192.168.1.5
[r3]ip rou	
[r3]ip route
[r3]undo ip route-static 193.168.1.0 30 192.168.1.5
[r3]
[r3]ip route-static 192.168.1.0 30 192.168.1.5 
[r3]ip rou	
[r3]ip route
[r3]ip route-static 192.168.1.64 27 192.168.1.5
[r3]ip route-static 192.168.1.64 27 192.168.1.14
[r3]ip rou	
[r3]ip route
[r3]ip route-static 0.0.0.0 0 192,168.1.14
                              ^
Error: Wrong parameter found at '^' position.
[r3]ip rou	
[r3]ip route
[r3]ip route-static 0.0.0.0 0 192.168.1.14

(4)r4

The device is running!

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname r3
[r3]sysname r4
[r4]

  Please check whether system data has been changed, and save data in time

  Configuration console time out, please press any key to log on

<r4>sys
Enter system view, return user view with Ctrl+Z.
[r4]int g 0/0/0
[r4-GigabitEthernet0/0/0]ip address 192.168.1.10 30
May  3 2023 15:04:24-08:00 r4 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface GigabitEthernet0/0/0 has entered the UP state. 
[r4-GigabitEthernet0/0/0]
[r4-GigabitEthernet0/0/0]q
[r4]int g 0/0/1
[r4-GigabitEthernet0/0/1]ip address 192.168.1.14 30
[r4-GigabitEthernet0/0/1]
May  3 2023 15:05:43-08:00 r4 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP 
on the interface GigabitEthernet0/0/1 has entered the UP state. 
[r4-GigabitEthernet0/0/1]q
[r4]int g 0/0/2
[r4-GigabitEthernet0/0/2]ip address 192.168.1.17 30
[r4-GigabitEthernet0/0/2]
May  3 2023 15:06:51-08:00 r4 %%01IFNET/4/LINK_STATE(l)[2]:The line protocol IP 
on the interface GigabitEthernet0/0/2 has entered the UP state. 
[r4-GigabitEthernet0/0/2]q
[r4]int g 4/0/0
[r4-GigabitEthernet4/0/0]ip address 192.168.1.21 30
[r4-GigabitEthernet4/0/0]
May  3 2023 15:08:15-08:00 r4 %%01IFNET/4/LINK_STATE(l)[3]:The line protocol IP 
on the interface GigabitEthernet4/0/0 has entered the UP state. 
[r4-GigabitEthernet4/0/0]q
[r4]int l 0
[r4-LoopBack0]ip add 192.168.1.129 28
[r4-LoopBack0]q
[r4]int l 1
[r4-LoopBack1]ip add 192.168.1.145 28
[r4-LoopBack1]q
[r4]int l 2
[r4-LoopBack2]q
[r4]
May  3 2023 15:13:43-08:00 r4 ARP/4/ARP_IPCONFLICT_TRAP:OID 16777216.50331648.10
0663296.16777216.67108864.16777216.3674669056.83886080.419430400.2063597568.3355
4432.100663296 ARP detects IP conflict. (IP address=17.1.168.192, Local interfac
e=GigabitEthernet0/0/2, Local MAC=00e0-fc5c-2dcc, Local vlan=0, Local CE vlan=0,
 Receive interface=GigabitEthernet0/0/2, Receive MAC=00e0-fc5a-4a4c, Receive vla
n=0, Receive CE vlan=0, IP conflict type=Local IP conflict). 
[r4]
May  3 2023 15:13:43-08:00 r4 %%01ARP/4/ARP_DUPLICATE_IPADDR(l)[4]:Received an A
RP packet with a duplicate IP address from the interface. (IpAddress=17.1.168.19
2, InterfaceName=GigabitEthernet0/0/2, MacAddress=00e0-fc5a-4a4c) 
[r4]

  Please check whether system data has been changed, and save data in time

  Configuration console time out, please press any key to log on

<r4>sys
Enter system view, return user view with Ctrl+Z.
[r4]ip route	
[r4]ip rou	
[r4]ip route-static 192.168.1.32 27 192.168.1.9
[r4]ip route-static 192.168.1.32 27 192.168.1.13
[r4]ip rou	
[r4]ip route
[r4]ip route-static 192.168.1.0 30 192.168.1.9
[r4]ip route-	
[r4]ip route-static 192.168.1.4 30 192.168.1.13
[r4]ip rou	
[r4]ip route
[r4]ip route-static 192.168.1.64 27 192.168.1.9
[r4]ip route	
[r4]ip rout	
[r4]ip route-static 192.168.1.96 27 192.168.1.13
[r4]ip route-	
[r4]ip route-static 0.0.0.0 0 192.168.1.18
[r4]ip route-static 0.0.0.0 0 192.168.1.22 pr	
[r4]ip route-static 0.0.0.0 0 192.168.1.22 preference 90
[r4]

(5)r5

[r5]int g 0/0/0
[r5-GigabitEthernet0/0/0]ip address 192.168.1.17 30
May  3 2023 15:13:42-08:00 r5 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface GigabitEthernet0/0/0 has entered the UP state. 
[r5-GigabitEthernet0/0/0]
May  3 2023 15:13:43-08:00 r5 ARP/4/ARP_IPCONFLICT_TRAP:OID 16777216.50331648.10
0663296.16777216.67108864.16777216.3674669056.83886080.419430400.2063597568.3355
4432.100663296 ARP detects IP conflict. (IP address=17.1.168.192, Local interfac
e=GigabitEthernet0/0/0, Local MAC=00e0-fc5a-4a4c, Local vlan=0, Local CE vlan=0,
 Receive interface=GigabitEthernet0/0/0, Receive MAC=00e0-fc5c-2dcc, Receive vla
n=0, Receive CE vlan=0, IP conflict type=Local IP conflict). 
[r5-GigabitEthernet0/0/0]
May  3 2023 15:13:43-08:00 r5 %%01ARP/4/ARP_DUPLICATE_IPADDR(l)[1]:Received an A
RP packet with a duplicate IP address from the interface. (IpAddress=17.1.168.19
2, InterfaceName=GigabitEthernet0/0/0, MacAddress=00e0-fc5c-2dcc) 
[r5-GigabitEthernet0/0/0]undo ip address 192.168.1.17 30
May  3 2023 15:14:38-08:00 r5 %%01IFNET/4/LINK_STATE(l)[2]:The line protocol IP 
on the interface GigabitEthernet0/0/0 has entered the DOWN state. 
[r5-GigabitEthernet0/0/0]
[r5-GigabitEthernet0/0/0]ip add 192.168.1.18 30
May  3 2023 15:15:22-08:00 r5 %%01IFNET/4/LINK_STATE(l)[3]:The line protocol IP 
on the interface GigabitEthernet0/0/0 has entered the UP state. 
[r5-GigabitEthernet0/0/0]q
[r5]int g 0/0/1
[r5-GigabitEthernet0/0/1]ip add 192.168.1.22 30
[r5-GigabitEthernet0/0/1]
May  3 2023 15:16:31-08:00 r5 %%01IFNET/4/LINK_STATE(l)[4]:The line protocol IP 
on the interface GigabitEthernet0/0/1 has entered the UP state. 
[r5-GigabitEthernet0/0/1]q
[r5]int g 0/0/2
[r5-GigabitEthernet0/0/2]ip add 192.168.1.193 27
[r5-GigabitEthernet0/0/2]
May  3 2023 15:17:53-08:00 r5 %%01IFNET/4/LINK_STATE(l)[5]:The line protocol IP 
on the interface GigabitEthernet0/0/2 has entered the UP state. 
[r5-GigabitEthernet0/0/2]q
[r5]int l 0
[r5-LoopBack0]ip add 192.168.1.161 28
[r5-LoopBack0]q
[r5]int l 1
[r5-LoopBack1]ip add 192.168.1.177 28
[r5-LoopBack1]q
[r5]

DHCP

PC1:

PC>ipconfig

Link local IPv6 address...........: fe80::5689:98ff:fefd:3c4d
IPv6 address......................: :: / 128
IPv6 gateway......................: ::
IPv4 address......................: 192.168.1.222
Subnet mask.......................: 255.255.255.224
Gateway...........................: 192.168.1.193
Physical address..................: 54-89-98-FD-3C-4D
DNS server........................: 114.114.114.114


PC2:

PC>ipconfig

Link local IPv6 address...........: fe80::5689:98ff:fe73:778d
IPv6 address......................: :: / 128
IPv6 gateway......................: ::
IPv4 address......................: 192.168.1.221
Subnet mask.......................: 255.255.255.224
Gateway...........................: 192.168.1.193
Physical address..................: 54-89-98-73-77-8D
DNS server........................: 114.114.114.114

检验

[r1]ping -a 192.168.1.65
                         ^
Error:Incomplete command found at '^' position.
[r1]ping -a 192.168.1.33 192.168.1.65
  PING 192.168.1.65: 56  data bytes, press CTRL_C to break
    Reply from 192.168.1.65: bytes=56 Sequence=1 ttl=255 time=30 ms
    Reply from 192.168.1.65: bytes=56 Sequence=2 ttl=255 time=20 ms
    Reply from 192.168.1.65: bytes=56 Sequence=3 ttl=255 time=20 ms
    Reply from 192.168.1.65: bytes=56 Sequence=4 ttl=255 time=40 ms
    Reply from 192.168.1.65: bytes=56 Sequence=5 ttl=255 time=20 ms

  --- 192.168.1.65 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 20/26/40 ms

[r1]ping -a 192.168.1.49 192.168.1.97
  PING 192.168.1.97: 56  data bytes, press CTRL_C to break
    Reply from 192.168.1.97: bytes=56 Sequence=1 ttl=255 time=40 ms
    Reply from 192.168.1.97: bytes=56 Sequence=2 ttl=255 time=20 ms
    Reply from 192.168.1.97: bytes=56 Sequence=3 ttl=255 time=10 ms
    Reply from 192.168.1.97: bytes=56 Sequence=4 ttl=255 time=30 ms
    Reply from 192.168.1.97: bytes=56 Sequence=5 ttl=255 time=30 ms

  --- 192.168.1.97 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 10/26/40 ms

[r1]




PC>ping 192.168.1.161

Ping 192.168.1.161: 32 data bytes, Press Ctrl_C to break
From 192.168.1.161: bytes=32 seq=1 ttl=255 time=47 ms
From 192.168.1.161: bytes=32 seq=2 ttl=255 time=47 ms
From 192.168.1.161: bytes=32 seq=3 ttl=255 time=31 ms
From 192.168.1.161: bytes=32 seq=4 ttl=255 time=47 ms
From 192.168.1.161: bytes=32 seq=5 ttl=255 time=32 ms

--- 192.168.1.161 ping statistics ---
  5 packet(s) transmitted
  5 packet(s) received
  0.00% packet loss
  round-trip min/avg/max = 31/40/47 ms

PC>ping 192.168.1.17

Ping 192.168.1.17: 32 data bytes, Press Ctrl_C to break
Request timeout!
From 192.168.1.17: bytes=32 seq=2 ttl=254 time=47 ms
From 192.168.1.17: bytes=32 seq=3 ttl=254 time=63 ms
From 192.168.1.17: bytes=32 seq=4 ttl=254 time=62 ms
From 192.168.1.17: bytes=32 seq=5 ttl=254 time=47 ms

--- 192.168.1.17 ping statistics ---
  5 packet(s) transmitted
  4 packet(s) received
  20.00% packet loss
  round-trip min/avg/max = 0/54/63 ms

PC>ping192.168.1.97
Invalid command!

PC>ping 192.168.1.97

Ping 192.168.1.97: 32 data bytes, Press Ctrl_C to break
Request timeout!
From 192.168.1.97: bytes=32 seq=2 ttl=253 time=62 ms
From 192.168.1.97: bytes=32 seq=3 ttl=253 time=63 ms
From 192.168.1.97: bytes=32 seq=4 ttl=253 time=46 ms
From 192.168.1.97: bytes=32 seq=5 ttl=253 time=63 ms

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值