华为综合实验(三)

华为综合实验(三)

拓扑图:
**华为综合实验(三)_第1张图片


实验环境:

  1. 配置单臂路由
  2. 配置ripv2、配置路由汇总
  3. 配置多区域ospf
  4. 配置重分发
  5. 将Telnet发布到外网桥接远程
  6. 全网互通**

**实验步骤:
一:给路由器配置IP地址

  1. 配置r1**
    [r1]interface GigabitEthernet0/0/1
    [r1-GigabitEthernet0/0/1]ip address 192.168.1.254 24
    [r1]interface GigabitEthernet0/0/0
    [r1-GigabitEthernet0/0/0]ip address 192.168.2.1 24
    查看:

华为综合实验(三)_第2张图片
2. 配置r2
[r2]interface GigabitEthernet 0/0/0
[r2-GigabitEthernet0/0/0]ip ad
[r2-GigabitEthernet0/0/0]ip address 192.168.2.2 24
[r2]interface loo1
[r2-LoopBack1]ip address 172.16.1.1 24
[r2]interface loo2
[r2-LoopBack2]ip address 176.16.2.2 24
[r2]interface loo3
[r2-LoopBack3]ip address 172.16.3.3 24
[r2]interface loo4
[r2-LoopBack4]ip address 172.16.4.4 24
查看:

华为综合实验(三)_第3张图片
3. 配置r3

[r3]interface GigabitEthernet0/0/0
[r3-GigabitEthernet0/0/0]ip address 192.168.3.2 24
[r3]int GigabitEthernet0/0/1
[r3-GigabitEthernet0/0/1]ip address 192.168.4.1 24
查看:
华为综合实验(三)_第4张图片
4. 配置r4

[r4]interface GigabitEthernet0/0/1
[r4-GigabitEthernet0/0/1]ip address 192.168.4.2 24
[r4]interface GigabitEthernet0/0/2
[r4-GigabitEthernet0/0/2]ip address 192.168.5.1 24
[r4]interface loo
[r4-LoopBack1]ip address 1.1.1.1 32
查看:
华为综合实验(三)_第5张图片
5. 配置r5
[r5]interface GigabitEthernet0/0/0
[r5-GigabitEthernet0/0/0]ip address 192.168.5.2 24
[r5-GigabitEthernet0/0/0]quit
[r5]interface loo1
[r5-LoopBack1]ip address 2.2.2.2 32
[r5]interface GigabitEthernet0/0/1
[r5-GigabitEthernet0/0/1]ip address 192.168.6.1 24
查看:
华为综合实验(三)_第6张图片
6. 配置r6
[r6]interface GigabitEthernet0/0/0
[r6-GigabitEthernet0/0/0]ip address 192.168.6.2 24
[r6]interface loo1
[r6-LoopBack1]ip address 3.3.3.3 3
查看:
华为综合实验(三)_第7张图片
[r6]int loo2
[r6-LoopBack2]ip ad
[r6-LoopBack2]ip address 192.168.7.1 24
二.创建VLAN
[sw1]vlan 10
[sw1-vlan10]quit
[sw1]vlan 20
[sw2]vlan 10
[sw2-vlan10]quit
[sw2]vlan 20
[sw2-vlan20]
在这里插入图片描述
三.在交换机上配置链路聚合、配置trunk并将接口加入VLAN
(1)加入聚合链路

[sw1]interface Eth-Trunk 1
[sw1]interface Ethernet0/0/3
[sw1-Ethernet0/0/3]eth-trunk 1
[sw1]interface Eth-Trunk 1
[sw1-Eth-Trunk1]quit
[sw1]interface Ethernet0/0/4
[sw1-Ethernet0/0/4]eth-trunk 1
[sw2]interface Eth-Trunk 1
[sw2-Eth-Trunk1]quit
[sw2]interface Ethernet0/0/3
[sw2-Ethernet0/0/3]eth-trunk 1
[sw2-Ethernet0/0/3]quit
[sw2]interface Eth-Trunk 1
[sw2-Eth-Trunk1]quit
[sw2]interface Ethernet0/0/4
[sw2-Ethernet0/0/4]eth-trunk 1
查看:display Eth-trunk
在这里插入图片描述
(2)配置trunk链路
[sw1]interface GigabitEthernet 0/0/1
[sw1-GigabitEthernet0/0/1]port link-type trunk
[sw1-GigabitEthernet0/0/1]port trunk allow-pass vlan all
[sw1]interface Eth-Trunk 1
[sw1-Eth-Trunk1]port link-type trunk
[sw1-Eth-Trunk1]port trunk allow-pass vlan all
[sw2]interface Eth-Trunk 1
[sw2-Eth-Trunk1]port link-type trunk
[sw2-Eth-Trunk1]port trunk allow-pass vlan all
(3)将接口加入VLAN
[sw1]interface Ethernet0/0/1
[sw1-Ethernet0/0/1]port link-type access
[sw1-Ethernet0/0/1]port default vlan 10
[sw1]interface Ethernet0/0/2
[sw1-Ethernet0/0/2]port link-type access
[sw1-Ethernet0/0/2]port default vlan 20
[sw2]interface Ethernet0/0/1
[sw2-Ethernet0/0/1]port link-type access
[sw2-Ethernet0/0/1]port default vlan 10
[sw2]interface Ethernet0/0/2
[sw2-Ethernet0/0/2]port link-type access
[sw2-Ethernet0/0/2]port default vlan 20
(4)配置子接口单臂路由
[r4]interface GigabitEthernet0/0/0.10
[r4-GigabitEthernet0/0/0.10]ip address 192.168.10.254 24
[r4-GigabitEthernet0/0/0.10]dot1q termination vid 10
[r4-GigabitEthernet0/0/0.10]arp broadcast enable
[r4]interface GigabitEthernet0/0/0.20
[r4-GigabitEthernet0/0/0.20]ip address 192.168.20.254 24
[r4-GigabitEthernet0/0/0.20]dot1q termination vid 20
[r4-GigabitEthernet0/0/0.20]arp broadcast enable
四.配置pc机的路由
华为综合实验(三)_第8张图片
华为综合实验(三)_第9张图片
华为综合实验(三)_第10张图片
华为综合实验(三)_第11张图片
五.配置ripv2、
[r2]rip 1
[r2-rip-1]vers
[r2-rip-1]version 2
[r2-rip-1]network 192.168.3.0
[r2-rip-1]network 172.16.0.0
[r3]rip 1
[r3-rip-1]vers
[r3-rip-1]version 2
[r3-rip-1]network 192.168.3.0
[r3-rip-1]network 192.168.4.0
[r4]rip 1
[r4-rip-1]version 2
[r4-rip-1]network 192.168.4.0
[r4-rip-1]network 192.168.10.0
[r4-rip-1]network 192.168.20.0
六.配置路由汇总
[r2]int GigabitEthernet 0/0/1
[r2-GigabitEthernet0/0/1]rip su
[r2-GigabitEthernet0/0/1]rip summary-address 172.16.0.0 255.255.0.0
七.配置rip的身份验证加密使用明文密码是pwd@123
[r2]int GigabitEthernet 0/0/1
[r2-GigabitEthernet0/0/1]rip authentication-mode simple pwd@123
[r3]interface GigabitEthernet0/0/0
[r3-GigabitEthernet0/0/0]rip authentication-mode simple pwd@123
[r3-GigabitEthernet0/0/0]quit
[r3]interface GigabitEthernet0/0/1
[r3-GigabitEthernet0/0/1]rip authentication-mode simple pwd@123
[r4]interface GigabitEthernet0/0/1
[r4-GigabitEthernet0/0/1]rip authentication-mode simple pwd@123
八.配置ospf多区域,身份验证。
(1)ospf宣告

[r4]ospf router-id 1.1.1.1
[r4-ospf-1]area 0
[r4-ospf-1-area-0.0.0.0]network 1.1.1.1 0.0.0.0
[r4-ospf-1-area-0.0.0.0]network 192.168.5.0 0.0.0.255
[r5]ospf router-id 2.2.2.2
[r5-ospf-1]area 0
[r5-ospf-1-area-0.0.0.0]network 192.168.5.0
[r5-ospf-1-area-0.0.0.0]network 2.2.2.2 0.0.0.0
[r5-ospf-1-area-0.0.0.1]network 192.168.6.0 0.0.0.255
[r6]ospf router-id 3.3.3.3
[r6-ospf-1]area 1
[r6-ospf-1-area-0.0.0.1]network 3.3.3.3 0.0.0.0
[r6-ospf-1-area-0.0.0.1]network 192.168.6.0 0.0.0.255
[r6-ospf-1-area-0.0.0.1]network 192.168.7.0 0.0.0.255
(2)身份验证
[r4]ospf router-id 1.1.1.1
[r4-ospf-1]area 0
[r4-ospf-1-area-0.0.0.0]authentication-modepwd@123
[r5]ospf router-id 2.2.2.2
[r5-ospf-1]area 1
[r5-ospf-1-area-0.0.0.1]authentication-mode pwd@123
[r6]ospf router-id 3.3.3.3
[r6-ospf-1]area 1
[r6-ospf-1-area-0.0.0.1]authentication-mode pwd@123
九.配置默认路由
[r1]ip route-static 0.0.0.0 0 GigabitEthernet 0/0/0 192.168.2.2
[r2]ip route-static 0.0.0.0 0 GigabitEthernet0/0/0 192.168.2.1
十.配置ospf的路由重分发
(1)将rip发布到ospf中

[r4]rip 1
[r4-rip-1]import-route ospf
(2)将ospf发布到rip中
[r4]ospf 1
[r4-ospf-1]import-route rip
(3)重分发默认路由
[r4]ospf 1
[r4-ospf-1]default-route-advertis
[r2]rip 1
[r2-rip-1]default-route originate cost 3
十一.开启Telne功能
[r6]user-interface vty 0 4
[r6-ui-vty0-4]authentication-mode password
[r6-ui-vty0-4]set authentication password simple pwd@123
[r6-ui-vty0-4]user privilege level 15
十二.配置nat服务器将内部192.168.2.10的23号端口映射到全局地址192.168.7.1的23号端口
[r2]interface GigabitEthernet 0/0/0
[r2-GigabitEthernet0/0/0]nat server protocol tcp global 192.168.2.10 23 inside 1
92.168.7.1 23
十三.桥接
华为综合实验(三)_第12张图片
十四.tenet到192.168.2.10
华为综合实验(三)_第13张图片
十五.实现全网互通
华为综合实验(三)_第14张图片
华为综合实验(三)_第15张图片
华为综合实验(三)_第16张图片
华为综合实验(三)_第17张图片
华为综合实验(三)_第18张图片

                                                                            by.weiwenbo

你可能感兴趣的:(单臂路由,rip,ospf,nat映射,路由重分发,桥接)