今天跟大家分享一个企业网三层交换的实例,实验拓扑图与实验要求如下:
首先我们启动模拟器根据实验要求搭建拓扑图,如下:
接下来我们根据实验要求进行配置:
R2(ISP):
interface Loopback0
ip address 2.2.2.2 255.255.255.0
interface FastEthernet0/0
ip address 12.1.1.2 255.255.255.0
R1(CORE):
interface FastEthernet0/0
ip address 12.1.1.1 255.255.255.0
ip nat outside
interface FastEthernet0/1
ip address 172.16.0.1 255.255.255.0
ip nat inside
ip summary-address eigrp 100 0.0.0.0 0.0.0.0 5
interface FastEthernet1/0
ip address 172.16.1.1 255.255.255.0
ip nat inside
ip summary-address eigrp 100 0.0.0.0 0.0.0.0 5
router eigrp 100
network 172.16.0.0
no auto-summary
ip nat inside source list 2 interface FastEthernet0/0 overload
ip classless
ip route 0.0.0.0 0.0.0.0 FastEthernet0/0
SW1:
ip dhcp pool v2
network 172.16.2.0 255.255.255.0
default-router 172.16.2.254
dns-server 8.8.8.8
ip dhcp pool v3
network 172.16.3.0 255.255.255.0
default-router 172.16.3.254
dns-server 8.8.8.8
ip routing 开启路由功能
spanning-tree mode pvst
spanning-tree portfast default
spanning-tree vlan 2 priority 24576
interface Port-channel 1
no switchport
ip address 172.16.4.1 255.255.255.0
interface FastEthernet0/2
no switchport
interface FastEthernet0/3
no switchport
interface FastEthernet0/4
no switchport
interface FastEthernet0/5
switchport access vlan 2
interface FastEthernet0/6
switchport access vlan 3
interface Vlan2
mac-address 000b.be65.0b01
ip address 172.16.2.1 255.255.255.0
standby 1 ip 172.16.2.254
standby 1 priority 110
standby 1 preempt
standby 1 track FastEthernet0/1
interface Vlan3
mac-address 000b.be65.0b02
ip address 172.16.3.1 255.255.255.0
standby 2 ip 172.16.3.254
standby 2 priority 90
standby 2 preempt
standby 2 track FastEthernet0/1
router eigrp 100
network 172.16.0.0
no auto-summary
SW2:
ip dhcp pool v2
network 172.16.2.0 255.255.255.0
default-router 172.16.2.254
dns-server 8.8.8.8
ip dhcp pool v3
network 172.16.3.0 255.255.255.0
default-router 172.16.3.254
dns-server 8.8.8.8
spanning-tree mode pvst
spanning-tree portfast default
spanning-tree vlan 3 priority 24576
spanning-tree vlan 2 priority 28672
interface FastEthernet0/1
no switchport
ip address 172.16.1.2 255.255.255.0
interface FastEthernet0/2
switchport trunk encapsulation dot1q
switchport mode trunk
interface FastEthernet0/3
switchport trunk encapsulation dot1q
switchport mode trunk
interface FastEthernet0/4
switchport trunk encapsulation dot1q
switchport mode trunk
interface FastEthernet0/5
switchport access vlan 2
switchport mode access
interface FastEthernet0/6
switchport access vlan 3
switchport mode access
interface Vlan2
mac-address 00e0.f96d.2901
ip address 172.16.2.1 255.255.255.0
standby 1 ip 172.16.2.254
standby 1 priority 90
standby 1 preempt
standby 1 track FastEthernet0/1
interface Vlan3
mac-address 00e0.f96d.2902
ip address 172.16.3.1 255.255.255.0
standby 2 ip 172.16.3.254
standby 2 priority 110
standby 2 preempt
standby 2 track FastEthernet0/1
router eigrp 100
network 172.16.0.0
no auto-summary
SW3:
interface FastEthernet0/1
switchport trunk encapsulation dot1q
switchport mode trunk
interface FastEthernet0/3
switchport access vlan 3
switchport mode access
interface FastEthernet0/4
switchport access vlan 2
switchport mode access
SW4:
interface FastEthernet0/1
switchport access vlan 2
switchport mode access
interface FastEthernet0/2
switchport access vlan 2
switchport mode access
interface FastEthernet0/3
switchport access vlan 2
switchport mode access
interface FastEthernet0/4
switchport access vlan 2
switchport mode access
SW5:
interface FastEthernet0/1
switchport access vlan 3
switchport mode access
interface FastEthernet0/2
switchport access vlan 3
switchport mode access
interface FastEthernet0/3
switchport access vlan 3
switchport mode access
interface FastEthernet0/4
switchport access vlan 3
switchport mode access
至此,该实验配置已经完成,有什么问题大家可以留言!!!