Easy ip 简单配置实验
实验topo:
配置前提须知:
- 配置nat的出口路由器必须使用AR
- 出口路由器上需要一条默认路由指向ISP
- 接口动态获取IP地址时,会自动获得一个默认路由指向ISP
- 接口动态获得IP地址也需要开启DHCP
实验配置:
- 配置接口:
[chukou]
dhcp enable --开启DHCP
interface GigabitEthernet0/0/0
ip address 192.168.1.1 255.255.255.0
interface GigabitEthernet0/0/1
ip address dhcp-alloc --接口动态获取ip地址
[isp]
interface Ethernet0/0/0
ip address 200.200.200.200 255.255.255.0
dhcp select interface
interface Ethernet0/0/1
ip address 200.1.1.1 255.255.255.0
- ISP上配置接口DHCP给出口路由器下放IP地址
DHCP enable
interface Ethernet0/0/0
dhcp select interface
- 配置ACL抓取流量:
acl number 2000 --配置基本acl即可
rule 5 permit source 192.168.1.0 0.0.0.255
- 在出口路由器上做NAT:
interface GigabitEthernet0/0/1
nat outbound 2000 --在出接口
实验结果测试
PC1 PING ISP:
PC1 PING ISP内的主机:
代码(全配置) 如图配置后直接粘贴
[chukou]
[V200R003C00]
#
sysname chukou
#
dhcp enable
#
acl number 2000
rule 5 permit source 192.168.1.0 0.0.0.255
#
interface GigabitEthernet0/0/0
ip address 192.168.1.1 255.255.255.0
#
interface GigabitEthernet0/0/1
nat outbound 2000
ip address dhcp-alloc
#
<isp>dis cu
#
sysname isp
#
dhcp enable
#
interface Ethernet0/0/0
ip address 200.200.200.200 255.255.255.0
dhcp select interface
#
interface Ethernet0/0/1
ip address 200.1.1.1 255.255.255.0
#