目录
静态综合实验
实验要求
实验图谱
IP地址划分
IP地址的配置
R1的IP地址
[R1]display ip interface brief
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 5
The number of interface that is DOWN in Physical is 1
The number of interface that is UP in Protocol is 5
The number of interface that is DOWN in Protocol is 1
Interface IP Address/Mask Physical Protocol
GigabitEthernet0/0/0 192.168.1.1/30 up up
GigabitEthernet0/0/1 192.168.1.5/30 up up
GigabitEthernet0/0/2 unassigned down down
LoopBack0 192.168.1.33/28 up up(s)
LoopBack1 192.168.1.49/28 up up(s)
NULL0 unassigned up up(s)
R2的IP地址
[R2]display ip interface brief
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 5
The number of interface that is DOWN in Physical is 1
The number of interface that is UP in Protocol is 5
The number of interface that is DOWN in Protocol is 1
Interface IP Address/Mask Physical Protocol
GigabitEthernet0/0/0 192.168.1.2/30 up up
GigabitEthernet0/0/1 192.168.1.9/30 up up
GigabitEthernet0/0/2 unassigned down down
LoopBack0 192.168.1.65/28 up up(s)
LoopBack1 192.168.1.81/28 up up(s)
NULL0 unassigned up up(s)
R3的IP地址
[R3]display ip interface brief
*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 0
The number of interface that is UP in Protocol is 4
The number of interface that is DOWN in Protocol is 0
Interface IP Address/Mask Physical Protocol
GigabitEthernet0/0/0 192.168.1.6/30 up up
GigabitEthernet0/0/1 192.168.1.13/30 up up
GigabitEthernet0/0/2 192.168.1.97/27 up up
NULL0 unassigned up up(s)
R4的IP地址
[R4]display ip interface brief
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 7
The number of interface that is DOWN in Physical is 1
The number of interface that is UP in Protocol is 7
The number of interface that is DOWN in Protocol is 1
Interface IP Address/Mask Physical Protocol
Ethernet4/0/0 192.168.1.21/30 up up
Ethernet4/0/1 unassigned down down
GigabitEthernet0/0/0 192.168.1.10/30 up up
GigabitEthernet0/0/1 192.168.1.14/30 up up
GigabitEthernet0/0/2 192.168.1.17/30 up up
LoopBack0 192.168.1.129/28 up up(s)
LoopBack1 192.168.1.145/28 up up(s)
NULL0 unassigned up up(s)
R5的IP地址
[R5]display ip interface brief
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 5
The number of interface that is DOWN in Physical is 0
The number of interface that is UP in Protocol is 5
The number of interface that is DOWN in Protocol is 0
Interface IP Address/Mask Physical Protocol
GigabitEthernet0/0/0 192.168.1.18/30 up up
GigabitEthernet0/0/1 12.0.0.1/24 up up
GigabitEthernet0/0/2 192.168.1.22/30 up up
LoopBack0 192.168.1.161/27 up up(s)
NULL0 unassigned up up(s)
R6的IP地址
[R6]display ip interface brief
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 3
The number of interface that is DOWN in Physical is 2
The number of interface that is UP in Protocol is 3
The number of interface that is DOWN in Protocol is 2
Interface IP Address/Mask Physical Protocol
GigabitEthernet0/0/0 12.0.0.2/24 up up
GigabitEthernet0/0/1 unassigned down down
GigabitEthernet0/0/2 unassigned down down
LoopBack0 1.1.1.1/24 up up(s)
NULL0 unassigned up up(s)
电脑通过HDCP获得IP地址
相关配置
1.开启服务
[R3]dhcp enable
2.创建地址池塘
[R3]ip pool aaa --- 名字为aaa
3.分配的网段
[R3-ip-pool-aaa]network 192.168.1.96 msk 27
4.配置网关
[R3-ip-pool-aaa]gateway-list 192.168.1.97
5.配置DNS
[R3-ip-pool-aaa]dns-list 8.8.8.8 114.114.114.114
6.调用DHCP服务
[R3-GigabitEthernet0/0/2]dhcp select global
测试结果
选路配置
R1配置信息
[R1]display ip routing-table protocol static
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Public routing table : Static
Destinations : 7 Routes : 8 Configured Routes : 8
Static routing table status : <Active>
Destinations : 7 Routes : 8
Destination/Mask Proto Pre Cost Flags NextHop Interface
0.0.0.0/0 Static 60 0 RD 192.168.1.2 GigabitEthernet
0/0/0
Static 60 0 RD 192.168.1.6 GigabitEthernet
0/0/1
192.168.1.8/30 Static 60 0 RD 192.168.1.2 GigabitEthernet
0/0/0
192.168.1.12/30 Static 60 0 RD 192.168.1.6 GigabitEthernet
0/0/1
192.168.1.32/27 Static 60 0 D 0.0.0.0 NULL0
192.168.1.64/27 Static 60 0 RD 192.168.1.2 GigabitEthernet
0/0/0
192.168.1.96/27 Static 60 0 RD 192.168.1.6 GigabitEthernet
0/0/1
192.168.1.160/27 Static 60 0 RD 192.168.1.2 GigabitEthernet
0/0/0
Static routing table status : <Inactive>
Destinations : 0 Routes : 0
R2配置信息
[R2]display ip routing-table protocol static
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Public routing table : Static
Destinations : 6 Routes : 7 Configured Routes : 7
Static routing table status : <Active>
Destinations : 6 Routes : 7
Destination/Mask Proto Pre Cost Flags NextHop Interface
0.0.0.0/0 Static 60 0 RD 192.168.1.1 GigabitEthernet
0/0/0
192.168.1.4/30 Static 60 0 RD 192.168.1.1 GigabitEthernet
0/0/0
192.168.1.32/27 Static 60 0 RD 192.168.1.1 GigabitEthernet
0/0/0
192.168.1.64/27 Static 60 0 D 0.0.0.0 NULL0
192.168.1.96/27 Static 60 0 RD 192.168.1.10 GigabitEthernet
0/0/1
Static 60 0 RD 192.168.1.1 GigabitEthernet
0/0/0
192.168.1.160/27 Static 60 0 RD 192.168.1.10 GigabitEthernet
0/0/1
Static routing table status : <Inactive>
Destinations : 0 Routes : 0
R3配置信息
[R3]display ip routing-table protocol static
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Public routing table : Static
Destinations : 5 Routes : 6 Configured Routes : 6
Static routing table status : <Active>
Destinations : 5 Routes : 6
Destination/Mask Proto Pre Cost Flags NextHop Interface
0.0.0.0/0 Static 60 0 RD 192.168.1.14 GigabitEthernet
0/0/1
192.168.1.0/30 Static 60 0 RD 192.168.1.5 GigabitEthernet
0/0/0
192.168.1.32/27 Static 60 0 RD 192.168.1.5 GigabitEthernet
0/0/0
192.168.1.64/27 Static 60 0 RD 192.168.1.14 GigabitEthernet
0/0/1
Static 60 0 RD 192.168.1.5 GigabitEthernet
0/0/0
192.168.1.160/27 Static 60 0 RD 192.168.1.14 GigabitEthernet
0/0/1
Static routing table status : <Inactive>
Destinations : 0 Routes : 0
R4配置信息
[R4]display ip routing-table protocol static
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Public routing table : Static
Destinations : 9 Routes : 11 Configured Routes : 11
Static routing table status : <Active>
Destinations : 9 Routes : 10
Destination/Mask Proto Pre Cost Flags NextHop Interface
0.0.0.0/0 Static 60 0 RD 192.168.1.18 GigabitEthernet
0/0/2
192.168.1.0/24 Static 60 0 D 0.0.0.0 NULL0
192.168.1.0/30 Static 60 0 RD 192.168.1.9 GigabitEthernet
0/0/0
192.168.1.4/30 Static 60 0 RD 192.168.1.13 GigabitEthernet
0/0/1
192.168.1.32/27 Static 60 0 RD 192.168.1.9 GigabitEthernet
0/0/0
Static 60 0 RD 192.168.1.13 GigabitEthernet
0/0/1
192.168.1.64/27 Static 60 0 RD 192.168.1.9 GigabitEthernet
0/0/0
192.168.1.96/27 Static 60 0 RD 192.168.1.13 GigabitEthernet
0/0/1
192.168.1.128/27 Static 60 0 D 0.0.0.0 NULL0
192.168.1.160/27 Static 60 0 RD 192.168.1.18 GigabitEthernet
0/0/2
Static routing table status : <Inactive>
Destinations : 1 Routes : 1
Destination/Mask Proto Pre Cost Flags NextHop Interface
0.0.0.0/0 Static 70 0 R 192.168.1.22 Ethernet4/0/0
R5配置信息
[R5]display ip routing-table protocol static
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Public routing table : Static
Destinations : 2 Routes : 3 Configured Routes : 3
Static routing table status : <Active>
Destinations : 2 Routes : 2
Destination/Mask Proto Pre Cost Flags NextHop Interface
0.0.0.0/0 Static 60 0 RD 12.0.0.2 GigabitEthernet
0/0/1
192.168.1.0/24 Static 60 0 RD 192.168.1.17 GigabitEthernet
0/0/0
Static routing table status : <Inactive>
Destinations : 1 Routes : 1
Destination/Mask Proto Pre Cost Flags NextHop Interface
192.168.1.0/24 Static 70 0 R 192.168.1.21 GigabitEthernet
0/0/2
私网地址访问公网地址
配置动态EZIB(边界路由器配置)
1.创建ACL列表
[R5]ACL 2000
[R5-acl-basic-2000]
2.写入规则
[R5-acl-basic-2000]rule permit source 192.168.1.0 0.0.0.255
3.写nat,匹配抓到的流量
[R5-GigabitEthernet0/0/1]nat outbound
测试结果
R6 telenetR5的公有IP地址时,实际登录到R1上
启动telnet
1.启动aaa
[R1]aaa
2.创建用户
[R1-aaa]local-user aaa privilege level 15 password cipher 123456
Info: Add a new user.
3.分配服务类型
[R1-aaa]local-user aaa service-type telnet
4.创建虚拟接口
[R1]user-interface vty 0 4
5.绑定需求
[R1-ui-vty0-4]authentication-mode aaa
配置映射
[R5]int g 0/0/1
[R5-GigabitEthernet0/0/1]nat server protocol tcp global current-interface 23 ins
ide 192.168.1.1
Warning:The port 23 is well-known port. If you continue it may cause function fa
ilure.
Are you sure to continue?[Y/N]:y
测试结果
<R6>telnet 12.0.0.1
Press CTRL_] to quit telnet mode
Trying 12.0.0.1 ...
Connected to 12.0.0.1 ...
Login authentication
Username:aaa
Password:
-----------------------------------------------------------------------------
User last login information:
-----------------------------------------------------------------------------
Access Type: Telnet
IP-Address : 192.168.1.2
Time : 2022-07-13 20:32:10-08:00
-----------------------------------------------------------------------------
<R1>q
Configuration console exit, please retry to log on
The connection was closed by the remote host