1在sw1和sw2上做以太通道和VTP,创建VLAN5,VLAN10并做热备份路由(HSRP)
2在R1和R2之间做ppp(chap认证)
3在R1和R2上做ospf多区
4因为在R3上是rip,所以要在R2上做路由重分发
好,下面是实验步骤:
一,首先还是先把所以接口配好
R1:
Router(config)#interface fastEthernet 0/0
Router(config-if)#ip add 192.168.1.2 255.255.255.0
Router(config-if)#no shutdown
Router(config-if)#exit
Router(config)#interface fastEthernet 1/0
Router(config-if)#ip add 192.168.2.2 255.255.255.0
Router(config-if)#no shutdown
Router(config-if)#exit
Router(config)#interface serial 2/0
Router(config-if)#ip add 192.168.3.1 255.255.255.0
Router(config-if)#no shutdown
R2:
Router(config)#interface serial 0/0
Router(config-if)#ip add 192.168.3.2 255.255.255.0
Router(config-if)#no shutdown
Router(config-if)#exit
Router(config)#interface fastEthernet 1/0
Router(config-if)#ip add 192.168.4.1 255.255.255.0
Router(config-if)#no shutdown
Router(config-if)#exit
R3:
Router(config)#interface fastEthernet 0/0
Router(config-if)#ip add 192.168.4.2 255.255.255.0
Router(config-if)#no shutdown
Router(config-if)#exit
Router(config)#interface fastEthernet 1/0
Router(config-if)#ip add 192.168.6.1 255.255.255.0
Router(config-if)#no shutdown
Router(config-if)#exit
二,将SW1,SW2上的各个配置做好(我没改名字)
1,先绑以太通道并trunk:
SW1和SW2上的配置一样
Router(config)#interface range fastEthernet 0/14 - 15
Router(config-if-range)#channel-group 1 mode on
Router(config-if-range)#switchport mode trunk
2VTP:
SW1:
Router#vlan database
Router(vlan)#vtp domain ts166
Router(vlan)#vtp server
Router(vlan)#vtp pruning
Router(vlan)#vtp v2-mode
Router(vlan)#vlan 5
VLAN 5 added:
Name: VLAN0005
Router(vlan)#vlan 10
VLAN 10 added:
Name: VLAN0010
SW2:
Router#vlan database
Router(vlan)#vtp domain ts166
Router(vlan)#vtp client
2,将vlan5和vlan10划入端口并启用三层路由
SW1:
sw1(config)#int f0/5
sw1(config-if)#switchport access vlan 5
sw1(config-if)#exit
sw1(config)#int f0/10
sw1(config-if)#switchport access vlan 10
sw1(config-if)#exit
sw1(config)#int vlan 5
sw1(config-if)#ip add 192.168.5.253 255.255.255.0
sw1(config-if)#int vlan 10
sw1(config-if)#ip add 192.168.10.254 255.255.255.0
sw1(config-if)#exit
sw1(config)#ip routing
sw1(config-if)#int f0/0
sw1(config-if)#no switchport
sw1(config-if)#ip add 192.168.1.1 255.255.255.0
sw1(config-if)#no shutdown
SW2:
sw2(config)#int f0/5
sw2(config-if)#switchport access vlan 5
sw2(config-if)#exit
sw2(config)#int f0/10
sw2(config-if)#switchport ac vlan 10
sw2(config-if)#exit
sw2(config)#int vlan 5
sw2(config-if)#ip add 192.168.5.254 255.255.255.0
sw2(config-if)#int vlan 10
sw2(config-if)#ip add 192.168.10.253 255.255.255.0
sw2(config-if)#exit
sw2(config)#ip routing
sw2(config)#int f0/0
sw2(config-if)#no switchport
sw2(config-if)#no shutdown
3,HSRP
SW1:
sw1(config)#int vlan 5
sw1(config-if)#standby 5 ip 192.168.5.1
sw1(config-if)#standby 5 priority 200
sw1(config-if)#standby 5 preempt
sw1(config-if)#standby 5 track fastEthernet 0/0 100
sw1(config-if)#exit
sw1(config)#int vlan 10
sw1(config-if)#standby 10 ip 192.168.10.1
sw1(config-if)#standby 10 priority 150
sw1(config-if)#standby 10 preempt
sw1(config-if)#standby 10 track fastEthernet 0/0 100
sw1(config-if)#exit
SW2:
sw2(config)#int vlan 5
sw2(config-if)#standby 5 ip 192.168.5.1
sw2(config-if)#standby 5 priority 150
sw2(config-if)#standby 5 preempt
sw2(config-if)#standby 5 track fastEthernet 0/0 100
sw2(config-if)#exit
sw2(config)#int vlan 10
sw2(config-if)#standby 10 ip 192.168.10.1
sw2(config-if)#standby 10 priority 200
sw2(config-if)#standby 10 preempt
sw2(config-if)#standby 10 track fastEthernet 0/0 100
三,PPP(chap认证)
R1:
Router(config)#username ts166 password 123
Router(config)#int serial 2/0
Router(config-if)#encapsulation ppp
Router(config-if)#ppp authentication chap
Router(config-if)#ppp chap hostname ts253
R2:
Router(config)#username ts253 password 123
Router(config)#int s0/0
Router(config-if)#encapsulation ppp
Router(config-if)#ppp chap hostname ts166
Router(config-if)#exit
四,OSPF多区
sw1:
sw1(config)#router ospf 100
sw1(config-router)#network 192.168.5.0 0.0.0.255 area 1
sw1(config-router)#network 192.168.10.0 0.0.0.255 area 1
sw1(config-router)#network 192.168.1.0 0.0.0.255 area 1
sw2:
sw2(config)#router ospf 100
sw2(config-router)#network 192.168.5.0 0.0.0.255 area 1
sw2(config-router)#network 192.168.10.0 0.0.0.255 area 1
sw2(config-router)#network 192.168.2.0 0.0.0.255 area 1
R1:
Router(config)#router ospf 100
Router(config-router)#network 192.168.1.0 0.0.0.255 area 1
Router(config-router)#network 192.168.2.0 0.0.0.255 area 1
Router(config-router)#network 192.168.3.0 0.0.0.255 area 0
R2:并做RIP重分发
Router(config)#router ospf 100
Router(config-router)#net 192.168.3.0 0.0.0.255 area 0
Router(config-router)#exit
Router(config)#router rip
Router(config-router)#net 192.168.4.0
Router(config-router)#version 2
Router(config-router)#exit
Router(config)#router ospf 100
Router(config-router)#redistribute rip metric 5 metric-type 2
Router(config-router)#exit
Router(config)#router rip
Router(config-router)#redistribute ospf 100 metric 4
Router(config-router)#exit
五,在R3上RIP
R3:
Router(config)#router rip
Router(config-router)#network 192.168.4.0
Router(config-router)#network 192.168.6.0
Router(config-router)#version 2
Router(config-router)#exit