04 H3C综合实验

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

H3C综合实验
一、VLAN规划
[SW1] vlan 2
vlan 3
interface Ethernet0/4/2
port link-mode bridge
port access vlan 2
interface Ethernet0/4/3
port link-mode bridge
port access vlan 3
interface Ethernet0/4/23
port link-mode bridge
port link-type trunk
port trunk permit vlan 1 to 3
[SW2]vlan 2
vlan 3
vlan 10
interface Ethernet0/4/1
port link-mode bridge
port link-type trunk
port trunk permit vlan 1 to 3
interface Ethernet0/4/2
port link-mode bridge
port access vlan 2
interface Ethernet0/4/3
port link-mode bridge
port access vlan 3
二、配置SW和PC的IP 地址,实现不同VLAN间的通信。

[SW1] int vlan1
ip address 172.16.1.201 255.255.255.0
[SW2] int vlan1
ip address 172.16.1.251 255.255.255.0
int vlan2
ip address 172.16.2.251 255.255.255.0
int vlan3
ip address 172.16.3.251 255.255.255.0
int loop1
ip address 172.16.10.1 255.255.255.0
配置sw3、sw4、pc2和pc3的IP地址,做为vlan2和vlan3的主机,进行测试使用。

[SW3] vlan 2
interface Ethernet0/4/23
port access vlan 2
int vlan2
ip address 172.16.2.2 255.255.255.0
[SW4] vlan 3
interface Ethernet0/4/23
port access vlan 3
int vlan3
ip address 172.16.3.2 255.255.255.0
[PC2] vlan 2
interface Ethernet0/4/23
port access vlan 2
int vlan2
ip address 172.16.2.1 255.255.255.0
[PC3] vlan 3
interface Ethernet0/4/23
port access vlan 3
int vlan2
ip address 172.16.3.1 255.255.255.0
三、配置SW2的路由接口和默认路由。

[SW2] interface GigabitEthernet0/1/13
port link-mode route
ip address 172.16.11.1 255.255.255.0
interface GigabitEthernet0/1/14
port link-mode route
ip address 172.16.12.1 255.255.255.0
ip route-static 0.0.0.0 0.0.0.0 172.16.11.2
四、配置路由器IP地址。

[r1]int G0/1/0
ip address 172.16.11.2 255.255.255.0
int G0/1/1
ip address 123.1.1.1 255.255.255.248
[r2]int G0/1/1
ip address 123.1.1.6 255.255.255.248
int loop1
ip address 200.1.1.1 255.255.255.255
int loop2
ip address 202.1.1.1 255.255.255.255
[r3]int G0/1/0
ip address 172.16.12.2 255.255.255.0
interface Serial0/2/0
link-protocol ppp
ip address 192.168.1.1 255.255.255.0
[r4]int loop1
ip address 172.17.1.1 255.255.255.255
interface Serial0/2/0
link-protocol ppp
ip address 192.168.1.2 255.255.255.0
五、配置OSPF协议
在SW2、R1、R3和R4上分别启用OSPF协议,实现全网互通。

[SW2]router id 1.1.1.2
ospf 1
area 1
net 172.16.0.0 0.0.255.255
[r1]router id 1.1.1.1
[r1] ospf 1
area 1
network 172.16.11.2 0.0.0.0
[r3]router id 1.1.1.3
[r3] ospf 1
area 1
network 172.16.12.2 0.0.0.0
network 192.168.1.1 0.0.0.0
[H3C]router id 1.1.1.4
[r4] ospf 1
area 1
network 192.168.1.2 0.0.0.0
network 172.17.1.1 0.0.0.0
六、配置NAT转换。

[r1]ip route 0.0.0.0 0.0.0.0 123.1.1.6
1.定义内部需要转换的源地址(私有IP)。

[r1]acl number 2000
[r1-acl-basic-2000]rule permit source 172.16.1.0 0.0.0.255
[r1-acl-basic-2000]rule permit source 172.16.2.0 0.0.0.255
[r1-acl-basic-2000]rule permit source 172.16.3.0 0.0.0.255
[r1-acl-basic-2000]rule permit source 172.16.11.0 0.0.0.255
2. 定义地址池(公有IP ).
[r1]nat address-group 1 123.1.1.1 123.1.1.1
3. 动态转换。

[r1]int g0/1/1
[r1-GigabitEthernet0/1/1]nat outbound 2000 address-group 1
4. 静态端口映射
[r1]int g0/1/1
[r1-GigabitEthernet0/1/1]nat server protocol tcp global 123.1.1.2 23inside 172.16.10.1 23。

相关文档
最新文档