其他分享
首页 > 其他分享> > HCIP 2021-09-22 静态路由案例

HCIP 2021-09-22 静态路由案例

作者:互联网

 

 划分ip

 

IP配置

AR1

[AR1]int g 0/0/0
[AR1-GigabitEthernet0/0/0]ip address 192.168.1.1 30
[AR1-GigabitEthernet0/0/0]int g 0/0/1
[AR1-GigabitEthernet0/0/1]ip address 192.168.1.5 30
[AR1-GigabitEthernet0/0/1]int l 0 
[AR1-LoopBack0]ip address 192.168.1.32 28
[AR1-LoopBack0]int l 1
[AR1-LoopBack1]ip address 192.168.1.48 28

AR2

[AR2]int g 0/0/0
[AR2-GigabitEthernet0/0/0]ip address 192.168.1.2 30
[AR2-GigabitEthernet0/0/0]int g 0/0/1
[AR2-GigabitEthernet0/0/1]ip address 192.168.1.9 30
[AR2-GigabitEthernet0/0/1]int l 0
[AR2-LoopBack0]ip address 192.168.1.65 28
[AR2-LoopBack0]int l 1
[AR2-LoopBack1]ip address 192.168.1.81 28

AR3

[AR3]int g 0/0/1
[AR3-GigabitEthernet0/0/1]ip address 192.168.1.6 30
[AR3-GigabitEthernet0/0/1]int g 0/0/2
[AR3-GigabitEthernet0/0/2]ip address 192.168.1.13 30
[AR3-GigabitEthernet0/0/2]int l 0
[AR3-LoopBack0]ip address 192.168.1.97 27

AR4

[AR4]int g 0/0/1
[AR4-GigabitEthernet0/0/1]ip address 192.168.1.10 30
[AR4-GigabitEthernet0/0/1]int g 0/0/2
[AR4-GigabitEthernet0/0/2]ip address 192.168.1.14 30
[AR4-GigabitEthernet0/0/2]int l 0
[AR4-LoopBack0]ip address 192.168.1.129 28
[AR4-LoopBack0]int l 1
[AR4-LoopBack1]ip address 192.168.1.145 28


[AR4-LoopBack1]int g 4/0/0
[AR4-GigabitEthernet4/0/0]ip address 192.168.1.21 30 
[AR4-GigabitEthernet4/0/0]int g 0/0/0
[AR4-GigabitEthernet0/0/0]ip address 192.168.1.17 30

AR5

[AR5]int g 0/0/1
[AR5-GigabitEthernet0/0/1]ip address 192.168.1.15 30
[AR5-GigabitEthernet0/0/1]int g 0/0/0
[AR5-GigabitEthernet0/0/0]ip address 192.168.1.18 30
[AR5-GigabitEthernet0/0/0]int l 0
[AR5-LoopBack0]ip address 192.168.1.161 27

AR6

[AR6]int g 0/0/2
[AR6-GigabitEthernet0/0/2]ip address 12.0.0.2 24
[AR6-GigabitEthernet0/0/2]int l 0
[AR6-LoopBack0]ip address 1.1.1.1 24

配置AR3的DHCP

[AR3]dhcp enable
[AR3]ip pool pool1
[AR3-ip-pool-pool1]network 192.168.1.96 mask 27
[AR3-ip-pool-pool1]gateway-list 192.168.1.97
[AR3-ip-pool-pool1]dns-list 8.8.8.8
[AR3]int g 0/0/0
[AR3-GigabitEthernet0/0/0]ip address 192.168.1.97 27
[AR3-GigabitEthernet0/0/0]dhcp select global 

静态路由配置

AR1

[AR1]ip route-static 0.0.0.0 0 192.168.1.2
[AR1]ip route-static 0.0.0.0 0 192.168.1.6
[AR1]ip route-static 192.168.1.64 27 192.168.1.2
[AR1]ip route-static 192.168.1.8 30 192.168.1.2
[AR1]ip route-static 192.168.1.12 30 192.168.1.6
[AR1]ip route-static 192.168.1.96 27 192.168.1.6

AR2

[AR2]ip route-static 0.0.0.0 0 192.168.1.10
[AR2]ip route-static 192.168.1.96 27 192.168.1.1
[AR2]ip route-static 192.168.1.96 27 192.168.1.10
[AR2]ip route-static 192.168.1.4 30 192.168.1.1
[AR2]ip route-static 192.168.1.32 27 192.168.1.1

 AR3

[AR3]ip route-static  0.0.0.0 0 192.168.1.14
[AR3]ip route-static 192.168.1.64 27 192.168.1.14
[AR3]ip route-static 192.168.1.64 27 192.168.1.5
[AR3]ip route-static 192.168.1.0 30 192.168.1.5
[AR3]ip route-static 192.168.1.32 27 192.168.1.5

 AR4

[AR4]ip route-static 0.0.0.0 0 192.168.1.18
[AR4]ip route-static 0.0.0.0 0 192.168.1.22 preference 61
[AR4]ip route-static 192.168.1.32 27 192.168.1.9
[AR4]ip route-static 192.168.1.32 27 192.168.1.13
[AR4]ip route-static 192.168.1.0 30 192.168.1.9
[AR4]ip route-static 192.168.1.64 27 192.168.1.9
[AR4]ip route-static 192.168.1.96 27 192.168.1.13
[AR4]ip route-static 192.168.1.4 30 192.168.1.13
[AR4]ip route-static 192.168.1.160 27 192.168.1.18

 AR5

[AR5]ip route-static 0.0.0.0 0 12.0.0.2
[AR5]ip route-static 192.168.1.0 24 192.168.1.21 preference 70

空接口配置

AR1

[AR1]ip route-static 192.168.1.32 27 NULL 0

AR2

[AR2]ip route-static 192.168.1.64 27 NULL 0

AR4

[AR4]ip route-static 0.0.0.0 0 GigabitEthernet 0/0/2 192.168.1.18

NAT

AR5

[AR5]acl 2000
[AR5-acl-basic-2000]rule permit source 192.168.1.0 0.0.0.255
[AR5]int g 0/0/2
[AR5-GigabitEthernet0/0/2]nat outbound  2000

telnet

AR1开启telnet

[AR1]aaa
[AR1-aaa]local-user wuhu privilege level 15 password cipher 123
[AR1-aaa]local-user wuhu service-type telnet
[AR1]user-interface vty 0 4
[AR1-ui-vty0-4]authentication-mode aaa

AR5配置端口映射

[AR5]int g 0/0/2
[AR5-GigabitEthernet0/0/2]nat server protocol tcp global current-interface 23 in
side  192.168.1.1 23

测试

telnet测试

 

全网可达测试

 

标签:AR4,22,ip,route,09,GigabitEthernet0,192.168,static,2021
来源: https://blog.csdn.net/qq_43679416/article/details/120423617