这次笔记主要以下面的拓扑为例,来练习相关的技术和命令
拓扑:
拓扑说明:1、R1为vlan2的根网桥和主备路由器,R2为vlan3的根网桥和主备路由器
2、vlan2 IP段:192.168.2.0 vlan3 IP 段:192.168.3.0
3、使用的技术有:STP、HSRP、OSPF、NAT等。
IP配置:
R1、 vlan2:192.168.2.100 vlan3:192.168.3.200 f0/0:20.0.0.2
R2、 vlan2:192.168.2.200 vlan3:192.168.3.100 f0/1:10.0.0.2
R5、 f0/0: 20.0.0.1 f0/1:10.0.0.1 s0/0:30.0.0.1
R6、s0/0:30.0.0.2
步骤:
第一步、在R1、R2、R3和R4上创建相关vlan,并配置相关IP地址。
命令简单,这步省略
第二步:设置Trunk
R1
interface FastEthernet1/14
switchport trunk native vlan 4
switchport mode trunk
interface FastEthernet1/15
switchport trunk native vlan 4
switchport mode trunk
R2、R3和R4相同配置
第三步:配置端口聚合
R1:
int range f 1/12 -13
channel-group 1 mode on
R2上命令相同
第四步:生成树配置
R1:
spanning-tree vlan 3 priority 16384
spanning-tree vlan 2 priority 8192
R2:
spanning-tree vlan 2 priority 16384
spanning-tree vlan 3 priority 8192
第五步:HSRP配置
R1:
interface Vlan2
ip address 192.168.2.100 255.255.255.0
standby 2 ip 192.168.2.254
standby 2 priority 200
standby 2 preempt
standby 2 track FastEthernet0/0 150
standby 2 track FastEthernet1/14 150
standby 2 track FastEthernet1/15 150
interface Vlan3
ip address 192.168.3.200 255.255.255.0
standby 3 ip 192.168.3.254
standby 3 preempt
R2:
interface Vlan2
ip address 192.168.2.200 255.255.255.0
standby 2 ip 192.168.2.254
standby 2 preempt
interface Vlan3
ip address 192.168.3.100 255.255.255.0
standby 3 ip 192.168.3.254
standby 3 priority 200
standby 3 preempt
standby 3 track FastEthernet0/1 150
standby 3 track FastEthernet1/15 150
standby 3 track FastEthernet1/14 150
第六步:OSPF配置
R1:
router ospf 100
log-adjacency-changes
network 20.0.0.0 0.0.0.255 area 0
network 192.168.2.0 0.0.0.255 area 0
network 192.168.3.0 0.0.0.255 area 0
R2:
router ospf 100
log-adjacency-changes
network 10.0.0.0 0.0.0.255 area 0
network 192.168.2.0 0.0.0.255 area 0
network 192.168.3.0 0.0.0.255 area 0
R5:
router ospf 100
log-adjacency-changes
network 10.0.0.0 0.0.0.255 area 0
network 20.0.0.0 0.0.0.255 area 0
network 192.168.5.0 0.0.0.255 area 0
default-information originate #########这条命令是重分布默认路由
第七步:
R5和R6互指默认路由
第八步:NAT配置
R5:
access list 100 permit ip any any
ip nat insid souce list 100 interface s0/0 overload
int s 0/0
ip nat outside
int r f 0/0 -1
ip nat inside
验证省略……
好了,到此为止整个实验已经完成了。